@wildix/wim-knowledge-base-client 0.0.8 → 0.0.10
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 +2 -2
- package/dist-cjs/KnowledgeBaseClient.js +2 -2
- package/dist-cjs/commands/{GetAuthorizationSessionForDataSourceCommand.js → GetExtraInfoForDataSourceCommand.js} +7 -7
- package/dist-cjs/commands/index.js +1 -1
- package/dist-cjs/protocols/Aws_restJson1.js +39 -34
- package/dist-es/KnowledgeBase.js +2 -2
- package/dist-es/KnowledgeBaseClient.js +2 -2
- package/dist-es/commands/GetExtraInfoForDataSourceCommand.js +17 -0
- package/dist-es/commands/index.js +1 -1
- package/dist-es/protocols/Aws_restJson1.js +31 -26
- package/dist-types/KnowledgeBase.d.ts +7 -7
- package/dist-types/KnowledgeBaseClient.d.ts +4 -3
- package/dist-types/commands/CreateDataSourceCommand.d.ts +2 -2
- package/dist-types/commands/GetDataSourceCommand.d.ts +1 -1
- package/dist-types/commands/GetExtraInfoForDataSourceCommand.d.ts +86 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +20 -19
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -9
- 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/GetAuthorizationSessionForDataSourceCommand.js +0 -17
- package/dist-types/commands/GetAuthorizationSessionForDataSourceCommand.d.ts +0 -85
|
@@ -8,11 +8,11 @@ const CreateKnowledgeBaseCommand_1 = require("./commands/CreateKnowledgeBaseComm
|
|
|
8
8
|
const DeleteDataSourceCommand_1 = require("./commands/DeleteDataSourceCommand");
|
|
9
9
|
const DeleteDocumentCommand_1 = require("./commands/DeleteDocumentCommand");
|
|
10
10
|
const DeleteKnowledgeBaseCommand_1 = require("./commands/DeleteKnowledgeBaseCommand");
|
|
11
|
-
const GetAuthorizationSessionForDataSourceCommand_1 = require("./commands/GetAuthorizationSessionForDataSourceCommand");
|
|
12
11
|
const GetDataSourceCommand_1 = require("./commands/GetDataSourceCommand");
|
|
13
12
|
const GetDocumentCommand_1 = require("./commands/GetDocumentCommand");
|
|
14
13
|
const GetDocumentPresignedDownloadUrlCommand_1 = require("./commands/GetDocumentPresignedDownloadUrlCommand");
|
|
15
14
|
const GetDocumentPresignedUploadUrlCommand_1 = require("./commands/GetDocumentPresignedUploadUrlCommand");
|
|
15
|
+
const GetExtraInfoForDataSourceCommand_1 = require("./commands/GetExtraInfoForDataSourceCommand");
|
|
16
16
|
const GetKnowledgeBaseCommand_1 = require("./commands/GetKnowledgeBaseCommand");
|
|
17
17
|
const GetSyncLogsCommand_1 = require("./commands/GetSyncLogsCommand");
|
|
18
18
|
const GetSyncStatusCommand_1 = require("./commands/GetSyncStatusCommand");
|
|
@@ -34,11 +34,11 @@ const commands = {
|
|
|
34
34
|
DeleteDataSourceCommand: DeleteDataSourceCommand_1.DeleteDataSourceCommand,
|
|
35
35
|
DeleteDocumentCommand: DeleteDocumentCommand_1.DeleteDocumentCommand,
|
|
36
36
|
DeleteKnowledgeBaseCommand: DeleteKnowledgeBaseCommand_1.DeleteKnowledgeBaseCommand,
|
|
37
|
-
GetAuthorizationSessionForDataSourceCommand: GetAuthorizationSessionForDataSourceCommand_1.GetAuthorizationSessionForDataSourceCommand,
|
|
38
37
|
GetDataSourceCommand: GetDataSourceCommand_1.GetDataSourceCommand,
|
|
39
38
|
GetDocumentCommand: GetDocumentCommand_1.GetDocumentCommand,
|
|
40
39
|
GetDocumentPresignedDownloadUrlCommand: GetDocumentPresignedDownloadUrlCommand_1.GetDocumentPresignedDownloadUrlCommand,
|
|
41
40
|
GetDocumentPresignedUploadUrlCommand: GetDocumentPresignedUploadUrlCommand_1.GetDocumentPresignedUploadUrlCommand,
|
|
41
|
+
GetExtraInfoForDataSourceCommand: GetExtraInfoForDataSourceCommand_1.GetExtraInfoForDataSourceCommand,
|
|
42
42
|
GetKnowledgeBaseCommand: GetKnowledgeBaseCommand_1.GetKnowledgeBaseCommand,
|
|
43
43
|
GetSyncLogsCommand: GetSyncLogsCommand_1.GetSyncLogsCommand,
|
|
44
44
|
GetSyncStatusCommand: GetSyncStatusCommand_1.GetSyncStatusCommand,
|
|
@@ -19,14 +19,14 @@ class KnowledgeBaseClient extends smithy_client_1.Client {
|
|
|
19
19
|
let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
|
|
20
20
|
let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
|
|
21
21
|
const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `kb.wim-${configuration.env}.wildix.com` : 'kb.wim.wildix.com';
|
|
22
|
-
const endpoint = () => {
|
|
22
|
+
const endpoint = configuration.endpoint || (() => {
|
|
23
23
|
return {
|
|
24
24
|
hostname,
|
|
25
25
|
protocol: "https",
|
|
26
26
|
port: '443',
|
|
27
27
|
path: ''
|
|
28
28
|
};
|
|
29
|
-
};
|
|
29
|
+
});
|
|
30
30
|
const config = { ..._config_3, endpoint };
|
|
31
31
|
this.config = config;
|
|
32
32
|
this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GetExtraInfoForDataSourceCommand = exports.$Command = void 0;
|
|
4
4
|
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
5
|
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
class
|
|
8
|
+
class GetExtraInfoForDataSourceCommand extends smithy_client_1.Command.classBuilder()
|
|
9
9
|
.m(function (Command, cs, config, o) {
|
|
10
10
|
return [
|
|
11
11
|
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
12
|
];
|
|
13
13
|
})
|
|
14
|
-
.s("KnowledgeBase", "
|
|
15
|
-
.n("KnowledgeBaseClient", "
|
|
14
|
+
.s("KnowledgeBase", "GetExtraInfoForDataSource", {})
|
|
15
|
+
.n("KnowledgeBaseClient", "GetExtraInfoForDataSourceCommand")
|
|
16
16
|
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.
|
|
18
|
-
.de(Aws_restJson1_1.
|
|
17
|
+
.ser(Aws_restJson1_1.se_GetExtraInfoForDataSourceCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_GetExtraInfoForDataSourceCommand)
|
|
19
19
|
.build() {
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
21
|
+
exports.GetExtraInfoForDataSourceCommand = GetExtraInfoForDataSourceCommand;
|
|
@@ -7,11 +7,11 @@ tslib_1.__exportStar(require("./CreateKnowledgeBaseCommand"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./DeleteDataSourceCommand"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./DeleteDocumentCommand"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./DeleteKnowledgeBaseCommand"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./GetAuthorizationSessionForDataSourceCommand"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./GetDataSourceCommand"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("./GetDocumentCommand"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("./GetDocumentPresignedDownloadUrlCommand"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./GetDocumentPresignedUploadUrlCommand"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./GetExtraInfoForDataSourceCommand"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./GetKnowledgeBaseCommand"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./GetSyncLogsCommand"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./GetSyncStatusCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = exports.de_QueryKnowledgeBaseCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourcesCommand = exports.de_GetSyncStatusCommand = exports.de_GetSyncLogsCommand = exports.de_GetKnowledgeBaseCommand = exports.
|
|
3
|
+
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = exports.de_QueryKnowledgeBaseCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourcesCommand = exports.de_GetSyncStatusCommand = exports.de_GetSyncLogsCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetExtraInfoForDataSourceCommand = exports.de_GetDocumentPresignedUploadUrlCommand = exports.de_GetDocumentPresignedDownloadUrlCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteDocumentCommand = exports.de_DeleteDataSourceCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateDocumentCommand = exports.de_CreateDataSourceCommand = exports.se_UpdateKnowledgeBaseCommand = exports.se_UpdateDocumentCommand = exports.se_UpdateDataSourceCommand = exports.se_StopSyncDataSourceCommand = exports.se_StartSyncDataSourceCommand = exports.se_SearchKnowledgeBaseCommand = exports.se_QueryKnowledgeBaseCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourcesCommand = exports.se_GetSyncStatusCommand = exports.se_GetSyncLogsCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetExtraInfoForDataSourceCommand = exports.se_GetDocumentPresignedUploadUrlCommand = exports.se_GetDocumentPresignedDownloadUrlCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteDocumentCommand = exports.se_DeleteDataSourceCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateDocumentCommand = exports.se_CreateDataSourceCommand = void 0;
|
|
4
4
|
const KnowledgeBaseServiceException_1 = require("../models/KnowledgeBaseServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const core_1 = require("@aws-sdk/core");
|
|
@@ -128,22 +128,6 @@ const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
|
128
128
|
return b.build();
|
|
129
129
|
};
|
|
130
130
|
exports.se_DeleteKnowledgeBaseCommand = se_DeleteKnowledgeBaseCommand;
|
|
131
|
-
const se_GetAuthorizationSessionForDataSourceCommand = async (input, context) => {
|
|
132
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
133
|
-
const headers = {};
|
|
134
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/authorization-session");
|
|
135
|
-
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
136
|
-
const query = (0, smithy_client_1.map)({
|
|
137
|
-
[_c]: [, input[_cI]],
|
|
138
|
-
});
|
|
139
|
-
let body;
|
|
140
|
-
b.m("GET")
|
|
141
|
-
.h(headers)
|
|
142
|
-
.q(query)
|
|
143
|
-
.b(body);
|
|
144
|
-
return b.build();
|
|
145
|
-
};
|
|
146
|
-
exports.se_GetAuthorizationSessionForDataSourceCommand = se_GetAuthorizationSessionForDataSourceCommand;
|
|
147
131
|
const se_GetDataSourceCommand = async (input, context) => {
|
|
148
132
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
149
133
|
const headers = {};
|
|
@@ -212,6 +196,27 @@ const se_GetDocumentPresignedUploadUrlCommand = async (input, context) => {
|
|
|
212
196
|
return b.build();
|
|
213
197
|
};
|
|
214
198
|
exports.se_GetDocumentPresignedUploadUrlCommand = se_GetDocumentPresignedUploadUrlCommand;
|
|
199
|
+
const se_GetExtraInfoForDataSourceCommand = async (input, context) => {
|
|
200
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
201
|
+
const headers = {
|
|
202
|
+
'content-type': 'application/json',
|
|
203
|
+
};
|
|
204
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/extra-info");
|
|
205
|
+
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
206
|
+
const query = (0, smithy_client_1.map)({
|
|
207
|
+
[_c]: [, input[_cI]],
|
|
208
|
+
});
|
|
209
|
+
let body;
|
|
210
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
211
|
+
'parameters': _ => se_Document(_, context),
|
|
212
|
+
}));
|
|
213
|
+
b.m("POST")
|
|
214
|
+
.h(headers)
|
|
215
|
+
.q(query)
|
|
216
|
+
.b(body);
|
|
217
|
+
return b.build();
|
|
218
|
+
};
|
|
219
|
+
exports.se_GetExtraInfoForDataSourceCommand = se_GetExtraInfoForDataSourceCommand;
|
|
215
220
|
const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
216
221
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
217
222
|
const headers = {};
|
|
@@ -538,21 +543,6 @@ const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
538
543
|
return contents;
|
|
539
544
|
};
|
|
540
545
|
exports.de_DeleteKnowledgeBaseCommand = de_DeleteKnowledgeBaseCommand;
|
|
541
|
-
const de_GetAuthorizationSessionForDataSourceCommand = async (output, context) => {
|
|
542
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
543
|
-
return de_CommandError(output, context);
|
|
544
|
-
}
|
|
545
|
-
const contents = (0, smithy_client_1.map)({
|
|
546
|
-
$metadata: deserializeMetadata(output),
|
|
547
|
-
});
|
|
548
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
549
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
550
|
-
'authorizationSession': smithy_client_1.expectString,
|
|
551
|
-
});
|
|
552
|
-
Object.assign(contents, doc);
|
|
553
|
-
return contents;
|
|
554
|
-
};
|
|
555
|
-
exports.de_GetAuthorizationSessionForDataSourceCommand = de_GetAuthorizationSessionForDataSourceCommand;
|
|
556
546
|
const de_GetDataSourceCommand = async (output, context) => {
|
|
557
547
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
548
|
return de_CommandError(output, context);
|
|
@@ -613,6 +603,21 @@ const de_GetDocumentPresignedUploadUrlCommand = async (output, context) => {
|
|
|
613
603
|
return contents;
|
|
614
604
|
};
|
|
615
605
|
exports.de_GetDocumentPresignedUploadUrlCommand = de_GetDocumentPresignedUploadUrlCommand;
|
|
606
|
+
const de_GetExtraInfoForDataSourceCommand = async (output, context) => {
|
|
607
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
608
|
+
return de_CommandError(output, context);
|
|
609
|
+
}
|
|
610
|
+
const contents = (0, smithy_client_1.map)({
|
|
611
|
+
$metadata: deserializeMetadata(output),
|
|
612
|
+
});
|
|
613
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
614
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
615
|
+
'extraInfo': _ => de_Document(_, context),
|
|
616
|
+
});
|
|
617
|
+
Object.assign(contents, doc);
|
|
618
|
+
return contents;
|
|
619
|
+
};
|
|
620
|
+
exports.de_GetExtraInfoForDataSourceCommand = de_GetExtraInfoForDataSourceCommand;
|
|
616
621
|
const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
617
622
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
618
623
|
return de_CommandError(output, context);
|
|
@@ -737,7 +742,7 @@ const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
737
742
|
};
|
|
738
743
|
exports.de_SearchKnowledgeBaseCommand = de_SearchKnowledgeBaseCommand;
|
|
739
744
|
const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
740
|
-
if (output.statusCode !==
|
|
745
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
741
746
|
return de_CommandError(output, context);
|
|
742
747
|
}
|
|
743
748
|
const contents = (0, smithy_client_1.map)({
|
|
@@ -748,7 +753,7 @@ const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
|
748
753
|
};
|
|
749
754
|
exports.de_StartSyncDataSourceCommand = de_StartSyncDataSourceCommand;
|
|
750
755
|
const de_StopSyncDataSourceCommand = async (output, context) => {
|
|
751
|
-
if (output.statusCode !==
|
|
756
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
752
757
|
return de_CommandError(output, context);
|
|
753
758
|
}
|
|
754
759
|
const contents = (0, smithy_client_1.map)({
|
package/dist-es/KnowledgeBase.js
CHANGED
|
@@ -5,11 +5,11 @@ import { CreateKnowledgeBaseCommand, } from "./commands/CreateKnowledgeBaseComma
|
|
|
5
5
|
import { DeleteDataSourceCommand, } from "./commands/DeleteDataSourceCommand";
|
|
6
6
|
import { DeleteDocumentCommand, } from "./commands/DeleteDocumentCommand";
|
|
7
7
|
import { DeleteKnowledgeBaseCommand, } from "./commands/DeleteKnowledgeBaseCommand";
|
|
8
|
-
import { GetAuthorizationSessionForDataSourceCommand, } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
9
8
|
import { GetDataSourceCommand, } from "./commands/GetDataSourceCommand";
|
|
10
9
|
import { GetDocumentCommand, } from "./commands/GetDocumentCommand";
|
|
11
10
|
import { GetDocumentPresignedDownloadUrlCommand, } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
12
11
|
import { GetDocumentPresignedUploadUrlCommand, } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
12
|
+
import { GetExtraInfoForDataSourceCommand, } from "./commands/GetExtraInfoForDataSourceCommand";
|
|
13
13
|
import { GetKnowledgeBaseCommand, } from "./commands/GetKnowledgeBaseCommand";
|
|
14
14
|
import { GetSyncLogsCommand, } from "./commands/GetSyncLogsCommand";
|
|
15
15
|
import { GetSyncStatusCommand, } from "./commands/GetSyncStatusCommand";
|
|
@@ -31,11 +31,11 @@ const commands = {
|
|
|
31
31
|
DeleteDataSourceCommand,
|
|
32
32
|
DeleteDocumentCommand,
|
|
33
33
|
DeleteKnowledgeBaseCommand,
|
|
34
|
-
GetAuthorizationSessionForDataSourceCommand,
|
|
35
34
|
GetDataSourceCommand,
|
|
36
35
|
GetDocumentCommand,
|
|
37
36
|
GetDocumentPresignedDownloadUrlCommand,
|
|
38
37
|
GetDocumentPresignedUploadUrlCommand,
|
|
38
|
+
GetExtraInfoForDataSourceCommand,
|
|
39
39
|
GetKnowledgeBaseCommand,
|
|
40
40
|
GetSyncLogsCommand,
|
|
41
41
|
GetSyncStatusCommand,
|
|
@@ -16,14 +16,14 @@ export class KnowledgeBaseClient extends __Client {
|
|
|
16
16
|
let _config_2 = resolveRetryConfig(_config_1);
|
|
17
17
|
let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
|
|
18
18
|
const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `kb.wim-${configuration.env}.wildix.com` : 'kb.wim.wildix.com';
|
|
19
|
-
const endpoint = () => {
|
|
19
|
+
const endpoint = configuration.endpoint || (() => {
|
|
20
20
|
return {
|
|
21
21
|
hostname,
|
|
22
22
|
protocol: "https",
|
|
23
23
|
port: '443',
|
|
24
24
|
path: ''
|
|
25
25
|
};
|
|
26
|
-
};
|
|
26
|
+
});
|
|
27
27
|
const config = { ..._config_3, endpoint };
|
|
28
28
|
this.config = config;
|
|
29
29
|
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetExtraInfoForDataSourceCommand, se_GetExtraInfoForDataSourceCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetExtraInfoForDataSourceCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("KnowledgeBase", "GetExtraInfoForDataSource", {})
|
|
12
|
+
.n("KnowledgeBaseClient", "GetExtraInfoForDataSourceCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetExtraInfoForDataSourceCommand)
|
|
15
|
+
.de(de_GetExtraInfoForDataSourceCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -4,11 +4,11 @@ export * from "./CreateKnowledgeBaseCommand";
|
|
|
4
4
|
export * from "./DeleteDataSourceCommand";
|
|
5
5
|
export * from "./DeleteDocumentCommand";
|
|
6
6
|
export * from "./DeleteKnowledgeBaseCommand";
|
|
7
|
-
export * from "./GetAuthorizationSessionForDataSourceCommand";
|
|
8
7
|
export * from "./GetDataSourceCommand";
|
|
9
8
|
export * from "./GetDocumentCommand";
|
|
10
9
|
export * from "./GetDocumentPresignedDownloadUrlCommand";
|
|
11
10
|
export * from "./GetDocumentPresignedUploadUrlCommand";
|
|
11
|
+
export * from "./GetExtraInfoForDataSourceCommand";
|
|
12
12
|
export * from "./GetKnowledgeBaseCommand";
|
|
13
13
|
export * from "./GetSyncLogsCommand";
|
|
14
14
|
export * from "./GetSyncStatusCommand";
|
|
@@ -119,10 +119,10 @@ export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
|
119
119
|
.b(body);
|
|
120
120
|
return b.build();
|
|
121
121
|
};
|
|
122
|
-
export const
|
|
122
|
+
export const se_GetDataSourceCommand = async (input, context) => {
|
|
123
123
|
const b = rb(input, context);
|
|
124
124
|
const headers = {};
|
|
125
|
-
b.bp("/api/v1/data-sources/{dataSourceId}
|
|
125
|
+
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
126
126
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
127
127
|
const query = map({
|
|
128
128
|
[_c]: [, input[_cI]],
|
|
@@ -134,11 +134,12 @@ export const se_GetAuthorizationSessionForDataSourceCommand = async (input, cont
|
|
|
134
134
|
.b(body);
|
|
135
135
|
return b.build();
|
|
136
136
|
};
|
|
137
|
-
export const
|
|
137
|
+
export const se_GetDocumentCommand = async (input, context) => {
|
|
138
138
|
const b = rb(input, context);
|
|
139
139
|
const headers = {};
|
|
140
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
140
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
141
141
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
142
|
+
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
142
143
|
const query = map({
|
|
143
144
|
[_c]: [, input[_cI]],
|
|
144
145
|
});
|
|
@@ -149,14 +150,15 @@ export const se_GetDataSourceCommand = async (input, context) => {
|
|
|
149
150
|
.b(body);
|
|
150
151
|
return b.build();
|
|
151
152
|
};
|
|
152
|
-
export const
|
|
153
|
+
export const se_GetDocumentPresignedDownloadUrlCommand = async (input, context) => {
|
|
153
154
|
const b = rb(input, context);
|
|
154
155
|
const headers = {};
|
|
155
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
156
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/download_url");
|
|
156
157
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
157
158
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
158
159
|
const query = map({
|
|
159
160
|
[_c]: [, input[_cI]],
|
|
161
|
+
[_dT]: [, input[_dT]],
|
|
160
162
|
});
|
|
161
163
|
let body;
|
|
162
164
|
b.m("GET")
|
|
@@ -165,15 +167,14 @@ export const se_GetDocumentCommand = async (input, context) => {
|
|
|
165
167
|
.b(body);
|
|
166
168
|
return b.build();
|
|
167
169
|
};
|
|
168
|
-
export const
|
|
170
|
+
export const se_GetDocumentPresignedUploadUrlCommand = async (input, context) => {
|
|
169
171
|
const b = rb(input, context);
|
|
170
172
|
const headers = {};
|
|
171
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/
|
|
173
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/upload_url");
|
|
172
174
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
173
175
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
174
176
|
const query = map({
|
|
175
177
|
[_c]: [, input[_cI]],
|
|
176
|
-
[_dT]: [, input[_dT]],
|
|
177
178
|
});
|
|
178
179
|
let body;
|
|
179
180
|
b.m("GET")
|
|
@@ -182,17 +183,21 @@ export const se_GetDocumentPresignedDownloadUrlCommand = async (input, context)
|
|
|
182
183
|
.b(body);
|
|
183
184
|
return b.build();
|
|
184
185
|
};
|
|
185
|
-
export const
|
|
186
|
+
export const se_GetExtraInfoForDataSourceCommand = async (input, context) => {
|
|
186
187
|
const b = rb(input, context);
|
|
187
|
-
const headers = {
|
|
188
|
-
|
|
188
|
+
const headers = {
|
|
189
|
+
'content-type': 'application/json',
|
|
190
|
+
};
|
|
191
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/extra-info");
|
|
189
192
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
190
|
-
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
191
193
|
const query = map({
|
|
192
194
|
[_c]: [, input[_cI]],
|
|
193
195
|
});
|
|
194
196
|
let body;
|
|
195
|
-
|
|
197
|
+
body = JSON.stringify(take(input, {
|
|
198
|
+
'parameters': _ => se_Document(_, context),
|
|
199
|
+
}));
|
|
200
|
+
b.m("POST")
|
|
196
201
|
.h(headers)
|
|
197
202
|
.q(query)
|
|
198
203
|
.b(body);
|
|
@@ -505,7 +510,7 @@ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
505
510
|
await collectBody(output.body, context);
|
|
506
511
|
return contents;
|
|
507
512
|
};
|
|
508
|
-
export const
|
|
513
|
+
export const de_GetDataSourceCommand = async (output, context) => {
|
|
509
514
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
515
|
return de_CommandError(output, context);
|
|
511
516
|
}
|
|
@@ -514,12 +519,12 @@ export const de_GetAuthorizationSessionForDataSourceCommand = async (output, con
|
|
|
514
519
|
});
|
|
515
520
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
516
521
|
const doc = take(data, {
|
|
517
|
-
'
|
|
522
|
+
'dataSource': _ => de_DataSourceItem(_, context),
|
|
518
523
|
});
|
|
519
524
|
Object.assign(contents, doc);
|
|
520
525
|
return contents;
|
|
521
526
|
};
|
|
522
|
-
export const
|
|
527
|
+
export const de_GetDocumentCommand = async (output, context) => {
|
|
523
528
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
524
529
|
return de_CommandError(output, context);
|
|
525
530
|
}
|
|
@@ -528,12 +533,12 @@ export const de_GetDataSourceCommand = async (output, context) => {
|
|
|
528
533
|
});
|
|
529
534
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
530
535
|
const doc = take(data, {
|
|
531
|
-
'
|
|
536
|
+
'document': _json,
|
|
532
537
|
});
|
|
533
538
|
Object.assign(contents, doc);
|
|
534
539
|
return contents;
|
|
535
540
|
};
|
|
536
|
-
export const
|
|
541
|
+
export const de_GetDocumentPresignedDownloadUrlCommand = async (output, context) => {
|
|
537
542
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
538
543
|
return de_CommandError(output, context);
|
|
539
544
|
}
|
|
@@ -542,12 +547,12 @@ export const de_GetDocumentCommand = async (output, context) => {
|
|
|
542
547
|
});
|
|
543
548
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
544
549
|
const doc = take(data, {
|
|
545
|
-
'
|
|
550
|
+
'presignedDownloadUrl': __expectString,
|
|
546
551
|
});
|
|
547
552
|
Object.assign(contents, doc);
|
|
548
553
|
return contents;
|
|
549
554
|
};
|
|
550
|
-
export const
|
|
555
|
+
export const de_GetDocumentPresignedUploadUrlCommand = async (output, context) => {
|
|
551
556
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
552
557
|
return de_CommandError(output, context);
|
|
553
558
|
}
|
|
@@ -556,12 +561,12 @@ export const de_GetDocumentPresignedDownloadUrlCommand = async (output, context)
|
|
|
556
561
|
});
|
|
557
562
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
558
563
|
const doc = take(data, {
|
|
559
|
-
'
|
|
564
|
+
'presignedUploadUrl': __expectString,
|
|
560
565
|
});
|
|
561
566
|
Object.assign(contents, doc);
|
|
562
567
|
return contents;
|
|
563
568
|
};
|
|
564
|
-
export const
|
|
569
|
+
export const de_GetExtraInfoForDataSourceCommand = async (output, context) => {
|
|
565
570
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
566
571
|
return de_CommandError(output, context);
|
|
567
572
|
}
|
|
@@ -570,7 +575,7 @@ export const de_GetDocumentPresignedUploadUrlCommand = async (output, context) =
|
|
|
570
575
|
});
|
|
571
576
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
572
577
|
const doc = take(data, {
|
|
573
|
-
'
|
|
578
|
+
'extraInfo': _ => de_Document(_, context),
|
|
574
579
|
});
|
|
575
580
|
Object.assign(contents, doc);
|
|
576
581
|
return contents;
|
|
@@ -691,7 +696,7 @@ export const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
691
696
|
return contents;
|
|
692
697
|
};
|
|
693
698
|
export const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
694
|
-
if (output.statusCode !==
|
|
699
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
695
700
|
return de_CommandError(output, context);
|
|
696
701
|
}
|
|
697
702
|
const contents = map({
|
|
@@ -701,7 +706,7 @@ export const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
|
701
706
|
return contents;
|
|
702
707
|
};
|
|
703
708
|
export const de_StopSyncDataSourceCommand = async (output, context) => {
|
|
704
|
-
if (output.statusCode !==
|
|
709
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
705
710
|
return de_CommandError(output, context);
|
|
706
711
|
}
|
|
707
712
|
const contents = map({
|
|
@@ -5,11 +5,11 @@ import { CreateKnowledgeBaseCommandInput, CreateKnowledgeBaseCommandOutput } fro
|
|
|
5
5
|
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand";
|
|
6
6
|
import { DeleteDocumentCommandInput, DeleteDocumentCommandOutput } from "./commands/DeleteDocumentCommand";
|
|
7
7
|
import { DeleteKnowledgeBaseCommandInput, DeleteKnowledgeBaseCommandOutput } from "./commands/DeleteKnowledgeBaseCommand";
|
|
8
|
-
import { GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
9
8
|
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand";
|
|
10
9
|
import { GetDocumentCommandInput, GetDocumentCommandOutput } from "./commands/GetDocumentCommand";
|
|
11
10
|
import { GetDocumentPresignedDownloadUrlCommandInput, GetDocumentPresignedDownloadUrlCommandOutput } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
12
11
|
import { GetDocumentPresignedUploadUrlCommandInput, GetDocumentPresignedUploadUrlCommandOutput } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
12
|
+
import { GetExtraInfoForDataSourceCommandInput, GetExtraInfoForDataSourceCommandOutput } from "./commands/GetExtraInfoForDataSourceCommand";
|
|
13
13
|
import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand";
|
|
14
14
|
import { GetSyncLogsCommandInput, GetSyncLogsCommandOutput } from "./commands/GetSyncLogsCommand";
|
|
15
15
|
import { GetSyncStatusCommandInput, GetSyncStatusCommandOutput } from "./commands/GetSyncStatusCommand";
|
|
@@ -61,12 +61,6 @@ export interface KnowledgeBase {
|
|
|
61
61
|
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<DeleteKnowledgeBaseCommandOutput>;
|
|
62
62
|
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void): void;
|
|
63
63
|
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void): void;
|
|
64
|
-
/**
|
|
65
|
-
* @see {@link GetAuthorizationSessionForDataSourceCommand}
|
|
66
|
-
*/
|
|
67
|
-
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<GetAuthorizationSessionForDataSourceCommandOutput>;
|
|
68
|
-
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, cb: (err: any, data?: GetAuthorizationSessionForDataSourceCommandOutput) => void): void;
|
|
69
|
-
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAuthorizationSessionForDataSourceCommandOutput) => void): void;
|
|
70
64
|
/**
|
|
71
65
|
* @see {@link GetDataSourceCommand}
|
|
72
66
|
*/
|
|
@@ -91,6 +85,12 @@ export interface KnowledgeBase {
|
|
|
91
85
|
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentPresignedUploadUrlCommandOutput>;
|
|
92
86
|
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, cb: (err: any, data?: GetDocumentPresignedUploadUrlCommandOutput) => void): void;
|
|
93
87
|
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentPresignedUploadUrlCommandOutput) => void): void;
|
|
88
|
+
/**
|
|
89
|
+
* @see {@link GetExtraInfoForDataSourceCommand}
|
|
90
|
+
*/
|
|
91
|
+
getExtraInfoForDataSource(args: GetExtraInfoForDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<GetExtraInfoForDataSourceCommandOutput>;
|
|
92
|
+
getExtraInfoForDataSource(args: GetExtraInfoForDataSourceCommandInput, cb: (err: any, data?: GetExtraInfoForDataSourceCommandOutput) => void): void;
|
|
93
|
+
getExtraInfoForDataSource(args: GetExtraInfoForDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetExtraInfoForDataSourceCommandOutput) => void): void;
|
|
94
94
|
/**
|
|
95
95
|
* @see {@link GetKnowledgeBaseCommand}
|
|
96
96
|
*/
|
|
@@ -4,11 +4,11 @@ import { CreateKnowledgeBaseCommandInput, CreateKnowledgeBaseCommandOutput } fro
|
|
|
4
4
|
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand";
|
|
5
5
|
import { DeleteDocumentCommandInput, DeleteDocumentCommandOutput } from "./commands/DeleteDocumentCommand";
|
|
6
6
|
import { DeleteKnowledgeBaseCommandInput, DeleteKnowledgeBaseCommandOutput } from "./commands/DeleteKnowledgeBaseCommand";
|
|
7
|
-
import { GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
8
7
|
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand";
|
|
9
8
|
import { GetDocumentCommandInput, GetDocumentCommandOutput } from "./commands/GetDocumentCommand";
|
|
10
9
|
import { GetDocumentPresignedDownloadUrlCommandInput, GetDocumentPresignedDownloadUrlCommandOutput } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
11
10
|
import { GetDocumentPresignedUploadUrlCommandInput, GetDocumentPresignedUploadUrlCommandOutput } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
11
|
+
import { GetExtraInfoForDataSourceCommandInput, GetExtraInfoForDataSourceCommandOutput } from "./commands/GetExtraInfoForDataSourceCommand";
|
|
12
12
|
import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand";
|
|
13
13
|
import { GetSyncLogsCommandInput, GetSyncLogsCommandOutput } from "./commands/GetSyncLogsCommand";
|
|
14
14
|
import { GetSyncStatusCommandInput, GetSyncStatusCommandOutput } from "./commands/GetSyncStatusCommand";
|
|
@@ -33,11 +33,11 @@ export { __Client };
|
|
|
33
33
|
/**
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
export type ServiceInputTypes = CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput |
|
|
36
|
+
export type ServiceInputTypes = CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetExtraInfoForDataSourceCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
|
|
37
37
|
/**
|
|
38
38
|
* @public
|
|
39
39
|
*/
|
|
40
|
-
export type ServiceOutputTypes = CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput |
|
|
40
|
+
export type ServiceOutputTypes = CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetExtraInfoForDataSourceCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
|
|
41
41
|
/**
|
|
42
42
|
* @public
|
|
43
43
|
*/
|
|
@@ -137,6 +137,7 @@ export type KnowledgeBaseClientConfigType = Partial<__SmithyConfiguration<__Http
|
|
|
137
137
|
export interface KnowledgeBaseClientConfig extends KnowledgeBaseClientConfigType {
|
|
138
138
|
env?: 'stage' | 'stable' | 'prod';
|
|
139
139
|
token: TokenProvider;
|
|
140
|
+
endpoint?: () => Record<string, string>;
|
|
140
141
|
}
|
|
141
142
|
/**
|
|
142
143
|
* @public
|
|
@@ -40,7 +40,7 @@ declare const CreateDataSourceCommand_base: {
|
|
|
40
40
|
* type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
41
41
|
* config: { // DataSourceConfig Union: only one key present
|
|
42
42
|
* confluence: { // ConfluenceConfig
|
|
43
|
-
*
|
|
43
|
+
* baseUrl: "STRING_VALUE", // required
|
|
44
44
|
* username: "STRING_VALUE", // required
|
|
45
45
|
* apiKey: "STRING_VALUE", // required
|
|
46
46
|
* spaceId: "STRING_VALUE", // required
|
|
@@ -98,7 +98,7 @@ declare const CreateDataSourceCommand_base: {
|
|
|
98
98
|
* // type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
99
99
|
* // config: { // DataSourceConfig Union: only one key present
|
|
100
100
|
* // confluence: { // ConfluenceConfig
|
|
101
|
-
* //
|
|
101
|
+
* // baseUrl: "STRING_VALUE", // required
|
|
102
102
|
* // username: "STRING_VALUE", // required
|
|
103
103
|
* // apiKey: "STRING_VALUE", // required
|
|
104
104
|
* // spaceId: "STRING_VALUE", // required
|
|
@@ -47,7 +47,7 @@ declare const GetDataSourceCommand_base: {
|
|
|
47
47
|
* // type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
48
48
|
* // config: { // DataSourceConfig Union: only one key present
|
|
49
49
|
* // confluence: { // ConfluenceConfig
|
|
50
|
-
* //
|
|
50
|
+
* // baseUrl: "STRING_VALUE", // required
|
|
51
51
|
* // username: "STRING_VALUE", // required
|
|
52
52
|
* // apiKey: "STRING_VALUE", // required
|
|
53
53
|
* // spaceId: "STRING_VALUE", // required
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
+
import { GetExtraInfoForDataSourceInput, GetExtraInfoForDataSourceOutput } 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 GetExtraInfoForDataSourceCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetExtraInfoForDataSourceCommandInput extends GetExtraInfoForDataSourceInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetExtraInfoForDataSourceCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetExtraInfoForDataSourceCommandOutput extends GetExtraInfoForDataSourceOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetExtraInfoForDataSourceCommand_base: {
|
|
25
|
+
new (input: GetExtraInfoForDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<GetExtraInfoForDataSourceCommandInput, GetExtraInfoForDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GetExtraInfoForDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<GetExtraInfoForDataSourceCommandInput, GetExtraInfoForDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Get the extra info of a data source by its ID. It will return the extra info of the data source based on the parameters provided.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { KnowledgeBaseClient, GetExtraInfoForDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
+
* // const { KnowledgeBaseClient, GetExtraInfoForDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
+
* const client = new KnowledgeBaseClient(config);
|
|
37
|
+
* const input = { // GetExtraInfoForDataSourceInput
|
|
38
|
+
* companyId: "STRING_VALUE",
|
|
39
|
+
* dataSourceId: "STRING_VALUE", // required
|
|
40
|
+
* parameters: "DOCUMENT_VALUE", // required
|
|
41
|
+
* };
|
|
42
|
+
* const command = new GetExtraInfoForDataSourceCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // GetExtraInfoForDataSourceOutput
|
|
45
|
+
* // extraInfo: "DOCUMENT_VALUE", // required
|
|
46
|
+
* // };
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param GetExtraInfoForDataSourceCommandInput - {@link GetExtraInfoForDataSourceCommandInput}
|
|
51
|
+
* @returns {@link GetExtraInfoForDataSourceCommandOutput}
|
|
52
|
+
* @see {@link GetExtraInfoForDataSourceCommandInput} for command's `input` shape.
|
|
53
|
+
* @see {@link GetExtraInfoForDataSourceCommandOutput} for command's `response` shape.
|
|
54
|
+
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link ValidationException} (client fault)
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link DocumentNotFoundException} (client fault)
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link KnowledgeBaseServiceException}
|
|
69
|
+
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
70
|
+
*
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export declare class GetExtraInfoForDataSourceCommand extends GetExtraInfoForDataSourceCommand_base {
|
|
75
|
+
/** @internal type navigation helper, not in runtime. */
|
|
76
|
+
protected static __types: {
|
|
77
|
+
api: {
|
|
78
|
+
input: GetExtraInfoForDataSourceInput;
|
|
79
|
+
output: GetExtraInfoForDataSourceOutput;
|
|
80
|
+
};
|
|
81
|
+
sdk: {
|
|
82
|
+
input: GetExtraInfoForDataSourceCommandInput;
|
|
83
|
+
output: GetExtraInfoForDataSourceCommandOutput;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -47,7 +47,7 @@ declare const ListDataSourcesCommand_base: {
|
|
|
47
47
|
* // type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
48
48
|
* // config: { // DataSourceConfig Union: only one key present
|
|
49
49
|
* // confluence: { // ConfluenceConfig
|
|
50
|
-
* //
|
|
50
|
+
* // baseUrl: "STRING_VALUE", // required
|
|
51
51
|
* // username: "STRING_VALUE", // required
|
|
52
52
|
* // apiKey: "STRING_VALUE", // required
|
|
53
53
|
* // spaceId: "STRING_VALUE", // required
|
|
@@ -40,7 +40,7 @@ declare const UpdateDataSourceCommand_base: {
|
|
|
40
40
|
* type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
41
41
|
* config: { // DataSourceConfig Union: only one key present
|
|
42
42
|
* confluence: { // ConfluenceConfig
|
|
43
|
-
*
|
|
43
|
+
* baseUrl: "STRING_VALUE", // required
|
|
44
44
|
* username: "STRING_VALUE", // required
|
|
45
45
|
* apiKey: "STRING_VALUE", // required
|
|
46
46
|
* spaceId: "STRING_VALUE", // required
|
|
@@ -99,7 +99,7 @@ declare const UpdateDataSourceCommand_base: {
|
|
|
99
99
|
* // type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
100
100
|
* // config: { // DataSourceConfig Union: only one key present
|
|
101
101
|
* // confluence: { // ConfluenceConfig
|
|
102
|
-
* //
|
|
102
|
+
* // baseUrl: "STRING_VALUE", // required
|
|
103
103
|
* // username: "STRING_VALUE", // required
|
|
104
104
|
* // apiKey: "STRING_VALUE", // required
|
|
105
105
|
* // spaceId: "STRING_VALUE", // required
|
|
@@ -4,11 +4,11 @@ export * from "./CreateKnowledgeBaseCommand";
|
|
|
4
4
|
export * from "./DeleteDataSourceCommand";
|
|
5
5
|
export * from "./DeleteDocumentCommand";
|
|
6
6
|
export * from "./DeleteKnowledgeBaseCommand";
|
|
7
|
-
export * from "./GetAuthorizationSessionForDataSourceCommand";
|
|
8
7
|
export * from "./GetDataSourceCommand";
|
|
9
8
|
export * from "./GetDocumentCommand";
|
|
10
9
|
export * from "./GetDocumentPresignedDownloadUrlCommand";
|
|
11
10
|
export * from "./GetDocumentPresignedUploadUrlCommand";
|
|
11
|
+
export * from "./GetExtraInfoForDataSourceCommand";
|
|
12
12
|
export * from "./GetKnowledgeBaseCommand";
|
|
13
13
|
export * from "./GetSyncLogsCommand";
|
|
14
14
|
export * from "./GetSyncStatusCommand";
|
|
@@ -49,14 +49,14 @@ export interface ConfluenceConfig {
|
|
|
49
49
|
* The URL of the Confluence instance. Example: https://your-confluence-domain.atlassian.net
|
|
50
50
|
* @public
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
baseUrl: string;
|
|
53
53
|
/**
|
|
54
54
|
* The username or email of the Confluence instance.
|
|
55
55
|
* @public
|
|
56
56
|
*/
|
|
57
57
|
username: string;
|
|
58
58
|
/**
|
|
59
|
-
* The API
|
|
59
|
+
* The API key of the Confluence instance.
|
|
60
60
|
* @public
|
|
61
61
|
*/
|
|
62
62
|
apiKey: string;
|
|
@@ -588,23 +588,6 @@ export declare const DownloadDocumentType: {
|
|
|
588
588
|
* @public
|
|
589
589
|
*/
|
|
590
590
|
export type DownloadDocumentType = typeof DownloadDocumentType[keyof typeof DownloadDocumentType];
|
|
591
|
-
/**
|
|
592
|
-
* @public
|
|
593
|
-
*/
|
|
594
|
-
export interface GetAuthorizationSessionForDataSourceInput {
|
|
595
|
-
/**
|
|
596
|
-
* The unique identifier of the tenant when a service token is used.
|
|
597
|
-
* @public
|
|
598
|
-
*/
|
|
599
|
-
companyId?: string | undefined;
|
|
600
|
-
dataSourceId: string;
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* @public
|
|
604
|
-
*/
|
|
605
|
-
export interface GetAuthorizationSessionForDataSourceOutput {
|
|
606
|
-
authorizationSession: string;
|
|
607
|
-
}
|
|
608
591
|
/**
|
|
609
592
|
* @public
|
|
610
593
|
*/
|
|
@@ -677,6 +660,24 @@ export interface GetDocumentPresignedUploadUrlInput {
|
|
|
677
660
|
export interface GetDocumentPresignedUploadUrlOutput {
|
|
678
661
|
presignedUploadUrl: string;
|
|
679
662
|
}
|
|
663
|
+
/**
|
|
664
|
+
* @public
|
|
665
|
+
*/
|
|
666
|
+
export interface GetExtraInfoForDataSourceInput {
|
|
667
|
+
/**
|
|
668
|
+
* The unique identifier of the tenant when a service token is used.
|
|
669
|
+
* @public
|
|
670
|
+
*/
|
|
671
|
+
companyId?: string | undefined;
|
|
672
|
+
dataSourceId: string;
|
|
673
|
+
parameters: __DocumentType;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* @public
|
|
677
|
+
*/
|
|
678
|
+
export interface GetExtraInfoForDataSourceOutput {
|
|
679
|
+
extraInfo: __DocumentType;
|
|
680
|
+
}
|
|
680
681
|
/**
|
|
681
682
|
* @public
|
|
682
683
|
*/
|
|
@@ -4,11 +4,11 @@ import { CreateKnowledgeBaseCommandInput, CreateKnowledgeBaseCommandOutput } fro
|
|
|
4
4
|
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "../commands/DeleteDataSourceCommand";
|
|
5
5
|
import { DeleteDocumentCommandInput, DeleteDocumentCommandOutput } from "../commands/DeleteDocumentCommand";
|
|
6
6
|
import { DeleteKnowledgeBaseCommandInput, DeleteKnowledgeBaseCommandOutput } from "../commands/DeleteKnowledgeBaseCommand";
|
|
7
|
-
import { GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput } from "../commands/GetAuthorizationSessionForDataSourceCommand";
|
|
8
7
|
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "../commands/GetDataSourceCommand";
|
|
9
8
|
import { GetDocumentCommandInput, GetDocumentCommandOutput } from "../commands/GetDocumentCommand";
|
|
10
9
|
import { GetDocumentPresignedDownloadUrlCommandInput, GetDocumentPresignedDownloadUrlCommandOutput } from "../commands/GetDocumentPresignedDownloadUrlCommand";
|
|
11
10
|
import { GetDocumentPresignedUploadUrlCommandInput, GetDocumentPresignedUploadUrlCommandOutput } from "../commands/GetDocumentPresignedUploadUrlCommand";
|
|
11
|
+
import { GetExtraInfoForDataSourceCommandInput, GetExtraInfoForDataSourceCommandOutput } from "../commands/GetExtraInfoForDataSourceCommand";
|
|
12
12
|
import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "../commands/GetKnowledgeBaseCommand";
|
|
13
13
|
import { GetSyncLogsCommandInput, GetSyncLogsCommandOutput } from "../commands/GetSyncLogsCommand";
|
|
14
14
|
import { GetSyncStatusCommandInput, GetSyncStatusCommandOutput } from "../commands/GetSyncStatusCommand";
|
|
@@ -48,10 +48,6 @@ export declare const se_DeleteDocumentCommand: (input: DeleteDocumentCommandInpu
|
|
|
48
48
|
* serializeAws_restJson1DeleteKnowledgeBaseCommand
|
|
49
49
|
*/
|
|
50
50
|
export declare const se_DeleteKnowledgeBaseCommand: (input: DeleteKnowledgeBaseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
51
|
-
/**
|
|
52
|
-
* serializeAws_restJson1GetAuthorizationSessionForDataSourceCommand
|
|
53
|
-
*/
|
|
54
|
-
export declare const se_GetAuthorizationSessionForDataSourceCommand: (input: GetAuthorizationSessionForDataSourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
55
51
|
/**
|
|
56
52
|
* serializeAws_restJson1GetDataSourceCommand
|
|
57
53
|
*/
|
|
@@ -68,6 +64,10 @@ export declare const se_GetDocumentPresignedDownloadUrlCommand: (input: GetDocum
|
|
|
68
64
|
* serializeAws_restJson1GetDocumentPresignedUploadUrlCommand
|
|
69
65
|
*/
|
|
70
66
|
export declare const se_GetDocumentPresignedUploadUrlCommand: (input: GetDocumentPresignedUploadUrlCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
67
|
+
/**
|
|
68
|
+
* serializeAws_restJson1GetExtraInfoForDataSourceCommand
|
|
69
|
+
*/
|
|
70
|
+
export declare const se_GetExtraInfoForDataSourceCommand: (input: GetExtraInfoForDataSourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
71
71
|
/**
|
|
72
72
|
* serializeAws_restJson1GetKnowledgeBaseCommand
|
|
73
73
|
*/
|
|
@@ -144,10 +144,6 @@ export declare const de_DeleteDocumentCommand: (output: __HttpResponse, context:
|
|
|
144
144
|
* deserializeAws_restJson1DeleteKnowledgeBaseCommand
|
|
145
145
|
*/
|
|
146
146
|
export declare const de_DeleteKnowledgeBaseCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteKnowledgeBaseCommandOutput>;
|
|
147
|
-
/**
|
|
148
|
-
* deserializeAws_restJson1GetAuthorizationSessionForDataSourceCommand
|
|
149
|
-
*/
|
|
150
|
-
export declare const de_GetAuthorizationSessionForDataSourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetAuthorizationSessionForDataSourceCommandOutput>;
|
|
151
147
|
/**
|
|
152
148
|
* deserializeAws_restJson1GetDataSourceCommand
|
|
153
149
|
*/
|
|
@@ -164,6 +160,10 @@ export declare const de_GetDocumentPresignedDownloadUrlCommand: (output: __HttpR
|
|
|
164
160
|
* deserializeAws_restJson1GetDocumentPresignedUploadUrlCommand
|
|
165
161
|
*/
|
|
166
162
|
export declare const de_GetDocumentPresignedUploadUrlCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentPresignedUploadUrlCommandOutput>;
|
|
163
|
+
/**
|
|
164
|
+
* deserializeAws_restJson1GetExtraInfoForDataSourceCommand
|
|
165
|
+
*/
|
|
166
|
+
export declare const de_GetExtraInfoForDataSourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetExtraInfoForDataSourceCommandOutput>;
|
|
167
167
|
/**
|
|
168
168
|
* deserializeAws_restJson1GetKnowledgeBaseCommand
|
|
169
169
|
*/
|
|
@@ -15,6 +15,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
15
15
|
streamCollector: import("@smithy/types").StreamCollector;
|
|
16
16
|
env?: "stage" | "stable" | "prod" | undefined;
|
|
17
17
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
18
|
+
endpoint?: (() => Record<string, string>) | undefined;
|
|
18
19
|
apiVersion: string;
|
|
19
20
|
cacheMiddleware?: boolean | undefined;
|
|
20
21
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -16,6 +16,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
16
16
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
17
17
|
env?: "stage" | "stable" | "prod" | undefined;
|
|
18
18
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
19
|
+
endpoint?: (() => Record<string, string>) | undefined;
|
|
19
20
|
apiVersion: string;
|
|
20
21
|
cacheMiddleware?: boolean | undefined;
|
|
21
22
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -7,6 +7,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
7
7
|
sha256: import("@smithy/types").HashConstructor;
|
|
8
8
|
env?: "stage" | "stable" | "prod" | undefined;
|
|
9
9
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
10
|
+
endpoint?: (() => Record<string, string>) | undefined;
|
|
10
11
|
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
11
12
|
apiVersion: string;
|
|
12
13
|
cacheMiddleware?: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-knowledge-base-client",
|
|
3
3
|
"description": "@wildix/wim-knowledge-base-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { de_GetAuthorizationSessionForDataSourceCommand, se_GetAuthorizationSessionForDataSourceCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
-
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
-
export { $Command };
|
|
5
|
-
export class GetAuthorizationSessionForDataSourceCommand extends $Command.classBuilder()
|
|
6
|
-
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
-
})
|
|
11
|
-
.s("KnowledgeBase", "GetAuthorizationSessionForDataSource", {})
|
|
12
|
-
.n("KnowledgeBaseClient", "GetAuthorizationSessionForDataSourceCommand")
|
|
13
|
-
.f(void 0, void 0)
|
|
14
|
-
.ser(se_GetAuthorizationSessionForDataSourceCommand)
|
|
15
|
-
.de(de_GetAuthorizationSessionForDataSourceCommand)
|
|
16
|
-
.build() {
|
|
17
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
-
import { GetAuthorizationSessionForDataSourceInput, GetAuthorizationSessionForDataSourceOutput } 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 GetAuthorizationSessionForDataSourceCommand}.
|
|
14
|
-
*/
|
|
15
|
-
export interface GetAuthorizationSessionForDataSourceCommandInput extends GetAuthorizationSessionForDataSourceInput {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @public
|
|
19
|
-
*
|
|
20
|
-
* The output of {@link GetAuthorizationSessionForDataSourceCommand}.
|
|
21
|
-
*/
|
|
22
|
-
export interface GetAuthorizationSessionForDataSourceCommandOutput extends GetAuthorizationSessionForDataSourceOutput, __MetadataBearer {
|
|
23
|
-
}
|
|
24
|
-
declare const GetAuthorizationSessionForDataSourceCommand_base: {
|
|
25
|
-
new (input: GetAuthorizationSessionForDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (__0_0: GetAuthorizationSessionForDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
-
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Get a Nango authorization session for a data source
|
|
31
|
-
* @example
|
|
32
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
-
* ```javascript
|
|
34
|
-
* import { KnowledgeBaseClient, GetAuthorizationSessionForDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
-
* // const { KnowledgeBaseClient, GetAuthorizationSessionForDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
-
* const client = new KnowledgeBaseClient(config);
|
|
37
|
-
* const input = { // GetAuthorizationSessionForDataSourceInput
|
|
38
|
-
* companyId: "STRING_VALUE",
|
|
39
|
-
* dataSourceId: "STRING_VALUE", // required
|
|
40
|
-
* };
|
|
41
|
-
* const command = new GetAuthorizationSessionForDataSourceCommand(input);
|
|
42
|
-
* const response = await client.send(command);
|
|
43
|
-
* // { // GetAuthorizationSessionForDataSourceOutput
|
|
44
|
-
* // authorizationSession: "STRING_VALUE", // required
|
|
45
|
-
* // };
|
|
46
|
-
*
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @param GetAuthorizationSessionForDataSourceCommandInput - {@link GetAuthorizationSessionForDataSourceCommandInput}
|
|
50
|
-
* @returns {@link GetAuthorizationSessionForDataSourceCommandOutput}
|
|
51
|
-
* @see {@link GetAuthorizationSessionForDataSourceCommandInput} for command's `input` shape.
|
|
52
|
-
* @see {@link GetAuthorizationSessionForDataSourceCommandOutput} for command's `response` shape.
|
|
53
|
-
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
54
|
-
*
|
|
55
|
-
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
56
|
-
*
|
|
57
|
-
* @throws {@link UnauthorizedException} (client fault)
|
|
58
|
-
*
|
|
59
|
-
* @throws {@link ForbiddenException} (client fault)
|
|
60
|
-
*
|
|
61
|
-
* @throws {@link ValidationException} (client fault)
|
|
62
|
-
*
|
|
63
|
-
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
64
|
-
*
|
|
65
|
-
* @throws {@link DocumentNotFoundException} (client fault)
|
|
66
|
-
*
|
|
67
|
-
* @throws {@link KnowledgeBaseServiceException}
|
|
68
|
-
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
export declare class GetAuthorizationSessionForDataSourceCommand extends GetAuthorizationSessionForDataSourceCommand_base {
|
|
74
|
-
/** @internal type navigation helper, not in runtime. */
|
|
75
|
-
protected static __types: {
|
|
76
|
-
api: {
|
|
77
|
-
input: GetAuthorizationSessionForDataSourceInput;
|
|
78
|
-
output: GetAuthorizationSessionForDataSourceOutput;
|
|
79
|
-
};
|
|
80
|
-
sdk: {
|
|
81
|
-
input: GetAuthorizationSessionForDataSourceCommandInput;
|
|
82
|
-
output: GetAuthorizationSessionForDataSourceCommandOutput;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
}
|