@wildix/wim-knowledge-base-client 0.0.7 → 0.0.9
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-cjs/KnowledgeBase.js +4 -2
- package/dist-cjs/KnowledgeBaseClient.js +2 -2
- package/dist-cjs/commands/StartSyncDataSourceCommand.js +21 -0
- package/dist-cjs/commands/{SyncDataSourceCommand.js → StopSyncDataSourceCommand.js} +7 -7
- package/dist-cjs/commands/index.js +2 -1
- package/dist-cjs/models/models_0.js +7 -1
- package/dist-cjs/protocols/Aws_restJson1.js +124 -12
- package/dist-es/KnowledgeBase.js +4 -2
- package/dist-es/KnowledgeBaseClient.js +2 -2
- package/dist-es/commands/StartSyncDataSourceCommand.js +17 -0
- package/dist-es/commands/StopSyncDataSourceCommand.js +17 -0
- package/dist-es/commands/index.js +2 -1
- package/dist-es/models/models_0.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +122 -12
- package/dist-types/KnowledgeBase.d.ts +12 -5
- package/dist-types/KnowledgeBaseClient.d.ts +5 -3
- package/dist-types/commands/CreateDataSourceCommand.d.ts +30 -0
- package/dist-types/commands/GetDataSourceCommand.d.ts +15 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +15 -0
- package/dist-types/commands/StartSyncDataSourceCommand.d.ts +84 -0
- package/dist-types/commands/StopSyncDataSourceCommand.d.ts +83 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +30 -0
- package/dist-types/commands/index.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +93 -3
- package/dist-types/protocols/Aws_restJson1.d.ts +14 -5
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/package.json +1 -1
- package/dist-es/commands/SyncDataSourceCommand.js +0 -17
- package/dist-types/commands/SyncDataSourceCommand.d.ts +0 -84
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { KnowledgeBaseServiceException as __BaseException } from "../models/KnowledgeBaseServiceException";
|
|
2
|
-
import { DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
|
+
import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
|
+
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CreateDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
@@ -14,7 +14,7 @@ export const se_CreateDataSourceCommand = async (input, context) => {
|
|
|
14
14
|
});
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify(take(input, {
|
|
17
|
-
'config': _ =>
|
|
17
|
+
'config': _ => se_DataSourceConfig(_, context),
|
|
18
18
|
'description': [],
|
|
19
19
|
'enabled': [],
|
|
20
20
|
'name': [],
|
|
@@ -329,10 +329,10 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
329
329
|
.b(body);
|
|
330
330
|
return b.build();
|
|
331
331
|
};
|
|
332
|
-
export const
|
|
332
|
+
export const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
333
333
|
const b = rb(input, context);
|
|
334
334
|
const headers = {};
|
|
335
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/sync");
|
|
335
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/start-sync");
|
|
336
336
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
337
337
|
const query = map({
|
|
338
338
|
[_c]: [, input[_cI]],
|
|
@@ -345,6 +345,21 @@ export const se_SyncDataSourceCommand = async (input, context) => {
|
|
|
345
345
|
.b(body);
|
|
346
346
|
return b.build();
|
|
347
347
|
};
|
|
348
|
+
export const se_StopSyncDataSourceCommand = async (input, context) => {
|
|
349
|
+
const b = rb(input, context);
|
|
350
|
+
const headers = {};
|
|
351
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/stop-sync");
|
|
352
|
+
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
353
|
+
const query = map({
|
|
354
|
+
[_c]: [, input[_cI]],
|
|
355
|
+
});
|
|
356
|
+
let body;
|
|
357
|
+
b.m("POST")
|
|
358
|
+
.h(headers)
|
|
359
|
+
.q(query)
|
|
360
|
+
.b(body);
|
|
361
|
+
return b.build();
|
|
362
|
+
};
|
|
348
363
|
export const se_UpdateDataSourceCommand = async (input, context) => {
|
|
349
364
|
const b = rb(input, context);
|
|
350
365
|
const headers = {
|
|
@@ -357,7 +372,7 @@ export const se_UpdateDataSourceCommand = async (input, context) => {
|
|
|
357
372
|
});
|
|
358
373
|
let body;
|
|
359
374
|
body = JSON.stringify(take(input, {
|
|
360
|
-
'config': _ =>
|
|
375
|
+
'config': _ => se_DataSourceConfig(_, context),
|
|
361
376
|
'description': [],
|
|
362
377
|
'enabled': [],
|
|
363
378
|
'name': [],
|
|
@@ -427,7 +442,7 @@ export const de_CreateDataSourceCommand = async (output, context) => {
|
|
|
427
442
|
});
|
|
428
443
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
429
444
|
const doc = take(data, {
|
|
430
|
-
'dataSource':
|
|
445
|
+
'dataSource': _ => de_DataSourceItem(_, context),
|
|
431
446
|
});
|
|
432
447
|
Object.assign(contents, doc);
|
|
433
448
|
return contents;
|
|
@@ -513,7 +528,7 @@ export const de_GetDataSourceCommand = async (output, context) => {
|
|
|
513
528
|
});
|
|
514
529
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
515
530
|
const doc = take(data, {
|
|
516
|
-
'dataSource':
|
|
531
|
+
'dataSource': _ => de_DataSourceItem(_, context),
|
|
517
532
|
});
|
|
518
533
|
Object.assign(contents, doc);
|
|
519
534
|
return contents;
|
|
@@ -613,7 +628,7 @@ export const de_ListDataSourcesCommand = async (output, context) => {
|
|
|
613
628
|
});
|
|
614
629
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
615
630
|
const doc = take(data, {
|
|
616
|
-
'dataSources':
|
|
631
|
+
'dataSources': _ => de_DataSourceList(_, context),
|
|
617
632
|
});
|
|
618
633
|
Object.assign(contents, doc);
|
|
619
634
|
return contents;
|
|
@@ -675,7 +690,17 @@ export const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
675
690
|
Object.assign(contents, doc);
|
|
676
691
|
return contents;
|
|
677
692
|
};
|
|
678
|
-
export const
|
|
693
|
+
export const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
694
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
695
|
+
return de_CommandError(output, context);
|
|
696
|
+
}
|
|
697
|
+
const contents = map({
|
|
698
|
+
$metadata: deserializeMetadata(output),
|
|
699
|
+
});
|
|
700
|
+
await collectBody(output.body, context);
|
|
701
|
+
return contents;
|
|
702
|
+
};
|
|
703
|
+
export const de_StopSyncDataSourceCommand = async (output, context) => {
|
|
679
704
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
680
705
|
return de_CommandError(output, context);
|
|
681
706
|
}
|
|
@@ -694,7 +719,7 @@ export const de_UpdateDataSourceCommand = async (output, context) => {
|
|
|
694
719
|
});
|
|
695
720
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
696
721
|
const doc = take(data, {
|
|
697
|
-
'dataSource':
|
|
722
|
+
'dataSource': _ => de_DataSourceItem(_, context),
|
|
698
723
|
});
|
|
699
724
|
Object.assign(contents, doc);
|
|
700
725
|
return contents;
|
|
@@ -840,6 +865,18 @@ const de_KnowledgeBaseNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
840
865
|
});
|
|
841
866
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
842
867
|
};
|
|
868
|
+
const se_Document = (input, context) => {
|
|
869
|
+
return input;
|
|
870
|
+
};
|
|
871
|
+
const se_DataSourceConfig = (input, context) => {
|
|
872
|
+
return DataSourceConfig.visit(input, {
|
|
873
|
+
confluence: value => ({ "confluence": _json(value) }),
|
|
874
|
+
files: value => ({ "files": _json(value) }),
|
|
875
|
+
gdrive: value => ({ "gdrive": _json(value) }),
|
|
876
|
+
proxy: value => ({ "proxy": se_ProxyConfig(value, context) }),
|
|
877
|
+
_: (name, value) => ({ [name]: value })
|
|
878
|
+
});
|
|
879
|
+
};
|
|
843
880
|
const se_LlmConfig = (input, context) => {
|
|
844
881
|
return take(input, {
|
|
845
882
|
'model': [],
|
|
@@ -848,6 +885,19 @@ const se_LlmConfig = (input, context) => {
|
|
|
848
885
|
'temperature': __serializeFloat,
|
|
849
886
|
});
|
|
850
887
|
};
|
|
888
|
+
const se_ProxyConfig = (input, context) => {
|
|
889
|
+
return take(input, {
|
|
890
|
+
'body': _ => se_Document(_, context),
|
|
891
|
+
'headers': _json,
|
|
892
|
+
'method': [],
|
|
893
|
+
'password': [],
|
|
894
|
+
'responseMapping': _json,
|
|
895
|
+
'timeoutMs': [],
|
|
896
|
+
'token': [],
|
|
897
|
+
'url': [],
|
|
898
|
+
'username': [],
|
|
899
|
+
});
|
|
900
|
+
};
|
|
851
901
|
const se_SearchConfig = (input, context) => {
|
|
852
902
|
return take(input, {
|
|
853
903
|
'searchStrategy': [],
|
|
@@ -858,6 +908,66 @@ const se_SearchConfig = (input, context) => {
|
|
|
858
908
|
const de_Document = (output, context) => {
|
|
859
909
|
return output;
|
|
860
910
|
};
|
|
911
|
+
const de_DataSourceConfig = (output, context) => {
|
|
912
|
+
if (output.confluence != null) {
|
|
913
|
+
return {
|
|
914
|
+
confluence: _json(output.confluence)
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
if (output.files != null) {
|
|
918
|
+
return {
|
|
919
|
+
files: _json(output.files)
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
if (output.gdrive != null) {
|
|
923
|
+
return {
|
|
924
|
+
gdrive: _json(output.gdrive)
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
if (output.proxy != null) {
|
|
928
|
+
return {
|
|
929
|
+
proxy: de_ProxyConfig(output.proxy, context)
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
return { $unknown: Object.entries(output)[0] };
|
|
933
|
+
};
|
|
934
|
+
const de_DataSourceItem = (output, context) => {
|
|
935
|
+
return take(output, {
|
|
936
|
+
'companyId': __expectString,
|
|
937
|
+
'config': (_) => de_DataSourceConfig(__expectUnion(_), context),
|
|
938
|
+
'createdAt': __expectString,
|
|
939
|
+
'description': __expectString,
|
|
940
|
+
'enabled': __expectBoolean,
|
|
941
|
+
'id': __expectString,
|
|
942
|
+
'lastSyncErrorMessage': __expectString,
|
|
943
|
+
'lastSyncMode': __expectString,
|
|
944
|
+
'lastSyncedAt': __expectString,
|
|
945
|
+
'name': __expectString,
|
|
946
|
+
'syncSchedule': __expectString,
|
|
947
|
+
'syncStatus': __expectString,
|
|
948
|
+
'type': __expectString,
|
|
949
|
+
'updatedAt': __expectString,
|
|
950
|
+
});
|
|
951
|
+
};
|
|
952
|
+
const de_DataSourceList = (output, context) => {
|
|
953
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
954
|
+
return de_DataSourceItem(entry, context);
|
|
955
|
+
});
|
|
956
|
+
return retVal;
|
|
957
|
+
};
|
|
958
|
+
const de_ProxyConfig = (output, context) => {
|
|
959
|
+
return take(output, {
|
|
960
|
+
'body': (_) => de_Document(_, context),
|
|
961
|
+
'headers': _json,
|
|
962
|
+
'method': __expectString,
|
|
963
|
+
'password': __expectString,
|
|
964
|
+
'responseMapping': _json,
|
|
965
|
+
'timeoutMs': __expectInt32,
|
|
966
|
+
'token': __expectString,
|
|
967
|
+
'url': __expectString,
|
|
968
|
+
'username': __expectString,
|
|
969
|
+
});
|
|
970
|
+
};
|
|
861
971
|
const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
862
972
|
return take(output, {
|
|
863
973
|
'content': __expectString,
|
|
@@ -18,7 +18,8 @@ import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./command
|
|
|
18
18
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
19
19
|
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
20
20
|
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
21
|
-
import {
|
|
21
|
+
import { StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput } from "./commands/StartSyncDataSourceCommand";
|
|
22
|
+
import { StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput } from "./commands/StopSyncDataSourceCommand";
|
|
22
23
|
import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand";
|
|
23
24
|
import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
|
|
24
25
|
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
@@ -141,11 +142,17 @@ export interface KnowledgeBase {
|
|
|
141
142
|
searchKnowledgeBase(args: SearchKnowledgeBaseCommandInput, cb: (err: any, data?: SearchKnowledgeBaseCommandOutput) => void): void;
|
|
142
143
|
searchKnowledgeBase(args: SearchKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchKnowledgeBaseCommandOutput) => void): void;
|
|
143
144
|
/**
|
|
144
|
-
* @see {@link
|
|
145
|
+
* @see {@link StartSyncDataSourceCommand}
|
|
145
146
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
startSyncDataSource(args: StartSyncDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<StartSyncDataSourceCommandOutput>;
|
|
148
|
+
startSyncDataSource(args: StartSyncDataSourceCommandInput, cb: (err: any, data?: StartSyncDataSourceCommandOutput) => void): void;
|
|
149
|
+
startSyncDataSource(args: StartSyncDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartSyncDataSourceCommandOutput) => void): void;
|
|
150
|
+
/**
|
|
151
|
+
* @see {@link StopSyncDataSourceCommand}
|
|
152
|
+
*/
|
|
153
|
+
stopSyncDataSource(args: StopSyncDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<StopSyncDataSourceCommandOutput>;
|
|
154
|
+
stopSyncDataSource(args: StopSyncDataSourceCommandInput, cb: (err: any, data?: StopSyncDataSourceCommandOutput) => void): void;
|
|
155
|
+
stopSyncDataSource(args: StopSyncDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopSyncDataSourceCommandOutput) => void): void;
|
|
149
156
|
/**
|
|
150
157
|
* @see {@link UpdateDataSourceCommand}
|
|
151
158
|
*/
|
|
@@ -17,7 +17,8 @@ import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./command
|
|
|
17
17
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
18
18
|
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
19
19
|
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
20
|
-
import {
|
|
20
|
+
import { StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput } from "./commands/StartSyncDataSourceCommand";
|
|
21
|
+
import { StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput } from "./commands/StopSyncDataSourceCommand";
|
|
21
22
|
import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand";
|
|
22
23
|
import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
|
|
23
24
|
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
@@ -32,11 +33,11 @@ export { __Client };
|
|
|
32
33
|
/**
|
|
33
34
|
* @public
|
|
34
35
|
*/
|
|
35
|
-
export type ServiceInputTypes = CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetAuthorizationSessionForDataSourceCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput |
|
|
36
|
+
export type ServiceInputTypes = CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetAuthorizationSessionForDataSourceCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
|
|
36
37
|
/**
|
|
37
38
|
* @public
|
|
38
39
|
*/
|
|
39
|
-
export type ServiceOutputTypes = CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAuthorizationSessionForDataSourceCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput |
|
|
40
|
+
export type ServiceOutputTypes = CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAuthorizationSessionForDataSourceCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
|
|
40
41
|
/**
|
|
41
42
|
* @public
|
|
42
43
|
*/
|
|
@@ -136,6 +137,7 @@ export type KnowledgeBaseClientConfigType = Partial<__SmithyConfiguration<__Http
|
|
|
136
137
|
export interface KnowledgeBaseClientConfig extends KnowledgeBaseClientConfigType {
|
|
137
138
|
env?: 'stage' | 'stable' | 'prod';
|
|
138
139
|
token: TokenProvider;
|
|
140
|
+
endpoint?: () => Record<string, string>;
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
143
|
* @public
|
|
@@ -69,6 +69,21 @@ declare const CreateDataSourceCommand_base: {
|
|
|
69
69
|
* "STRING_VALUE",
|
|
70
70
|
* ],
|
|
71
71
|
* },
|
|
72
|
+
* proxy: { // ProxyConfig
|
|
73
|
+
* url: "STRING_VALUE", // required
|
|
74
|
+
* method: "GET" || "POST",
|
|
75
|
+
* token: "STRING_VALUE",
|
|
76
|
+
* username: "STRING_VALUE",
|
|
77
|
+
* password: "STRING_VALUE",
|
|
78
|
+
* headers: [
|
|
79
|
+
* "STRING_VALUE",
|
|
80
|
+
* ],
|
|
81
|
+
* body: "DOCUMENT_VALUE",
|
|
82
|
+
* timeoutMs: Number("int"),
|
|
83
|
+
* responseMapping: [
|
|
84
|
+
* "STRING_VALUE",
|
|
85
|
+
* ],
|
|
86
|
+
* },
|
|
72
87
|
* },
|
|
73
88
|
* enabled: true || false, // required
|
|
74
89
|
* syncSchedule: "STRING_VALUE",
|
|
@@ -112,6 +127,21 @@ declare const CreateDataSourceCommand_base: {
|
|
|
112
127
|
* // "STRING_VALUE",
|
|
113
128
|
* // ],
|
|
114
129
|
* // },
|
|
130
|
+
* // proxy: { // ProxyConfig
|
|
131
|
+
* // url: "STRING_VALUE", // required
|
|
132
|
+
* // method: "GET" || "POST",
|
|
133
|
+
* // token: "STRING_VALUE",
|
|
134
|
+
* // username: "STRING_VALUE",
|
|
135
|
+
* // password: "STRING_VALUE",
|
|
136
|
+
* // headers: [
|
|
137
|
+
* // "STRING_VALUE",
|
|
138
|
+
* // ],
|
|
139
|
+
* // body: "DOCUMENT_VALUE",
|
|
140
|
+
* // timeoutMs: Number("int"),
|
|
141
|
+
* // responseMapping: [
|
|
142
|
+
* // "STRING_VALUE",
|
|
143
|
+
* // ],
|
|
144
|
+
* // },
|
|
115
145
|
* // },
|
|
116
146
|
* // enabled: true || false, // required
|
|
117
147
|
* // syncSchedule: "STRING_VALUE",
|
|
@@ -76,6 +76,21 @@ declare const GetDataSourceCommand_base: {
|
|
|
76
76
|
* // "STRING_VALUE",
|
|
77
77
|
* // ],
|
|
78
78
|
* // },
|
|
79
|
+
* // proxy: { // ProxyConfig
|
|
80
|
+
* // url: "STRING_VALUE", // required
|
|
81
|
+
* // method: "GET" || "POST",
|
|
82
|
+
* // token: "STRING_VALUE",
|
|
83
|
+
* // username: "STRING_VALUE",
|
|
84
|
+
* // password: "STRING_VALUE",
|
|
85
|
+
* // headers: [
|
|
86
|
+
* // "STRING_VALUE",
|
|
87
|
+
* // ],
|
|
88
|
+
* // body: "DOCUMENT_VALUE",
|
|
89
|
+
* // timeoutMs: Number("int"),
|
|
90
|
+
* // responseMapping: [
|
|
91
|
+
* // "STRING_VALUE",
|
|
92
|
+
* // ],
|
|
93
|
+
* // },
|
|
79
94
|
* // },
|
|
80
95
|
* // enabled: true || false, // required
|
|
81
96
|
* // syncSchedule: "STRING_VALUE",
|
|
@@ -76,6 +76,21 @@ declare const ListDataSourcesCommand_base: {
|
|
|
76
76
|
* // "STRING_VALUE",
|
|
77
77
|
* // ],
|
|
78
78
|
* // },
|
|
79
|
+
* // proxy: { // ProxyConfig
|
|
80
|
+
* // url: "STRING_VALUE", // required
|
|
81
|
+
* // method: "GET" || "POST",
|
|
82
|
+
* // token: "STRING_VALUE",
|
|
83
|
+
* // username: "STRING_VALUE",
|
|
84
|
+
* // password: "STRING_VALUE",
|
|
85
|
+
* // headers: [
|
|
86
|
+
* // "STRING_VALUE",
|
|
87
|
+
* // ],
|
|
88
|
+
* // body: "DOCUMENT_VALUE",
|
|
89
|
+
* // timeoutMs: Number("int"),
|
|
90
|
+
* // responseMapping: [
|
|
91
|
+
* // "STRING_VALUE",
|
|
92
|
+
* // ],
|
|
93
|
+
* // },
|
|
79
94
|
* // },
|
|
80
95
|
* // enabled: true || false, // required
|
|
81
96
|
* // syncSchedule: "STRING_VALUE",
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
+
import { StartSyncDataSourceInput, StartSyncDataSourceOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link StartSyncDataSourceCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface StartSyncDataSourceCommandInput extends StartSyncDataSourceInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link StartSyncDataSourceCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface StartSyncDataSourceCommandOutput extends StartSyncDataSourceOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const StartSyncDataSourceCommand_base: {
|
|
25
|
+
new (input: StartSyncDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: StartSyncDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Start the sync of a data source by its ID
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { KnowledgeBaseClient, StartSyncDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
+
* // const { KnowledgeBaseClient, StartSyncDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
+
* const client = new KnowledgeBaseClient(config);
|
|
37
|
+
* const input = { // StartSyncDataSourceInput
|
|
38
|
+
* companyId: "STRING_VALUE",
|
|
39
|
+
* dataSourceId: "STRING_VALUE", // required
|
|
40
|
+
* syncType: "full" || "incremental" || "unknown", // required
|
|
41
|
+
* };
|
|
42
|
+
* const command = new StartSyncDataSourceCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // {};
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param StartSyncDataSourceCommandInput - {@link StartSyncDataSourceCommandInput}
|
|
49
|
+
* @returns {@link StartSyncDataSourceCommandOutput}
|
|
50
|
+
* @see {@link StartSyncDataSourceCommandInput} for command's `input` shape.
|
|
51
|
+
* @see {@link StartSyncDataSourceCommandOutput} for command's `response` shape.
|
|
52
|
+
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ValidationException} (client fault)
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link DocumentNotFoundException} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link KnowledgeBaseServiceException}
|
|
67
|
+
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
68
|
+
*
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare class StartSyncDataSourceCommand extends StartSyncDataSourceCommand_base {
|
|
73
|
+
/** @internal type navigation helper, not in runtime. */
|
|
74
|
+
protected static __types: {
|
|
75
|
+
api: {
|
|
76
|
+
input: StartSyncDataSourceInput;
|
|
77
|
+
output: {};
|
|
78
|
+
};
|
|
79
|
+
sdk: {
|
|
80
|
+
input: StartSyncDataSourceCommandInput;
|
|
81
|
+
output: StartSyncDataSourceCommandOutput;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
+
import { StopSyncDataSourceInput, StopSyncDataSourceOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link StopSyncDataSourceCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface StopSyncDataSourceCommandInput extends StopSyncDataSourceInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link StopSyncDataSourceCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface StopSyncDataSourceCommandOutput extends StopSyncDataSourceOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const StopSyncDataSourceCommand_base: {
|
|
25
|
+
new (input: StopSyncDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: StopSyncDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Stop the sync of a data source by its ID
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { KnowledgeBaseClient, StopSyncDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
+
* // const { KnowledgeBaseClient, StopSyncDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
+
* const client = new KnowledgeBaseClient(config);
|
|
37
|
+
* const input = { // StopSyncDataSourceInput
|
|
38
|
+
* companyId: "STRING_VALUE",
|
|
39
|
+
* dataSourceId: "STRING_VALUE", // required
|
|
40
|
+
* };
|
|
41
|
+
* const command = new StopSyncDataSourceCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // {};
|
|
44
|
+
*
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @param StopSyncDataSourceCommandInput - {@link StopSyncDataSourceCommandInput}
|
|
48
|
+
* @returns {@link StopSyncDataSourceCommandOutput}
|
|
49
|
+
* @see {@link StopSyncDataSourceCommandInput} for command's `input` shape.
|
|
50
|
+
* @see {@link StopSyncDataSourceCommandOutput} for command's `response` shape.
|
|
51
|
+
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link ValidationException} (client fault)
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link DocumentNotFoundException} (client fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link KnowledgeBaseServiceException}
|
|
66
|
+
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare class StopSyncDataSourceCommand extends StopSyncDataSourceCommand_base {
|
|
72
|
+
/** @internal type navigation helper, not in runtime. */
|
|
73
|
+
protected static __types: {
|
|
74
|
+
api: {
|
|
75
|
+
input: StopSyncDataSourceInput;
|
|
76
|
+
output: {};
|
|
77
|
+
};
|
|
78
|
+
sdk: {
|
|
79
|
+
input: StopSyncDataSourceCommandInput;
|
|
80
|
+
output: StopSyncDataSourceCommandOutput;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -69,6 +69,21 @@ declare const UpdateDataSourceCommand_base: {
|
|
|
69
69
|
* "STRING_VALUE",
|
|
70
70
|
* ],
|
|
71
71
|
* },
|
|
72
|
+
* proxy: { // ProxyConfig
|
|
73
|
+
* url: "STRING_VALUE", // required
|
|
74
|
+
* method: "GET" || "POST",
|
|
75
|
+
* token: "STRING_VALUE",
|
|
76
|
+
* username: "STRING_VALUE",
|
|
77
|
+
* password: "STRING_VALUE",
|
|
78
|
+
* headers: [
|
|
79
|
+
* "STRING_VALUE",
|
|
80
|
+
* ],
|
|
81
|
+
* body: "DOCUMENT_VALUE",
|
|
82
|
+
* timeoutMs: Number("int"),
|
|
83
|
+
* responseMapping: [
|
|
84
|
+
* "STRING_VALUE",
|
|
85
|
+
* ],
|
|
86
|
+
* },
|
|
72
87
|
* },
|
|
73
88
|
* enabled: true || false, // required
|
|
74
89
|
* syncSchedule: "STRING_VALUE",
|
|
@@ -113,6 +128,21 @@ declare const UpdateDataSourceCommand_base: {
|
|
|
113
128
|
* // "STRING_VALUE",
|
|
114
129
|
* // ],
|
|
115
130
|
* // },
|
|
131
|
+
* // proxy: { // ProxyConfig
|
|
132
|
+
* // url: "STRING_VALUE", // required
|
|
133
|
+
* // method: "GET" || "POST",
|
|
134
|
+
* // token: "STRING_VALUE",
|
|
135
|
+
* // username: "STRING_VALUE",
|
|
136
|
+
* // password: "STRING_VALUE",
|
|
137
|
+
* // headers: [
|
|
138
|
+
* // "STRING_VALUE",
|
|
139
|
+
* // ],
|
|
140
|
+
* // body: "DOCUMENT_VALUE",
|
|
141
|
+
* // timeoutMs: Number("int"),
|
|
142
|
+
* // responseMapping: [
|
|
143
|
+
* // "STRING_VALUE",
|
|
144
|
+
* // ],
|
|
145
|
+
* // },
|
|
116
146
|
* // },
|
|
117
147
|
* // enabled: true || false, // required
|
|
118
148
|
* // syncSchedule: "STRING_VALUE",
|
|
@@ -17,7 +17,8 @@ export * from "./ListDocumentsCommand";
|
|
|
17
17
|
export * from "./ListKnowledgeBasesCommand";
|
|
18
18
|
export * from "./QueryKnowledgeBaseCommand";
|
|
19
19
|
export * from "./SearchKnowledgeBaseCommand";
|
|
20
|
-
export * from "./
|
|
20
|
+
export * from "./StartSyncDataSourceCommand";
|
|
21
|
+
export * from "./StopSyncDataSourceCommand";
|
|
21
22
|
export * from "./UpdateDataSourceCommand";
|
|
22
23
|
export * from "./UpdateDocumentCommand";
|
|
23
24
|
export * from "./UpdateKnowledgeBaseCommand";
|