@closerplatform/spinner-openapi 0.12.588 → 0.12.590
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +265 -4
- package/dist/api.js +308 -8
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -2282,6 +2282,67 @@ export interface ExternalMessageForm {
|
|
|
2282
2282
|
*/
|
|
2283
2283
|
context?: any;
|
|
2284
2284
|
}
|
|
2285
|
+
/**
|
|
2286
|
+
*
|
|
2287
|
+
* @export
|
|
2288
|
+
* @interface FileDto
|
|
2289
|
+
*/
|
|
2290
|
+
export interface FileDto {
|
|
2291
|
+
/**
|
|
2292
|
+
*
|
|
2293
|
+
* @type {string}
|
|
2294
|
+
* @memberof FileDto
|
|
2295
|
+
*/
|
|
2296
|
+
id: string;
|
|
2297
|
+
/**
|
|
2298
|
+
*
|
|
2299
|
+
* @type {string}
|
|
2300
|
+
* @memberof FileDto
|
|
2301
|
+
*/
|
|
2302
|
+
creator: string;
|
|
2303
|
+
/**
|
|
2304
|
+
*
|
|
2305
|
+
* @type {string}
|
|
2306
|
+
* @memberof FileDto
|
|
2307
|
+
*/
|
|
2308
|
+
token: string;
|
|
2309
|
+
/**
|
|
2310
|
+
*
|
|
2311
|
+
* @type {string}
|
|
2312
|
+
* @memberof FileDto
|
|
2313
|
+
*/
|
|
2314
|
+
type: string;
|
|
2315
|
+
/**
|
|
2316
|
+
*
|
|
2317
|
+
* @type {string}
|
|
2318
|
+
* @memberof FileDto
|
|
2319
|
+
*/
|
|
2320
|
+
url: string;
|
|
2321
|
+
/**
|
|
2322
|
+
*
|
|
2323
|
+
* @type {string}
|
|
2324
|
+
* @memberof FileDto
|
|
2325
|
+
*/
|
|
2326
|
+
orgId?: string;
|
|
2327
|
+
/**
|
|
2328
|
+
*
|
|
2329
|
+
* @type {string}
|
|
2330
|
+
* @memberof FileDto
|
|
2331
|
+
*/
|
|
2332
|
+
roomId?: string;
|
|
2333
|
+
/**
|
|
2334
|
+
*
|
|
2335
|
+
* @type {string}
|
|
2336
|
+
* @memberof FileDto
|
|
2337
|
+
*/
|
|
2338
|
+
callback?: string;
|
|
2339
|
+
/**
|
|
2340
|
+
*
|
|
2341
|
+
* @type {FileInfo}
|
|
2342
|
+
* @memberof FileDto
|
|
2343
|
+
*/
|
|
2344
|
+
info?: FileInfo;
|
|
2345
|
+
}
|
|
2285
2346
|
/**
|
|
2286
2347
|
*
|
|
2287
2348
|
* @export
|
|
@@ -2301,6 +2362,43 @@ export interface FileHandle {
|
|
|
2301
2362
|
*/
|
|
2302
2363
|
fileId?: string;
|
|
2303
2364
|
}
|
|
2365
|
+
/**
|
|
2366
|
+
*
|
|
2367
|
+
* @export
|
|
2368
|
+
* @interface FileInfo
|
|
2369
|
+
*/
|
|
2370
|
+
export interface FileInfo {
|
|
2371
|
+
/**
|
|
2372
|
+
*
|
|
2373
|
+
* @type {string}
|
|
2374
|
+
* @memberof FileInfo
|
|
2375
|
+
*/
|
|
2376
|
+
name: string;
|
|
2377
|
+
/**
|
|
2378
|
+
*
|
|
2379
|
+
* @type {string}
|
|
2380
|
+
* @memberof FileInfo
|
|
2381
|
+
*/
|
|
2382
|
+
mimeType: string;
|
|
2383
|
+
/**
|
|
2384
|
+
*
|
|
2385
|
+
* @type {number}
|
|
2386
|
+
* @memberof FileInfo
|
|
2387
|
+
*/
|
|
2388
|
+
size: number;
|
|
2389
|
+
/**
|
|
2390
|
+
*
|
|
2391
|
+
* @type {number}
|
|
2392
|
+
* @memberof FileInfo
|
|
2393
|
+
*/
|
|
2394
|
+
createdAt: number;
|
|
2395
|
+
/**
|
|
2396
|
+
*
|
|
2397
|
+
* @type {number}
|
|
2398
|
+
* @memberof FileInfo
|
|
2399
|
+
*/
|
|
2400
|
+
uploadedAt: number;
|
|
2401
|
+
}
|
|
2304
2402
|
/**
|
|
2305
2403
|
*
|
|
2306
2404
|
* @export
|
|
@@ -3257,6 +3355,37 @@ export interface InviteeForm {
|
|
|
3257
3355
|
*/
|
|
3258
3356
|
validTo?: number;
|
|
3259
3357
|
}
|
|
3358
|
+
/**
|
|
3359
|
+
*
|
|
3360
|
+
* @export
|
|
3361
|
+
* @interface KnowledgeBase
|
|
3362
|
+
*/
|
|
3363
|
+
export interface KnowledgeBase {
|
|
3364
|
+
/**
|
|
3365
|
+
*
|
|
3366
|
+
* @type {string}
|
|
3367
|
+
* @memberof KnowledgeBase
|
|
3368
|
+
*/
|
|
3369
|
+
id: string;
|
|
3370
|
+
/**
|
|
3371
|
+
*
|
|
3372
|
+
* @type {string}
|
|
3373
|
+
* @memberof KnowledgeBase
|
|
3374
|
+
*/
|
|
3375
|
+
orgId: string;
|
|
3376
|
+
/**
|
|
3377
|
+
*
|
|
3378
|
+
* @type {number}
|
|
3379
|
+
* @memberof KnowledgeBase
|
|
3380
|
+
*/
|
|
3381
|
+
createdAt: number;
|
|
3382
|
+
/**
|
|
3383
|
+
*
|
|
3384
|
+
* @type {number}
|
|
3385
|
+
* @memberof KnowledgeBase
|
|
3386
|
+
*/
|
|
3387
|
+
updatedAt?: number;
|
|
3388
|
+
}
|
|
3260
3389
|
/**
|
|
3261
3390
|
*
|
|
3262
3391
|
* @export
|
|
@@ -9163,39 +9292,135 @@ export declare class InviteesApi extends BaseAPI {
|
|
|
9163
9292
|
* @export
|
|
9164
9293
|
*/
|
|
9165
9294
|
export declare const KnowledgeBasesApiFetchParamCreator: (configuration?: Configuration) => {
|
|
9295
|
+
/**
|
|
9296
|
+
*
|
|
9297
|
+
* @summary Create knowledge base
|
|
9298
|
+
* @param {*} [options] Override http request option.
|
|
9299
|
+
* @throws {RequiredError}
|
|
9300
|
+
*/
|
|
9301
|
+
create(options?: any): FetchArgs;
|
|
9166
9302
|
/**
|
|
9167
9303
|
*
|
|
9168
9304
|
* @summary Create knowledge base's file
|
|
9305
|
+
* @param {string} id
|
|
9306
|
+
* @param {*} [options] Override http request option.
|
|
9307
|
+
* @throws {RequiredError}
|
|
9308
|
+
*/
|
|
9309
|
+
createFile(id: string, options?: any): FetchArgs;
|
|
9310
|
+
/**
|
|
9311
|
+
*
|
|
9312
|
+
* @summary Delete knowledge base's file
|
|
9313
|
+
* @param {string} knowledgeBaseId
|
|
9314
|
+
* @param {string} fileId
|
|
9315
|
+
* @param {*} [options] Override http request option.
|
|
9316
|
+
* @throws {RequiredError}
|
|
9317
|
+
*/
|
|
9318
|
+
deleteFile(knowledgeBaseId: string, fileId: string, options?: any): FetchArgs;
|
|
9319
|
+
/**
|
|
9320
|
+
*
|
|
9321
|
+
* @summary Get knowledge bases by orgId
|
|
9322
|
+
* @param {*} [options] Override http request option.
|
|
9323
|
+
* @throws {RequiredError}
|
|
9324
|
+
*/
|
|
9325
|
+
getByOrgId(options?: any): FetchArgs;
|
|
9326
|
+
/**
|
|
9327
|
+
*
|
|
9328
|
+
* @summary Get uploaded knowledge base's files
|
|
9329
|
+
* @param {string} id
|
|
9169
9330
|
* @param {*} [options] Override http request option.
|
|
9170
9331
|
* @throws {RequiredError}
|
|
9171
9332
|
*/
|
|
9172
|
-
|
|
9333
|
+
getUploadedFiles(id: string, options?: any): FetchArgs;
|
|
9173
9334
|
};
|
|
9174
9335
|
/**
|
|
9175
9336
|
* KnowledgeBasesApi - functional programming interface
|
|
9176
9337
|
* @export
|
|
9177
9338
|
*/
|
|
9178
9339
|
export declare const KnowledgeBasesApiFp: (configuration?: Configuration) => {
|
|
9340
|
+
/**
|
|
9341
|
+
*
|
|
9342
|
+
* @summary Create knowledge base
|
|
9343
|
+
* @param {*} [options] Override http request option.
|
|
9344
|
+
* @throws {RequiredError}
|
|
9345
|
+
*/
|
|
9346
|
+
create(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<KnowledgeBase>;
|
|
9179
9347
|
/**
|
|
9180
9348
|
*
|
|
9181
9349
|
* @summary Create knowledge base's file
|
|
9350
|
+
* @param {string} id
|
|
9182
9351
|
* @param {*} [options] Override http request option.
|
|
9183
9352
|
* @throws {RequiredError}
|
|
9184
9353
|
*/
|
|
9185
|
-
createFile(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<FileHandle>;
|
|
9354
|
+
createFile(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<FileHandle>;
|
|
9355
|
+
/**
|
|
9356
|
+
*
|
|
9357
|
+
* @summary Delete knowledge base's file
|
|
9358
|
+
* @param {string} knowledgeBaseId
|
|
9359
|
+
* @param {string} fileId
|
|
9360
|
+
* @param {*} [options] Override http request option.
|
|
9361
|
+
* @throws {RequiredError}
|
|
9362
|
+
*/
|
|
9363
|
+
deleteFile(knowledgeBaseId: string, fileId: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
|
|
9364
|
+
/**
|
|
9365
|
+
*
|
|
9366
|
+
* @summary Get knowledge bases by orgId
|
|
9367
|
+
* @param {*} [options] Override http request option.
|
|
9368
|
+
* @throws {RequiredError}
|
|
9369
|
+
*/
|
|
9370
|
+
getByOrgId(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Array<KnowledgeBase>>;
|
|
9371
|
+
/**
|
|
9372
|
+
*
|
|
9373
|
+
* @summary Get uploaded knowledge base's files
|
|
9374
|
+
* @param {string} id
|
|
9375
|
+
* @param {*} [options] Override http request option.
|
|
9376
|
+
* @throws {RequiredError}
|
|
9377
|
+
*/
|
|
9378
|
+
getUploadedFiles(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Array<FileDto>>;
|
|
9186
9379
|
};
|
|
9187
9380
|
/**
|
|
9188
9381
|
* KnowledgeBasesApi - factory interface
|
|
9189
9382
|
* @export
|
|
9190
9383
|
*/
|
|
9191
9384
|
export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
|
|
9385
|
+
/**
|
|
9386
|
+
*
|
|
9387
|
+
* @summary Create knowledge base
|
|
9388
|
+
* @param {*} [options] Override http request option.
|
|
9389
|
+
* @throws {RequiredError}
|
|
9390
|
+
*/
|
|
9391
|
+
create(options?: any): Promise<KnowledgeBase>;
|
|
9192
9392
|
/**
|
|
9193
9393
|
*
|
|
9194
9394
|
* @summary Create knowledge base's file
|
|
9395
|
+
* @param {string} id
|
|
9396
|
+
* @param {*} [options] Override http request option.
|
|
9397
|
+
* @throws {RequiredError}
|
|
9398
|
+
*/
|
|
9399
|
+
createFile(id: string, options?: any): Promise<FileHandle>;
|
|
9400
|
+
/**
|
|
9401
|
+
*
|
|
9402
|
+
* @summary Delete knowledge base's file
|
|
9403
|
+
* @param {string} knowledgeBaseId
|
|
9404
|
+
* @param {string} fileId
|
|
9405
|
+
* @param {*} [options] Override http request option.
|
|
9406
|
+
* @throws {RequiredError}
|
|
9407
|
+
*/
|
|
9408
|
+
deleteFile(knowledgeBaseId: string, fileId: string, options?: any): Promise<Response>;
|
|
9409
|
+
/**
|
|
9410
|
+
*
|
|
9411
|
+
* @summary Get knowledge bases by orgId
|
|
9412
|
+
* @param {*} [options] Override http request option.
|
|
9413
|
+
* @throws {RequiredError}
|
|
9414
|
+
*/
|
|
9415
|
+
getByOrgId(options?: any): Promise<KnowledgeBase[]>;
|
|
9416
|
+
/**
|
|
9417
|
+
*
|
|
9418
|
+
* @summary Get uploaded knowledge base's files
|
|
9419
|
+
* @param {string} id
|
|
9195
9420
|
* @param {*} [options] Override http request option.
|
|
9196
9421
|
* @throws {RequiredError}
|
|
9197
9422
|
*/
|
|
9198
|
-
|
|
9423
|
+
getUploadedFiles(id: string, options?: any): Promise<FileDto[]>;
|
|
9199
9424
|
};
|
|
9200
9425
|
/**
|
|
9201
9426
|
* KnowledgeBasesApi - object-oriented interface
|
|
@@ -9204,14 +9429,50 @@ export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, f
|
|
|
9204
9429
|
* @extends {BaseAPI}
|
|
9205
9430
|
*/
|
|
9206
9431
|
export declare class KnowledgeBasesApi extends BaseAPI {
|
|
9432
|
+
/**
|
|
9433
|
+
*
|
|
9434
|
+
* @summary Create knowledge base
|
|
9435
|
+
* @param {*} [options] Override http request option.
|
|
9436
|
+
* @throws {RequiredError}
|
|
9437
|
+
* @memberof KnowledgeBasesApi
|
|
9438
|
+
*/
|
|
9439
|
+
create(options?: any): Promise<KnowledgeBase>;
|
|
9207
9440
|
/**
|
|
9208
9441
|
*
|
|
9209
9442
|
* @summary Create knowledge base's file
|
|
9443
|
+
* @param {string} id
|
|
9444
|
+
* @param {*} [options] Override http request option.
|
|
9445
|
+
* @throws {RequiredError}
|
|
9446
|
+
* @memberof KnowledgeBasesApi
|
|
9447
|
+
*/
|
|
9448
|
+
createFile(id: string, options?: any): Promise<FileHandle>;
|
|
9449
|
+
/**
|
|
9450
|
+
*
|
|
9451
|
+
* @summary Delete knowledge base's file
|
|
9452
|
+
* @param {string} knowledgeBaseId
|
|
9453
|
+
* @param {string} fileId
|
|
9454
|
+
* @param {*} [options] Override http request option.
|
|
9455
|
+
* @throws {RequiredError}
|
|
9456
|
+
* @memberof KnowledgeBasesApi
|
|
9457
|
+
*/
|
|
9458
|
+
deleteFile(knowledgeBaseId: string, fileId: string, options?: any): Promise<Response>;
|
|
9459
|
+
/**
|
|
9460
|
+
*
|
|
9461
|
+
* @summary Get knowledge bases by orgId
|
|
9462
|
+
* @param {*} [options] Override http request option.
|
|
9463
|
+
* @throws {RequiredError}
|
|
9464
|
+
* @memberof KnowledgeBasesApi
|
|
9465
|
+
*/
|
|
9466
|
+
getByOrgId(options?: any): Promise<KnowledgeBase[]>;
|
|
9467
|
+
/**
|
|
9468
|
+
*
|
|
9469
|
+
* @summary Get uploaded knowledge base's files
|
|
9470
|
+
* @param {string} id
|
|
9210
9471
|
* @param {*} [options] Override http request option.
|
|
9211
9472
|
* @throws {RequiredError}
|
|
9212
9473
|
* @memberof KnowledgeBasesApi
|
|
9213
9474
|
*/
|
|
9214
|
-
|
|
9475
|
+
getUploadedFiles(id: string, options?: any): Promise<FileDto[]>;
|
|
9215
9476
|
}
|
|
9216
9477
|
/**
|
|
9217
9478
|
* MainNotificationsApi - fetch parameter creator
|
package/dist/api.js
CHANGED
|
@@ -4879,14 +4879,48 @@ exports.InviteesApi = InviteesApi;
|
|
|
4879
4879
|
*/
|
|
4880
4880
|
const KnowledgeBasesApiFetchParamCreator = function (configuration) {
|
|
4881
4881
|
return {
|
|
4882
|
+
/**
|
|
4883
|
+
*
|
|
4884
|
+
* @summary Create knowledge base
|
|
4885
|
+
* @param {*} [options] Override http request option.
|
|
4886
|
+
* @throws {RequiredError}
|
|
4887
|
+
*/
|
|
4888
|
+
create(options = {}) {
|
|
4889
|
+
const localVarPath = `/knowledge-bases`;
|
|
4890
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
4891
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
4892
|
+
const localVarHeaderParameter = {};
|
|
4893
|
+
const localVarQueryParameter = {};
|
|
4894
|
+
// authentication apiKey required
|
|
4895
|
+
if (configuration && configuration.apiKey) {
|
|
4896
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
4897
|
+
? configuration.apiKey("X-Api-Key")
|
|
4898
|
+
: configuration.apiKey;
|
|
4899
|
+
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
|
|
4900
|
+
}
|
|
4901
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
4902
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
4903
|
+
delete localVarUrlObj.search;
|
|
4904
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
4905
|
+
return {
|
|
4906
|
+
url: url.format(localVarUrlObj),
|
|
4907
|
+
options: localVarRequestOptions,
|
|
4908
|
+
};
|
|
4909
|
+
},
|
|
4882
4910
|
/**
|
|
4883
4911
|
*
|
|
4884
4912
|
* @summary Create knowledge base's file
|
|
4913
|
+
* @param {string} id
|
|
4885
4914
|
* @param {*} [options] Override http request option.
|
|
4886
4915
|
* @throws {RequiredError}
|
|
4887
4916
|
*/
|
|
4888
|
-
createFile(options = {}) {
|
|
4889
|
-
|
|
4917
|
+
createFile(id, options = {}) {
|
|
4918
|
+
// verify required parameter 'id' is not null or undefined
|
|
4919
|
+
if (id === null || id === undefined) {
|
|
4920
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling createFile.');
|
|
4921
|
+
}
|
|
4922
|
+
const localVarPath = `/knowledge-bases/{id}/files`
|
|
4923
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4890
4924
|
const localVarUrlObj = url.parse(localVarPath, true);
|
|
4891
4925
|
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
4892
4926
|
const localVarHeaderParameter = {};
|
|
@@ -4907,6 +4941,108 @@ const KnowledgeBasesApiFetchParamCreator = function (configuration) {
|
|
|
4907
4941
|
options: localVarRequestOptions,
|
|
4908
4942
|
};
|
|
4909
4943
|
},
|
|
4944
|
+
/**
|
|
4945
|
+
*
|
|
4946
|
+
* @summary Delete knowledge base's file
|
|
4947
|
+
* @param {string} knowledgeBaseId
|
|
4948
|
+
* @param {string} fileId
|
|
4949
|
+
* @param {*} [options] Override http request option.
|
|
4950
|
+
* @throws {RequiredError}
|
|
4951
|
+
*/
|
|
4952
|
+
deleteFile(knowledgeBaseId, fileId, options = {}) {
|
|
4953
|
+
// verify required parameter 'knowledgeBaseId' is not null or undefined
|
|
4954
|
+
if (knowledgeBaseId === null || knowledgeBaseId === undefined) {
|
|
4955
|
+
throw new RequiredError('knowledgeBaseId', 'Required parameter knowledgeBaseId was null or undefined when calling deleteFile.');
|
|
4956
|
+
}
|
|
4957
|
+
// verify required parameter 'fileId' is not null or undefined
|
|
4958
|
+
if (fileId === null || fileId === undefined) {
|
|
4959
|
+
throw new RequiredError('fileId', 'Required parameter fileId was null or undefined when calling deleteFile.');
|
|
4960
|
+
}
|
|
4961
|
+
const localVarPath = `/knowledge-bases/{knowledgeBaseId}/files/{fileId}`
|
|
4962
|
+
.replace(`{${"knowledgeBaseId"}}`, encodeURIComponent(String(knowledgeBaseId)))
|
|
4963
|
+
.replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
|
|
4964
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
4965
|
+
const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
|
|
4966
|
+
const localVarHeaderParameter = {};
|
|
4967
|
+
const localVarQueryParameter = {};
|
|
4968
|
+
// authentication apiKey required
|
|
4969
|
+
if (configuration && configuration.apiKey) {
|
|
4970
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
4971
|
+
? configuration.apiKey("X-Api-Key")
|
|
4972
|
+
: configuration.apiKey;
|
|
4973
|
+
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
|
|
4974
|
+
}
|
|
4975
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
4976
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
4977
|
+
delete localVarUrlObj.search;
|
|
4978
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
4979
|
+
return {
|
|
4980
|
+
url: url.format(localVarUrlObj),
|
|
4981
|
+
options: localVarRequestOptions,
|
|
4982
|
+
};
|
|
4983
|
+
},
|
|
4984
|
+
/**
|
|
4985
|
+
*
|
|
4986
|
+
* @summary Get knowledge bases by orgId
|
|
4987
|
+
* @param {*} [options] Override http request option.
|
|
4988
|
+
* @throws {RequiredError}
|
|
4989
|
+
*/
|
|
4990
|
+
getByOrgId(options = {}) {
|
|
4991
|
+
const localVarPath = `/knowledge-bases`;
|
|
4992
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
4993
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
4994
|
+
const localVarHeaderParameter = {};
|
|
4995
|
+
const localVarQueryParameter = {};
|
|
4996
|
+
// authentication apiKey required
|
|
4997
|
+
if (configuration && configuration.apiKey) {
|
|
4998
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
4999
|
+
? configuration.apiKey("X-Api-Key")
|
|
5000
|
+
: configuration.apiKey;
|
|
5001
|
+
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
|
|
5002
|
+
}
|
|
5003
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
5004
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
5005
|
+
delete localVarUrlObj.search;
|
|
5006
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
5007
|
+
return {
|
|
5008
|
+
url: url.format(localVarUrlObj),
|
|
5009
|
+
options: localVarRequestOptions,
|
|
5010
|
+
};
|
|
5011
|
+
},
|
|
5012
|
+
/**
|
|
5013
|
+
*
|
|
5014
|
+
* @summary Get uploaded knowledge base's files
|
|
5015
|
+
* @param {string} id
|
|
5016
|
+
* @param {*} [options] Override http request option.
|
|
5017
|
+
* @throws {RequiredError}
|
|
5018
|
+
*/
|
|
5019
|
+
getUploadedFiles(id, options = {}) {
|
|
5020
|
+
// verify required parameter 'id' is not null or undefined
|
|
5021
|
+
if (id === null || id === undefined) {
|
|
5022
|
+
throw new RequiredError('id', 'Required parameter id was null or undefined when calling getUploadedFiles.');
|
|
5023
|
+
}
|
|
5024
|
+
const localVarPath = `/knowledge-bases/{id}`
|
|
5025
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
5026
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
5027
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
5028
|
+
const localVarHeaderParameter = {};
|
|
5029
|
+
const localVarQueryParameter = {};
|
|
5030
|
+
// authentication apiKey required
|
|
5031
|
+
if (configuration && configuration.apiKey) {
|
|
5032
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
5033
|
+
? configuration.apiKey("X-Api-Key")
|
|
5034
|
+
: configuration.apiKey;
|
|
5035
|
+
localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
|
|
5036
|
+
}
|
|
5037
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
5038
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
5039
|
+
delete localVarUrlObj.search;
|
|
5040
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
5041
|
+
return {
|
|
5042
|
+
url: url.format(localVarUrlObj),
|
|
5043
|
+
options: localVarRequestOptions,
|
|
5044
|
+
};
|
|
5045
|
+
},
|
|
4910
5046
|
};
|
|
4911
5047
|
};
|
|
4912
5048
|
exports.KnowledgeBasesApiFetchParamCreator = KnowledgeBasesApiFetchParamCreator;
|
|
@@ -4916,14 +5052,94 @@ exports.KnowledgeBasesApiFetchParamCreator = KnowledgeBasesApiFetchParamCreator;
|
|
|
4916
5052
|
*/
|
|
4917
5053
|
const KnowledgeBasesApiFp = function (configuration) {
|
|
4918
5054
|
return {
|
|
5055
|
+
/**
|
|
5056
|
+
*
|
|
5057
|
+
* @summary Create knowledge base
|
|
5058
|
+
* @param {*} [options] Override http request option.
|
|
5059
|
+
* @throws {RequiredError}
|
|
5060
|
+
*/
|
|
5061
|
+
create(options) {
|
|
5062
|
+
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).create(options);
|
|
5063
|
+
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
|
|
5064
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
5065
|
+
if (response.status >= 200 && response.status < 300) {
|
|
5066
|
+
return response.json();
|
|
5067
|
+
}
|
|
5068
|
+
else {
|
|
5069
|
+
throw response;
|
|
5070
|
+
}
|
|
5071
|
+
});
|
|
5072
|
+
};
|
|
5073
|
+
},
|
|
4919
5074
|
/**
|
|
4920
5075
|
*
|
|
4921
5076
|
* @summary Create knowledge base's file
|
|
5077
|
+
* @param {string} id
|
|
4922
5078
|
* @param {*} [options] Override http request option.
|
|
4923
5079
|
* @throws {RequiredError}
|
|
4924
5080
|
*/
|
|
4925
|
-
createFile(options) {
|
|
4926
|
-
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).createFile(options);
|
|
5081
|
+
createFile(id, options) {
|
|
5082
|
+
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).createFile(id, options);
|
|
5083
|
+
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
|
|
5084
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
5085
|
+
if (response.status >= 200 && response.status < 300) {
|
|
5086
|
+
return response.json();
|
|
5087
|
+
}
|
|
5088
|
+
else {
|
|
5089
|
+
throw response;
|
|
5090
|
+
}
|
|
5091
|
+
});
|
|
5092
|
+
};
|
|
5093
|
+
},
|
|
5094
|
+
/**
|
|
5095
|
+
*
|
|
5096
|
+
* @summary Delete knowledge base's file
|
|
5097
|
+
* @param {string} knowledgeBaseId
|
|
5098
|
+
* @param {string} fileId
|
|
5099
|
+
* @param {*} [options] Override http request option.
|
|
5100
|
+
* @throws {RequiredError}
|
|
5101
|
+
*/
|
|
5102
|
+
deleteFile(knowledgeBaseId, fileId, options) {
|
|
5103
|
+
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).deleteFile(knowledgeBaseId, fileId, options);
|
|
5104
|
+
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
|
|
5105
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
5106
|
+
if (response.status >= 200 && response.status < 300) {
|
|
5107
|
+
return response;
|
|
5108
|
+
}
|
|
5109
|
+
else {
|
|
5110
|
+
throw response;
|
|
5111
|
+
}
|
|
5112
|
+
});
|
|
5113
|
+
};
|
|
5114
|
+
},
|
|
5115
|
+
/**
|
|
5116
|
+
*
|
|
5117
|
+
* @summary Get knowledge bases by orgId
|
|
5118
|
+
* @param {*} [options] Override http request option.
|
|
5119
|
+
* @throws {RequiredError}
|
|
5120
|
+
*/
|
|
5121
|
+
getByOrgId(options) {
|
|
5122
|
+
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).getByOrgId(options);
|
|
5123
|
+
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
|
|
5124
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
5125
|
+
if (response.status >= 200 && response.status < 300) {
|
|
5126
|
+
return response.json();
|
|
5127
|
+
}
|
|
5128
|
+
else {
|
|
5129
|
+
throw response;
|
|
5130
|
+
}
|
|
5131
|
+
});
|
|
5132
|
+
};
|
|
5133
|
+
},
|
|
5134
|
+
/**
|
|
5135
|
+
*
|
|
5136
|
+
* @summary Get uploaded knowledge base's files
|
|
5137
|
+
* @param {string} id
|
|
5138
|
+
* @param {*} [options] Override http request option.
|
|
5139
|
+
* @throws {RequiredError}
|
|
5140
|
+
*/
|
|
5141
|
+
getUploadedFiles(id, options) {
|
|
5142
|
+
const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).getUploadedFiles(id, options);
|
|
4927
5143
|
return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
|
|
4928
5144
|
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
4929
5145
|
if (response.status >= 200 && response.status < 300) {
|
|
@@ -4944,14 +5160,54 @@ exports.KnowledgeBasesApiFp = KnowledgeBasesApiFp;
|
|
|
4944
5160
|
*/
|
|
4945
5161
|
const KnowledgeBasesApiFactory = function (configuration, fetch, basePath) {
|
|
4946
5162
|
return {
|
|
5163
|
+
/**
|
|
5164
|
+
*
|
|
5165
|
+
* @summary Create knowledge base
|
|
5166
|
+
* @param {*} [options] Override http request option.
|
|
5167
|
+
* @throws {RequiredError}
|
|
5168
|
+
*/
|
|
5169
|
+
create(options) {
|
|
5170
|
+
return (0, exports.KnowledgeBasesApiFp)(configuration).create(options)(fetch, basePath);
|
|
5171
|
+
},
|
|
4947
5172
|
/**
|
|
4948
5173
|
*
|
|
4949
5174
|
* @summary Create knowledge base's file
|
|
5175
|
+
* @param {string} id
|
|
5176
|
+
* @param {*} [options] Override http request option.
|
|
5177
|
+
* @throws {RequiredError}
|
|
5178
|
+
*/
|
|
5179
|
+
createFile(id, options) {
|
|
5180
|
+
return (0, exports.KnowledgeBasesApiFp)(configuration).createFile(id, options)(fetch, basePath);
|
|
5181
|
+
},
|
|
5182
|
+
/**
|
|
5183
|
+
*
|
|
5184
|
+
* @summary Delete knowledge base's file
|
|
5185
|
+
* @param {string} knowledgeBaseId
|
|
5186
|
+
* @param {string} fileId
|
|
4950
5187
|
* @param {*} [options] Override http request option.
|
|
4951
5188
|
* @throws {RequiredError}
|
|
4952
5189
|
*/
|
|
4953
|
-
|
|
4954
|
-
return (0, exports.KnowledgeBasesApiFp)(configuration).
|
|
5190
|
+
deleteFile(knowledgeBaseId, fileId, options) {
|
|
5191
|
+
return (0, exports.KnowledgeBasesApiFp)(configuration).deleteFile(knowledgeBaseId, fileId, options)(fetch, basePath);
|
|
5192
|
+
},
|
|
5193
|
+
/**
|
|
5194
|
+
*
|
|
5195
|
+
* @summary Get knowledge bases by orgId
|
|
5196
|
+
* @param {*} [options] Override http request option.
|
|
5197
|
+
* @throws {RequiredError}
|
|
5198
|
+
*/
|
|
5199
|
+
getByOrgId(options) {
|
|
5200
|
+
return (0, exports.KnowledgeBasesApiFp)(configuration).getByOrgId(options)(fetch, basePath);
|
|
5201
|
+
},
|
|
5202
|
+
/**
|
|
5203
|
+
*
|
|
5204
|
+
* @summary Get uploaded knowledge base's files
|
|
5205
|
+
* @param {string} id
|
|
5206
|
+
* @param {*} [options] Override http request option.
|
|
5207
|
+
* @throws {RequiredError}
|
|
5208
|
+
*/
|
|
5209
|
+
getUploadedFiles(id, options) {
|
|
5210
|
+
return (0, exports.KnowledgeBasesApiFp)(configuration).getUploadedFiles(id, options)(fetch, basePath);
|
|
4955
5211
|
},
|
|
4956
5212
|
};
|
|
4957
5213
|
};
|
|
@@ -4963,15 +5219,59 @@ exports.KnowledgeBasesApiFactory = KnowledgeBasesApiFactory;
|
|
|
4963
5219
|
* @extends {BaseAPI}
|
|
4964
5220
|
*/
|
|
4965
5221
|
class KnowledgeBasesApi extends BaseAPI {
|
|
5222
|
+
/**
|
|
5223
|
+
*
|
|
5224
|
+
* @summary Create knowledge base
|
|
5225
|
+
* @param {*} [options] Override http request option.
|
|
5226
|
+
* @throws {RequiredError}
|
|
5227
|
+
* @memberof KnowledgeBasesApi
|
|
5228
|
+
*/
|
|
5229
|
+
create(options) {
|
|
5230
|
+
return (0, exports.KnowledgeBasesApiFp)(this.configuration).create(options)(this.fetch, this.basePath);
|
|
5231
|
+
}
|
|
4966
5232
|
/**
|
|
4967
5233
|
*
|
|
4968
5234
|
* @summary Create knowledge base's file
|
|
5235
|
+
* @param {string} id
|
|
5236
|
+
* @param {*} [options] Override http request option.
|
|
5237
|
+
* @throws {RequiredError}
|
|
5238
|
+
* @memberof KnowledgeBasesApi
|
|
5239
|
+
*/
|
|
5240
|
+
createFile(id, options) {
|
|
5241
|
+
return (0, exports.KnowledgeBasesApiFp)(this.configuration).createFile(id, options)(this.fetch, this.basePath);
|
|
5242
|
+
}
|
|
5243
|
+
/**
|
|
5244
|
+
*
|
|
5245
|
+
* @summary Delete knowledge base's file
|
|
5246
|
+
* @param {string} knowledgeBaseId
|
|
5247
|
+
* @param {string} fileId
|
|
5248
|
+
* @param {*} [options] Override http request option.
|
|
5249
|
+
* @throws {RequiredError}
|
|
5250
|
+
* @memberof KnowledgeBasesApi
|
|
5251
|
+
*/
|
|
5252
|
+
deleteFile(knowledgeBaseId, fileId, options) {
|
|
5253
|
+
return (0, exports.KnowledgeBasesApiFp)(this.configuration).deleteFile(knowledgeBaseId, fileId, options)(this.fetch, this.basePath);
|
|
5254
|
+
}
|
|
5255
|
+
/**
|
|
5256
|
+
*
|
|
5257
|
+
* @summary Get knowledge bases by orgId
|
|
5258
|
+
* @param {*} [options] Override http request option.
|
|
5259
|
+
* @throws {RequiredError}
|
|
5260
|
+
* @memberof KnowledgeBasesApi
|
|
5261
|
+
*/
|
|
5262
|
+
getByOrgId(options) {
|
|
5263
|
+
return (0, exports.KnowledgeBasesApiFp)(this.configuration).getByOrgId(options)(this.fetch, this.basePath);
|
|
5264
|
+
}
|
|
5265
|
+
/**
|
|
5266
|
+
*
|
|
5267
|
+
* @summary Get uploaded knowledge base's files
|
|
5268
|
+
* @param {string} id
|
|
4969
5269
|
* @param {*} [options] Override http request option.
|
|
4970
5270
|
* @throws {RequiredError}
|
|
4971
5271
|
* @memberof KnowledgeBasesApi
|
|
4972
5272
|
*/
|
|
4973
|
-
|
|
4974
|
-
return (0, exports.KnowledgeBasesApiFp)(this.configuration).
|
|
5273
|
+
getUploadedFiles(id, options) {
|
|
5274
|
+
return (0, exports.KnowledgeBasesApiFp)(this.configuration).getUploadedFiles(id, options)(this.fetch, this.basePath);
|
|
4975
5275
|
}
|
|
4976
5276
|
}
|
|
4977
5277
|
exports.KnowledgeBasesApi = KnowledgeBasesApi;
|