@relevanceai/sdk 1.2.0 → 1.7.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/dist-cjs/generated/VectorApi.js +99 -3
- package/dist-cjs/services/discovery/Dataset.js +4 -1
- package/dist-cjs/services/discovery/index.js +61 -48
- package/dist-es/generated/VectorApi.js +147 -3
- package/dist-es/services/discovery/Dataset.js +4 -1
- package/dist-es/services/discovery/index.js +81 -51
- package/dist-types/generated/VectorApi.d.ts +45 -9
- package/dist-types/generated/_VectorApiSchemaTypes.d.ts +579 -18
- package/dist-types/services/discovery/Dataset.d.ts +1 -0
- package/dist-types/services/discovery/index.d.ts +42 -9
- package/package.json +1 -1
- package/dist-cjs/generated/Discovery.js +0 -82
- package/dist-cjs/generated/Vector.js +0 -634
- package/dist-cjs/generated/_DiscoverySchemaTypes.js +0 -6
- package/dist-cjs/generated/_VectorSchemaTypes.js +0 -6
- package/dist-cjs/generated/clients.js +0 -82
- package/dist-es/generated/Discovery.js +0 -179
- package/dist-es/generated/Vector.js +0 -1007
- package/dist-es/generated/_DiscoverySchemaTypes.js +0 -5
- package/dist-es/generated/_VectorSchemaTypes.js +0 -5
- package/dist-es/generated/clients.js +0 -179
- package/dist-types/generated/Discovery.d.ts +0 -32
- package/dist-types/generated/Vector.d.ts +0 -239
- package/dist-types/generated/_DiscoverySchemaTypes.d.ts +0 -911
- package/dist-types/generated/_VectorSchemaTypes.d.ts +0 -5017
- package/dist-types/generated/clients.d.ts +0 -942
|
@@ -4,6 +4,7 @@ import { DeleteDocumentOutput, DeleteWhereOutput, GetDocumentOutput, SimpleSearc
|
|
|
4
4
|
import { _GenericMethodOptions } from "../../shared/BaseClient";
|
|
5
5
|
interface searchOptions {
|
|
6
6
|
debounce?: number;
|
|
7
|
+
rawPayload?: any;
|
|
7
8
|
}
|
|
8
9
|
export declare class Dataset {
|
|
9
10
|
client: DiscoveryClient;
|
|
@@ -4,8 +4,49 @@ import { operations, components } from '../../generated/_DiscoveryApiSchemaTypes
|
|
|
4
4
|
import { Dataset } from './Dataset';
|
|
5
5
|
declare type bodyType = operations['SimpleSearchPost']['requestBody']['content']['application/json'];
|
|
6
6
|
export declare function QueryBuilder(): _QueryBuilder;
|
|
7
|
-
export declare
|
|
7
|
+
export declare function FilterBuilder(): _FilterBuilder;
|
|
8
|
+
export declare class _FilterBuilder {
|
|
8
9
|
body: bodyType;
|
|
10
|
+
constructor();
|
|
11
|
+
buildFilters(): {
|
|
12
|
+
match?: {
|
|
13
|
+
key: string;
|
|
14
|
+
value: string | number | boolean | unknown[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
range?: {
|
|
17
|
+
key: string;
|
|
18
|
+
greaterThan?: unknown;
|
|
19
|
+
lessThan?: unknown;
|
|
20
|
+
} | undefined;
|
|
21
|
+
wildcard?: {
|
|
22
|
+
key: string;
|
|
23
|
+
value: string | string[];
|
|
24
|
+
} | undefined;
|
|
25
|
+
fieldExists?: {
|
|
26
|
+
key: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
selfreference?: {
|
|
29
|
+
a: string;
|
|
30
|
+
b: string;
|
|
31
|
+
operation: "<=" | ">=" | "<" | ">" | "==" | "!=";
|
|
32
|
+
} | undefined;
|
|
33
|
+
or?: (any | any[])[] | undefined;
|
|
34
|
+
not?: any | any[] | undefined;
|
|
35
|
+
chunk?: {
|
|
36
|
+
path: string;
|
|
37
|
+
filters: any[];
|
|
38
|
+
} | undefined;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
rawFilter(filter: components['schemas']['filterListItem']): this;
|
|
41
|
+
filter(type: string, key: string, value: string, ...options: any): this;
|
|
42
|
+
match(field: string, value: any): this;
|
|
43
|
+
wildcard(field: string, value: any): this;
|
|
44
|
+
selfreference(fielda: string, fieldb: string, operation: "<=" | ">=" | "<" | ">" | "==" | "!="): this;
|
|
45
|
+
range(field: string, options: Omit<components['schemas']['filterListItem']['range'], 'key'>): this;
|
|
46
|
+
or(filters: _FilterBuilder[]): this;
|
|
47
|
+
not(filter: _FilterBuilder): this;
|
|
48
|
+
}
|
|
49
|
+
export declare class _QueryBuilder extends _FilterBuilder {
|
|
9
50
|
defaultQueryValue?: string;
|
|
10
51
|
shouldPerformTextQuery: boolean;
|
|
11
52
|
constructor();
|
|
@@ -308,17 +349,9 @@ export declare class _QueryBuilder {
|
|
|
308
349
|
minimumRelevance(value: bodyType['minimumRelevance']): this;
|
|
309
350
|
page(value: bodyType['page']): this;
|
|
310
351
|
pageSize(value: bodyType['pageSize']): this;
|
|
311
|
-
rawFilter(filter: components['schemas']['filterListItem']): this;
|
|
312
352
|
includeFields(fields: bodyType['includeFields']): void;
|
|
313
353
|
excludeFields(fields: bodyType['excludeFields']): void;
|
|
314
354
|
includeVectors(whetherToInclude: bodyType['includeVectors']): void;
|
|
315
|
-
filter(type: string, key: string, value: string, ...options: any): this;
|
|
316
|
-
match(field: string, value: any): this;
|
|
317
|
-
wildcard(field: string, value: any): this;
|
|
318
|
-
selfreference(fielda: string, fieldb: string, operation: "<=" | ">=" | "<" | ">" | "==" | "!="): this;
|
|
319
|
-
range(field: string, options: Omit<components['schemas']['filterListItem']['range'], 'key'>): this;
|
|
320
|
-
or(filters: _QueryBuilder[]): this;
|
|
321
|
-
not(filter: _QueryBuilder): this;
|
|
322
355
|
aggregate(field: string, options?: {
|
|
323
356
|
options?: any;
|
|
324
357
|
aggregates?: _QueryBuilder;
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiscoveryClient = void 0;
|
|
4
|
-
const BaseClient_1 = require("../shared/BaseClient");
|
|
5
|
-
class DiscoveryClient extends BaseClient_1._GenericClient {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super({ ...config, service_name: 'Discovery' });
|
|
8
|
-
}
|
|
9
|
-
async Insert(input, options) {
|
|
10
|
-
return this.SendRequest({
|
|
11
|
-
input,
|
|
12
|
-
method: 'post',
|
|
13
|
-
path: '/datasets/{dataset_id}/documents/insert',
|
|
14
|
-
options
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
async BulkInsert(input, options) {
|
|
18
|
-
return this.SendRequest({
|
|
19
|
-
input,
|
|
20
|
-
method: 'post',
|
|
21
|
-
path: '/datasets/{dataset_id}/documents/bulk_insert',
|
|
22
|
-
options
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
async BlobAccessURLs(input, options) {
|
|
26
|
-
return this.SendRequest({
|
|
27
|
-
input,
|
|
28
|
-
method: 'post',
|
|
29
|
-
path: '/datasets/{dataset_id}/blob_access_urls',
|
|
30
|
-
options
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
async ParseBlob(input, options) {
|
|
34
|
-
return this.SendRequest({
|
|
35
|
-
input,
|
|
36
|
-
method: 'post',
|
|
37
|
-
path: '/datasets/{dataset_id}/parse_blob',
|
|
38
|
-
options
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
async Update(input, options) {
|
|
42
|
-
return this.SendRequest({
|
|
43
|
-
input,
|
|
44
|
-
method: 'post',
|
|
45
|
-
path: '/datasets/{dataset_id}/documents/update',
|
|
46
|
-
options
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
async BulkUpdate(input, options) {
|
|
50
|
-
return this.SendRequest({
|
|
51
|
-
input,
|
|
52
|
-
method: 'post',
|
|
53
|
-
path: '/datasets/{dataset_id}/documents/bulk_update',
|
|
54
|
-
options
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
async UpdateWhere(input, options) {
|
|
58
|
-
return this.SendRequest({
|
|
59
|
-
input,
|
|
60
|
-
method: 'post',
|
|
61
|
-
path: '/datasets/{dataset_id}/documents/update_where',
|
|
62
|
-
options
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
async SimpleSearchPost(input, options) {
|
|
66
|
-
return this.SendRequest({
|
|
67
|
-
input,
|
|
68
|
-
method: 'post',
|
|
69
|
-
path: '/datasets/{dataset_id}/simple_search',
|
|
70
|
-
options
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
async SimpleSearchGet(input, options) {
|
|
74
|
-
return this.SendRequest({
|
|
75
|
-
input,
|
|
76
|
-
method: 'get',
|
|
77
|
-
path: '/datasets/{dataset_id}/simple_search',
|
|
78
|
-
options
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.DiscoveryClient = DiscoveryClient;
|