@wildix/wim-knowledge-base-client 0.0.35 → 0.0.37
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/protocols/Aws_restJson1.js +9 -5
- package/dist-es/protocols/Aws_restJson1.js +10 -6
- package/dist-types/commands/QueryKnowledgeBaseCommand.d.ts +1 -0
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +292 -142
- package/package.json +1 -1
|
@@ -371,9 +371,10 @@ const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
|
371
371
|
exports.se_ListKnowledgeBasesCommand = se_ListKnowledgeBasesCommand;
|
|
372
372
|
const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
373
373
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
374
|
-
const headers = {
|
|
374
|
+
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
375
375
|
'content-type': 'application/json',
|
|
376
|
-
|
|
376
|
+
[_xsu]: input[_sU],
|
|
377
|
+
});
|
|
377
378
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/query");
|
|
378
379
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
379
380
|
const query = (0, smithy_client_1.map)({
|
|
@@ -394,9 +395,10 @@ const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
394
395
|
exports.se_QueryKnowledgeBaseCommand = se_QueryKnowledgeBaseCommand;
|
|
395
396
|
const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
396
397
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
397
|
-
const headers = {
|
|
398
|
+
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
398
399
|
'content-type': 'application/json',
|
|
399
|
-
|
|
400
|
+
[_xsu]: input[_sU],
|
|
401
|
+
});
|
|
400
402
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/search");
|
|
401
403
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
402
404
|
const query = (0, smithy_client_1.map)({
|
|
@@ -532,7 +534,7 @@ const de_CleanDataSourceCommand = async (output, context) => {
|
|
|
532
534
|
};
|
|
533
535
|
exports.de_CleanDataSourceCommand = de_CleanDataSourceCommand;
|
|
534
536
|
const de_CloneDataSourceCommand = async (output, context) => {
|
|
535
|
-
if (output.statusCode !==
|
|
537
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
536
538
|
return de_CommandError(output, context);
|
|
537
539
|
}
|
|
538
540
|
const contents = (0, smithy_client_1.map)({
|
|
@@ -1175,5 +1177,7 @@ const _l = "limit";
|
|
|
1175
1177
|
const _o = "offset";
|
|
1176
1178
|
const _q = "query";
|
|
1177
1179
|
const _sT = "syncType";
|
|
1180
|
+
const _sU = "searchUser";
|
|
1178
1181
|
const _wC = "withContent";
|
|
1179
1182
|
const _wCi = "withChunks";
|
|
1183
|
+
const _xsu = "x-search-user";
|
|
@@ -2,7 +2,7 @@ import { KnowledgeBaseServiceException as __BaseException } from "../models/Know
|
|
|
2
2
|
import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CleanDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
@@ -347,9 +347,10 @@ export const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
|
347
347
|
};
|
|
348
348
|
export const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
349
349
|
const b = rb(input, context);
|
|
350
|
-
const headers = {
|
|
350
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
351
351
|
'content-type': 'application/json',
|
|
352
|
-
|
|
352
|
+
[_xsu]: input[_sU],
|
|
353
|
+
});
|
|
353
354
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/query");
|
|
354
355
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
355
356
|
const query = map({
|
|
@@ -369,9 +370,10 @@ export const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
369
370
|
};
|
|
370
371
|
export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
371
372
|
const b = rb(input, context);
|
|
372
|
-
const headers = {
|
|
373
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
373
374
|
'content-type': 'application/json',
|
|
374
|
-
|
|
375
|
+
[_xsu]: input[_sU],
|
|
376
|
+
});
|
|
375
377
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/search");
|
|
376
378
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
377
379
|
const query = map({
|
|
@@ -500,7 +502,7 @@ export const de_CleanDataSourceCommand = async (output, context) => {
|
|
|
500
502
|
return contents;
|
|
501
503
|
};
|
|
502
504
|
export const de_CloneDataSourceCommand = async (output, context) => {
|
|
503
|
-
if (output.statusCode !==
|
|
505
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
504
506
|
return de_CommandError(output, context);
|
|
505
507
|
}
|
|
506
508
|
const contents = map({
|
|
@@ -1117,5 +1119,7 @@ const _l = "limit";
|
|
|
1117
1119
|
const _o = "offset";
|
|
1118
1120
|
const _q = "query";
|
|
1119
1121
|
const _sT = "syncType";
|
|
1122
|
+
const _sU = "searchUser";
|
|
1120
1123
|
const _wC = "withContent";
|
|
1121
1124
|
const _wCi = "withChunks";
|
|
1125
|
+
const _xsu = "x-search-user";
|
|
@@ -52,6 +52,7 @@ declare const QueryKnowledgeBaseCommand_base: {
|
|
|
52
52
|
* maxOutputTokens: Number("int"),
|
|
53
53
|
* systemPrompt: "STRING_VALUE",
|
|
54
54
|
* },
|
|
55
|
+
* searchUser: "STRING_VALUE",
|
|
55
56
|
* };
|
|
56
57
|
* const command = new QueryKnowledgeBaseCommand(input);
|
|
57
58
|
* const response = await client.send(command);
|
|
@@ -46,6 +46,7 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
46
46
|
* extendMetadata: true || false,
|
|
47
47
|
* },
|
|
48
48
|
* withMetadata: true || false,
|
|
49
|
+
* searchUser: "STRING_VALUE",
|
|
49
50
|
* };
|
|
50
51
|
* const command = new SearchKnowledgeBaseCommand(input);
|
|
51
52
|
* const response = await client.send(command);
|