@relevanceai/sdk 1.0.0 → 1.5.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.
@@ -510,6 +510,42 @@ var VectorApiClient = /** @class */ (function (_super) {
510
510
  });
511
511
  });
512
512
  };
513
+ VectorApiClient.prototype.encodebymodelapidatasetsdatasetidvectorizepost = function (input, options) {
514
+ return __awaiter(this, void 0, void 0, function () {
515
+ return __generator(this, function (_a) {
516
+ return [2 /*return*/, this.SendRequest({
517
+ input: input,
518
+ method: 'post',
519
+ path: '/datasets/{dataset_id}/vectorize',
520
+ options: options
521
+ })];
522
+ });
523
+ });
524
+ };
525
+ VectorApiClient.prototype.taskstatusbymodelapidatasetsdatasetidtaskstatusget = function (input, options) {
526
+ return __awaiter(this, void 0, void 0, function () {
527
+ return __generator(this, function (_a) {
528
+ return [2 /*return*/, this.SendRequest({
529
+ input: input,
530
+ method: 'get',
531
+ path: '/datasets/{dataset_id}/task_status',
532
+ options: options
533
+ })];
534
+ });
535
+ });
536
+ };
537
+ VectorApiClient.prototype.listtasksapidatasetsdatasetidtasksget = function (input, options) {
538
+ return __awaiter(this, void 0, void 0, function () {
539
+ return __generator(this, function (_a) {
540
+ return [2 /*return*/, this.SendRequest({
541
+ input: input,
542
+ method: 'get',
543
+ path: '/datasets/{dataset_id}/tasks',
544
+ options: options
545
+ })];
546
+ });
547
+ });
548
+ };
513
549
  VectorApiClient.prototype.vectorsearchapiservicessearchvectorpost = function (input, options) {
514
550
  return __awaiter(this, void 0, void 0, function () {
515
551
  return __generator(this, function (_a) {
@@ -666,6 +702,18 @@ var VectorApiClient = /** @class */ (function (_super) {
666
702
  });
667
703
  });
668
704
  };
705
+ VectorApiClient.prototype.clustercentroidsapiv2servicesclustercentroidslistpost = function (input, options) {
706
+ return __awaiter(this, void 0, void 0, function () {
707
+ return __generator(this, function (_a) {
708
+ return [2 /*return*/, this.SendRequest({
709
+ input: input,
710
+ method: 'post',
711
+ path: '/services/cluster/centroids/list',
712
+ options: options
713
+ })];
714
+ });
715
+ });
716
+ };
669
717
  VectorApiClient.prototype.clustercentroidsgetapiservicesclustercentroidsgetget = function (input, options) {
670
718
  return __awaiter(this, void 0, void 0, function () {
671
719
  return __generator(this, function (_a) {
@@ -678,7 +726,19 @@ var VectorApiClient = /** @class */ (function (_super) {
678
726
  });
679
727
  });
680
728
  };
681
- VectorApiClient.prototype.insertclustercentroidsapiservicesclustercentroidsinsertpost = function (input, options) {
729
+ VectorApiClient.prototype.clustercentroidsgetapiservicesclustercentroidsgetpost = function (input, options) {
730
+ return __awaiter(this, void 0, void 0, function () {
731
+ return __generator(this, function (_a) {
732
+ return [2 /*return*/, this.SendRequest({
733
+ input: input,
734
+ method: 'post',
735
+ path: '/services/cluster/centroids/get',
736
+ options: options
737
+ })];
738
+ });
739
+ });
740
+ };
741
+ VectorApiClient.prototype.insertclustercentroids2apiservicesclustercentroidsinsertpost = function (input, options) {
682
742
  return __awaiter(this, void 0, void 0, function () {
683
743
  return __generator(this, function (_a) {
684
744
  return [2 /*return*/, this.SendRequest({
@@ -690,6 +750,54 @@ var VectorApiClient = /** @class */ (function (_super) {
690
750
  });
691
751
  });
692
752
  };
753
+ VectorApiClient.prototype.updatecentroidsapiv2servicesclustercentroidsupdatepost = function (input, options) {
754
+ return __awaiter(this, void 0, void 0, function () {
755
+ return __generator(this, function (_a) {
756
+ return [2 /*return*/, this.SendRequest({
757
+ input: input,
758
+ method: 'post',
759
+ path: '/services/cluster/centroids/update',
760
+ options: options
761
+ })];
762
+ });
763
+ });
764
+ };
765
+ VectorApiClient.prototype.deletecentroidsapiservicesclustercentroidscentroididdeleteget = function (input, options) {
766
+ return __awaiter(this, void 0, void 0, function () {
767
+ return __generator(this, function (_a) {
768
+ return [2 /*return*/, this.SendRequest({
769
+ input: input,
770
+ method: 'get',
771
+ path: '/services/cluster/centroids/{centroid_id}/delete',
772
+ options: options
773
+ })];
774
+ });
775
+ });
776
+ };
777
+ VectorApiClient.prototype.deletecentroidsapiservicesclustercentroidscentroididdeletepost = function (input, options) {
778
+ return __awaiter(this, void 0, void 0, function () {
779
+ return __generator(this, function (_a) {
780
+ return [2 /*return*/, this.SendRequest({
781
+ input: input,
782
+ method: 'post',
783
+ path: '/services/cluster/centroids/{centroid_id}/delete',
784
+ options: options
785
+ })];
786
+ });
787
+ });
788
+ };
789
+ VectorApiClient.prototype.clustercentroidsdeleteapiservicesclustercentroidsdeletepost = function (input, options) {
790
+ return __awaiter(this, void 0, void 0, function () {
791
+ return __generator(this, function (_a) {
792
+ return [2 /*return*/, this.SendRequest({
793
+ input: input,
794
+ method: 'post',
795
+ path: '/services/cluster/centroids/delete',
796
+ options: options
797
+ })];
798
+ });
799
+ });
800
+ };
693
801
  VectorApiClient.prototype.clustercentroidsgetapiservicesclustercentroidsdocumentspost = function (input, options) {
694
802
  return __awaiter(this, void 0, void 0, function () {
695
803
  return __generator(this, function (_a) {
@@ -702,7 +810,55 @@ var VectorApiClient = /** @class */ (function (_super) {
702
810
  });
703
811
  });
704
812
  };
705
- VectorApiClient.prototype.clusteraggregateapiservicesclusteraggregatepost = function (input, options) {
813
+ VectorApiClient.prototype.centroidsmetadatagetapiservicesclustercentroidsmetadataget = function (input, options) {
814
+ return __awaiter(this, void 0, void 0, function () {
815
+ return __generator(this, function (_a) {
816
+ return [2 /*return*/, this.SendRequest({
817
+ input: input,
818
+ method: 'get',
819
+ path: '/services/cluster/centroids/metadata',
820
+ options: options
821
+ })];
822
+ });
823
+ });
824
+ };
825
+ VectorApiClient.prototype.centroidsmetadatapostapiv2servicesclustercentroidsmetadatapost = function (input, options) {
826
+ return __awaiter(this, void 0, void 0, function () {
827
+ return __generator(this, function (_a) {
828
+ return [2 /*return*/, this.SendRequest({
829
+ input: input,
830
+ method: 'post',
831
+ path: '/services/cluster/centroids/metadata',
832
+ options: options
833
+ })];
834
+ });
835
+ });
836
+ };
837
+ VectorApiClient.prototype.centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpost = function (input, options) {
838
+ return __awaiter(this, void 0, void 0, function () {
839
+ return __generator(this, function (_a) {
840
+ return [2 /*return*/, this.SendRequest({
841
+ input: input,
842
+ method: 'post',
843
+ path: '/services/cluster/centroids/list_closest_to_center',
844
+ options: options
845
+ })];
846
+ });
847
+ });
848
+ };
849
+ VectorApiClient.prototype.centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpost = function (input, options) {
850
+ return __awaiter(this, void 0, void 0, function () {
851
+ return __generator(this, function (_a) {
852
+ return [2 /*return*/, this.SendRequest({
853
+ input: input,
854
+ method: 'post',
855
+ path: '/services/cluster/centroids/list_furthest_from_center',
856
+ options: options
857
+ })];
858
+ });
859
+ });
860
+ };
861
+ VectorApiClient.prototype.clusteraggregateapiv2servicesclusteraggregatepost = function (input, options) {
706
862
  return __awaiter(this, void 0, void 0, function () {
707
863
  return __generator(this, function (_a) {
708
864
  return [2 /*return*/, this.SendRequest({
@@ -714,7 +870,7 @@ var VectorApiClient = /** @class */ (function (_super) {
714
870
  });
715
871
  });
716
872
  };
717
- VectorApiClient.prototype.clusterfacetsapiservicesclusterfacetsget = function (input, options) {
873
+ VectorApiClient.prototype.advancedclusterfacetsapiservicesclusterfacetsget = function (input, options) {
718
874
  return __awaiter(this, void 0, void 0, function () {
719
875
  return __generator(this, function (_a) {
720
876
  return [2 /*return*/, this.SendRequest({
@@ -726,6 +882,30 @@ var VectorApiClient = /** @class */ (function (_super) {
726
882
  });
727
883
  });
728
884
  };
885
+ VectorApiClient.prototype.clusterlistservicesclusterlistget = function (input, options) {
886
+ return __awaiter(this, void 0, void 0, function () {
887
+ return __generator(this, function (_a) {
888
+ return [2 /*return*/, this.SendRequest({
889
+ input: input,
890
+ method: 'get',
891
+ path: '/services/cluster/list',
892
+ options: options
893
+ })];
894
+ });
895
+ });
896
+ };
897
+ VectorApiClient.prototype.clusterlistmultiservicesclusterlistpost = function (input, options) {
898
+ return __awaiter(this, void 0, void 0, function () {
899
+ return __generator(this, function (_a) {
900
+ return [2 /*return*/, this.SendRequest({
901
+ input: input,
902
+ method: 'post',
903
+ path: '/services/cluster/list',
904
+ options: options
905
+ })];
906
+ });
907
+ });
908
+ };
729
909
  VectorApiClient.prototype.tagapiservicestaggertagpost = function (input, options) {
730
910
  return __awaiter(this, void 0, void 0, function () {
731
911
  return __generator(this, function (_a) {
@@ -105,8 +105,11 @@ var Dataset = /** @class */ (function () {
105
105
  if (arg instanceof _QueryBuilder) {
106
106
  payload = __assign(__assign({}, payload), arg.build());
107
107
  }
108
- else
108
+ else {
109
109
  options = arg;
110
+ if (options.rawPayload)
111
+ payload = __assign(__assign({}, payload), options.rawPayload);
112
+ }
110
113
  }
111
114
  }
112
115
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -196,6 +199,7 @@ var Dataset = /** @class */ (function () {
196
199
  return [3 /*break*/, 7];
197
200
  case 5:
198
201
  e_2 = _b.sent();
202
+ console.error("Bulk operation failed with error, retrying - " + e_2);
199
203
  return [3 /*break*/, 6];
200
204
  case 6:
201
205
  retrysSoFar++;
@@ -249,7 +253,7 @@ var Dataset = /** @class */ (function () {
249
253
  return __awaiter(this, void 0, void 0, function () {
250
254
  return __generator(this, function (_a) {
251
255
  switch (_a.label) {
252
- case 0: return [4 /*yield*/, this.client.apiClient.UpdateWhere({ filters: filters.body.filters, updates: partialUpdates })];
256
+ case 0: return [4 /*yield*/, this.client.apiClient.UpdateWhere({ filters: filters.build().filters, updates: partialUpdates })];
253
257
  case 1: return [2 /*return*/, (_a.sent()).body];
254
258
  }
255
259
  });
@@ -283,7 +287,7 @@ var Dataset = /** @class */ (function () {
283
287
  switch (_b.label) {
284
288
  case 0:
285
289
  filters = QueryBuilder().match('_id', documentIds);
286
- return [4 /*yield*/, this.client.apiClient.DeleteWhere({ filters: (_a = filters.body.filters) !== null && _a !== void 0 ? _a : [] })];
290
+ return [4 /*yield*/, this.client.apiClient.DeleteWhere({ filters: (_a = filters.build().filters) !== null && _a !== void 0 ? _a : [] })];
287
291
  case 1: return [2 /*return*/, (_b.sent()).body];
288
292
  }
289
293
  });
@@ -294,7 +298,7 @@ var Dataset = /** @class */ (function () {
294
298
  return __awaiter(this, void 0, void 0, function () {
295
299
  return __generator(this, function (_b) {
296
300
  switch (_b.label) {
297
- case 0: return [4 /*yield*/, this.client.apiClient.DeleteWhere({ filters: (_a = filters.body.filters) !== null && _a !== void 0 ? _a : [] })];
301
+ case 0: return [4 /*yield*/, this.client.apiClient.DeleteWhere({ filters: (_a = filters.build().filters) !== null && _a !== void 0 ? _a : [] })];
298
302
  case 1: return [2 /*return*/, (_b.sent()).body];
299
303
  }
300
304
  });
@@ -1,3 +1,18 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
1
16
  var __assign = (this && this.__assign) || function () {
2
17
  __assign = Object.assign || function(t) {
3
18
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -25,27 +40,122 @@ import { Dataset } from './Dataset';
25
40
  export function QueryBuilder() {
26
41
  return new _QueryBuilder();
27
42
  }
28
- var _QueryBuilder = /** @class */ (function () {
29
- function _QueryBuilder() {
43
+ export function FilterBuilder() {
44
+ return new _FilterBuilder();
45
+ }
46
+ var _FilterBuilder = /** @class */ (function () {
47
+ function _FilterBuilder() {
30
48
  this.body = { filters: [], fieldsToAggregate: [], fieldsToAggregateStats: [] };
31
49
  }
50
+ _FilterBuilder.prototype.buildFilters = function () {
51
+ return this.body.filters;
52
+ };
53
+ _FilterBuilder.prototype.rawFilter = function (filter) {
54
+ var _a;
55
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push(filter);
56
+ return this;
57
+ };
58
+ _FilterBuilder.prototype.filter = function (type, key, value) {
59
+ var _a;
60
+ var _b;
61
+ var options = [];
62
+ for (var _i = 3; _i < arguments.length; _i++) {
63
+ options[_i - 3] = arguments[_i];
64
+ }
65
+ (_b = this.body.filters) === null || _b === void 0 ? void 0 : _b.push((_a = {},
66
+ _a[type] = __assign({ key: key, value: value }, options),
67
+ _a));
68
+ return this;
69
+ };
70
+ _FilterBuilder.prototype.match = function (field, value) {
71
+ var _a;
72
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ match: { key: field, value: value } });
73
+ return this;
74
+ };
75
+ _FilterBuilder.prototype.wildcard = function (field, value) {
76
+ var _a;
77
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ wildcard: { key: field, value: value } });
78
+ return this;
79
+ };
80
+ _FilterBuilder.prototype.selfreference = function (fielda, fieldb, operation) {
81
+ var _a;
82
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ selfreference: { a: fielda, b: fieldb, operation: operation } });
83
+ return this;
84
+ };
85
+ _FilterBuilder.prototype.range = function (field, options) {
86
+ var _a;
87
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ range: __assign({ key: field }, options) });
88
+ return this;
89
+ };
90
+ _FilterBuilder.prototype.or = function (filters) {
91
+ var _a;
92
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ or: filters.map(function (f) { var _a; return (_a = f.body.filters) !== null && _a !== void 0 ? _a : []; }) });
93
+ return this;
94
+ };
95
+ _FilterBuilder.prototype.not = function (filter) {
96
+ var _a, _b, _c;
97
+ (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ not: (_c = (_b = filter.body) === null || _b === void 0 ? void 0 : _b.filters) !== null && _c !== void 0 ? _c : [] });
98
+ return this;
99
+ };
100
+ return _FilterBuilder;
101
+ }());
102
+ export { _FilterBuilder };
103
+ var _QueryBuilder = /** @class */ (function (_super) {
104
+ __extends(_QueryBuilder, _super);
105
+ function _QueryBuilder() {
106
+ var _this = _super.call(this) || this;
107
+ _this.shouldPerformTextQuery = false;
108
+ return _this;
109
+ }
32
110
  _QueryBuilder.prototype.build = function () {
111
+ if (!this.shouldPerformTextQuery)
112
+ return this.body;
113
+ if (!this.defaultQueryValue)
114
+ throw new Error("Please set the search query by calling .query('my search query') before performing a text search.");
115
+ this.body.query = this.defaultQueryValue;
33
116
  return this.body;
34
117
  };
35
- _QueryBuilder.prototype.text = function (query) {
118
+ _QueryBuilder.prototype.query = function (query, fieldsToSearch) {
119
+ this.defaultQueryValue = query;
120
+ if (fieldsToSearch)
121
+ this.body.fieldsToSearch = fieldsToSearch;
122
+ return this;
123
+ };
124
+ _QueryBuilder.prototype.queryConfig = function (weight, options) {
125
+ this.body.queryConfig = __assign({ weight: weight }, (options !== null && options !== void 0 ? options : {}));
126
+ return this;
127
+ };
128
+ _QueryBuilder.prototype.text = function (field, weight) {
129
+ this.shouldPerformTextQuery = true;
130
+ if (!field)
131
+ return this; // support searching all fields
132
+ if (!this.body.fieldsToSearch)
133
+ this.body.fieldsToSearch = [];
134
+ if (!weight)
135
+ this.body.fieldsToSearch.push(field);
136
+ else
137
+ this.body.fieldsToSearch.push({ key: field, weight: weight });
138
+ return this;
139
+ };
140
+ _QueryBuilder.prototype.vector = function (field) {
36
141
  var e_1, _a;
37
142
  var args = [];
38
143
  for (var _i = 1; _i < arguments.length; _i++) {
39
144
  args[_i - 1] = arguments[_i];
40
145
  }
41
- this.body.query = query;
146
+ if (!Array.isArray(this.body.vectorSearchQuery))
147
+ this.body.vectorSearchQuery = [];
148
+ var payload = { field: field };
149
+ var inferredModelMatch = field.match(/_(.*)_.*vector_/); // title_text@1-0_vector_ -> text@1-0
150
+ if (inferredModelMatch && inferredModelMatch[1])
151
+ payload.model = inferredModelMatch[1]; // this can be overridden
42
152
  try {
43
153
  for (var args_1 = __values(args), args_1_1 = args_1.next(); !args_1_1.done; args_1_1 = args_1.next()) {
44
154
  var arg = args_1_1.value;
45
- if (Array.isArray(arg))
46
- this.body.fieldsToSearch = arg;
155
+ if (typeof arg === 'number')
156
+ payload.weight = arg; // weight
47
157
  else
48
- this.body.queryConfig = arg;
158
+ payload = __assign(__assign({}, payload), arg); // options
49
159
  }
50
160
  }
51
161
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -55,36 +165,6 @@ var _QueryBuilder = /** @class */ (function () {
55
165
  }
56
166
  finally { if (e_1) throw e_1.error; }
57
167
  }
58
- return this;
59
- };
60
- _QueryBuilder.prototype.vector = function (field, model) {
61
- var e_2, _a;
62
- var _b, _c;
63
- var args = [];
64
- for (var _i = 2; _i < arguments.length; _i++) {
65
- args[_i - 2] = arguments[_i];
66
- }
67
- if (!Array.isArray(this.body.vectorSearchQuery))
68
- this.body.vectorSearchQuery = [];
69
- if (!((_c = (_b = this === null || this === void 0 ? void 0 : this.body) === null || _b === void 0 ? void 0 : _b.vectorSearchQuery) === null || _c === void 0 ? void 0 : _c.length))
70
- this.body.vectorSearchQuery = [];
71
- var payload = { field: field, model: model };
72
- try {
73
- for (var args_2 = __values(args), args_2_1 = args_2.next(); !args_2_1.done; args_2_1 = args_2.next()) {
74
- var arg = args_2_1.value;
75
- if (typeof arg === 'number')
76
- payload.weight = arg;
77
- else
78
- payload = __assign(__assign({}, payload), arg);
79
- }
80
- }
81
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
82
- finally {
83
- try {
84
- if (args_2_1 && !args_2_1.done && (_a = args_2.return)) _a.call(args_2);
85
- }
86
- finally { if (e_2) throw e_2.error; }
87
- }
88
168
  this.body.vectorSearchQuery.push(payload);
89
169
  return this;
90
170
  };
@@ -118,52 +198,14 @@ var _QueryBuilder = /** @class */ (function () {
118
198
  this.body.pageSize = value;
119
199
  return this;
120
200
  };
121
- _QueryBuilder.prototype.rawFilter = function (filter) {
122
- var _a;
123
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push(filter);
124
- return this;
201
+ _QueryBuilder.prototype.includeFields = function (fields) {
202
+ this.body.includeFields = fields;
125
203
  };
126
- _QueryBuilder.prototype.filter = function (type, key, value) {
127
- var _a;
128
- var _b;
129
- var options = [];
130
- for (var _i = 3; _i < arguments.length; _i++) {
131
- options[_i - 3] = arguments[_i];
132
- }
133
- (_b = this.body.filters) === null || _b === void 0 ? void 0 : _b.push((_a = {},
134
- _a[type] = __assign({ key: key, value: value }, options),
135
- _a));
136
- return this;
137
- };
138
- _QueryBuilder.prototype.match = function (field, value) {
139
- var _a;
140
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ match: { key: field, value: value } });
141
- return this;
142
- };
143
- _QueryBuilder.prototype.wildcard = function (field, value) {
144
- var _a;
145
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ wildcard: { key: field, value: value } });
146
- return this;
147
- };
148
- _QueryBuilder.prototype.selfreference = function (fielda, fieldb, operation) {
149
- var _a;
150
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ selfreference: { a: fielda, b: fieldb, operation: operation } });
151
- return this;
204
+ _QueryBuilder.prototype.excludeFields = function (fields) {
205
+ this.body.excludeFields = fields;
152
206
  };
153
- _QueryBuilder.prototype.range = function (field, options) {
154
- var _a;
155
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ range: __assign({ key: field }, options) });
156
- return this;
157
- };
158
- _QueryBuilder.prototype.or = function (filters) {
159
- var _a;
160
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ or: filters.map(function (f) { var _a; return (_a = f.body.filters) !== null && _a !== void 0 ? _a : []; }) });
161
- return this;
162
- };
163
- _QueryBuilder.prototype.not = function (filter) {
164
- var _a, _b, _c;
165
- (_a = this.body.filters) === null || _a === void 0 ? void 0 : _a.push({ not: (_c = (_b = filter.body) === null || _b === void 0 ? void 0 : _b.filters) !== null && _c !== void 0 ? _c : [] });
166
- return this;
207
+ _QueryBuilder.prototype.includeVectors = function (whetherToInclude) {
208
+ this.body.includeVectors = whetherToInclude;
167
209
  };
168
210
  _QueryBuilder.prototype.aggregate = function (field, options) {
169
211
  var _a, _b, _c;
@@ -176,7 +218,7 @@ var _QueryBuilder = /** @class */ (function () {
176
218
  return this;
177
219
  };
178
220
  return _QueryBuilder;
179
- }());
221
+ }(_FilterBuilder));
180
222
  export { _QueryBuilder };
181
223
  var DiscoveryClient = /** @class */ (function () {
182
224
  function DiscoveryClient(config) {
@@ -74,6 +74,12 @@ export declare type listcollectionjobsapidatasetsdatasetidtaskslistgetInput = {}
74
74
  export declare type listcollectionjobsapidatasetsdatasetidtaskslistgetOutput = operations['list_collection_jobs_api_datasets__dataset_id__tasks_list_get']['responses']['200']['content']['application/json'];
75
75
  export declare type tasksstatusapidatasetsdatasetidtaskstaskidstatusgetInput = {};
76
76
  export declare type tasksstatusapidatasetsdatasetidtaskstaskidstatusgetOutput = operations['tasks_status_api_datasets__dataset_id__tasks__task_id__status_get']['responses']['200']['content']['application/json'];
77
+ export declare type encodebymodelapidatasetsdatasetidvectorizepostInput = operations['encode_by_model_api_datasets__dataset_id__vectorize_post']['requestBody']['content']['application/json'];
78
+ export declare type encodebymodelapidatasetsdatasetidvectorizepostOutput = operations['encode_by_model_api_datasets__dataset_id__vectorize_post']['responses']['200']['content']['application/json'];
79
+ export declare type taskstatusbymodelapidatasetsdatasetidtaskstatusgetInput = {};
80
+ export declare type taskstatusbymodelapidatasetsdatasetidtaskstatusgetOutput = operations['task_status_by_model_api_datasets__dataset_id__task_status_get']['responses']['200']['content']['application/json'];
81
+ export declare type listtasksapidatasetsdatasetidtasksgetInput = {};
82
+ export declare type listtasksapidatasetsdatasetidtasksgetOutput = operations['list_tasks_api_datasets__dataset_id__tasks_get']['responses']['200']['content']['application/json'];
77
83
  export declare type vectorsearchapiservicessearchvectorpostInput = operations['vector_search_api_services_search_vector_post']['requestBody']['content']['application/json'];
78
84
  export declare type vectorsearchapiservicessearchvectorpostOutput = operations['vector_search_api_services_search_vector_post']['responses']['200']['content']['application/json'];
79
85
  export declare type traditionalsearchapiservicessearchtraditionalpostInput = operations['traditional_search_api_services_search_traditional_post']['requestBody']['content']['application/json'];
@@ -100,16 +106,40 @@ export declare type aggregatev2apiservicesaggregateaggregatepostInput = operatio
100
106
  export declare type aggregatev2apiservicesaggregateaggregatepostOutput = operations['aggregate_v2_api_services_aggregate_aggregate_post']['responses']['200']['content']['application/json'];
101
107
  export declare type clustercentroidsapiservicesclustercentroidslistgetInput = {};
102
108
  export declare type clustercentroidsapiservicesclustercentroidslistgetOutput = operations['cluster_centroids_api_services_cluster_centroids_list_get']['responses']['200']['content']['application/json'];
109
+ export declare type clustercentroidsapiv2servicesclustercentroidslistpostInput = operations['cluster_centroids_api_v2_services_cluster_centroids_list_post']['requestBody']['content']['application/json'];
110
+ export declare type clustercentroidsapiv2servicesclustercentroidslistpostOutput = operations['cluster_centroids_api_v2_services_cluster_centroids_list_post']['responses']['200']['content']['application/json'];
103
111
  export declare type clustercentroidsgetapiservicesclustercentroidsgetgetInput = {};
104
112
  export declare type clustercentroidsgetapiservicesclustercentroidsgetgetOutput = operations['cluster_centroids_get_api_services_cluster_centroids_get_get']['responses']['200']['content']['application/json'];
105
- export declare type insertclustercentroidsapiservicesclustercentroidsinsertpostInput = operations['insert_cluster_centroids_api_services_cluster_centroids_insert_post']['requestBody']['content']['application/json'];
106
- export declare type insertclustercentroidsapiservicesclustercentroidsinsertpostOutput = operations['insert_cluster_centroids_api_services_cluster_centroids_insert_post']['responses']['200']['content']['application/json'];
113
+ export declare type clustercentroidsgetapiservicesclustercentroidsgetpostInput = operations['cluster_centroids_get_api_services_cluster_centroids_get_post']['requestBody']['content']['application/json'];
114
+ export declare type clustercentroidsgetapiservicesclustercentroidsgetpostOutput = operations['cluster_centroids_get_api_services_cluster_centroids_get_post']['responses']['200']['content']['application/json'];
115
+ export declare type insertclustercentroids2apiservicesclustercentroidsinsertpostInput = operations['insert_cluster_centroids_2_api_services_cluster_centroids_insert_post']['requestBody']['content']['application/json'];
116
+ export declare type insertclustercentroids2apiservicesclustercentroidsinsertpostOutput = operations['insert_cluster_centroids_2_api_services_cluster_centroids_insert_post']['responses']['200']['content']['application/json'];
117
+ export declare type updatecentroidsapiv2servicesclustercentroidsupdatepostInput = operations['update_centroids_api_v2_services_cluster_centroids_update_post']['requestBody']['content']['application/json'];
118
+ export declare type updatecentroidsapiv2servicesclustercentroidsupdatepostOutput = operations['update_centroids_api_v2_services_cluster_centroids_update_post']['responses']['200']['content']['application/json'];
119
+ export declare type deletecentroidsapiservicesclustercentroidscentroididdeletegetInput = {};
120
+ export declare type deletecentroidsapiservicesclustercentroidscentroididdeletegetOutput = operations['delete_centroids_api_services_cluster_centroids__centroid_id__delete_get']['responses']['200']['content']['application/json'];
121
+ export declare type deletecentroidsapiservicesclustercentroidscentroididdeletepostInput = {};
122
+ export declare type deletecentroidsapiservicesclustercentroidscentroididdeletepostOutput = operations['delete_centroids_api_services_cluster_centroids__centroid_id__delete_post']['responses']['200']['content']['application/json'];
123
+ export declare type clustercentroidsdeleteapiservicesclustercentroidsdeletepostInput = {};
124
+ export declare type clustercentroidsdeleteapiservicesclustercentroidsdeletepostOutput = operations['cluster_centroids_delete_api_services_cluster_centroids_delete_post']['responses']['200']['content']['application/json'];
107
125
  export declare type clustercentroidsgetapiservicesclustercentroidsdocumentspostInput = operations['cluster_centroids_get_api_services_cluster_centroids_documents_post']['requestBody']['content']['application/json'];
108
126
  export declare type clustercentroidsgetapiservicesclustercentroidsdocumentspostOutput = operations['cluster_centroids_get_api_services_cluster_centroids_documents_post']['responses']['200']['content']['application/json'];
109
- export declare type clusteraggregateapiservicesclusteraggregatepostInput = operations['cluster_aggregate_api_services_cluster_aggregate_post']['requestBody']['content']['application/json'];
110
- export declare type clusteraggregateapiservicesclusteraggregatepostOutput = operations['cluster_aggregate_api_services_cluster_aggregate_post']['responses']['200']['content']['application/json'];
111
- export declare type clusterfacetsapiservicesclusterfacetsgetInput = {};
112
- export declare type clusterfacetsapiservicesclusterfacetsgetOutput = operations['cluster_facets_api_services_cluster_facets_get']['responses']['200']['content']['application/json'];
127
+ export declare type centroidsmetadatagetapiservicesclustercentroidsmetadatagetInput = {};
128
+ export declare type centroidsmetadatagetapiservicesclustercentroidsmetadatagetOutput = operations['centroids_metadata_get_api_services_cluster_centroids_metadata_get']['responses']['200']['content']['application/json'];
129
+ export declare type centroidsmetadatapostapiv2servicesclustercentroidsmetadatapostInput = operations['centroids_metadata_post_api_v2_services_cluster_centroids_metadata_post']['requestBody']['content']['application/json'];
130
+ export declare type centroidsmetadatapostapiv2servicesclustercentroidsmetadatapostOutput = operations['centroids_metadata_post_api_v2_services_cluster_centroids_metadata_post']['responses']['200']['content']['application/json'];
131
+ export declare type centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpostInput = operations['centroids_list_closest_to_center_v2_services_cluster_centroids_list_closest_to_center_post']['requestBody']['content']['application/json'];
132
+ export declare type centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpostOutput = operations['centroids_list_closest_to_center_v2_services_cluster_centroids_list_closest_to_center_post']['responses']['200']['content']['application/json'];
133
+ export declare type centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpostInput = operations['centroids_list_furthest_from_center_v2_services_cluster_centroids_list_furthest_from_center_post']['requestBody']['content']['application/json'];
134
+ export declare type centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpostOutput = operations['centroids_list_furthest_from_center_v2_services_cluster_centroids_list_furthest_from_center_post']['responses']['200']['content']['application/json'];
135
+ export declare type clusteraggregateapiv2servicesclusteraggregatepostInput = operations['cluster_aggregate_api_v2_services_cluster_aggregate_post']['requestBody']['content']['application/json'];
136
+ export declare type clusteraggregateapiv2servicesclusteraggregatepostOutput = operations['cluster_aggregate_api_v2_services_cluster_aggregate_post']['responses']['200']['content']['application/json'];
137
+ export declare type advancedclusterfacetsapiservicesclusterfacetsgetInput = {};
138
+ export declare type advancedclusterfacetsapiservicesclusterfacetsgetOutput = operations['advanced_cluster_facets_api_services_cluster_facets_get']['responses']['200']['content']['application/json'];
139
+ export declare type clusterlistservicesclusterlistgetInput = {};
140
+ export declare type clusterlistservicesclusterlistgetOutput = operations['cluster_list_services_cluster_list_get']['responses']['200']['content']['application/json'];
141
+ export declare type clusterlistmultiservicesclusterlistpostInput = {};
142
+ export declare type clusterlistmultiservicesclusterlistpostOutput = operations['cluster_list_multi_services_cluster_list_post']['responses']['200']['content']['application/json'];
113
143
  export declare type tagapiservicestaggertagpostInput = operations['tag_api_services_tagger_tag_post']['requestBody']['content']['application/json'];
114
144
  export declare type tagapiservicestaggertagpostOutput = operations['tag_api_services_tagger_tag_post']['responses']['200']['content']['application/json'];
115
145
  export declare type clusterandtagapiservicestaggerdiversitypostInput = operations['cluster_and_tag_api_services_tagger_diversity_post']['requestBody']['content']['application/json'];
@@ -195,6 +225,9 @@ export declare class VectorApiClient extends _GenericClient {
195
225
  tasksapidatasetsdatasetidtaskscreatepost(input: CommandInput<tasksapidatasetsdatasetidtaskscreatepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<tasksapidatasetsdatasetidtaskscreatepostOutput>>;
196
226
  listcollectionjobsapidatasetsdatasetidtaskslistget(input: CommandInput<listcollectionjobsapidatasetsdatasetidtaskslistgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<listcollectionjobsapidatasetsdatasetidtaskslistgetOutput>>;
197
227
  tasksstatusapidatasetsdatasetidtaskstaskidstatusget(input: CommandInput<tasksstatusapidatasetsdatasetidtaskstaskidstatusgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<tasksstatusapidatasetsdatasetidtaskstaskidstatusgetOutput>>;
228
+ encodebymodelapidatasetsdatasetidvectorizepost(input: CommandInput<encodebymodelapidatasetsdatasetidvectorizepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<encodebymodelapidatasetsdatasetidvectorizepostOutput>>;
229
+ taskstatusbymodelapidatasetsdatasetidtaskstatusget(input: CommandInput<taskstatusbymodelapidatasetsdatasetidtaskstatusgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<taskstatusbymodelapidatasetsdatasetidtaskstatusgetOutput>>;
230
+ listtasksapidatasetsdatasetidtasksget(input: CommandInput<listtasksapidatasetsdatasetidtasksgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<listtasksapidatasetsdatasetidtasksgetOutput>>;
198
231
  vectorsearchapiservicessearchvectorpost(input: CommandInput<vectorsearchapiservicessearchvectorpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<vectorsearchapiservicessearchvectorpostOutput>>;
199
232
  traditionalsearchapiservicessearchtraditionalpost(input: CommandInput<traditionalsearchapiservicessearchtraditionalpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<traditionalsearchapiservicessearchtraditionalpostOutput>>;
200
233
  hybridsearchapiservicessearchhybridpost(input: CommandInput<hybridsearchapiservicessearchhybridpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<hybridsearchapiservicessearchhybridpostOutput>>;
@@ -208,11 +241,23 @@ export declare class VectorApiClient extends _GenericClient {
208
241
  vectordiversityrecommendapiservicesrecommenddiversitypost(input: CommandInput<vectordiversityrecommendapiservicesrecommenddiversitypostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<vectordiversityrecommendapiservicesrecommenddiversitypostOutput>>;
209
242
  aggregatev2apiservicesaggregateaggregatepost(input: CommandInput<aggregatev2apiservicesaggregateaggregatepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<aggregatev2apiservicesaggregateaggregatepostOutput>>;
210
243
  clustercentroidsapiservicesclustercentroidslistget(input: CommandInput<clustercentroidsapiservicesclustercentroidslistgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsapiservicesclustercentroidslistgetOutput>>;
244
+ clustercentroidsapiv2servicesclustercentroidslistpost(input: CommandInput<clustercentroidsapiv2servicesclustercentroidslistpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsapiv2servicesclustercentroidslistpostOutput>>;
211
245
  clustercentroidsgetapiservicesclustercentroidsgetget(input: CommandInput<clustercentroidsgetapiservicesclustercentroidsgetgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsgetapiservicesclustercentroidsgetgetOutput>>;
212
- insertclustercentroidsapiservicesclustercentroidsinsertpost(input: CommandInput<insertclustercentroidsapiservicesclustercentroidsinsertpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<insertclustercentroidsapiservicesclustercentroidsinsertpostOutput>>;
246
+ clustercentroidsgetapiservicesclustercentroidsgetpost(input: CommandInput<clustercentroidsgetapiservicesclustercentroidsgetpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsgetapiservicesclustercentroidsgetpostOutput>>;
247
+ insertclustercentroids2apiservicesclustercentroidsinsertpost(input: CommandInput<insertclustercentroids2apiservicesclustercentroidsinsertpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<insertclustercentroids2apiservicesclustercentroidsinsertpostOutput>>;
248
+ updatecentroidsapiv2servicesclustercentroidsupdatepost(input: CommandInput<updatecentroidsapiv2servicesclustercentroidsupdatepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<updatecentroidsapiv2servicesclustercentroidsupdatepostOutput>>;
249
+ deletecentroidsapiservicesclustercentroidscentroididdeleteget(input: CommandInput<deletecentroidsapiservicesclustercentroidscentroididdeletegetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<deletecentroidsapiservicesclustercentroidscentroididdeletegetOutput>>;
250
+ deletecentroidsapiservicesclustercentroidscentroididdeletepost(input: CommandInput<deletecentroidsapiservicesclustercentroidscentroididdeletepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<deletecentroidsapiservicesclustercentroidscentroididdeletepostOutput>>;
251
+ clustercentroidsdeleteapiservicesclustercentroidsdeletepost(input: CommandInput<clustercentroidsdeleteapiservicesclustercentroidsdeletepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsdeleteapiservicesclustercentroidsdeletepostOutput>>;
213
252
  clustercentroidsgetapiservicesclustercentroidsdocumentspost(input: CommandInput<clustercentroidsgetapiservicesclustercentroidsdocumentspostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clustercentroidsgetapiservicesclustercentroidsdocumentspostOutput>>;
214
- clusteraggregateapiservicesclusteraggregatepost(input: CommandInput<clusteraggregateapiservicesclusteraggregatepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusteraggregateapiservicesclusteraggregatepostOutput>>;
215
- clusterfacetsapiservicesclusterfacetsget(input: CommandInput<clusterfacetsapiservicesclusterfacetsgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusterfacetsapiservicesclusterfacetsgetOutput>>;
253
+ centroidsmetadatagetapiservicesclustercentroidsmetadataget(input: CommandInput<centroidsmetadatagetapiservicesclustercentroidsmetadatagetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<centroidsmetadatagetapiservicesclustercentroidsmetadatagetOutput>>;
254
+ centroidsmetadatapostapiv2servicesclustercentroidsmetadatapost(input: CommandInput<centroidsmetadatapostapiv2servicesclustercentroidsmetadatapostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<centroidsmetadatapostapiv2servicesclustercentroidsmetadatapostOutput>>;
255
+ centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpost(input: CommandInput<centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<centroidslistclosesttocenterv2servicesclustercentroidslistclosesttocenterpostOutput>>;
256
+ centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpost(input: CommandInput<centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<centroidslistfurthestfromcenterv2servicesclustercentroidslistfurthestfromcenterpostOutput>>;
257
+ clusteraggregateapiv2servicesclusteraggregatepost(input: CommandInput<clusteraggregateapiv2servicesclusteraggregatepostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusteraggregateapiv2servicesclusteraggregatepostOutput>>;
258
+ advancedclusterfacetsapiservicesclusterfacetsget(input: CommandInput<advancedclusterfacetsapiservicesclusterfacetsgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<advancedclusterfacetsapiservicesclusterfacetsgetOutput>>;
259
+ clusterlistservicesclusterlistget(input: CommandInput<clusterlistservicesclusterlistgetInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusterlistservicesclusterlistgetOutput>>;
260
+ clusterlistmultiservicesclusterlistpost(input: CommandInput<clusterlistmultiservicesclusterlistpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusterlistmultiservicesclusterlistpostOutput>>;
216
261
  tagapiservicestaggertagpost(input: CommandInput<tagapiservicestaggertagpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<tagapiservicestaggertagpostOutput>>;
217
262
  clusterandtagapiservicestaggerdiversitypost(input: CommandInput<clusterandtagapiservicestaggerdiversitypostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<clusterandtagapiservicestaggerdiversitypostOutput>>;
218
263
  vectorrecommendapiservicesdocumentdiffpost(input: CommandInput<vectorrecommendapiservicesdocumentdiffpostInput>, options?: _GenericMethodOptions): Promise<CommandOutput<vectorrecommendapiservicesdocumentdiffpostOutput>>;