@nestbox-ai/documents 1.0.24

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/api.js ADDED
@@ -0,0 +1,1018 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nestbox API Documents API
6
+ * API for Nestbox Documents, control your documents
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.CollectionApi = exports.CollectionApiFactory = exports.CollectionApiFp = exports.CollectionApiAxiosParamCreator = exports.AppApi = exports.AppApiFactory = exports.AppApiFp = exports.AppApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("./common");
30
+ // @ts-ignore
31
+ const base_1 = require("./base");
32
+ /**
33
+ * AppApi - axios parameter creator
34
+ * @export
35
+ */
36
+ const AppApiAxiosParamCreator = function (configuration) {
37
+ return {
38
+ /**
39
+ *
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ appControllerGetHello: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
44
+ const localVarPath = `/`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ if (configuration) {
49
+ baseOptions = configuration.baseOptions;
50
+ }
51
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
52
+ const localVarHeaderParameter = {};
53
+ const localVarQueryParameter = {};
54
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
55
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
56
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
57
+ return {
58
+ url: (0, common_1.toPathString)(localVarUrlObj),
59
+ options: localVarRequestOptions,
60
+ };
61
+ }),
62
+ };
63
+ };
64
+ exports.AppApiAxiosParamCreator = AppApiAxiosParamCreator;
65
+ /**
66
+ * AppApi - functional programming interface
67
+ * @export
68
+ */
69
+ const AppApiFp = function (configuration) {
70
+ const localVarAxiosParamCreator = (0, exports.AppApiAxiosParamCreator)(configuration);
71
+ return {
72
+ /**
73
+ *
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ appControllerGetHello(options) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c;
80
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.appControllerGetHello(options);
81
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
82
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AppApi.appControllerGetHello']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
83
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
84
+ });
85
+ },
86
+ };
87
+ };
88
+ exports.AppApiFp = AppApiFp;
89
+ /**
90
+ * AppApi - factory interface
91
+ * @export
92
+ */
93
+ const AppApiFactory = function (configuration, basePath, axios) {
94
+ const localVarFp = (0, exports.AppApiFp)(configuration);
95
+ return {
96
+ /**
97
+ *
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ appControllerGetHello(options) {
102
+ return localVarFp.appControllerGetHello(options).then((request) => request(axios, basePath));
103
+ },
104
+ };
105
+ };
106
+ exports.AppApiFactory = AppApiFactory;
107
+ /**
108
+ * AppApi - object-oriented interface
109
+ * @export
110
+ * @class AppApi
111
+ * @extends {BaseAPI}
112
+ */
113
+ class AppApi extends base_1.BaseAPI {
114
+ /**
115
+ *
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ * @memberof AppApi
119
+ */
120
+ appControllerGetHello(options) {
121
+ return (0, exports.AppApiFp)(this.configuration).appControllerGetHello(options).then((request) => request(this.axios, this.basePath));
122
+ }
123
+ }
124
+ exports.AppApi = AppApi;
125
+ /**
126
+ * CollectionApi - axios parameter creator
127
+ * @export
128
+ */
129
+ const CollectionApiAxiosParamCreator = function (configuration) {
130
+ return {
131
+ /**
132
+ *
133
+ * @summary Add a new doc
134
+ * @param {string} collectionId
135
+ * @param {CreateDocumentRequestDTO} createDocumentRequestDTO
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ collectionControllerAddDocToCollection: (collectionId_1, createDocumentRequestDTO_1, ...args_1) => __awaiter(this, [collectionId_1, createDocumentRequestDTO_1, ...args_1], void 0, function* (collectionId, createDocumentRequestDTO, options = {}) {
140
+ // verify required parameter 'collectionId' is not null or undefined
141
+ (0, common_1.assertParamExists)('collectionControllerAddDocToCollection', 'collectionId', collectionId);
142
+ // verify required parameter 'createDocumentRequestDTO' is not null or undefined
143
+ (0, common_1.assertParamExists)('collectionControllerAddDocToCollection', 'createDocumentRequestDTO', createDocumentRequestDTO);
144
+ const localVarPath = `/collections/{collection_id}/docs`
145
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ if (configuration) {
150
+ baseOptions = configuration.baseOptions;
151
+ }
152
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
153
+ const localVarHeaderParameter = {};
154
+ const localVarQueryParameter = {};
155
+ localVarHeaderParameter['Content-Type'] = 'application/json';
156
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
157
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
158
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
159
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDocumentRequestDTO, localVarRequestOptions, configuration);
160
+ return {
161
+ url: (0, common_1.toPathString)(localVarUrlObj),
162
+ options: localVarRequestOptions,
163
+ };
164
+ }),
165
+ /**
166
+ *
167
+ * @summary Use a file to chunk and add to collection
168
+ * @param {string} collectionId
169
+ * @param {ChunkFileRequestDTO} chunkFileRequestDTO
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
173
+ collectionControllerChunkFileToCollection: (collectionId_1, chunkFileRequestDTO_1, ...args_1) => __awaiter(this, [collectionId_1, chunkFileRequestDTO_1, ...args_1], void 0, function* (collectionId, chunkFileRequestDTO, options = {}) {
174
+ // verify required parameter 'collectionId' is not null or undefined
175
+ (0, common_1.assertParamExists)('collectionControllerChunkFileToCollection', 'collectionId', collectionId);
176
+ // verify required parameter 'chunkFileRequestDTO' is not null or undefined
177
+ (0, common_1.assertParamExists)('collectionControllerChunkFileToCollection', 'chunkFileRequestDTO', chunkFileRequestDTO);
178
+ const localVarPath = `/collections/{collection_id}/docs/file`
179
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
180
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
181
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
182
+ let baseOptions;
183
+ if (configuration) {
184
+ baseOptions = configuration.baseOptions;
185
+ }
186
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
187
+ const localVarHeaderParameter = {};
188
+ const localVarQueryParameter = {};
189
+ localVarHeaderParameter['Content-Type'] = 'application/json';
190
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
191
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
192
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
193
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chunkFileRequestDTO, localVarRequestOptions, configuration);
194
+ return {
195
+ url: (0, common_1.toPathString)(localVarUrlObj),
196
+ options: localVarRequestOptions,
197
+ };
198
+ }),
199
+ /**
200
+ *
201
+ * @summary Create a new collection
202
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
203
+ * @param {*} [options] Override http request option.
204
+ * @throws {RequiredError}
205
+ */
206
+ collectionControllerCreateCollection: (createCollectionRequestDTO_1, ...args_1) => __awaiter(this, [createCollectionRequestDTO_1, ...args_1], void 0, function* (createCollectionRequestDTO, options = {}) {
207
+ // verify required parameter 'createCollectionRequestDTO' is not null or undefined
208
+ (0, common_1.assertParamExists)('collectionControllerCreateCollection', 'createCollectionRequestDTO', createCollectionRequestDTO);
209
+ const localVarPath = `/collections`;
210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
211
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ let baseOptions;
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ }
216
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
217
+ const localVarHeaderParameter = {};
218
+ const localVarQueryParameter = {};
219
+ localVarHeaderParameter['Content-Type'] = 'application/json';
220
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
221
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
222
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
223
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCollectionRequestDTO, localVarRequestOptions, configuration);
224
+ return {
225
+ url: (0, common_1.toPathString)(localVarUrlObj),
226
+ options: localVarRequestOptions,
227
+ };
228
+ }),
229
+ /**
230
+ *
231
+ * @summary Delete a collection
232
+ * @param {string} collectionId
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ collectionControllerDeleteCollection: (collectionId_1, ...args_1) => __awaiter(this, [collectionId_1, ...args_1], void 0, function* (collectionId, options = {}) {
237
+ // verify required parameter 'collectionId' is not null or undefined
238
+ (0, common_1.assertParamExists)('collectionControllerDeleteCollection', 'collectionId', collectionId);
239
+ const localVarPath = `/collections/{collection_id}`
240
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
241
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
243
+ let baseOptions;
244
+ if (configuration) {
245
+ baseOptions = configuration.baseOptions;
246
+ }
247
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
248
+ const localVarHeaderParameter = {};
249
+ const localVarQueryParameter = {};
250
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
251
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
252
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
253
+ return {
254
+ url: (0, common_1.toPathString)(localVarUrlObj),
255
+ options: localVarRequestOptions,
256
+ };
257
+ }),
258
+ /**
259
+ *
260
+ * @summary Delete doc by ID
261
+ * @param {string} collectionId
262
+ * @param {string} docId
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ collectionControllerDeleteDoc: (collectionId_1, docId_1, ...args_1) => __awaiter(this, [collectionId_1, docId_1, ...args_1], void 0, function* (collectionId, docId, options = {}) {
267
+ // verify required parameter 'collectionId' is not null or undefined
268
+ (0, common_1.assertParamExists)('collectionControllerDeleteDoc', 'collectionId', collectionId);
269
+ // verify required parameter 'docId' is not null or undefined
270
+ (0, common_1.assertParamExists)('collectionControllerDeleteDoc', 'docId', docId);
271
+ const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
272
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
273
+ .replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
274
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
275
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
276
+ let baseOptions;
277
+ if (configuration) {
278
+ baseOptions = configuration.baseOptions;
279
+ }
280
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
281
+ const localVarHeaderParameter = {};
282
+ const localVarQueryParameter = {};
283
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
284
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
285
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
286
+ return {
287
+ url: (0, common_1.toPathString)(localVarUrlObj),
288
+ options: localVarRequestOptions,
289
+ };
290
+ }),
291
+ /**
292
+ *
293
+ * @summary Delete docs based on metadata filter
294
+ * @param {string} collectionId
295
+ * @param {string} filter
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ collectionControllerDeleteDocsByMetadata: (collectionId_1, filter_1, ...args_1) => __awaiter(this, [collectionId_1, filter_1, ...args_1], void 0, function* (collectionId, filter, options = {}) {
300
+ // verify required parameter 'collectionId' is not null or undefined
301
+ (0, common_1.assertParamExists)('collectionControllerDeleteDocsByMetadata', 'collectionId', collectionId);
302
+ // verify required parameter 'filter' is not null or undefined
303
+ (0, common_1.assertParamExists)('collectionControllerDeleteDocsByMetadata', 'filter', filter);
304
+ const localVarPath = `/collections/{collection_id}/docs`
305
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
306
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
307
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
308
+ let baseOptions;
309
+ if (configuration) {
310
+ baseOptions = configuration.baseOptions;
311
+ }
312
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
313
+ const localVarHeaderParameter = {};
314
+ const localVarQueryParameter = {};
315
+ if (filter !== undefined) {
316
+ localVarQueryParameter['filter'] = filter;
317
+ }
318
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
319
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
321
+ return {
322
+ url: (0, common_1.toPathString)(localVarUrlObj),
323
+ options: localVarRequestOptions,
324
+ };
325
+ }),
326
+ /**
327
+ *
328
+ * @summary Get a collection info
329
+ * @param {string} collectionId
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ collectionControllerGetCollection: (collectionId_1, ...args_1) => __awaiter(this, [collectionId_1, ...args_1], void 0, function* (collectionId, options = {}) {
334
+ // verify required parameter 'collectionId' is not null or undefined
335
+ (0, common_1.assertParamExists)('collectionControllerGetCollection', 'collectionId', collectionId);
336
+ const localVarPath = `/collections/{collection_id}`
337
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
338
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
339
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
340
+ let baseOptions;
341
+ if (configuration) {
342
+ baseOptions = configuration.baseOptions;
343
+ }
344
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
345
+ const localVarHeaderParameter = {};
346
+ const localVarQueryParameter = {};
347
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
348
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
+ return {
351
+ url: (0, common_1.toPathString)(localVarUrlObj),
352
+ options: localVarRequestOptions,
353
+ };
354
+ }),
355
+ /**
356
+ *
357
+ * @summary List all collections
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ collectionControllerGetCollections: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
362
+ const localVarPath = `/collections`;
363
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
364
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
365
+ let baseOptions;
366
+ if (configuration) {
367
+ baseOptions = configuration.baseOptions;
368
+ }
369
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
370
+ const localVarHeaderParameter = {};
371
+ const localVarQueryParameter = {};
372
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
373
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
374
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
375
+ return {
376
+ url: (0, common_1.toPathString)(localVarUrlObj),
377
+ options: localVarRequestOptions,
378
+ };
379
+ }),
380
+ /**
381
+ *
382
+ * @summary Retrieve doc by ID
383
+ * @param {string} collectionId
384
+ * @param {string} docId
385
+ * @param {*} [options] Override http request option.
386
+ * @throws {RequiredError}
387
+ */
388
+ collectionControllerGetDocById: (collectionId_1, docId_1, ...args_1) => __awaiter(this, [collectionId_1, docId_1, ...args_1], void 0, function* (collectionId, docId, options = {}) {
389
+ // verify required parameter 'collectionId' is not null or undefined
390
+ (0, common_1.assertParamExists)('collectionControllerGetDocById', 'collectionId', collectionId);
391
+ // verify required parameter 'docId' is not null or undefined
392
+ (0, common_1.assertParamExists)('collectionControllerGetDocById', 'docId', docId);
393
+ const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
394
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
395
+ .replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
396
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
397
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
398
+ let baseOptions;
399
+ if (configuration) {
400
+ baseOptions = configuration.baseOptions;
401
+ }
402
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
403
+ const localVarHeaderParameter = {};
404
+ const localVarQueryParameter = {};
405
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
406
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
407
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
408
+ return {
409
+ url: (0, common_1.toPathString)(localVarUrlObj),
410
+ options: localVarRequestOptions,
411
+ };
412
+ }),
413
+ /**
414
+ *
415
+ * @summary Similarity search query
416
+ * @param {string} collectionId
417
+ * @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
418
+ * @param {*} [options] Override http request option.
419
+ * @throws {RequiredError}
420
+ */
421
+ collectionControllerSimilaritySearch: (collectionId_1, similaritySearchQueryDTO_1, ...args_1) => __awaiter(this, [collectionId_1, similaritySearchQueryDTO_1, ...args_1], void 0, function* (collectionId, similaritySearchQueryDTO, options = {}) {
422
+ // verify required parameter 'collectionId' is not null or undefined
423
+ (0, common_1.assertParamExists)('collectionControllerSimilaritySearch', 'collectionId', collectionId);
424
+ // verify required parameter 'similaritySearchQueryDTO' is not null or undefined
425
+ (0, common_1.assertParamExists)('collectionControllerSimilaritySearch', 'similaritySearchQueryDTO', similaritySearchQueryDTO);
426
+ const localVarPath = `/collections/{collection_id}/query`
427
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
428
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
429
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
430
+ let baseOptions;
431
+ if (configuration) {
432
+ baseOptions = configuration.baseOptions;
433
+ }
434
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
435
+ const localVarHeaderParameter = {};
436
+ const localVarQueryParameter = {};
437
+ localVarHeaderParameter['Content-Type'] = 'application/json';
438
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
439
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
440
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
441
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(similaritySearchQueryDTO, localVarRequestOptions, configuration);
442
+ return {
443
+ url: (0, common_1.toPathString)(localVarUrlObj),
444
+ options: localVarRequestOptions,
445
+ };
446
+ }),
447
+ /**
448
+ *
449
+ * @summary Updates a collection
450
+ * @param {string} collectionId
451
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ collectionControllerUpdateCollection: (collectionId_1, createCollectionRequestDTO_1, ...args_1) => __awaiter(this, [collectionId_1, createCollectionRequestDTO_1, ...args_1], void 0, function* (collectionId, createCollectionRequestDTO, options = {}) {
456
+ // verify required parameter 'collectionId' is not null or undefined
457
+ (0, common_1.assertParamExists)('collectionControllerUpdateCollection', 'collectionId', collectionId);
458
+ // verify required parameter 'createCollectionRequestDTO' is not null or undefined
459
+ (0, common_1.assertParamExists)('collectionControllerUpdateCollection', 'createCollectionRequestDTO', createCollectionRequestDTO);
460
+ const localVarPath = `/collections/{collection_id}`
461
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
462
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
463
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
464
+ let baseOptions;
465
+ if (configuration) {
466
+ baseOptions = configuration.baseOptions;
467
+ }
468
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
469
+ const localVarHeaderParameter = {};
470
+ const localVarQueryParameter = {};
471
+ localVarHeaderParameter['Content-Type'] = 'application/json';
472
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
473
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
474
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
475
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCollectionRequestDTO, localVarRequestOptions, configuration);
476
+ return {
477
+ url: (0, common_1.toPathString)(localVarUrlObj),
478
+ options: localVarRequestOptions,
479
+ };
480
+ }),
481
+ /**
482
+ *
483
+ * @summary Update or upsert doc
484
+ * @param {string} collectionId
485
+ * @param {string} docId
486
+ * @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ collectionControllerUpdateDoc: (collectionId_1, docId_1, updateDocumentRequestDTO_1, ...args_1) => __awaiter(this, [collectionId_1, docId_1, updateDocumentRequestDTO_1, ...args_1], void 0, function* (collectionId, docId, updateDocumentRequestDTO, options = {}) {
491
+ // verify required parameter 'collectionId' is not null or undefined
492
+ (0, common_1.assertParamExists)('collectionControllerUpdateDoc', 'collectionId', collectionId);
493
+ // verify required parameter 'docId' is not null or undefined
494
+ (0, common_1.assertParamExists)('collectionControllerUpdateDoc', 'docId', docId);
495
+ // verify required parameter 'updateDocumentRequestDTO' is not null or undefined
496
+ (0, common_1.assertParamExists)('collectionControllerUpdateDoc', 'updateDocumentRequestDTO', updateDocumentRequestDTO);
497
+ const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
498
+ .replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
499
+ .replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
500
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
501
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
502
+ let baseOptions;
503
+ if (configuration) {
504
+ baseOptions = configuration.baseOptions;
505
+ }
506
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
507
+ const localVarHeaderParameter = {};
508
+ const localVarQueryParameter = {};
509
+ localVarHeaderParameter['Content-Type'] = 'application/json';
510
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
511
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
512
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
513
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateDocumentRequestDTO, localVarRequestOptions, configuration);
514
+ return {
515
+ url: (0, common_1.toPathString)(localVarUrlObj),
516
+ options: localVarRequestOptions,
517
+ };
518
+ }),
519
+ };
520
+ };
521
+ exports.CollectionApiAxiosParamCreator = CollectionApiAxiosParamCreator;
522
+ /**
523
+ * CollectionApi - functional programming interface
524
+ * @export
525
+ */
526
+ const CollectionApiFp = function (configuration) {
527
+ const localVarAxiosParamCreator = (0, exports.CollectionApiAxiosParamCreator)(configuration);
528
+ return {
529
+ /**
530
+ *
531
+ * @summary Add a new doc
532
+ * @param {string} collectionId
533
+ * @param {CreateDocumentRequestDTO} createDocumentRequestDTO
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ */
537
+ collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options) {
538
+ return __awaiter(this, void 0, void 0, function* () {
539
+ var _a, _b, _c;
540
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options);
541
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
542
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerAddDocToCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
543
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
544
+ });
545
+ },
546
+ /**
547
+ *
548
+ * @summary Use a file to chunk and add to collection
549
+ * @param {string} collectionId
550
+ * @param {ChunkFileRequestDTO} chunkFileRequestDTO
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options) {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ var _a, _b, _c;
557
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options);
558
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
559
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerChunkFileToCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
560
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
561
+ });
562
+ },
563
+ /**
564
+ *
565
+ * @summary Create a new collection
566
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ collectionControllerCreateCollection(createCollectionRequestDTO, options) {
571
+ return __awaiter(this, void 0, void 0, function* () {
572
+ var _a, _b, _c;
573
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerCreateCollection(createCollectionRequestDTO, options);
574
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
575
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerCreateCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
576
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
577
+ });
578
+ },
579
+ /**
580
+ *
581
+ * @summary Delete a collection
582
+ * @param {string} collectionId
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ collectionControllerDeleteCollection(collectionId, options) {
587
+ return __awaiter(this, void 0, void 0, function* () {
588
+ var _a, _b, _c;
589
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerDeleteCollection(collectionId, options);
590
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
591
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerDeleteCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
592
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
593
+ });
594
+ },
595
+ /**
596
+ *
597
+ * @summary Delete doc by ID
598
+ * @param {string} collectionId
599
+ * @param {string} docId
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ collectionControllerDeleteDoc(collectionId, docId, options) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ var _a, _b, _c;
606
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerDeleteDoc(collectionId, docId, options);
607
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
608
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerDeleteDoc']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
609
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
610
+ });
611
+ },
612
+ /**
613
+ *
614
+ * @summary Delete docs based on metadata filter
615
+ * @param {string} collectionId
616
+ * @param {string} filter
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ collectionControllerDeleteDocsByMetadata(collectionId, filter, options) {
621
+ return __awaiter(this, void 0, void 0, function* () {
622
+ var _a, _b, _c;
623
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerDeleteDocsByMetadata(collectionId, filter, options);
624
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
625
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerDeleteDocsByMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
626
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
627
+ });
628
+ },
629
+ /**
630
+ *
631
+ * @summary Get a collection info
632
+ * @param {string} collectionId
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ */
636
+ collectionControllerGetCollection(collectionId, options) {
637
+ return __awaiter(this, void 0, void 0, function* () {
638
+ var _a, _b, _c;
639
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerGetCollection(collectionId, options);
640
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
641
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerGetCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
642
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
643
+ });
644
+ },
645
+ /**
646
+ *
647
+ * @summary List all collections
648
+ * @param {*} [options] Override http request option.
649
+ * @throws {RequiredError}
650
+ */
651
+ collectionControllerGetCollections(options) {
652
+ return __awaiter(this, void 0, void 0, function* () {
653
+ var _a, _b, _c;
654
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerGetCollections(options);
655
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
656
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerGetCollections']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
657
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
658
+ });
659
+ },
660
+ /**
661
+ *
662
+ * @summary Retrieve doc by ID
663
+ * @param {string} collectionId
664
+ * @param {string} docId
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ */
668
+ collectionControllerGetDocById(collectionId, docId, options) {
669
+ return __awaiter(this, void 0, void 0, function* () {
670
+ var _a, _b, _c;
671
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerGetDocById(collectionId, docId, options);
672
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
673
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerGetDocById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
674
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
675
+ });
676
+ },
677
+ /**
678
+ *
679
+ * @summary Similarity search query
680
+ * @param {string} collectionId
681
+ * @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options) {
686
+ return __awaiter(this, void 0, void 0, function* () {
687
+ var _a, _b, _c;
688
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options);
689
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
690
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerSimilaritySearch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
691
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
692
+ });
693
+ },
694
+ /**
695
+ *
696
+ * @summary Updates a collection
697
+ * @param {string} collectionId
698
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options) {
703
+ return __awaiter(this, void 0, void 0, function* () {
704
+ var _a, _b, _c;
705
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options);
706
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
707
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerUpdateCollection']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
708
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
709
+ });
710
+ },
711
+ /**
712
+ *
713
+ * @summary Update or upsert doc
714
+ * @param {string} collectionId
715
+ * @param {string} docId
716
+ * @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
717
+ * @param {*} [options] Override http request option.
718
+ * @throws {RequiredError}
719
+ */
720
+ collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options) {
721
+ return __awaiter(this, void 0, void 0, function* () {
722
+ var _a, _b, _c;
723
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options);
724
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
725
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CollectionApi.collectionControllerUpdateDoc']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
726
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
727
+ });
728
+ },
729
+ };
730
+ };
731
+ exports.CollectionApiFp = CollectionApiFp;
732
+ /**
733
+ * CollectionApi - factory interface
734
+ * @export
735
+ */
736
+ const CollectionApiFactory = function (configuration, basePath, axios) {
737
+ const localVarFp = (0, exports.CollectionApiFp)(configuration);
738
+ return {
739
+ /**
740
+ *
741
+ * @summary Add a new doc
742
+ * @param {string} collectionId
743
+ * @param {CreateDocumentRequestDTO} createDocumentRequestDTO
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ */
747
+ collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options) {
748
+ return localVarFp.collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options).then((request) => request(axios, basePath));
749
+ },
750
+ /**
751
+ *
752
+ * @summary Use a file to chunk and add to collection
753
+ * @param {string} collectionId
754
+ * @param {ChunkFileRequestDTO} chunkFileRequestDTO
755
+ * @param {*} [options] Override http request option.
756
+ * @throws {RequiredError}
757
+ */
758
+ collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options) {
759
+ return localVarFp.collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options).then((request) => request(axios, basePath));
760
+ },
761
+ /**
762
+ *
763
+ * @summary Create a new collection
764
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ collectionControllerCreateCollection(createCollectionRequestDTO, options) {
769
+ return localVarFp.collectionControllerCreateCollection(createCollectionRequestDTO, options).then((request) => request(axios, basePath));
770
+ },
771
+ /**
772
+ *
773
+ * @summary Delete a collection
774
+ * @param {string} collectionId
775
+ * @param {*} [options] Override http request option.
776
+ * @throws {RequiredError}
777
+ */
778
+ collectionControllerDeleteCollection(collectionId, options) {
779
+ return localVarFp.collectionControllerDeleteCollection(collectionId, options).then((request) => request(axios, basePath));
780
+ },
781
+ /**
782
+ *
783
+ * @summary Delete doc by ID
784
+ * @param {string} collectionId
785
+ * @param {string} docId
786
+ * @param {*} [options] Override http request option.
787
+ * @throws {RequiredError}
788
+ */
789
+ collectionControllerDeleteDoc(collectionId, docId, options) {
790
+ return localVarFp.collectionControllerDeleteDoc(collectionId, docId, options).then((request) => request(axios, basePath));
791
+ },
792
+ /**
793
+ *
794
+ * @summary Delete docs based on metadata filter
795
+ * @param {string} collectionId
796
+ * @param {string} filter
797
+ * @param {*} [options] Override http request option.
798
+ * @throws {RequiredError}
799
+ */
800
+ collectionControllerDeleteDocsByMetadata(collectionId, filter, options) {
801
+ return localVarFp.collectionControllerDeleteDocsByMetadata(collectionId, filter, options).then((request) => request(axios, basePath));
802
+ },
803
+ /**
804
+ *
805
+ * @summary Get a collection info
806
+ * @param {string} collectionId
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ collectionControllerGetCollection(collectionId, options) {
811
+ return localVarFp.collectionControllerGetCollection(collectionId, options).then((request) => request(axios, basePath));
812
+ },
813
+ /**
814
+ *
815
+ * @summary List all collections
816
+ * @param {*} [options] Override http request option.
817
+ * @throws {RequiredError}
818
+ */
819
+ collectionControllerGetCollections(options) {
820
+ return localVarFp.collectionControllerGetCollections(options).then((request) => request(axios, basePath));
821
+ },
822
+ /**
823
+ *
824
+ * @summary Retrieve doc by ID
825
+ * @param {string} collectionId
826
+ * @param {string} docId
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ collectionControllerGetDocById(collectionId, docId, options) {
831
+ return localVarFp.collectionControllerGetDocById(collectionId, docId, options).then((request) => request(axios, basePath));
832
+ },
833
+ /**
834
+ *
835
+ * @summary Similarity search query
836
+ * @param {string} collectionId
837
+ * @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options) {
842
+ return localVarFp.collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options).then((request) => request(axios, basePath));
843
+ },
844
+ /**
845
+ *
846
+ * @summary Updates a collection
847
+ * @param {string} collectionId
848
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
849
+ * @param {*} [options] Override http request option.
850
+ * @throws {RequiredError}
851
+ */
852
+ collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options) {
853
+ return localVarFp.collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options).then((request) => request(axios, basePath));
854
+ },
855
+ /**
856
+ *
857
+ * @summary Update or upsert doc
858
+ * @param {string} collectionId
859
+ * @param {string} docId
860
+ * @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
861
+ * @param {*} [options] Override http request option.
862
+ * @throws {RequiredError}
863
+ */
864
+ collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options) {
865
+ return localVarFp.collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options).then((request) => request(axios, basePath));
866
+ },
867
+ };
868
+ };
869
+ exports.CollectionApiFactory = CollectionApiFactory;
870
+ /**
871
+ * CollectionApi - object-oriented interface
872
+ * @export
873
+ * @class CollectionApi
874
+ * @extends {BaseAPI}
875
+ */
876
+ class CollectionApi extends base_1.BaseAPI {
877
+ /**
878
+ *
879
+ * @summary Add a new doc
880
+ * @param {string} collectionId
881
+ * @param {CreateDocumentRequestDTO} createDocumentRequestDTO
882
+ * @param {*} [options] Override http request option.
883
+ * @throws {RequiredError}
884
+ * @memberof CollectionApi
885
+ */
886
+ collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options) {
887
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options).then((request) => request(this.axios, this.basePath));
888
+ }
889
+ /**
890
+ *
891
+ * @summary Use a file to chunk and add to collection
892
+ * @param {string} collectionId
893
+ * @param {ChunkFileRequestDTO} chunkFileRequestDTO
894
+ * @param {*} [options] Override http request option.
895
+ * @throws {RequiredError}
896
+ * @memberof CollectionApi
897
+ */
898
+ collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options) {
899
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options).then((request) => request(this.axios, this.basePath));
900
+ }
901
+ /**
902
+ *
903
+ * @summary Create a new collection
904
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
905
+ * @param {*} [options] Override http request option.
906
+ * @throws {RequiredError}
907
+ * @memberof CollectionApi
908
+ */
909
+ collectionControllerCreateCollection(createCollectionRequestDTO, options) {
910
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerCreateCollection(createCollectionRequestDTO, options).then((request) => request(this.axios, this.basePath));
911
+ }
912
+ /**
913
+ *
914
+ * @summary Delete a collection
915
+ * @param {string} collectionId
916
+ * @param {*} [options] Override http request option.
917
+ * @throws {RequiredError}
918
+ * @memberof CollectionApi
919
+ */
920
+ collectionControllerDeleteCollection(collectionId, options) {
921
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerDeleteCollection(collectionId, options).then((request) => request(this.axios, this.basePath));
922
+ }
923
+ /**
924
+ *
925
+ * @summary Delete doc by ID
926
+ * @param {string} collectionId
927
+ * @param {string} docId
928
+ * @param {*} [options] Override http request option.
929
+ * @throws {RequiredError}
930
+ * @memberof CollectionApi
931
+ */
932
+ collectionControllerDeleteDoc(collectionId, docId, options) {
933
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerDeleteDoc(collectionId, docId, options).then((request) => request(this.axios, this.basePath));
934
+ }
935
+ /**
936
+ *
937
+ * @summary Delete docs based on metadata filter
938
+ * @param {string} collectionId
939
+ * @param {string} filter
940
+ * @param {*} [options] Override http request option.
941
+ * @throws {RequiredError}
942
+ * @memberof CollectionApi
943
+ */
944
+ collectionControllerDeleteDocsByMetadata(collectionId, filter, options) {
945
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerDeleteDocsByMetadata(collectionId, filter, options).then((request) => request(this.axios, this.basePath));
946
+ }
947
+ /**
948
+ *
949
+ * @summary Get a collection info
950
+ * @param {string} collectionId
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ * @memberof CollectionApi
954
+ */
955
+ collectionControllerGetCollection(collectionId, options) {
956
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerGetCollection(collectionId, options).then((request) => request(this.axios, this.basePath));
957
+ }
958
+ /**
959
+ *
960
+ * @summary List all collections
961
+ * @param {*} [options] Override http request option.
962
+ * @throws {RequiredError}
963
+ * @memberof CollectionApi
964
+ */
965
+ collectionControllerGetCollections(options) {
966
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerGetCollections(options).then((request) => request(this.axios, this.basePath));
967
+ }
968
+ /**
969
+ *
970
+ * @summary Retrieve doc by ID
971
+ * @param {string} collectionId
972
+ * @param {string} docId
973
+ * @param {*} [options] Override http request option.
974
+ * @throws {RequiredError}
975
+ * @memberof CollectionApi
976
+ */
977
+ collectionControllerGetDocById(collectionId, docId, options) {
978
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerGetDocById(collectionId, docId, options).then((request) => request(this.axios, this.basePath));
979
+ }
980
+ /**
981
+ *
982
+ * @summary Similarity search query
983
+ * @param {string} collectionId
984
+ * @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
985
+ * @param {*} [options] Override http request option.
986
+ * @throws {RequiredError}
987
+ * @memberof CollectionApi
988
+ */
989
+ collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options) {
990
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options).then((request) => request(this.axios, this.basePath));
991
+ }
992
+ /**
993
+ *
994
+ * @summary Updates a collection
995
+ * @param {string} collectionId
996
+ * @param {CreateCollectionRequestDTO} createCollectionRequestDTO
997
+ * @param {*} [options] Override http request option.
998
+ * @throws {RequiredError}
999
+ * @memberof CollectionApi
1000
+ */
1001
+ collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options) {
1002
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options).then((request) => request(this.axios, this.basePath));
1003
+ }
1004
+ /**
1005
+ *
1006
+ * @summary Update or upsert doc
1007
+ * @param {string} collectionId
1008
+ * @param {string} docId
1009
+ * @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
1010
+ * @param {*} [options] Override http request option.
1011
+ * @throws {RequiredError}
1012
+ * @memberof CollectionApi
1013
+ */
1014
+ collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options) {
1015
+ return (0, exports.CollectionApiFp)(this.configuration).collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options).then((request) => request(this.axios, this.basePath));
1016
+ }
1017
+ }
1018
+ exports.CollectionApi = CollectionApi;