@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/api.ts
ADDED
|
@@ -0,0 +1,1264 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import type { Configuration } from './configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
22
|
+
import type { RequestArgs } from './base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @interface BadRequestExceptionResponse
|
|
30
|
+
*/
|
|
31
|
+
export interface BadRequestExceptionResponse {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof BadRequestExceptionResponse
|
|
36
|
+
*/
|
|
37
|
+
'message': string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {object}
|
|
41
|
+
* @memberof BadRequestExceptionResponse
|
|
42
|
+
*/
|
|
43
|
+
'errors': object | null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @interface ChunkFileRequestDTO
|
|
49
|
+
*/
|
|
50
|
+
export interface ChunkFileRequestDTO {
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof ChunkFileRequestDTO
|
|
55
|
+
*/
|
|
56
|
+
'type': string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof ChunkFileRequestDTO
|
|
61
|
+
*/
|
|
62
|
+
'url': string;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {object}
|
|
66
|
+
* @memberof ChunkFileRequestDTO
|
|
67
|
+
*/
|
|
68
|
+
'options': object;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @export
|
|
73
|
+
* @interface CreateCollectionRequestDTO
|
|
74
|
+
*/
|
|
75
|
+
export interface CreateCollectionRequestDTO {
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof CreateCollectionRequestDTO
|
|
80
|
+
*/
|
|
81
|
+
'name': string;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {object}
|
|
85
|
+
* @memberof CreateCollectionRequestDTO
|
|
86
|
+
*/
|
|
87
|
+
'metadata': object;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @export
|
|
92
|
+
* @interface CreateDocumentRequestDTO
|
|
93
|
+
*/
|
|
94
|
+
export interface CreateDocumentRequestDTO {
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {string}
|
|
98
|
+
* @memberof CreateDocumentRequestDTO
|
|
99
|
+
*/
|
|
100
|
+
'id': string;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof CreateDocumentRequestDTO
|
|
105
|
+
*/
|
|
106
|
+
'document': string;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @type {object}
|
|
110
|
+
* @memberof CreateDocumentRequestDTO
|
|
111
|
+
*/
|
|
112
|
+
'metadata': object;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @export
|
|
117
|
+
* @interface FatalErrorExceptionResponse
|
|
118
|
+
*/
|
|
119
|
+
export interface FatalErrorExceptionResponse {
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {string}
|
|
123
|
+
* @memberof FatalErrorExceptionResponse
|
|
124
|
+
*/
|
|
125
|
+
'message': string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @export
|
|
130
|
+
* @interface ForbiddenExceptionResponse
|
|
131
|
+
*/
|
|
132
|
+
export interface ForbiddenExceptionResponse {
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {string}
|
|
136
|
+
* @memberof ForbiddenExceptionResponse
|
|
137
|
+
*/
|
|
138
|
+
'message': string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
* @export
|
|
143
|
+
* @interface MessageResponseDTO
|
|
144
|
+
*/
|
|
145
|
+
export interface MessageResponseDTO {
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @type {string}
|
|
149
|
+
* @memberof MessageResponseDTO
|
|
150
|
+
*/
|
|
151
|
+
'message': string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @export
|
|
156
|
+
* @interface NotFoundExceptionResponse
|
|
157
|
+
*/
|
|
158
|
+
export interface NotFoundExceptionResponse {
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @type {string}
|
|
162
|
+
* @memberof NotFoundExceptionResponse
|
|
163
|
+
*/
|
|
164
|
+
'message': string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @export
|
|
169
|
+
* @interface SimilaritySearchQueryDTO
|
|
170
|
+
*/
|
|
171
|
+
export interface SimilaritySearchQueryDTO {
|
|
172
|
+
/**
|
|
173
|
+
*
|
|
174
|
+
* @type {string}
|
|
175
|
+
* @memberof SimilaritySearchQueryDTO
|
|
176
|
+
*/
|
|
177
|
+
'query': string;
|
|
178
|
+
/**
|
|
179
|
+
*
|
|
180
|
+
* @type {object}
|
|
181
|
+
* @memberof SimilaritySearchQueryDTO
|
|
182
|
+
*/
|
|
183
|
+
'params': object;
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
* @type {object}
|
|
187
|
+
* @memberof SimilaritySearchQueryDTO
|
|
188
|
+
*/
|
|
189
|
+
'filter': object;
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
* @type {Array<string>}
|
|
193
|
+
* @memberof SimilaritySearchQueryDTO
|
|
194
|
+
*/
|
|
195
|
+
'include': Array<string>;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @export
|
|
200
|
+
* @interface UnauthorizedExceptionResponse
|
|
201
|
+
*/
|
|
202
|
+
export interface UnauthorizedExceptionResponse {
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @type {string}
|
|
206
|
+
* @memberof UnauthorizedExceptionResponse
|
|
207
|
+
*/
|
|
208
|
+
'message': string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @export
|
|
213
|
+
* @interface UpdateDocumentRequestDTO
|
|
214
|
+
*/
|
|
215
|
+
export interface UpdateDocumentRequestDTO {
|
|
216
|
+
/**
|
|
217
|
+
*
|
|
218
|
+
* @type {string}
|
|
219
|
+
* @memberof UpdateDocumentRequestDTO
|
|
220
|
+
*/
|
|
221
|
+
'document': string;
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @type {object}
|
|
225
|
+
* @memberof UpdateDocumentRequestDTO
|
|
226
|
+
*/
|
|
227
|
+
'metadata': object;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* AppApi - axios parameter creator
|
|
232
|
+
* @export
|
|
233
|
+
*/
|
|
234
|
+
export const AppApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
235
|
+
return {
|
|
236
|
+
/**
|
|
237
|
+
*
|
|
238
|
+
* @param {*} [options] Override http request option.
|
|
239
|
+
* @throws {RequiredError}
|
|
240
|
+
*/
|
|
241
|
+
appControllerGetHello: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
242
|
+
const localVarPath = `/`;
|
|
243
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
244
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
245
|
+
let baseOptions;
|
|
246
|
+
if (configuration) {
|
|
247
|
+
baseOptions = configuration.baseOptions;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
251
|
+
const localVarHeaderParameter = {} as any;
|
|
252
|
+
const localVarQueryParameter = {} as any;
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
257
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
258
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
url: toPathString(localVarUrlObj),
|
|
262
|
+
options: localVarRequestOptions,
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* AppApi - functional programming interface
|
|
270
|
+
* @export
|
|
271
|
+
*/
|
|
272
|
+
export const AppApiFp = function(configuration?: Configuration) {
|
|
273
|
+
const localVarAxiosParamCreator = AppApiAxiosParamCreator(configuration)
|
|
274
|
+
return {
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
280
|
+
async appControllerGetHello(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
281
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.appControllerGetHello(options);
|
|
282
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
283
|
+
const localVarOperationServerBasePath = operationServerMap['AppApi.appControllerGetHello']?.[localVarOperationServerIndex]?.url;
|
|
284
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
285
|
+
},
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* AppApi - factory interface
|
|
291
|
+
* @export
|
|
292
|
+
*/
|
|
293
|
+
export const AppApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
294
|
+
const localVarFp = AppApiFp(configuration)
|
|
295
|
+
return {
|
|
296
|
+
/**
|
|
297
|
+
*
|
|
298
|
+
* @param {*} [options] Override http request option.
|
|
299
|
+
* @throws {RequiredError}
|
|
300
|
+
*/
|
|
301
|
+
appControllerGetHello(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
302
|
+
return localVarFp.appControllerGetHello(options).then((request) => request(axios, basePath));
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* AppApi - object-oriented interface
|
|
309
|
+
* @export
|
|
310
|
+
* @class AppApi
|
|
311
|
+
* @extends {BaseAPI}
|
|
312
|
+
*/
|
|
313
|
+
export class AppApi extends BaseAPI {
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @param {*} [options] Override http request option.
|
|
317
|
+
* @throws {RequiredError}
|
|
318
|
+
* @memberof AppApi
|
|
319
|
+
*/
|
|
320
|
+
public appControllerGetHello(options?: RawAxiosRequestConfig) {
|
|
321
|
+
return AppApiFp(this.configuration).appControllerGetHello(options).then((request) => request(this.axios, this.basePath));
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* CollectionApi - axios parameter creator
|
|
329
|
+
* @export
|
|
330
|
+
*/
|
|
331
|
+
export const CollectionApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
332
|
+
return {
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
* @summary Add a new doc
|
|
336
|
+
* @param {string} collectionId
|
|
337
|
+
* @param {CreateDocumentRequestDTO} createDocumentRequestDTO
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
collectionControllerAddDocToCollection: async (collectionId: string, createDocumentRequestDTO: CreateDocumentRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
342
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
343
|
+
assertParamExists('collectionControllerAddDocToCollection', 'collectionId', collectionId)
|
|
344
|
+
// verify required parameter 'createDocumentRequestDTO' is not null or undefined
|
|
345
|
+
assertParamExists('collectionControllerAddDocToCollection', 'createDocumentRequestDTO', createDocumentRequestDTO)
|
|
346
|
+
const localVarPath = `/collections/{collection_id}/docs`
|
|
347
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
348
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
349
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
350
|
+
let baseOptions;
|
|
351
|
+
if (configuration) {
|
|
352
|
+
baseOptions = configuration.baseOptions;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
356
|
+
const localVarHeaderParameter = {} as any;
|
|
357
|
+
const localVarQueryParameter = {} as any;
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
362
|
+
|
|
363
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
364
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
365
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
366
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createDocumentRequestDTO, localVarRequestOptions, configuration)
|
|
367
|
+
|
|
368
|
+
return {
|
|
369
|
+
url: toPathString(localVarUrlObj),
|
|
370
|
+
options: localVarRequestOptions,
|
|
371
|
+
};
|
|
372
|
+
},
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @summary Use a file to chunk and add to collection
|
|
376
|
+
* @param {string} collectionId
|
|
377
|
+
* @param {ChunkFileRequestDTO} chunkFileRequestDTO
|
|
378
|
+
* @param {*} [options] Override http request option.
|
|
379
|
+
* @throws {RequiredError}
|
|
380
|
+
*/
|
|
381
|
+
collectionControllerChunkFileToCollection: async (collectionId: string, chunkFileRequestDTO: ChunkFileRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
382
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
383
|
+
assertParamExists('collectionControllerChunkFileToCollection', 'collectionId', collectionId)
|
|
384
|
+
// verify required parameter 'chunkFileRequestDTO' is not null or undefined
|
|
385
|
+
assertParamExists('collectionControllerChunkFileToCollection', 'chunkFileRequestDTO', chunkFileRequestDTO)
|
|
386
|
+
const localVarPath = `/collections/{collection_id}/docs/file`
|
|
387
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
388
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
389
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
390
|
+
let baseOptions;
|
|
391
|
+
if (configuration) {
|
|
392
|
+
baseOptions = configuration.baseOptions;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
396
|
+
const localVarHeaderParameter = {} as any;
|
|
397
|
+
const localVarQueryParameter = {} as any;
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
402
|
+
|
|
403
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
404
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
405
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
406
|
+
localVarRequestOptions.data = serializeDataIfNeeded(chunkFileRequestDTO, localVarRequestOptions, configuration)
|
|
407
|
+
|
|
408
|
+
return {
|
|
409
|
+
url: toPathString(localVarUrlObj),
|
|
410
|
+
options: localVarRequestOptions,
|
|
411
|
+
};
|
|
412
|
+
},
|
|
413
|
+
/**
|
|
414
|
+
*
|
|
415
|
+
* @summary Create a new collection
|
|
416
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
417
|
+
* @param {*} [options] Override http request option.
|
|
418
|
+
* @throws {RequiredError}
|
|
419
|
+
*/
|
|
420
|
+
collectionControllerCreateCollection: async (createCollectionRequestDTO: CreateCollectionRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
421
|
+
// verify required parameter 'createCollectionRequestDTO' is not null or undefined
|
|
422
|
+
assertParamExists('collectionControllerCreateCollection', 'createCollectionRequestDTO', createCollectionRequestDTO)
|
|
423
|
+
const localVarPath = `/collections`;
|
|
424
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
425
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
426
|
+
let baseOptions;
|
|
427
|
+
if (configuration) {
|
|
428
|
+
baseOptions = configuration.baseOptions;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
432
|
+
const localVarHeaderParameter = {} as any;
|
|
433
|
+
const localVarQueryParameter = {} as any;
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
438
|
+
|
|
439
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
440
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
441
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
442
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createCollectionRequestDTO, localVarRequestOptions, configuration)
|
|
443
|
+
|
|
444
|
+
return {
|
|
445
|
+
url: toPathString(localVarUrlObj),
|
|
446
|
+
options: localVarRequestOptions,
|
|
447
|
+
};
|
|
448
|
+
},
|
|
449
|
+
/**
|
|
450
|
+
*
|
|
451
|
+
* @summary Delete a collection
|
|
452
|
+
* @param {string} collectionId
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
*/
|
|
456
|
+
collectionControllerDeleteCollection: async (collectionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
457
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
458
|
+
assertParamExists('collectionControllerDeleteCollection', 'collectionId', collectionId)
|
|
459
|
+
const localVarPath = `/collections/{collection_id}`
|
|
460
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
461
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
462
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
463
|
+
let baseOptions;
|
|
464
|
+
if (configuration) {
|
|
465
|
+
baseOptions = configuration.baseOptions;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
469
|
+
const localVarHeaderParameter = {} as any;
|
|
470
|
+
const localVarQueryParameter = {} as any;
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
475
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
476
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
477
|
+
|
|
478
|
+
return {
|
|
479
|
+
url: toPathString(localVarUrlObj),
|
|
480
|
+
options: localVarRequestOptions,
|
|
481
|
+
};
|
|
482
|
+
},
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* @summary Delete doc by ID
|
|
486
|
+
* @param {string} collectionId
|
|
487
|
+
* @param {string} docId
|
|
488
|
+
* @param {*} [options] Override http request option.
|
|
489
|
+
* @throws {RequiredError}
|
|
490
|
+
*/
|
|
491
|
+
collectionControllerDeleteDoc: async (collectionId: string, docId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
492
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
493
|
+
assertParamExists('collectionControllerDeleteDoc', 'collectionId', collectionId)
|
|
494
|
+
// verify required parameter 'docId' is not null or undefined
|
|
495
|
+
assertParamExists('collectionControllerDeleteDoc', 'docId', docId)
|
|
496
|
+
const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
|
|
497
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
|
|
498
|
+
.replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
|
|
499
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
500
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
501
|
+
let baseOptions;
|
|
502
|
+
if (configuration) {
|
|
503
|
+
baseOptions = configuration.baseOptions;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
507
|
+
const localVarHeaderParameter = {} as any;
|
|
508
|
+
const localVarQueryParameter = {} as any;
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
513
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
514
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
515
|
+
|
|
516
|
+
return {
|
|
517
|
+
url: toPathString(localVarUrlObj),
|
|
518
|
+
options: localVarRequestOptions,
|
|
519
|
+
};
|
|
520
|
+
},
|
|
521
|
+
/**
|
|
522
|
+
*
|
|
523
|
+
* @summary Delete docs based on metadata filter
|
|
524
|
+
* @param {string} collectionId
|
|
525
|
+
* @param {string} filter
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
*/
|
|
529
|
+
collectionControllerDeleteDocsByMetadata: async (collectionId: string, filter: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
530
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
531
|
+
assertParamExists('collectionControllerDeleteDocsByMetadata', 'collectionId', collectionId)
|
|
532
|
+
// verify required parameter 'filter' is not null or undefined
|
|
533
|
+
assertParamExists('collectionControllerDeleteDocsByMetadata', 'filter', filter)
|
|
534
|
+
const localVarPath = `/collections/{collection_id}/docs`
|
|
535
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
536
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
537
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
538
|
+
let baseOptions;
|
|
539
|
+
if (configuration) {
|
|
540
|
+
baseOptions = configuration.baseOptions;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
544
|
+
const localVarHeaderParameter = {} as any;
|
|
545
|
+
const localVarQueryParameter = {} as any;
|
|
546
|
+
|
|
547
|
+
if (filter !== undefined) {
|
|
548
|
+
localVarQueryParameter['filter'] = filter;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
554
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
555
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
556
|
+
|
|
557
|
+
return {
|
|
558
|
+
url: toPathString(localVarUrlObj),
|
|
559
|
+
options: localVarRequestOptions,
|
|
560
|
+
};
|
|
561
|
+
},
|
|
562
|
+
/**
|
|
563
|
+
*
|
|
564
|
+
* @summary Get a collection info
|
|
565
|
+
* @param {string} collectionId
|
|
566
|
+
* @param {*} [options] Override http request option.
|
|
567
|
+
* @throws {RequiredError}
|
|
568
|
+
*/
|
|
569
|
+
collectionControllerGetCollection: async (collectionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
570
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
571
|
+
assertParamExists('collectionControllerGetCollection', 'collectionId', collectionId)
|
|
572
|
+
const localVarPath = `/collections/{collection_id}`
|
|
573
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
574
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
575
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
576
|
+
let baseOptions;
|
|
577
|
+
if (configuration) {
|
|
578
|
+
baseOptions = configuration.baseOptions;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
582
|
+
const localVarHeaderParameter = {} as any;
|
|
583
|
+
const localVarQueryParameter = {} as any;
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
588
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
589
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
590
|
+
|
|
591
|
+
return {
|
|
592
|
+
url: toPathString(localVarUrlObj),
|
|
593
|
+
options: localVarRequestOptions,
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
/**
|
|
597
|
+
*
|
|
598
|
+
* @summary List all collections
|
|
599
|
+
* @param {*} [options] Override http request option.
|
|
600
|
+
* @throws {RequiredError}
|
|
601
|
+
*/
|
|
602
|
+
collectionControllerGetCollections: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
603
|
+
const localVarPath = `/collections`;
|
|
604
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
605
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
606
|
+
let baseOptions;
|
|
607
|
+
if (configuration) {
|
|
608
|
+
baseOptions = configuration.baseOptions;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
612
|
+
const localVarHeaderParameter = {} as any;
|
|
613
|
+
const localVarQueryParameter = {} as any;
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
618
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
619
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
620
|
+
|
|
621
|
+
return {
|
|
622
|
+
url: toPathString(localVarUrlObj),
|
|
623
|
+
options: localVarRequestOptions,
|
|
624
|
+
};
|
|
625
|
+
},
|
|
626
|
+
/**
|
|
627
|
+
*
|
|
628
|
+
* @summary Retrieve doc by ID
|
|
629
|
+
* @param {string} collectionId
|
|
630
|
+
* @param {string} docId
|
|
631
|
+
* @param {*} [options] Override http request option.
|
|
632
|
+
* @throws {RequiredError}
|
|
633
|
+
*/
|
|
634
|
+
collectionControllerGetDocById: async (collectionId: string, docId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
635
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
636
|
+
assertParamExists('collectionControllerGetDocById', 'collectionId', collectionId)
|
|
637
|
+
// verify required parameter 'docId' is not null or undefined
|
|
638
|
+
assertParamExists('collectionControllerGetDocById', 'docId', docId)
|
|
639
|
+
const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
|
|
640
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
|
|
641
|
+
.replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
|
|
642
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
643
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
644
|
+
let baseOptions;
|
|
645
|
+
if (configuration) {
|
|
646
|
+
baseOptions = configuration.baseOptions;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
650
|
+
const localVarHeaderParameter = {} as any;
|
|
651
|
+
const localVarQueryParameter = {} as any;
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
656
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
657
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
658
|
+
|
|
659
|
+
return {
|
|
660
|
+
url: toPathString(localVarUrlObj),
|
|
661
|
+
options: localVarRequestOptions,
|
|
662
|
+
};
|
|
663
|
+
},
|
|
664
|
+
/**
|
|
665
|
+
*
|
|
666
|
+
* @summary Similarity search query
|
|
667
|
+
* @param {string} collectionId
|
|
668
|
+
* @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
|
|
669
|
+
* @param {*} [options] Override http request option.
|
|
670
|
+
* @throws {RequiredError}
|
|
671
|
+
*/
|
|
672
|
+
collectionControllerSimilaritySearch: async (collectionId: string, similaritySearchQueryDTO: SimilaritySearchQueryDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
673
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
674
|
+
assertParamExists('collectionControllerSimilaritySearch', 'collectionId', collectionId)
|
|
675
|
+
// verify required parameter 'similaritySearchQueryDTO' is not null or undefined
|
|
676
|
+
assertParamExists('collectionControllerSimilaritySearch', 'similaritySearchQueryDTO', similaritySearchQueryDTO)
|
|
677
|
+
const localVarPath = `/collections/{collection_id}/query`
|
|
678
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
679
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
680
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
681
|
+
let baseOptions;
|
|
682
|
+
if (configuration) {
|
|
683
|
+
baseOptions = configuration.baseOptions;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
687
|
+
const localVarHeaderParameter = {} as any;
|
|
688
|
+
const localVarQueryParameter = {} as any;
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
693
|
+
|
|
694
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
695
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
696
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
697
|
+
localVarRequestOptions.data = serializeDataIfNeeded(similaritySearchQueryDTO, localVarRequestOptions, configuration)
|
|
698
|
+
|
|
699
|
+
return {
|
|
700
|
+
url: toPathString(localVarUrlObj),
|
|
701
|
+
options: localVarRequestOptions,
|
|
702
|
+
};
|
|
703
|
+
},
|
|
704
|
+
/**
|
|
705
|
+
*
|
|
706
|
+
* @summary Updates a collection
|
|
707
|
+
* @param {string} collectionId
|
|
708
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
709
|
+
* @param {*} [options] Override http request option.
|
|
710
|
+
* @throws {RequiredError}
|
|
711
|
+
*/
|
|
712
|
+
collectionControllerUpdateCollection: async (collectionId: string, createCollectionRequestDTO: CreateCollectionRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
713
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
714
|
+
assertParamExists('collectionControllerUpdateCollection', 'collectionId', collectionId)
|
|
715
|
+
// verify required parameter 'createCollectionRequestDTO' is not null or undefined
|
|
716
|
+
assertParamExists('collectionControllerUpdateCollection', 'createCollectionRequestDTO', createCollectionRequestDTO)
|
|
717
|
+
const localVarPath = `/collections/{collection_id}`
|
|
718
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)));
|
|
719
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
720
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
721
|
+
let baseOptions;
|
|
722
|
+
if (configuration) {
|
|
723
|
+
baseOptions = configuration.baseOptions;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
727
|
+
const localVarHeaderParameter = {} as any;
|
|
728
|
+
const localVarQueryParameter = {} as any;
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
733
|
+
|
|
734
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
735
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
736
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
737
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createCollectionRequestDTO, localVarRequestOptions, configuration)
|
|
738
|
+
|
|
739
|
+
return {
|
|
740
|
+
url: toPathString(localVarUrlObj),
|
|
741
|
+
options: localVarRequestOptions,
|
|
742
|
+
};
|
|
743
|
+
},
|
|
744
|
+
/**
|
|
745
|
+
*
|
|
746
|
+
* @summary Update or upsert doc
|
|
747
|
+
* @param {string} collectionId
|
|
748
|
+
* @param {string} docId
|
|
749
|
+
* @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
|
|
750
|
+
* @param {*} [options] Override http request option.
|
|
751
|
+
* @throws {RequiredError}
|
|
752
|
+
*/
|
|
753
|
+
collectionControllerUpdateDoc: async (collectionId: string, docId: string, updateDocumentRequestDTO: UpdateDocumentRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
754
|
+
// verify required parameter 'collectionId' is not null or undefined
|
|
755
|
+
assertParamExists('collectionControllerUpdateDoc', 'collectionId', collectionId)
|
|
756
|
+
// verify required parameter 'docId' is not null or undefined
|
|
757
|
+
assertParamExists('collectionControllerUpdateDoc', 'docId', docId)
|
|
758
|
+
// verify required parameter 'updateDocumentRequestDTO' is not null or undefined
|
|
759
|
+
assertParamExists('collectionControllerUpdateDoc', 'updateDocumentRequestDTO', updateDocumentRequestDTO)
|
|
760
|
+
const localVarPath = `/collections/{collection_id}/docs/{doc_id}`
|
|
761
|
+
.replace(`{${"collection_id"}}`, encodeURIComponent(String(collectionId)))
|
|
762
|
+
.replace(`{${"doc_id"}}`, encodeURIComponent(String(docId)));
|
|
763
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
764
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
765
|
+
let baseOptions;
|
|
766
|
+
if (configuration) {
|
|
767
|
+
baseOptions = configuration.baseOptions;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
771
|
+
const localVarHeaderParameter = {} as any;
|
|
772
|
+
const localVarQueryParameter = {} as any;
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
777
|
+
|
|
778
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
779
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
780
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
781
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateDocumentRequestDTO, localVarRequestOptions, configuration)
|
|
782
|
+
|
|
783
|
+
return {
|
|
784
|
+
url: toPathString(localVarUrlObj),
|
|
785
|
+
options: localVarRequestOptions,
|
|
786
|
+
};
|
|
787
|
+
},
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* CollectionApi - functional programming interface
|
|
793
|
+
* @export
|
|
794
|
+
*/
|
|
795
|
+
export const CollectionApiFp = function(configuration?: Configuration) {
|
|
796
|
+
const localVarAxiosParamCreator = CollectionApiAxiosParamCreator(configuration)
|
|
797
|
+
return {
|
|
798
|
+
/**
|
|
799
|
+
*
|
|
800
|
+
* @summary Add a new doc
|
|
801
|
+
* @param {string} collectionId
|
|
802
|
+
* @param {CreateDocumentRequestDTO} createDocumentRequestDTO
|
|
803
|
+
* @param {*} [options] Override http request option.
|
|
804
|
+
* @throws {RequiredError}
|
|
805
|
+
*/
|
|
806
|
+
async collectionControllerAddDocToCollection(collectionId: string, createDocumentRequestDTO: CreateDocumentRequestDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
807
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options);
|
|
808
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
809
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerAddDocToCollection']?.[localVarOperationServerIndex]?.url;
|
|
810
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
811
|
+
},
|
|
812
|
+
/**
|
|
813
|
+
*
|
|
814
|
+
* @summary Use a file to chunk and add to collection
|
|
815
|
+
* @param {string} collectionId
|
|
816
|
+
* @param {ChunkFileRequestDTO} chunkFileRequestDTO
|
|
817
|
+
* @param {*} [options] Override http request option.
|
|
818
|
+
* @throws {RequiredError}
|
|
819
|
+
*/
|
|
820
|
+
async collectionControllerChunkFileToCollection(collectionId: string, chunkFileRequestDTO: ChunkFileRequestDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
821
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options);
|
|
822
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
823
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerChunkFileToCollection']?.[localVarOperationServerIndex]?.url;
|
|
824
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
825
|
+
},
|
|
826
|
+
/**
|
|
827
|
+
*
|
|
828
|
+
* @summary Create a new collection
|
|
829
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
830
|
+
* @param {*} [options] Override http request option.
|
|
831
|
+
* @throws {RequiredError}
|
|
832
|
+
*/
|
|
833
|
+
async collectionControllerCreateCollection(createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
834
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerCreateCollection(createCollectionRequestDTO, options);
|
|
835
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
836
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerCreateCollection']?.[localVarOperationServerIndex]?.url;
|
|
837
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* @summary Delete a collection
|
|
842
|
+
* @param {string} collectionId
|
|
843
|
+
* @param {*} [options] Override http request option.
|
|
844
|
+
* @throws {RequiredError}
|
|
845
|
+
*/
|
|
846
|
+
async collectionControllerDeleteCollection(collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
847
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerDeleteCollection(collectionId, options);
|
|
848
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
849
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerDeleteCollection']?.[localVarOperationServerIndex]?.url;
|
|
850
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
851
|
+
},
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* @summary Delete doc by ID
|
|
855
|
+
* @param {string} collectionId
|
|
856
|
+
* @param {string} docId
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
async collectionControllerDeleteDoc(collectionId: string, docId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
861
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerDeleteDoc(collectionId, docId, options);
|
|
862
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
863
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerDeleteDoc']?.[localVarOperationServerIndex]?.url;
|
|
864
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
865
|
+
},
|
|
866
|
+
/**
|
|
867
|
+
*
|
|
868
|
+
* @summary Delete docs based on metadata filter
|
|
869
|
+
* @param {string} collectionId
|
|
870
|
+
* @param {string} filter
|
|
871
|
+
* @param {*} [options] Override http request option.
|
|
872
|
+
* @throws {RequiredError}
|
|
873
|
+
*/
|
|
874
|
+
async collectionControllerDeleteDocsByMetadata(collectionId: string, filter: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
875
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerDeleteDocsByMetadata(collectionId, filter, options);
|
|
876
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
877
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerDeleteDocsByMetadata']?.[localVarOperationServerIndex]?.url;
|
|
878
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
879
|
+
},
|
|
880
|
+
/**
|
|
881
|
+
*
|
|
882
|
+
* @summary Get a collection info
|
|
883
|
+
* @param {string} collectionId
|
|
884
|
+
* @param {*} [options] Override http request option.
|
|
885
|
+
* @throws {RequiredError}
|
|
886
|
+
*/
|
|
887
|
+
async collectionControllerGetCollection(collectionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
888
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerGetCollection(collectionId, options);
|
|
889
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
890
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerGetCollection']?.[localVarOperationServerIndex]?.url;
|
|
891
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
892
|
+
},
|
|
893
|
+
/**
|
|
894
|
+
*
|
|
895
|
+
* @summary List all collections
|
|
896
|
+
* @param {*} [options] Override http request option.
|
|
897
|
+
* @throws {RequiredError}
|
|
898
|
+
*/
|
|
899
|
+
async collectionControllerGetCollections(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
900
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerGetCollections(options);
|
|
901
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
902
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerGetCollections']?.[localVarOperationServerIndex]?.url;
|
|
903
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
904
|
+
},
|
|
905
|
+
/**
|
|
906
|
+
*
|
|
907
|
+
* @summary Retrieve doc by ID
|
|
908
|
+
* @param {string} collectionId
|
|
909
|
+
* @param {string} docId
|
|
910
|
+
* @param {*} [options] Override http request option.
|
|
911
|
+
* @throws {RequiredError}
|
|
912
|
+
*/
|
|
913
|
+
async collectionControllerGetDocById(collectionId: string, docId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
914
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerGetDocById(collectionId, docId, options);
|
|
915
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
916
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerGetDocById']?.[localVarOperationServerIndex]?.url;
|
|
917
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
918
|
+
},
|
|
919
|
+
/**
|
|
920
|
+
*
|
|
921
|
+
* @summary Similarity search query
|
|
922
|
+
* @param {string} collectionId
|
|
923
|
+
* @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
|
|
924
|
+
* @param {*} [options] Override http request option.
|
|
925
|
+
* @throws {RequiredError}
|
|
926
|
+
*/
|
|
927
|
+
async collectionControllerSimilaritySearch(collectionId: string, similaritySearchQueryDTO: SimilaritySearchQueryDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
928
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options);
|
|
929
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
930
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerSimilaritySearch']?.[localVarOperationServerIndex]?.url;
|
|
931
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
932
|
+
},
|
|
933
|
+
/**
|
|
934
|
+
*
|
|
935
|
+
* @summary Updates a collection
|
|
936
|
+
* @param {string} collectionId
|
|
937
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
938
|
+
* @param {*} [options] Override http request option.
|
|
939
|
+
* @throws {RequiredError}
|
|
940
|
+
*/
|
|
941
|
+
async collectionControllerUpdateCollection(collectionId: string, createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
942
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options);
|
|
943
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
944
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerUpdateCollection']?.[localVarOperationServerIndex]?.url;
|
|
945
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
946
|
+
},
|
|
947
|
+
/**
|
|
948
|
+
*
|
|
949
|
+
* @summary Update or upsert doc
|
|
950
|
+
* @param {string} collectionId
|
|
951
|
+
* @param {string} docId
|
|
952
|
+
* @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
|
|
953
|
+
* @param {*} [options] Override http request option.
|
|
954
|
+
* @throws {RequiredError}
|
|
955
|
+
*/
|
|
956
|
+
async collectionControllerUpdateDoc(collectionId: string, docId: string, updateDocumentRequestDTO: UpdateDocumentRequestDTO, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MessageResponseDTO>> {
|
|
957
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options);
|
|
958
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
959
|
+
const localVarOperationServerBasePath = operationServerMap['CollectionApi.collectionControllerUpdateDoc']?.[localVarOperationServerIndex]?.url;
|
|
960
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
961
|
+
},
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* CollectionApi - factory interface
|
|
967
|
+
* @export
|
|
968
|
+
*/
|
|
969
|
+
export const CollectionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
970
|
+
const localVarFp = CollectionApiFp(configuration)
|
|
971
|
+
return {
|
|
972
|
+
/**
|
|
973
|
+
*
|
|
974
|
+
* @summary Add a new doc
|
|
975
|
+
* @param {string} collectionId
|
|
976
|
+
* @param {CreateDocumentRequestDTO} createDocumentRequestDTO
|
|
977
|
+
* @param {*} [options] Override http request option.
|
|
978
|
+
* @throws {RequiredError}
|
|
979
|
+
*/
|
|
980
|
+
collectionControllerAddDocToCollection(collectionId: string, createDocumentRequestDTO: CreateDocumentRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
981
|
+
return localVarFp.collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options).then((request) => request(axios, basePath));
|
|
982
|
+
},
|
|
983
|
+
/**
|
|
984
|
+
*
|
|
985
|
+
* @summary Use a file to chunk and add to collection
|
|
986
|
+
* @param {string} collectionId
|
|
987
|
+
* @param {ChunkFileRequestDTO} chunkFileRequestDTO
|
|
988
|
+
* @param {*} [options] Override http request option.
|
|
989
|
+
* @throws {RequiredError}
|
|
990
|
+
*/
|
|
991
|
+
collectionControllerChunkFileToCollection(collectionId: string, chunkFileRequestDTO: ChunkFileRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
992
|
+
return localVarFp.collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options).then((request) => request(axios, basePath));
|
|
993
|
+
},
|
|
994
|
+
/**
|
|
995
|
+
*
|
|
996
|
+
* @summary Create a new collection
|
|
997
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
998
|
+
* @param {*} [options] Override http request option.
|
|
999
|
+
* @throws {RequiredError}
|
|
1000
|
+
*/
|
|
1001
|
+
collectionControllerCreateCollection(createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1002
|
+
return localVarFp.collectionControllerCreateCollection(createCollectionRequestDTO, options).then((request) => request(axios, basePath));
|
|
1003
|
+
},
|
|
1004
|
+
/**
|
|
1005
|
+
*
|
|
1006
|
+
* @summary Delete a collection
|
|
1007
|
+
* @param {string} collectionId
|
|
1008
|
+
* @param {*} [options] Override http request option.
|
|
1009
|
+
* @throws {RequiredError}
|
|
1010
|
+
*/
|
|
1011
|
+
collectionControllerDeleteCollection(collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1012
|
+
return localVarFp.collectionControllerDeleteCollection(collectionId, options).then((request) => request(axios, basePath));
|
|
1013
|
+
},
|
|
1014
|
+
/**
|
|
1015
|
+
*
|
|
1016
|
+
* @summary Delete doc by ID
|
|
1017
|
+
* @param {string} collectionId
|
|
1018
|
+
* @param {string} docId
|
|
1019
|
+
* @param {*} [options] Override http request option.
|
|
1020
|
+
* @throws {RequiredError}
|
|
1021
|
+
*/
|
|
1022
|
+
collectionControllerDeleteDoc(collectionId: string, docId: string, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1023
|
+
return localVarFp.collectionControllerDeleteDoc(collectionId, docId, options).then((request) => request(axios, basePath));
|
|
1024
|
+
},
|
|
1025
|
+
/**
|
|
1026
|
+
*
|
|
1027
|
+
* @summary Delete docs based on metadata filter
|
|
1028
|
+
* @param {string} collectionId
|
|
1029
|
+
* @param {string} filter
|
|
1030
|
+
* @param {*} [options] Override http request option.
|
|
1031
|
+
* @throws {RequiredError}
|
|
1032
|
+
*/
|
|
1033
|
+
collectionControllerDeleteDocsByMetadata(collectionId: string, filter: string, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1034
|
+
return localVarFp.collectionControllerDeleteDocsByMetadata(collectionId, filter, options).then((request) => request(axios, basePath));
|
|
1035
|
+
},
|
|
1036
|
+
/**
|
|
1037
|
+
*
|
|
1038
|
+
* @summary Get a collection info
|
|
1039
|
+
* @param {string} collectionId
|
|
1040
|
+
* @param {*} [options] Override http request option.
|
|
1041
|
+
* @throws {RequiredError}
|
|
1042
|
+
*/
|
|
1043
|
+
collectionControllerGetCollection(collectionId: string, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1044
|
+
return localVarFp.collectionControllerGetCollection(collectionId, options).then((request) => request(axios, basePath));
|
|
1045
|
+
},
|
|
1046
|
+
/**
|
|
1047
|
+
*
|
|
1048
|
+
* @summary List all collections
|
|
1049
|
+
* @param {*} [options] Override http request option.
|
|
1050
|
+
* @throws {RequiredError}
|
|
1051
|
+
*/
|
|
1052
|
+
collectionControllerGetCollections(options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1053
|
+
return localVarFp.collectionControllerGetCollections(options).then((request) => request(axios, basePath));
|
|
1054
|
+
},
|
|
1055
|
+
/**
|
|
1056
|
+
*
|
|
1057
|
+
* @summary Retrieve doc by ID
|
|
1058
|
+
* @param {string} collectionId
|
|
1059
|
+
* @param {string} docId
|
|
1060
|
+
* @param {*} [options] Override http request option.
|
|
1061
|
+
* @throws {RequiredError}
|
|
1062
|
+
*/
|
|
1063
|
+
collectionControllerGetDocById(collectionId: string, docId: string, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1064
|
+
return localVarFp.collectionControllerGetDocById(collectionId, docId, options).then((request) => request(axios, basePath));
|
|
1065
|
+
},
|
|
1066
|
+
/**
|
|
1067
|
+
*
|
|
1068
|
+
* @summary Similarity search query
|
|
1069
|
+
* @param {string} collectionId
|
|
1070
|
+
* @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
|
|
1071
|
+
* @param {*} [options] Override http request option.
|
|
1072
|
+
* @throws {RequiredError}
|
|
1073
|
+
*/
|
|
1074
|
+
collectionControllerSimilaritySearch(collectionId: string, similaritySearchQueryDTO: SimilaritySearchQueryDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1075
|
+
return localVarFp.collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options).then((request) => request(axios, basePath));
|
|
1076
|
+
},
|
|
1077
|
+
/**
|
|
1078
|
+
*
|
|
1079
|
+
* @summary Updates a collection
|
|
1080
|
+
* @param {string} collectionId
|
|
1081
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
1082
|
+
* @param {*} [options] Override http request option.
|
|
1083
|
+
* @throws {RequiredError}
|
|
1084
|
+
*/
|
|
1085
|
+
collectionControllerUpdateCollection(collectionId: string, createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1086
|
+
return localVarFp.collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options).then((request) => request(axios, basePath));
|
|
1087
|
+
},
|
|
1088
|
+
/**
|
|
1089
|
+
*
|
|
1090
|
+
* @summary Update or upsert doc
|
|
1091
|
+
* @param {string} collectionId
|
|
1092
|
+
* @param {string} docId
|
|
1093
|
+
* @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
|
|
1094
|
+
* @param {*} [options] Override http request option.
|
|
1095
|
+
* @throws {RequiredError}
|
|
1096
|
+
*/
|
|
1097
|
+
collectionControllerUpdateDoc(collectionId: string, docId: string, updateDocumentRequestDTO: UpdateDocumentRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<MessageResponseDTO> {
|
|
1098
|
+
return localVarFp.collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options).then((request) => request(axios, basePath));
|
|
1099
|
+
},
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* CollectionApi - object-oriented interface
|
|
1105
|
+
* @export
|
|
1106
|
+
* @class CollectionApi
|
|
1107
|
+
* @extends {BaseAPI}
|
|
1108
|
+
*/
|
|
1109
|
+
export class CollectionApi extends BaseAPI {
|
|
1110
|
+
/**
|
|
1111
|
+
*
|
|
1112
|
+
* @summary Add a new doc
|
|
1113
|
+
* @param {string} collectionId
|
|
1114
|
+
* @param {CreateDocumentRequestDTO} createDocumentRequestDTO
|
|
1115
|
+
* @param {*} [options] Override http request option.
|
|
1116
|
+
* @throws {RequiredError}
|
|
1117
|
+
* @memberof CollectionApi
|
|
1118
|
+
*/
|
|
1119
|
+
public collectionControllerAddDocToCollection(collectionId: string, createDocumentRequestDTO: CreateDocumentRequestDTO, options?: RawAxiosRequestConfig) {
|
|
1120
|
+
return CollectionApiFp(this.configuration).collectionControllerAddDocToCollection(collectionId, createDocumentRequestDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
*
|
|
1125
|
+
* @summary Use a file to chunk and add to collection
|
|
1126
|
+
* @param {string} collectionId
|
|
1127
|
+
* @param {ChunkFileRequestDTO} chunkFileRequestDTO
|
|
1128
|
+
* @param {*} [options] Override http request option.
|
|
1129
|
+
* @throws {RequiredError}
|
|
1130
|
+
* @memberof CollectionApi
|
|
1131
|
+
*/
|
|
1132
|
+
public collectionControllerChunkFileToCollection(collectionId: string, chunkFileRequestDTO: ChunkFileRequestDTO, options?: RawAxiosRequestConfig) {
|
|
1133
|
+
return CollectionApiFp(this.configuration).collectionControllerChunkFileToCollection(collectionId, chunkFileRequestDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
*
|
|
1138
|
+
* @summary Create a new collection
|
|
1139
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
1140
|
+
* @param {*} [options] Override http request option.
|
|
1141
|
+
* @throws {RequiredError}
|
|
1142
|
+
* @memberof CollectionApi
|
|
1143
|
+
*/
|
|
1144
|
+
public collectionControllerCreateCollection(createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig) {
|
|
1145
|
+
return CollectionApiFp(this.configuration).collectionControllerCreateCollection(createCollectionRequestDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
*
|
|
1150
|
+
* @summary Delete a collection
|
|
1151
|
+
* @param {string} collectionId
|
|
1152
|
+
* @param {*} [options] Override http request option.
|
|
1153
|
+
* @throws {RequiredError}
|
|
1154
|
+
* @memberof CollectionApi
|
|
1155
|
+
*/
|
|
1156
|
+
public collectionControllerDeleteCollection(collectionId: string, options?: RawAxiosRequestConfig) {
|
|
1157
|
+
return CollectionApiFp(this.configuration).collectionControllerDeleteCollection(collectionId, options).then((request) => request(this.axios, this.basePath));
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
*
|
|
1162
|
+
* @summary Delete doc by ID
|
|
1163
|
+
* @param {string} collectionId
|
|
1164
|
+
* @param {string} docId
|
|
1165
|
+
* @param {*} [options] Override http request option.
|
|
1166
|
+
* @throws {RequiredError}
|
|
1167
|
+
* @memberof CollectionApi
|
|
1168
|
+
*/
|
|
1169
|
+
public collectionControllerDeleteDoc(collectionId: string, docId: string, options?: RawAxiosRequestConfig) {
|
|
1170
|
+
return CollectionApiFp(this.configuration).collectionControllerDeleteDoc(collectionId, docId, options).then((request) => request(this.axios, this.basePath));
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
*
|
|
1175
|
+
* @summary Delete docs based on metadata filter
|
|
1176
|
+
* @param {string} collectionId
|
|
1177
|
+
* @param {string} filter
|
|
1178
|
+
* @param {*} [options] Override http request option.
|
|
1179
|
+
* @throws {RequiredError}
|
|
1180
|
+
* @memberof CollectionApi
|
|
1181
|
+
*/
|
|
1182
|
+
public collectionControllerDeleteDocsByMetadata(collectionId: string, filter: string, options?: RawAxiosRequestConfig) {
|
|
1183
|
+
return CollectionApiFp(this.configuration).collectionControllerDeleteDocsByMetadata(collectionId, filter, options).then((request) => request(this.axios, this.basePath));
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
*
|
|
1188
|
+
* @summary Get a collection info
|
|
1189
|
+
* @param {string} collectionId
|
|
1190
|
+
* @param {*} [options] Override http request option.
|
|
1191
|
+
* @throws {RequiredError}
|
|
1192
|
+
* @memberof CollectionApi
|
|
1193
|
+
*/
|
|
1194
|
+
public collectionControllerGetCollection(collectionId: string, options?: RawAxiosRequestConfig) {
|
|
1195
|
+
return CollectionApiFp(this.configuration).collectionControllerGetCollection(collectionId, options).then((request) => request(this.axios, this.basePath));
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
*
|
|
1200
|
+
* @summary List all collections
|
|
1201
|
+
* @param {*} [options] Override http request option.
|
|
1202
|
+
* @throws {RequiredError}
|
|
1203
|
+
* @memberof CollectionApi
|
|
1204
|
+
*/
|
|
1205
|
+
public collectionControllerGetCollections(options?: RawAxiosRequestConfig) {
|
|
1206
|
+
return CollectionApiFp(this.configuration).collectionControllerGetCollections(options).then((request) => request(this.axios, this.basePath));
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
*
|
|
1211
|
+
* @summary Retrieve doc by ID
|
|
1212
|
+
* @param {string} collectionId
|
|
1213
|
+
* @param {string} docId
|
|
1214
|
+
* @param {*} [options] Override http request option.
|
|
1215
|
+
* @throws {RequiredError}
|
|
1216
|
+
* @memberof CollectionApi
|
|
1217
|
+
*/
|
|
1218
|
+
public collectionControllerGetDocById(collectionId: string, docId: string, options?: RawAxiosRequestConfig) {
|
|
1219
|
+
return CollectionApiFp(this.configuration).collectionControllerGetDocById(collectionId, docId, options).then((request) => request(this.axios, this.basePath));
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
*
|
|
1224
|
+
* @summary Similarity search query
|
|
1225
|
+
* @param {string} collectionId
|
|
1226
|
+
* @param {SimilaritySearchQueryDTO} similaritySearchQueryDTO
|
|
1227
|
+
* @param {*} [options] Override http request option.
|
|
1228
|
+
* @throws {RequiredError}
|
|
1229
|
+
* @memberof CollectionApi
|
|
1230
|
+
*/
|
|
1231
|
+
public collectionControllerSimilaritySearch(collectionId: string, similaritySearchQueryDTO: SimilaritySearchQueryDTO, options?: RawAxiosRequestConfig) {
|
|
1232
|
+
return CollectionApiFp(this.configuration).collectionControllerSimilaritySearch(collectionId, similaritySearchQueryDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
*
|
|
1237
|
+
* @summary Updates a collection
|
|
1238
|
+
* @param {string} collectionId
|
|
1239
|
+
* @param {CreateCollectionRequestDTO} createCollectionRequestDTO
|
|
1240
|
+
* @param {*} [options] Override http request option.
|
|
1241
|
+
* @throws {RequiredError}
|
|
1242
|
+
* @memberof CollectionApi
|
|
1243
|
+
*/
|
|
1244
|
+
public collectionControllerUpdateCollection(collectionId: string, createCollectionRequestDTO: CreateCollectionRequestDTO, options?: RawAxiosRequestConfig) {
|
|
1245
|
+
return CollectionApiFp(this.configuration).collectionControllerUpdateCollection(collectionId, createCollectionRequestDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
*
|
|
1250
|
+
* @summary Update or upsert doc
|
|
1251
|
+
* @param {string} collectionId
|
|
1252
|
+
* @param {string} docId
|
|
1253
|
+
* @param {UpdateDocumentRequestDTO} updateDocumentRequestDTO
|
|
1254
|
+
* @param {*} [options] Override http request option.
|
|
1255
|
+
* @throws {RequiredError}
|
|
1256
|
+
* @memberof CollectionApi
|
|
1257
|
+
*/
|
|
1258
|
+
public collectionControllerUpdateDoc(collectionId: string, docId: string, updateDocumentRequestDTO: UpdateDocumentRequestDTO, options?: RawAxiosRequestConfig) {
|
|
1259
|
+
return CollectionApiFp(this.configuration).collectionControllerUpdateDoc(collectionId, docId, updateDocumentRequestDTO, options).then((request) => request(this.axios, this.basePath));
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|