@gooddata/api-client-tiger 11.28.0-alpha.0 → 11.28.0-alpha.2
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/api-client-tiger.d.ts +678 -555
- package/esm/endpoints/actions/index.d.ts +1 -1
- package/esm/endpoints/actions/index.d.ts.map +1 -1
- package/esm/endpoints/actions/index.js +2 -6
- package/esm/endpoints/actions/index.js.map +1 -1
- package/esm/endpoints/genAI/index.d.ts +2 -2
- package/esm/endpoints/genAI/index.d.ts.map +1 -1
- package/esm/endpoints/genAI/index.js +4 -2
- package/esm/endpoints/genAI/index.js.map +1 -1
- package/esm/gd-tiger-model/TigerTypes.d.ts +1 -1
- package/esm/gd-tiger-model/TigerTypes.d.ts.map +1 -1
- package/esm/gd-tiger-model/typeGuards.d.ts.map +1 -1
- package/esm/gd-tiger-model/typeGuards.js +9 -1
- package/esm/gd-tiger-model/typeGuards.js.map +1 -1
- package/esm/gd-tiger-model/typeGuards.test.js +22 -1
- package/esm/gd-tiger-model/typeGuards.test.js.map +1 -1
- package/esm/generated/afm-rest-api/api.d.ts +0 -512
- package/esm/generated/afm-rest-api/api.d.ts.map +1 -1
- package/esm/generated/afm-rest-api/api.js +0 -505
- package/esm/generated/afm-rest-api/api.js.map +1 -1
- package/esm/generated/afm-rest-api/index.js +1 -1
- package/esm/generated/afm-rest-api/index.js.map +1 -1
- package/esm/generated/ai-json-api/api.d.ts +613 -164
- package/esm/generated/ai-json-api/api.d.ts.map +1 -1
- package/esm/generated/ai-json-api/api.js +438 -48
- package/esm/generated/ai-json-api/api.js.map +1 -1
- package/esm/generated/auth-json-api/index.js +1 -1
- package/esm/generated/auth-json-api/index.js.map +1 -1
- package/esm/generated/automation-json-api/index.js +1 -1
- package/esm/generated/automation-json-api/index.js.map +1 -1
- package/esm/generated/export-json-api/index.js +1 -1
- package/esm/generated/export-json-api/index.js.map +1 -1
- package/esm/generated/metadata-json-api/api.d.ts +8 -0
- package/esm/generated/metadata-json-api/api.d.ts.map +1 -1
- package/esm/generated/metadata-json-api/api.js.map +1 -1
- package/esm/generated/metadata-json-api/index.js +1 -1
- package/esm/generated/metadata-json-api/index.js.map +1 -1
- package/esm/generated/result-json-api/index.js +1 -1
- package/esm/generated/result-json-api/index.js.map +1 -1
- package/esm/generated/scan-json-api/index.js +1 -1
- package/esm/generated/scan-json-api/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -3,7 +3,7 @@ import globalAxios from 'axios';
|
|
|
3
3
|
// @ts-ignore
|
|
4
4
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from './common.js';
|
|
5
5
|
// @ts-ignore
|
|
6
|
-
import { BASE_PATH, BaseAPI } from './base.js';
|
|
6
|
+
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from './base.js';
|
|
7
7
|
/**
|
|
8
8
|
* Date granularity for date filters.
|
|
9
9
|
*/
|
|
@@ -362,23 +362,114 @@ export class ItemsAi extends BaseAPI {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
365
|
+
/**
|
|
366
|
+
* Upload a new knowledge document. Returns 409 if filename already exists.
|
|
367
|
+
* @summary Upload Document
|
|
368
|
+
* @param {string} workspaceId
|
|
369
|
+
* @param {File} file
|
|
370
|
+
* @param {string} [title]
|
|
371
|
+
* @param {Array<string>} [scopes]
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
374
|
+
* @throws {RequiredError}
|
|
375
|
+
*/
|
|
376
|
+
export async function KnowledgeAiAxiosParamCreator_CreateDocument(workspaceId, file, title, scopes, options = {}, configuration) {
|
|
377
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
378
|
+
assertParamExists('createDocument', 'workspaceId', workspaceId);
|
|
379
|
+
// verify required parameter 'file' is not null or undefined
|
|
380
|
+
assertParamExists('createDocument', 'file', file);
|
|
381
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents`
|
|
382
|
+
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)));
|
|
383
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
384
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
385
|
+
let baseOptions;
|
|
386
|
+
if (configuration) {
|
|
387
|
+
baseOptions = configuration.baseOptions;
|
|
388
|
+
}
|
|
389
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
390
|
+
const localVarHeaderParameter = {};
|
|
391
|
+
const localVarQueryParameter = {};
|
|
392
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
393
|
+
if (file !== undefined) {
|
|
394
|
+
localVarFormParams.append('file', file);
|
|
395
|
+
}
|
|
396
|
+
if (title !== undefined) {
|
|
397
|
+
localVarFormParams.append('title', title);
|
|
398
|
+
}
|
|
399
|
+
if (scopes) {
|
|
400
|
+
localVarFormParams.append('scopes', scopes.join(COLLECTION_FORMATS.csv));
|
|
401
|
+
}
|
|
402
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
403
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
404
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
405
|
+
localVarRequestOptions.headers = {
|
|
406
|
+
...localVarHeaderParameter,
|
|
407
|
+
...headersFromBaseOptions,
|
|
408
|
+
...options.headers,
|
|
409
|
+
};
|
|
410
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
411
|
+
return {
|
|
412
|
+
url: toPathString(localVarUrlObj),
|
|
413
|
+
options: localVarRequestOptions,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
417
|
+
/**
|
|
418
|
+
* Delete a knowledge document and all its chunks.
|
|
419
|
+
* @summary Delete Document
|
|
420
|
+
* @param {string} workspaceId
|
|
421
|
+
* @param {string} documentId
|
|
422
|
+
* @param {*} [options] Override http request option.
|
|
423
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
424
|
+
* @throws {RequiredError}
|
|
425
|
+
*/
|
|
426
|
+
export async function KnowledgeAiAxiosParamCreator_DeleteDocument(workspaceId, documentId, options = {}, configuration) {
|
|
427
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
428
|
+
assertParamExists('deleteDocument', 'workspaceId', workspaceId);
|
|
429
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
430
|
+
assertParamExists('deleteDocument', 'documentId', documentId);
|
|
431
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}`
|
|
432
|
+
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)))
|
|
433
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
434
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
435
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
436
|
+
let baseOptions;
|
|
437
|
+
if (configuration) {
|
|
438
|
+
baseOptions = configuration.baseOptions;
|
|
439
|
+
}
|
|
440
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
|
|
441
|
+
const localVarHeaderParameter = {};
|
|
442
|
+
const localVarQueryParameter = {};
|
|
443
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
444
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
445
|
+
localVarRequestOptions.headers = {
|
|
446
|
+
...localVarHeaderParameter,
|
|
447
|
+
...headersFromBaseOptions,
|
|
448
|
+
...options.headers,
|
|
449
|
+
};
|
|
450
|
+
return {
|
|
451
|
+
url: toPathString(localVarUrlObj),
|
|
452
|
+
options: localVarRequestOptions,
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
365
456
|
/**
|
|
366
457
|
* Download a knowledge document\'s raw file.
|
|
367
458
|
* @summary Download Document
|
|
368
459
|
* @param {string} workspaceId
|
|
369
|
-
* @param {string}
|
|
460
|
+
* @param {string} documentId
|
|
370
461
|
* @param {*} [options] Override http request option.
|
|
371
462
|
* @param {Configuration} [configuration] Optional configuration.
|
|
372
463
|
* @throws {RequiredError}
|
|
373
464
|
*/
|
|
374
|
-
export async function
|
|
465
|
+
export async function KnowledgeAiAxiosParamCreator_DownloadDocument(workspaceId, documentId, options = {}, configuration) {
|
|
375
466
|
// verify required parameter 'workspaceId' is not null or undefined
|
|
376
|
-
assertParamExists('
|
|
377
|
-
// verify required parameter '
|
|
378
|
-
assertParamExists('
|
|
379
|
-
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{
|
|
467
|
+
assertParamExists('downloadDocument', 'workspaceId', workspaceId);
|
|
468
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
469
|
+
assertParamExists('downloadDocument', 'documentId', documentId);
|
|
470
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}/download`
|
|
380
471
|
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)))
|
|
381
|
-
.replace(`{${"
|
|
472
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
382
473
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
383
474
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
384
475
|
let baseOptions;
|
|
@@ -402,20 +493,62 @@ export async function KnowledgeAiAxiosParamCreator_DownloadDocumentApiV1AiWorksp
|
|
|
402
493
|
}
|
|
403
494
|
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
404
495
|
/**
|
|
405
|
-
*
|
|
406
|
-
* @summary
|
|
496
|
+
* Get a single knowledge document\'s metadata.
|
|
497
|
+
* @summary Get Document
|
|
407
498
|
* @param {string} workspaceId
|
|
408
|
-
* @param {
|
|
499
|
+
* @param {string} documentId
|
|
409
500
|
* @param {*} [options] Override http request option.
|
|
410
501
|
* @param {Configuration} [configuration] Optional configuration.
|
|
411
502
|
* @throws {RequiredError}
|
|
412
503
|
*/
|
|
413
|
-
export async function
|
|
504
|
+
export async function KnowledgeAiAxiosParamCreator_GetDocument(workspaceId, documentId, options = {}, configuration) {
|
|
414
505
|
// verify required parameter 'workspaceId' is not null or undefined
|
|
415
|
-
assertParamExists('
|
|
416
|
-
// verify required parameter '
|
|
417
|
-
assertParamExists('
|
|
418
|
-
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/
|
|
506
|
+
assertParamExists('getDocument', 'workspaceId', workspaceId);
|
|
507
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
508
|
+
assertParamExists('getDocument', 'documentId', documentId);
|
|
509
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}`
|
|
510
|
+
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)))
|
|
511
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
512
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
513
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
514
|
+
let baseOptions;
|
|
515
|
+
if (configuration) {
|
|
516
|
+
baseOptions = configuration.baseOptions;
|
|
517
|
+
}
|
|
518
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
519
|
+
const localVarHeaderParameter = {};
|
|
520
|
+
const localVarQueryParameter = {};
|
|
521
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
522
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
523
|
+
localVarRequestOptions.headers = {
|
|
524
|
+
...localVarHeaderParameter,
|
|
525
|
+
...headersFromBaseOptions,
|
|
526
|
+
...options.headers,
|
|
527
|
+
};
|
|
528
|
+
return {
|
|
529
|
+
url: toPathString(localVarUrlObj),
|
|
530
|
+
options: localVarRequestOptions,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
534
|
+
/**
|
|
535
|
+
* List knowledge documents accessible from the workspace.
|
|
536
|
+
* @summary List Documents
|
|
537
|
+
* @param {string} workspaceId
|
|
538
|
+
* @param {Array<string>} [scopes]
|
|
539
|
+
* @param {number} [size]
|
|
540
|
+
* @param {string} [pageToken]
|
|
541
|
+
* @param {string} [metaInclude]
|
|
542
|
+
* @param {'enabled' | 'disabled'} [state]
|
|
543
|
+
* @param {string} [query]
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
546
|
+
* @throws {RequiredError}
|
|
547
|
+
*/
|
|
548
|
+
export async function KnowledgeAiAxiosParamCreator_ListDocuments(workspaceId, scopes, size, pageToken, metaInclude, state, query, options = {}, configuration) {
|
|
549
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
550
|
+
assertParamExists('listDocuments', 'workspaceId', workspaceId);
|
|
551
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents`
|
|
419
552
|
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)));
|
|
420
553
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
421
554
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -423,14 +556,134 @@ export async function KnowledgeAiAxiosParamCreator_UploadDocumentApiV1AiWorkspac
|
|
|
423
556
|
if (configuration) {
|
|
424
557
|
baseOptions = configuration.baseOptions;
|
|
425
558
|
}
|
|
426
|
-
const localVarRequestOptions = { method: '
|
|
559
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
427
560
|
const localVarHeaderParameter = {};
|
|
428
561
|
const localVarQueryParameter = {};
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
562
|
+
if (scopes) {
|
|
563
|
+
localVarQueryParameter['scopes'] = scopes;
|
|
564
|
+
}
|
|
565
|
+
if (size !== undefined) {
|
|
566
|
+
localVarQueryParameter['size'] = size;
|
|
567
|
+
}
|
|
568
|
+
if (pageToken !== undefined) {
|
|
569
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
570
|
+
}
|
|
571
|
+
if (metaInclude !== undefined) {
|
|
572
|
+
localVarQueryParameter['metaInclude'] = metaInclude;
|
|
573
|
+
}
|
|
574
|
+
if (state !== undefined) {
|
|
575
|
+
localVarQueryParameter['state'] = state;
|
|
576
|
+
}
|
|
577
|
+
if (query !== undefined) {
|
|
578
|
+
localVarQueryParameter['query'] = query;
|
|
579
|
+
}
|
|
580
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
581
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
582
|
+
localVarRequestOptions.headers = {
|
|
583
|
+
...localVarHeaderParameter,
|
|
584
|
+
...headersFromBaseOptions,
|
|
585
|
+
...options.headers,
|
|
586
|
+
};
|
|
587
|
+
return {
|
|
588
|
+
url: toPathString(localVarUrlObj),
|
|
589
|
+
options: localVarRequestOptions,
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
593
|
+
/**
|
|
594
|
+
* Patch a knowledge document\'s metadata without re-uploading content.
|
|
595
|
+
* @summary Patch Document
|
|
596
|
+
* @param {string} workspaceId
|
|
597
|
+
* @param {string} documentId
|
|
598
|
+
* @param {AiPatchDocumentRequest} aiPatchDocumentRequest
|
|
599
|
+
* @param {*} [options] Override http request option.
|
|
600
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
601
|
+
* @throws {RequiredError}
|
|
602
|
+
*/
|
|
603
|
+
export async function KnowledgeAiAxiosParamCreator_PatchDocument(workspaceId, documentId, aiPatchDocumentRequest, options = {}, configuration) {
|
|
604
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
605
|
+
assertParamExists('patchDocument', 'workspaceId', workspaceId);
|
|
606
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
607
|
+
assertParamExists('patchDocument', 'documentId', documentId);
|
|
608
|
+
// verify required parameter 'aiPatchDocumentRequest' is not null or undefined
|
|
609
|
+
assertParamExists('patchDocument', 'aiPatchDocumentRequest', aiPatchDocumentRequest);
|
|
610
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents/{document_id}`
|
|
611
|
+
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)))
|
|
612
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
613
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
614
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
615
|
+
let baseOptions;
|
|
616
|
+
if (configuration) {
|
|
617
|
+
baseOptions = configuration.baseOptions;
|
|
618
|
+
}
|
|
619
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
|
|
620
|
+
const localVarHeaderParameter = {};
|
|
621
|
+
const localVarQueryParameter = {};
|
|
622
|
+
const consumes = [
|
|
623
|
+
'application/json'
|
|
624
|
+
];
|
|
625
|
+
// use application/json if present, otherwise fallback to the first one
|
|
626
|
+
localVarHeaderParameter['Content-Type'] = consumes.includes('application/json')
|
|
627
|
+
? 'application/json'
|
|
628
|
+
: consumes[0];
|
|
629
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
630
|
+
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
631
|
+
localVarRequestOptions.headers = {
|
|
632
|
+
...localVarHeaderParameter,
|
|
633
|
+
...headersFromBaseOptions,
|
|
634
|
+
...options.headers,
|
|
635
|
+
};
|
|
636
|
+
const needsSerialization = typeof aiPatchDocumentRequest !== "string" ||
|
|
637
|
+
localVarRequestOptions.headers["Content-Type"] === "application/json";
|
|
638
|
+
localVarRequestOptions.data = needsSerialization
|
|
639
|
+
? JSON.stringify(aiPatchDocumentRequest !== undefined ? aiPatchDocumentRequest : {})
|
|
640
|
+
: aiPatchDocumentRequest || "";
|
|
641
|
+
return {
|
|
642
|
+
url: toPathString(localVarUrlObj),
|
|
643
|
+
options: localVarRequestOptions,
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
// KnowledgeAi FP - KnowledgeAiAxiosParamCreator
|
|
647
|
+
/**
|
|
648
|
+
* Search the knowledge base using semantic similarity.
|
|
649
|
+
* @summary Search Documents
|
|
650
|
+
* @param {string} workspaceId
|
|
651
|
+
* @param {string} query
|
|
652
|
+
* @param {number} [limit]
|
|
653
|
+
* @param {number} [minScore]
|
|
654
|
+
* @param {Array<string>} [scopes]
|
|
655
|
+
* @param {*} [options] Override http request option.
|
|
656
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
657
|
+
* @throws {RequiredError}
|
|
658
|
+
*/
|
|
659
|
+
export async function KnowledgeAiAxiosParamCreator_SearchKnowledge(workspaceId, query, limit, minScore, scopes, options = {}, configuration) {
|
|
660
|
+
// verify required parameter 'workspaceId' is not null or undefined
|
|
661
|
+
assertParamExists('searchKnowledge', 'workspaceId', workspaceId);
|
|
662
|
+
// verify required parameter 'query' is not null or undefined
|
|
663
|
+
assertParamExists('searchKnowledge', 'query', query);
|
|
664
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/search`
|
|
665
|
+
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)));
|
|
666
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
667
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
668
|
+
let baseOptions;
|
|
669
|
+
if (configuration) {
|
|
670
|
+
baseOptions = configuration.baseOptions;
|
|
671
|
+
}
|
|
672
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
673
|
+
const localVarHeaderParameter = {};
|
|
674
|
+
const localVarQueryParameter = {};
|
|
675
|
+
if (query !== undefined) {
|
|
676
|
+
localVarQueryParameter['query'] = query;
|
|
677
|
+
}
|
|
678
|
+
if (limit !== undefined) {
|
|
679
|
+
localVarQueryParameter['limit'] = limit;
|
|
680
|
+
}
|
|
681
|
+
if (minScore !== undefined) {
|
|
682
|
+
localVarQueryParameter['minScore'] = minScore;
|
|
683
|
+
}
|
|
684
|
+
if (scopes) {
|
|
685
|
+
localVarQueryParameter['scopes'] = scopes;
|
|
432
686
|
}
|
|
433
|
-
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
434
687
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
435
688
|
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
436
689
|
localVarRequestOptions.headers = {
|
|
@@ -438,7 +691,6 @@ export async function KnowledgeAiAxiosParamCreator_UploadDocumentApiV1AiWorkspac
|
|
|
438
691
|
...headersFromBaseOptions,
|
|
439
692
|
...options.headers,
|
|
440
693
|
};
|
|
441
|
-
localVarRequestOptions.data = localVarFormParams;
|
|
442
694
|
return {
|
|
443
695
|
url: toPathString(localVarUrlObj),
|
|
444
696
|
options: localVarRequestOptions,
|
|
@@ -450,16 +702,18 @@ export async function KnowledgeAiAxiosParamCreator_UploadDocumentApiV1AiWorkspac
|
|
|
450
702
|
* @summary Upsert Document
|
|
451
703
|
* @param {string} workspaceId
|
|
452
704
|
* @param {File} file
|
|
705
|
+
* @param {string} [title]
|
|
706
|
+
* @param {Array<string>} [scopes]
|
|
453
707
|
* @param {*} [options] Override http request option.
|
|
454
708
|
* @param {Configuration} [configuration] Optional configuration.
|
|
455
709
|
* @throws {RequiredError}
|
|
456
710
|
*/
|
|
457
|
-
export async function
|
|
711
|
+
export async function KnowledgeAiAxiosParamCreator_UpsertDocument(workspaceId, file, title, scopes, options = {}, configuration) {
|
|
458
712
|
// verify required parameter 'workspaceId' is not null or undefined
|
|
459
|
-
assertParamExists('
|
|
713
|
+
assertParamExists('upsertDocument', 'workspaceId', workspaceId);
|
|
460
714
|
// verify required parameter 'file' is not null or undefined
|
|
461
|
-
assertParamExists('
|
|
462
|
-
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents
|
|
715
|
+
assertParamExists('upsertDocument', 'file', file);
|
|
716
|
+
const localVarPath = `/api/v1/ai/workspaces/{workspace_id}/knowledge/documents`
|
|
463
717
|
.replace(`{${"workspace_id"}}`, encodeURIComponent(String(workspaceId)));
|
|
464
718
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
465
719
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -474,6 +728,12 @@ export async function KnowledgeAiAxiosParamCreator_UpsertDocumentApiV1AiWorkspac
|
|
|
474
728
|
if (file !== undefined) {
|
|
475
729
|
localVarFormParams.append('file', file);
|
|
476
730
|
}
|
|
731
|
+
if (title !== undefined) {
|
|
732
|
+
localVarFormParams.append('title', title);
|
|
733
|
+
}
|
|
734
|
+
if (scopes) {
|
|
735
|
+
localVarFormParams.append('scopes', scopes.join(COLLECTION_FORMATS.csv));
|
|
736
|
+
}
|
|
477
737
|
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
478
738
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
479
739
|
const headersFromBaseOptions = baseOptions?.headers ? baseOptions.headers : {};
|
|
@@ -489,33 +749,108 @@ export async function KnowledgeAiAxiosParamCreator_UpsertDocumentApiV1AiWorkspac
|
|
|
489
749
|
};
|
|
490
750
|
}
|
|
491
751
|
// KnowledgeAi Api FP
|
|
752
|
+
/**
|
|
753
|
+
* Upload a new knowledge document. Returns 409 if filename already exists.
|
|
754
|
+
* @summary Upload Document
|
|
755
|
+
* @param {AxiosInstance} axios Axios instance.
|
|
756
|
+
* @param {string} basePath Base path.
|
|
757
|
+
* @param {KnowledgeAiCreateDocumentRequest} requestParameters Request parameters.
|
|
758
|
+
* @param {*} [options] Override http request option.
|
|
759
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
760
|
+
* @throws {RequiredError}
|
|
761
|
+
*/
|
|
762
|
+
export async function KnowledgeAi_CreateDocument(axios, basePath, requestParameters, options, configuration) {
|
|
763
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_CreateDocument(requestParameters.workspaceId, requestParameters.file, requestParameters.title, requestParameters.scopes, options || {}, configuration);
|
|
764
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
765
|
+
}
|
|
766
|
+
// KnowledgeAi Api FP
|
|
767
|
+
/**
|
|
768
|
+
* Delete a knowledge document and all its chunks.
|
|
769
|
+
* @summary Delete Document
|
|
770
|
+
* @param {AxiosInstance} axios Axios instance.
|
|
771
|
+
* @param {string} basePath Base path.
|
|
772
|
+
* @param {KnowledgeAiDeleteDocumentRequest} requestParameters Request parameters.
|
|
773
|
+
* @param {*} [options] Override http request option.
|
|
774
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
775
|
+
* @throws {RequiredError}
|
|
776
|
+
*/
|
|
777
|
+
export async function KnowledgeAi_DeleteDocument(axios, basePath, requestParameters, options, configuration) {
|
|
778
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_DeleteDocument(requestParameters.workspaceId, requestParameters.documentId, options || {}, configuration);
|
|
779
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
780
|
+
}
|
|
781
|
+
// KnowledgeAi Api FP
|
|
492
782
|
/**
|
|
493
783
|
* Download a knowledge document\'s raw file.
|
|
494
784
|
* @summary Download Document
|
|
495
785
|
* @param {AxiosInstance} axios Axios instance.
|
|
496
786
|
* @param {string} basePath Base path.
|
|
497
|
-
* @param {
|
|
787
|
+
* @param {KnowledgeAiDownloadDocumentRequest} requestParameters Request parameters.
|
|
498
788
|
* @param {*} [options] Override http request option.
|
|
499
789
|
* @param {Configuration} [configuration] Optional configuration.
|
|
500
790
|
* @throws {RequiredError}
|
|
501
791
|
*/
|
|
502
|
-
export async function
|
|
503
|
-
const localVarAxiosArgs = await
|
|
792
|
+
export async function KnowledgeAi_DownloadDocument(axios, basePath, requestParameters, options, configuration) {
|
|
793
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_DownloadDocument(requestParameters.workspaceId, requestParameters.documentId, options || {}, configuration);
|
|
504
794
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
505
795
|
}
|
|
506
796
|
// KnowledgeAi Api FP
|
|
507
797
|
/**
|
|
508
|
-
*
|
|
509
|
-
* @summary
|
|
798
|
+
* Get a single knowledge document\'s metadata.
|
|
799
|
+
* @summary Get Document
|
|
800
|
+
* @param {AxiosInstance} axios Axios instance.
|
|
801
|
+
* @param {string} basePath Base path.
|
|
802
|
+
* @param {KnowledgeAiGetDocumentRequest} requestParameters Request parameters.
|
|
803
|
+
* @param {*} [options] Override http request option.
|
|
804
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
805
|
+
* @throws {RequiredError}
|
|
806
|
+
*/
|
|
807
|
+
export async function KnowledgeAi_GetDocument(axios, basePath, requestParameters, options, configuration) {
|
|
808
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_GetDocument(requestParameters.workspaceId, requestParameters.documentId, options || {}, configuration);
|
|
809
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
810
|
+
}
|
|
811
|
+
// KnowledgeAi Api FP
|
|
812
|
+
/**
|
|
813
|
+
* List knowledge documents accessible from the workspace.
|
|
814
|
+
* @summary List Documents
|
|
815
|
+
* @param {AxiosInstance} axios Axios instance.
|
|
816
|
+
* @param {string} basePath Base path.
|
|
817
|
+
* @param {KnowledgeAiListDocumentsRequest} requestParameters Request parameters.
|
|
818
|
+
* @param {*} [options] Override http request option.
|
|
819
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
820
|
+
* @throws {RequiredError}
|
|
821
|
+
*/
|
|
822
|
+
export async function KnowledgeAi_ListDocuments(axios, basePath, requestParameters, options, configuration) {
|
|
823
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_ListDocuments(requestParameters.workspaceId, requestParameters.scopes, requestParameters.size, requestParameters.pageToken, requestParameters.metaInclude, requestParameters.state, requestParameters.query, options || {}, configuration);
|
|
824
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
825
|
+
}
|
|
826
|
+
// KnowledgeAi Api FP
|
|
827
|
+
/**
|
|
828
|
+
* Patch a knowledge document\'s metadata without re-uploading content.
|
|
829
|
+
* @summary Patch Document
|
|
830
|
+
* @param {AxiosInstance} axios Axios instance.
|
|
831
|
+
* @param {string} basePath Base path.
|
|
832
|
+
* @param {KnowledgeAiPatchDocumentRequest} requestParameters Request parameters.
|
|
833
|
+
* @param {*} [options] Override http request option.
|
|
834
|
+
* @param {Configuration} [configuration] Optional configuration.
|
|
835
|
+
* @throws {RequiredError}
|
|
836
|
+
*/
|
|
837
|
+
export async function KnowledgeAi_PatchDocument(axios, basePath, requestParameters, options, configuration) {
|
|
838
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_PatchDocument(requestParameters.workspaceId, requestParameters.documentId, requestParameters.aiPatchDocumentRequest, options || {}, configuration);
|
|
839
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
840
|
+
}
|
|
841
|
+
// KnowledgeAi Api FP
|
|
842
|
+
/**
|
|
843
|
+
* Search the knowledge base using semantic similarity.
|
|
844
|
+
* @summary Search Documents
|
|
510
845
|
* @param {AxiosInstance} axios Axios instance.
|
|
511
846
|
* @param {string} basePath Base path.
|
|
512
|
-
* @param {
|
|
847
|
+
* @param {KnowledgeAiSearchKnowledgeRequest} requestParameters Request parameters.
|
|
513
848
|
* @param {*} [options] Override http request option.
|
|
514
849
|
* @param {Configuration} [configuration] Optional configuration.
|
|
515
850
|
* @throws {RequiredError}
|
|
516
851
|
*/
|
|
517
|
-
export async function
|
|
518
|
-
const localVarAxiosArgs = await
|
|
852
|
+
export async function KnowledgeAi_SearchKnowledge(axios, basePath, requestParameters, options, configuration) {
|
|
853
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_SearchKnowledge(requestParameters.workspaceId, requestParameters.query, requestParameters.limit, requestParameters.minScore, requestParameters.scopes, options || {}, configuration);
|
|
519
854
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
520
855
|
}
|
|
521
856
|
// KnowledgeAi Api FP
|
|
@@ -524,13 +859,13 @@ export async function KnowledgeAi_UploadDocumentApiV1AiWorkspacesWorkspaceIdKnow
|
|
|
524
859
|
* @summary Upsert Document
|
|
525
860
|
* @param {AxiosInstance} axios Axios instance.
|
|
526
861
|
* @param {string} basePath Base path.
|
|
527
|
-
* @param {
|
|
862
|
+
* @param {KnowledgeAiUpsertDocumentRequest} requestParameters Request parameters.
|
|
528
863
|
* @param {*} [options] Override http request option.
|
|
529
864
|
* @param {Configuration} [configuration] Optional configuration.
|
|
530
865
|
* @throws {RequiredError}
|
|
531
866
|
*/
|
|
532
|
-
export async function
|
|
533
|
-
const localVarAxiosArgs = await
|
|
867
|
+
export async function KnowledgeAi_UpsertDocument(axios, basePath, requestParameters, options, configuration) {
|
|
868
|
+
const localVarAxiosArgs = await KnowledgeAiAxiosParamCreator_UpsertDocument(requestParameters.workspaceId, requestParameters.file, requestParameters.title, requestParameters.scopes, options || {}, configuration);
|
|
534
869
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, basePath);
|
|
535
870
|
}
|
|
536
871
|
/**
|
|
@@ -540,38 +875,93 @@ export async function KnowledgeAi_UpsertDocumentApiV1AiWorkspacesWorkspaceIdKnow
|
|
|
540
875
|
* @extends {BaseAPI}
|
|
541
876
|
*/
|
|
542
877
|
export class KnowledgeAi extends BaseAPI {
|
|
878
|
+
/**
|
|
879
|
+
* Upload a new knowledge document. Returns 409 if filename already exists.
|
|
880
|
+
* @summary Upload Document
|
|
881
|
+
* @param {KnowledgeAiCreateDocumentRequest} requestParameters Request parameters.
|
|
882
|
+
* @param {*} [options] Override http request option.
|
|
883
|
+
* @throws {RequiredError}
|
|
884
|
+
* @memberof KnowledgeAi
|
|
885
|
+
*/
|
|
886
|
+
createDocument(requestParameters, options) {
|
|
887
|
+
return KnowledgeAi_CreateDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Delete a knowledge document and all its chunks.
|
|
891
|
+
* @summary Delete Document
|
|
892
|
+
* @param {KnowledgeAiDeleteDocumentRequest} requestParameters Request parameters.
|
|
893
|
+
* @param {*} [options] Override http request option.
|
|
894
|
+
* @throws {RequiredError}
|
|
895
|
+
* @memberof KnowledgeAi
|
|
896
|
+
*/
|
|
897
|
+
deleteDocument(requestParameters, options) {
|
|
898
|
+
return KnowledgeAi_DeleteDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
899
|
+
}
|
|
543
900
|
/**
|
|
544
901
|
* Download a knowledge document\'s raw file.
|
|
545
902
|
* @summary Download Document
|
|
546
|
-
* @param {
|
|
903
|
+
* @param {KnowledgeAiDownloadDocumentRequest} requestParameters Request parameters.
|
|
547
904
|
* @param {*} [options] Override http request option.
|
|
548
905
|
* @throws {RequiredError}
|
|
549
906
|
* @memberof KnowledgeAi
|
|
550
907
|
*/
|
|
551
|
-
|
|
552
|
-
return
|
|
908
|
+
downloadDocument(requestParameters, options) {
|
|
909
|
+
return KnowledgeAi_DownloadDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
553
910
|
}
|
|
554
911
|
/**
|
|
555
|
-
*
|
|
556
|
-
* @summary
|
|
557
|
-
* @param {
|
|
912
|
+
* Get a single knowledge document\'s metadata.
|
|
913
|
+
* @summary Get Document
|
|
914
|
+
* @param {KnowledgeAiGetDocumentRequest} requestParameters Request parameters.
|
|
915
|
+
* @param {*} [options] Override http request option.
|
|
916
|
+
* @throws {RequiredError}
|
|
917
|
+
* @memberof KnowledgeAi
|
|
918
|
+
*/
|
|
919
|
+
getDocument(requestParameters, options) {
|
|
920
|
+
return KnowledgeAi_GetDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* List knowledge documents accessible from the workspace.
|
|
924
|
+
* @summary List Documents
|
|
925
|
+
* @param {KnowledgeAiListDocumentsRequest} requestParameters Request parameters.
|
|
926
|
+
* @param {*} [options] Override http request option.
|
|
927
|
+
* @throws {RequiredError}
|
|
928
|
+
* @memberof KnowledgeAi
|
|
929
|
+
*/
|
|
930
|
+
listDocuments(requestParameters, options) {
|
|
931
|
+
return KnowledgeAi_ListDocuments(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Patch a knowledge document\'s metadata without re-uploading content.
|
|
935
|
+
* @summary Patch Document
|
|
936
|
+
* @param {KnowledgeAiPatchDocumentRequest} requestParameters Request parameters.
|
|
937
|
+
* @param {*} [options] Override http request option.
|
|
938
|
+
* @throws {RequiredError}
|
|
939
|
+
* @memberof KnowledgeAi
|
|
940
|
+
*/
|
|
941
|
+
patchDocument(requestParameters, options) {
|
|
942
|
+
return KnowledgeAi_PatchDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Search the knowledge base using semantic similarity.
|
|
946
|
+
* @summary Search Documents
|
|
947
|
+
* @param {KnowledgeAiSearchKnowledgeRequest} requestParameters Request parameters.
|
|
558
948
|
* @param {*} [options] Override http request option.
|
|
559
949
|
* @throws {RequiredError}
|
|
560
950
|
* @memberof KnowledgeAi
|
|
561
951
|
*/
|
|
562
|
-
|
|
563
|
-
return
|
|
952
|
+
searchKnowledge(requestParameters, options) {
|
|
953
|
+
return KnowledgeAi_SearchKnowledge(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
564
954
|
}
|
|
565
955
|
/**
|
|
566
956
|
* Upload or replace a knowledge document.
|
|
567
957
|
* @summary Upsert Document
|
|
568
|
-
* @param {
|
|
958
|
+
* @param {KnowledgeAiUpsertDocumentRequest} requestParameters Request parameters.
|
|
569
959
|
* @param {*} [options] Override http request option.
|
|
570
960
|
* @throws {RequiredError}
|
|
571
961
|
* @memberof KnowledgeAi
|
|
572
962
|
*/
|
|
573
|
-
|
|
574
|
-
return
|
|
963
|
+
upsertDocument(requestParameters, options) {
|
|
964
|
+
return KnowledgeAi_UpsertDocument(this.axios, this.basePath, requestParameters, options, this.configuration);
|
|
575
965
|
}
|
|
576
966
|
}
|
|
577
967
|
// MessagesAi FP - MessagesAiAxiosParamCreator
|