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