@wildix/wim-knowledge-base-client 0.0.9 → 0.0.12
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 +6 -2
- package/dist-cjs/commands/{GetAuthorizationSessionForDataSourceCommand.js → ClearDataSourceCommand.js} +7 -7
- package/dist-cjs/commands/CloneDataSourceCommand.js +21 -0
- package/dist-cjs/commands/GetExtraInfoForDataSourceCommand.js +21 -0
- package/dist-cjs/commands/index.js +3 -1
- package/dist-cjs/models/models_0.js +37 -36
- package/dist-cjs/protocols/Aws_restJson1.js +103 -34
- package/dist-es/KnowledgeBase.js +6 -2
- package/dist-es/commands/ClearDataSourceCommand.js +17 -0
- package/dist-es/commands/CloneDataSourceCommand.js +17 -0
- package/dist-es/commands/GetExtraInfoForDataSourceCommand.js +17 -0
- package/dist-es/commands/index.js +3 -1
- package/dist-es/models/models_0.js +36 -35
- package/dist-es/protocols/Aws_restJson1.js +90 -26
- package/dist-types/KnowledgeBase.d.ts +21 -7
- package/dist-types/KnowledgeBaseClient.d.ts +5 -3
- package/dist-types/commands/ClearDataSourceCommand.d.ts +83 -0
- package/dist-types/commands/CloneDataSourceCommand.d.ts +85 -0
- package/dist-types/commands/CreateDataSourceCommand.d.ts +6 -6
- package/dist-types/commands/CreateDocumentCommand.d.ts +1 -1
- package/dist-types/commands/GetDataSourceCommand.d.ts +3 -3
- package/dist-types/commands/GetDocumentCommand.d.ts +1 -1
- package/dist-types/commands/GetExtraInfoForDataSourceCommand.d.ts +86 -0
- package/dist-types/commands/GetSyncLogsCommand.d.ts +2 -0
- package/dist-types/commands/GetSyncStatusCommand.d.ts +7 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +3 -3
- package/dist-types/commands/ListDocumentsCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +6 -6
- package/dist-types/commands/UpdateDocumentCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +3 -1
- package/dist-types/models/models_0.d.ts +236 -50
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -9
- package/package.json +1 -1
- package/dist-es/commands/GetAuthorizationSessionForDataSourceCommand.js +0 -17
- package/dist-types/commands/GetAuthorizationSessionForDataSourceCommand.d.ts +0 -85
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.KnowledgeBase = void 0;
|
|
4
4
|
const KnowledgeBaseClient_1 = require("./KnowledgeBaseClient");
|
|
5
|
+
const ClearDataSourceCommand_1 = require("./commands/ClearDataSourceCommand");
|
|
6
|
+
const CloneDataSourceCommand_1 = require("./commands/CloneDataSourceCommand");
|
|
5
7
|
const CreateDataSourceCommand_1 = require("./commands/CreateDataSourceCommand");
|
|
6
8
|
const CreateDocumentCommand_1 = require("./commands/CreateDocumentCommand");
|
|
7
9
|
const CreateKnowledgeBaseCommand_1 = require("./commands/CreateKnowledgeBaseCommand");
|
|
8
10
|
const DeleteDataSourceCommand_1 = require("./commands/DeleteDataSourceCommand");
|
|
9
11
|
const DeleteDocumentCommand_1 = require("./commands/DeleteDocumentCommand");
|
|
10
12
|
const DeleteKnowledgeBaseCommand_1 = require("./commands/DeleteKnowledgeBaseCommand");
|
|
11
|
-
const GetAuthorizationSessionForDataSourceCommand_1 = require("./commands/GetAuthorizationSessionForDataSourceCommand");
|
|
12
13
|
const GetDataSourceCommand_1 = require("./commands/GetDataSourceCommand");
|
|
13
14
|
const GetDocumentCommand_1 = require("./commands/GetDocumentCommand");
|
|
14
15
|
const GetDocumentPresignedDownloadUrlCommand_1 = require("./commands/GetDocumentPresignedDownloadUrlCommand");
|
|
15
16
|
const GetDocumentPresignedUploadUrlCommand_1 = require("./commands/GetDocumentPresignedUploadUrlCommand");
|
|
17
|
+
const GetExtraInfoForDataSourceCommand_1 = require("./commands/GetExtraInfoForDataSourceCommand");
|
|
16
18
|
const GetKnowledgeBaseCommand_1 = require("./commands/GetKnowledgeBaseCommand");
|
|
17
19
|
const GetSyncLogsCommand_1 = require("./commands/GetSyncLogsCommand");
|
|
18
20
|
const GetSyncStatusCommand_1 = require("./commands/GetSyncStatusCommand");
|
|
@@ -28,17 +30,19 @@ const UpdateDocumentCommand_1 = require("./commands/UpdateDocumentCommand");
|
|
|
28
30
|
const UpdateKnowledgeBaseCommand_1 = require("./commands/UpdateKnowledgeBaseCommand");
|
|
29
31
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
30
32
|
const commands = {
|
|
33
|
+
ClearDataSourceCommand: ClearDataSourceCommand_1.ClearDataSourceCommand,
|
|
34
|
+
CloneDataSourceCommand: CloneDataSourceCommand_1.CloneDataSourceCommand,
|
|
31
35
|
CreateDataSourceCommand: CreateDataSourceCommand_1.CreateDataSourceCommand,
|
|
32
36
|
CreateDocumentCommand: CreateDocumentCommand_1.CreateDocumentCommand,
|
|
33
37
|
CreateKnowledgeBaseCommand: CreateKnowledgeBaseCommand_1.CreateKnowledgeBaseCommand,
|
|
34
38
|
DeleteDataSourceCommand: DeleteDataSourceCommand_1.DeleteDataSourceCommand,
|
|
35
39
|
DeleteDocumentCommand: DeleteDocumentCommand_1.DeleteDocumentCommand,
|
|
36
40
|
DeleteKnowledgeBaseCommand: DeleteKnowledgeBaseCommand_1.DeleteKnowledgeBaseCommand,
|
|
37
|
-
GetAuthorizationSessionForDataSourceCommand: GetAuthorizationSessionForDataSourceCommand_1.GetAuthorizationSessionForDataSourceCommand,
|
|
38
41
|
GetDataSourceCommand: GetDataSourceCommand_1.GetDataSourceCommand,
|
|
39
42
|
GetDocumentCommand: GetDocumentCommand_1.GetDocumentCommand,
|
|
40
43
|
GetDocumentPresignedDownloadUrlCommand: GetDocumentPresignedDownloadUrlCommand_1.GetDocumentPresignedDownloadUrlCommand,
|
|
41
44
|
GetDocumentPresignedUploadUrlCommand: GetDocumentPresignedUploadUrlCommand_1.GetDocumentPresignedUploadUrlCommand,
|
|
45
|
+
GetExtraInfoForDataSourceCommand: GetExtraInfoForDataSourceCommand_1.GetExtraInfoForDataSourceCommand,
|
|
42
46
|
GetKnowledgeBaseCommand: GetKnowledgeBaseCommand_1.GetKnowledgeBaseCommand,
|
|
43
47
|
GetSyncLogsCommand: GetSyncLogsCommand_1.GetSyncLogsCommand,
|
|
44
48
|
GetSyncStatusCommand: GetSyncStatusCommand_1.GetSyncStatusCommand,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ClearDataSourceCommand = 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 ClearDataSourceCommand 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", "ClearDataSource", {})
|
|
15
|
+
.n("KnowledgeBaseClient", "ClearDataSourceCommand")
|
|
16
16
|
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.
|
|
18
|
-
.de(Aws_restJson1_1.
|
|
17
|
+
.ser(Aws_restJson1_1.se_ClearDataSourceCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_ClearDataSourceCommand)
|
|
19
19
|
.build() {
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
21
|
+
exports.ClearDataSourceCommand = ClearDataSourceCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloneDataSourceCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class CloneDataSourceCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("KnowledgeBase", "CloneDataSource", {})
|
|
15
|
+
.n("KnowledgeBaseClient", "CloneDataSourceCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_CloneDataSourceCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_CloneDataSourceCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.CloneDataSourceCommand = CloneDataSourceCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetExtraInfoForDataSourceCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class GetExtraInfoForDataSourceCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("KnowledgeBase", "GetExtraInfoForDataSource", {})
|
|
15
|
+
.n("KnowledgeBaseClient", "GetExtraInfoForDataSourceCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_GetExtraInfoForDataSourceCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_GetExtraInfoForDataSourceCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.GetExtraInfoForDataSourceCommand = GetExtraInfoForDataSourceCommand;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./ClearDataSourceCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./CloneDataSourceCommand"), exports);
|
|
4
6
|
tslib_1.__exportStar(require("./CreateDataSourceCommand"), exports);
|
|
5
7
|
tslib_1.__exportStar(require("./CreateDocumentCommand"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./CreateKnowledgeBaseCommand"), exports);
|
|
7
9
|
tslib_1.__exportStar(require("./DeleteDataSourceCommand"), exports);
|
|
8
10
|
tslib_1.__exportStar(require("./DeleteDocumentCommand"), exports);
|
|
9
11
|
tslib_1.__exportStar(require("./DeleteKnowledgeBaseCommand"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./GetAuthorizationSessionForDataSourceCommand"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./GetDataSourceCommand"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./GetDocumentCommand"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./GetDocumentPresignedDownloadUrlCommand"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./GetDocumentPresignedUploadUrlCommand"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./GetExtraInfoForDataSourceCommand"), exports);
|
|
15
17
|
tslib_1.__exportStar(require("./GetKnowledgeBaseCommand"), exports);
|
|
16
18
|
tslib_1.__exportStar(require("./GetSyncLogsCommand"), exports);
|
|
17
19
|
tslib_1.__exportStar(require("./GetSyncStatusCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.
|
|
3
|
+
exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DataSourceType = exports.DataSourceConfig = exports.ProxyMethod = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const KnowledgeBaseServiceException_1 = require("./KnowledgeBaseServiceException");
|
|
5
5
|
class ValidationException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
|
|
6
6
|
name = "ValidationException";
|
|
@@ -41,41 +41,6 @@ class UnauthorizedException extends KnowledgeBaseServiceException_1.KnowledgeBas
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.UnauthorizedException = UnauthorizedException;
|
|
44
|
-
exports.ProxyMethod = {
|
|
45
|
-
GET: "GET",
|
|
46
|
-
POST: "POST",
|
|
47
|
-
};
|
|
48
|
-
var DataSourceConfig;
|
|
49
|
-
(function (DataSourceConfig) {
|
|
50
|
-
DataSourceConfig.visit = (value, visitor) => {
|
|
51
|
-
if (value.confluence !== undefined)
|
|
52
|
-
return visitor.confluence(value.confluence);
|
|
53
|
-
if (value.gdrive !== undefined)
|
|
54
|
-
return visitor.gdrive(value.gdrive);
|
|
55
|
-
if (value.files !== undefined)
|
|
56
|
-
return visitor.files(value.files);
|
|
57
|
-
if (value.proxy !== undefined)
|
|
58
|
-
return visitor.proxy(value.proxy);
|
|
59
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
60
|
-
};
|
|
61
|
-
})(DataSourceConfig || (exports.DataSourceConfig = DataSourceConfig = {}));
|
|
62
|
-
exports.DataSourceType = {
|
|
63
|
-
CONFLUENCE: "confluence",
|
|
64
|
-
FILES: "files",
|
|
65
|
-
GDRIVE: "gdrive",
|
|
66
|
-
PROXY: "proxy",
|
|
67
|
-
};
|
|
68
|
-
exports.SyncDataSourceMode = {
|
|
69
|
-
FULL: "full",
|
|
70
|
-
INCREMENTAL: "incremental",
|
|
71
|
-
UNKNOWN: "unknown",
|
|
72
|
-
};
|
|
73
|
-
exports.SyncDataSourceStatus = {
|
|
74
|
-
FAILED: "failed",
|
|
75
|
-
IDLE: "idle",
|
|
76
|
-
RUNNING: "running",
|
|
77
|
-
SUCCESS: "success",
|
|
78
|
-
};
|
|
79
44
|
class DataSourceNotFoundException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
|
|
80
45
|
name = "DataSourceNotFoundException";
|
|
81
46
|
$fault = "client";
|
|
@@ -115,8 +80,44 @@ class KnowledgeBaseNotFoundException extends KnowledgeBaseServiceException_1.Kno
|
|
|
115
80
|
}
|
|
116
81
|
}
|
|
117
82
|
exports.KnowledgeBaseNotFoundException = KnowledgeBaseNotFoundException;
|
|
83
|
+
exports.ProxyMethod = {
|
|
84
|
+
GET: "GET",
|
|
85
|
+
POST: "POST",
|
|
86
|
+
};
|
|
87
|
+
var DataSourceConfig;
|
|
88
|
+
(function (DataSourceConfig) {
|
|
89
|
+
DataSourceConfig.visit = (value, visitor) => {
|
|
90
|
+
if (value.confluence !== undefined)
|
|
91
|
+
return visitor.confluence(value.confluence);
|
|
92
|
+
if (value.gdrive !== undefined)
|
|
93
|
+
return visitor.gdrive(value.gdrive);
|
|
94
|
+
if (value.files !== undefined)
|
|
95
|
+
return visitor.files(value.files);
|
|
96
|
+
if (value.proxy !== undefined)
|
|
97
|
+
return visitor.proxy(value.proxy);
|
|
98
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
99
|
+
};
|
|
100
|
+
})(DataSourceConfig || (exports.DataSourceConfig = DataSourceConfig = {}));
|
|
101
|
+
exports.DataSourceType = {
|
|
102
|
+
CONFLUENCE: "confluence",
|
|
103
|
+
FILES: "files",
|
|
104
|
+
GDRIVE: "gdrive",
|
|
105
|
+
PROXY: "proxy",
|
|
106
|
+
};
|
|
107
|
+
exports.SyncDataSourceMode = {
|
|
108
|
+
FULL: "full",
|
|
109
|
+
INCREMENTAL: "incremental",
|
|
110
|
+
UNKNOWN: "unknown",
|
|
111
|
+
};
|
|
112
|
+
exports.SyncDataSourceStatus = {
|
|
113
|
+
FAILED: "failed",
|
|
114
|
+
IDLE: "idle",
|
|
115
|
+
RUNNING: "running",
|
|
116
|
+
SUCCESS: "success",
|
|
117
|
+
};
|
|
118
118
|
exports.DocumentStatus = {
|
|
119
119
|
COMPLETED: "completed",
|
|
120
|
+
DRAFT: "draft",
|
|
120
121
|
FAILED: "failed",
|
|
121
122
|
PENDING: "pending",
|
|
122
123
|
PROCESSING: "processing",
|
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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.de_CloneDataSourceCommand = exports.de_ClearDataSourceCommand = 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 = exports.se_CloneDataSourceCommand = exports.se_ClearDataSourceCommand = void 0;
|
|
4
|
+
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = void 0;
|
|
4
5
|
const KnowledgeBaseServiceException_1 = require("../models/KnowledgeBaseServiceException");
|
|
5
6
|
const models_0_1 = require("../models/models_0");
|
|
6
7
|
const core_1 = require("@aws-sdk/core");
|
|
7
8
|
const core_2 = require("@smithy/core");
|
|
8
9
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
10
|
+
const se_ClearDataSourceCommand = async (input, context) => {
|
|
11
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
|
+
const headers = {};
|
|
13
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clear");
|
|
14
|
+
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
15
|
+
const query = (0, smithy_client_1.map)({
|
|
16
|
+
[_c]: [, input[_cI]],
|
|
17
|
+
});
|
|
18
|
+
let body;
|
|
19
|
+
b.m("POST")
|
|
20
|
+
.h(headers)
|
|
21
|
+
.q(query)
|
|
22
|
+
.b(body);
|
|
23
|
+
return b.build();
|
|
24
|
+
};
|
|
25
|
+
exports.se_ClearDataSourceCommand = se_ClearDataSourceCommand;
|
|
26
|
+
const se_CloneDataSourceCommand = async (input, context) => {
|
|
27
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
|
+
const headers = {};
|
|
29
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/clone");
|
|
30
|
+
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
31
|
+
const query = (0, smithy_client_1.map)({
|
|
32
|
+
[_c]: [, input[_cI]],
|
|
33
|
+
});
|
|
34
|
+
let body;
|
|
35
|
+
b.m("POST")
|
|
36
|
+
.h(headers)
|
|
37
|
+
.q(query)
|
|
38
|
+
.b(body);
|
|
39
|
+
return b.build();
|
|
40
|
+
};
|
|
41
|
+
exports.se_CloneDataSourceCommand = se_CloneDataSourceCommand;
|
|
9
42
|
const se_CreateDataSourceCommand = async (input, context) => {
|
|
10
43
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
44
|
const headers = {
|
|
@@ -128,22 +161,6 @@ const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
|
128
161
|
return b.build();
|
|
129
162
|
};
|
|
130
163
|
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
164
|
const se_GetDataSourceCommand = async (input, context) => {
|
|
148
165
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
149
166
|
const headers = {};
|
|
@@ -212,6 +229,27 @@ const se_GetDocumentPresignedUploadUrlCommand = async (input, context) => {
|
|
|
212
229
|
return b.build();
|
|
213
230
|
};
|
|
214
231
|
exports.se_GetDocumentPresignedUploadUrlCommand = se_GetDocumentPresignedUploadUrlCommand;
|
|
232
|
+
const se_GetExtraInfoForDataSourceCommand = async (input, context) => {
|
|
233
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
234
|
+
const headers = {
|
|
235
|
+
'content-type': 'application/json',
|
|
236
|
+
};
|
|
237
|
+
b.bp("/api/v1/data-sources/{dataSourceId}/extra-info");
|
|
238
|
+
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
239
|
+
const query = (0, smithy_client_1.map)({
|
|
240
|
+
[_c]: [, input[_cI]],
|
|
241
|
+
});
|
|
242
|
+
let body;
|
|
243
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
244
|
+
'parameters': _ => se_Document(_, context),
|
|
245
|
+
}));
|
|
246
|
+
b.m("POST")
|
|
247
|
+
.h(headers)
|
|
248
|
+
.q(query)
|
|
249
|
+
.b(body);
|
|
250
|
+
return b.build();
|
|
251
|
+
};
|
|
252
|
+
exports.se_GetExtraInfoForDataSourceCommand = se_GetExtraInfoForDataSourceCommand;
|
|
215
253
|
const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
216
254
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
217
255
|
const headers = {};
|
|
@@ -235,6 +273,8 @@ const se_GetSyncLogsCommand = async (input, context) => {
|
|
|
235
273
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
236
274
|
const query = (0, smithy_client_1.map)({
|
|
237
275
|
[_c]: [, input[_cI]],
|
|
276
|
+
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
277
|
+
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
238
278
|
});
|
|
239
279
|
let body;
|
|
240
280
|
b.m("GET")
|
|
@@ -460,6 +500,32 @@ const se_UpdateKnowledgeBaseCommand = async (input, context) => {
|
|
|
460
500
|
return b.build();
|
|
461
501
|
};
|
|
462
502
|
exports.se_UpdateKnowledgeBaseCommand = se_UpdateKnowledgeBaseCommand;
|
|
503
|
+
const de_ClearDataSourceCommand = async (output, context) => {
|
|
504
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
505
|
+
return de_CommandError(output, context);
|
|
506
|
+
}
|
|
507
|
+
const contents = (0, smithy_client_1.map)({
|
|
508
|
+
$metadata: deserializeMetadata(output),
|
|
509
|
+
});
|
|
510
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
511
|
+
return contents;
|
|
512
|
+
};
|
|
513
|
+
exports.de_ClearDataSourceCommand = de_ClearDataSourceCommand;
|
|
514
|
+
const de_CloneDataSourceCommand = async (output, context) => {
|
|
515
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
516
|
+
return de_CommandError(output, context);
|
|
517
|
+
}
|
|
518
|
+
const contents = (0, smithy_client_1.map)({
|
|
519
|
+
$metadata: deserializeMetadata(output),
|
|
520
|
+
});
|
|
521
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
522
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
523
|
+
'dataSourceId': smithy_client_1.expectString,
|
|
524
|
+
});
|
|
525
|
+
Object.assign(contents, doc);
|
|
526
|
+
return contents;
|
|
527
|
+
};
|
|
528
|
+
exports.de_CloneDataSourceCommand = de_CloneDataSourceCommand;
|
|
463
529
|
const de_CreateDataSourceCommand = async (output, context) => {
|
|
464
530
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
465
531
|
return de_CommandError(output, context);
|
|
@@ -538,21 +604,6 @@ const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
538
604
|
return contents;
|
|
539
605
|
};
|
|
540
606
|
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
607
|
const de_GetDataSourceCommand = async (output, context) => {
|
|
557
608
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
609
|
return de_CommandError(output, context);
|
|
@@ -613,6 +664,21 @@ const de_GetDocumentPresignedUploadUrlCommand = async (output, context) => {
|
|
|
613
664
|
return contents;
|
|
614
665
|
};
|
|
615
666
|
exports.de_GetDocumentPresignedUploadUrlCommand = de_GetDocumentPresignedUploadUrlCommand;
|
|
667
|
+
const de_GetExtraInfoForDataSourceCommand = async (output, context) => {
|
|
668
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
669
|
+
return de_CommandError(output, context);
|
|
670
|
+
}
|
|
671
|
+
const contents = (0, smithy_client_1.map)({
|
|
672
|
+
$metadata: deserializeMetadata(output),
|
|
673
|
+
});
|
|
674
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
675
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
676
|
+
'extraInfo': _ => de_Document(_, context),
|
|
677
|
+
});
|
|
678
|
+
Object.assign(contents, doc);
|
|
679
|
+
return contents;
|
|
680
|
+
};
|
|
681
|
+
exports.de_GetExtraInfoForDataSourceCommand = de_GetExtraInfoForDataSourceCommand;
|
|
616
682
|
const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
617
683
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
618
684
|
return de_CommandError(output, context);
|
|
@@ -652,6 +718,7 @@ const de_GetSyncStatusCommand = async (output, context) => {
|
|
|
652
718
|
});
|
|
653
719
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
654
720
|
const doc = (0, smithy_client_1.take)(data, {
|
|
721
|
+
'lastSyncLogs': smithy_client_1._json,
|
|
655
722
|
'progress': smithy_client_1.expectInt32,
|
|
656
723
|
'syncErrorMessage': smithy_client_1.expectString,
|
|
657
724
|
'syncStatus': smithy_client_1.expectString,
|
|
@@ -737,7 +804,7 @@ const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
|
737
804
|
};
|
|
738
805
|
exports.de_SearchKnowledgeBaseCommand = de_SearchKnowledgeBaseCommand;
|
|
739
806
|
const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
740
|
-
if (output.statusCode !==
|
|
807
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
741
808
|
return de_CommandError(output, context);
|
|
742
809
|
}
|
|
743
810
|
const contents = (0, smithy_client_1.map)({
|
|
@@ -748,7 +815,7 @@ const de_StartSyncDataSourceCommand = async (output, context) => {
|
|
|
748
815
|
};
|
|
749
816
|
exports.de_StartSyncDataSourceCommand = de_StartSyncDataSourceCommand;
|
|
750
817
|
const de_StopSyncDataSourceCommand = async (output, context) => {
|
|
751
|
-
if (output.statusCode !==
|
|
818
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
752
819
|
return de_CommandError(output, context);
|
|
753
820
|
}
|
|
754
821
|
const contents = (0, smithy_client_1.map)({
|
|
@@ -1044,5 +1111,7 @@ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBo
|
|
|
1044
1111
|
const _c = "company";
|
|
1045
1112
|
const _cI = "companyId";
|
|
1046
1113
|
const _dT = "documentType";
|
|
1114
|
+
const _l = "limit";
|
|
1115
|
+
const _o = "offset";
|
|
1047
1116
|
const _q = "query";
|
|
1048
1117
|
const _sT = "syncType";
|
package/dist-es/KnowledgeBase.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { KnowledgeBaseClient, } from "./KnowledgeBaseClient";
|
|
2
|
+
import { ClearDataSourceCommand, } from "./commands/ClearDataSourceCommand";
|
|
3
|
+
import { CloneDataSourceCommand, } from "./commands/CloneDataSourceCommand";
|
|
2
4
|
import { CreateDataSourceCommand, } from "./commands/CreateDataSourceCommand";
|
|
3
5
|
import { CreateDocumentCommand, } from "./commands/CreateDocumentCommand";
|
|
4
6
|
import { CreateKnowledgeBaseCommand, } from "./commands/CreateKnowledgeBaseCommand";
|
|
5
7
|
import { DeleteDataSourceCommand, } from "./commands/DeleteDataSourceCommand";
|
|
6
8
|
import { DeleteDocumentCommand, } from "./commands/DeleteDocumentCommand";
|
|
7
9
|
import { DeleteKnowledgeBaseCommand, } from "./commands/DeleteKnowledgeBaseCommand";
|
|
8
|
-
import { GetAuthorizationSessionForDataSourceCommand, } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
9
10
|
import { GetDataSourceCommand, } from "./commands/GetDataSourceCommand";
|
|
10
11
|
import { GetDocumentCommand, } from "./commands/GetDocumentCommand";
|
|
11
12
|
import { GetDocumentPresignedDownloadUrlCommand, } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
12
13
|
import { GetDocumentPresignedUploadUrlCommand, } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
14
|
+
import { GetExtraInfoForDataSourceCommand, } from "./commands/GetExtraInfoForDataSourceCommand";
|
|
13
15
|
import { GetKnowledgeBaseCommand, } from "./commands/GetKnowledgeBaseCommand";
|
|
14
16
|
import { GetSyncLogsCommand, } from "./commands/GetSyncLogsCommand";
|
|
15
17
|
import { GetSyncStatusCommand, } from "./commands/GetSyncStatusCommand";
|
|
@@ -25,17 +27,19 @@ import { UpdateDocumentCommand, } from "./commands/UpdateDocumentCommand";
|
|
|
25
27
|
import { UpdateKnowledgeBaseCommand, } from "./commands/UpdateKnowledgeBaseCommand";
|
|
26
28
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
27
29
|
const commands = {
|
|
30
|
+
ClearDataSourceCommand,
|
|
31
|
+
CloneDataSourceCommand,
|
|
28
32
|
CreateDataSourceCommand,
|
|
29
33
|
CreateDocumentCommand,
|
|
30
34
|
CreateKnowledgeBaseCommand,
|
|
31
35
|
DeleteDataSourceCommand,
|
|
32
36
|
DeleteDocumentCommand,
|
|
33
37
|
DeleteKnowledgeBaseCommand,
|
|
34
|
-
GetAuthorizationSessionForDataSourceCommand,
|
|
35
38
|
GetDataSourceCommand,
|
|
36
39
|
GetDocumentCommand,
|
|
37
40
|
GetDocumentPresignedDownloadUrlCommand,
|
|
38
41
|
GetDocumentPresignedUploadUrlCommand,
|
|
42
|
+
GetExtraInfoForDataSourceCommand,
|
|
39
43
|
GetKnowledgeBaseCommand,
|
|
40
44
|
GetSyncLogsCommand,
|
|
41
45
|
GetSyncStatusCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ClearDataSourceCommand, se_ClearDataSourceCommand, } 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 ClearDataSourceCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("KnowledgeBase", "ClearDataSource", {})
|
|
12
|
+
.n("KnowledgeBaseClient", "ClearDataSourceCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ClearDataSourceCommand)
|
|
15
|
+
.de(de_ClearDataSourceCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_CloneDataSourceCommand, se_CloneDataSourceCommand, } 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 CloneDataSourceCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("KnowledgeBase", "CloneDataSource", {})
|
|
12
|
+
.n("KnowledgeBaseClient", "CloneDataSourceCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_CloneDataSourceCommand)
|
|
15
|
+
.de(de_CloneDataSourceCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
export * from "./ClearDataSourceCommand";
|
|
2
|
+
export * from "./CloneDataSourceCommand";
|
|
1
3
|
export * from "./CreateDataSourceCommand";
|
|
2
4
|
export * from "./CreateDocumentCommand";
|
|
3
5
|
export * from "./CreateKnowledgeBaseCommand";
|
|
4
6
|
export * from "./DeleteDataSourceCommand";
|
|
5
7
|
export * from "./DeleteDocumentCommand";
|
|
6
8
|
export * from "./DeleteKnowledgeBaseCommand";
|
|
7
|
-
export * from "./GetAuthorizationSessionForDataSourceCommand";
|
|
8
9
|
export * from "./GetDataSourceCommand";
|
|
9
10
|
export * from "./GetDocumentCommand";
|
|
10
11
|
export * from "./GetDocumentPresignedDownloadUrlCommand";
|
|
11
12
|
export * from "./GetDocumentPresignedUploadUrlCommand";
|
|
13
|
+
export * from "./GetExtraInfoForDataSourceCommand";
|
|
12
14
|
export * from "./GetKnowledgeBaseCommand";
|
|
13
15
|
export * from "./GetSyncLogsCommand";
|
|
14
16
|
export * from "./GetSyncStatusCommand";
|
|
@@ -35,41 +35,6 @@ export class UnauthorizedException extends __BaseException {
|
|
|
35
35
|
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
export const ProxyMethod = {
|
|
39
|
-
GET: "GET",
|
|
40
|
-
POST: "POST",
|
|
41
|
-
};
|
|
42
|
-
export var DataSourceConfig;
|
|
43
|
-
(function (DataSourceConfig) {
|
|
44
|
-
DataSourceConfig.visit = (value, visitor) => {
|
|
45
|
-
if (value.confluence !== undefined)
|
|
46
|
-
return visitor.confluence(value.confluence);
|
|
47
|
-
if (value.gdrive !== undefined)
|
|
48
|
-
return visitor.gdrive(value.gdrive);
|
|
49
|
-
if (value.files !== undefined)
|
|
50
|
-
return visitor.files(value.files);
|
|
51
|
-
if (value.proxy !== undefined)
|
|
52
|
-
return visitor.proxy(value.proxy);
|
|
53
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
54
|
-
};
|
|
55
|
-
})(DataSourceConfig || (DataSourceConfig = {}));
|
|
56
|
-
export const DataSourceType = {
|
|
57
|
-
CONFLUENCE: "confluence",
|
|
58
|
-
FILES: "files",
|
|
59
|
-
GDRIVE: "gdrive",
|
|
60
|
-
PROXY: "proxy",
|
|
61
|
-
};
|
|
62
|
-
export const SyncDataSourceMode = {
|
|
63
|
-
FULL: "full",
|
|
64
|
-
INCREMENTAL: "incremental",
|
|
65
|
-
UNKNOWN: "unknown",
|
|
66
|
-
};
|
|
67
|
-
export const SyncDataSourceStatus = {
|
|
68
|
-
FAILED: "failed",
|
|
69
|
-
IDLE: "idle",
|
|
70
|
-
RUNNING: "running",
|
|
71
|
-
SUCCESS: "success",
|
|
72
|
-
};
|
|
73
38
|
export class DataSourceNotFoundException extends __BaseException {
|
|
74
39
|
name = "DataSourceNotFoundException";
|
|
75
40
|
$fault = "client";
|
|
@@ -106,8 +71,44 @@ export class KnowledgeBaseNotFoundException extends __BaseException {
|
|
|
106
71
|
Object.setPrototypeOf(this, KnowledgeBaseNotFoundException.prototype);
|
|
107
72
|
}
|
|
108
73
|
}
|
|
74
|
+
export const ProxyMethod = {
|
|
75
|
+
GET: "GET",
|
|
76
|
+
POST: "POST",
|
|
77
|
+
};
|
|
78
|
+
export var DataSourceConfig;
|
|
79
|
+
(function (DataSourceConfig) {
|
|
80
|
+
DataSourceConfig.visit = (value, visitor) => {
|
|
81
|
+
if (value.confluence !== undefined)
|
|
82
|
+
return visitor.confluence(value.confluence);
|
|
83
|
+
if (value.gdrive !== undefined)
|
|
84
|
+
return visitor.gdrive(value.gdrive);
|
|
85
|
+
if (value.files !== undefined)
|
|
86
|
+
return visitor.files(value.files);
|
|
87
|
+
if (value.proxy !== undefined)
|
|
88
|
+
return visitor.proxy(value.proxy);
|
|
89
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
90
|
+
};
|
|
91
|
+
})(DataSourceConfig || (DataSourceConfig = {}));
|
|
92
|
+
export const DataSourceType = {
|
|
93
|
+
CONFLUENCE: "confluence",
|
|
94
|
+
FILES: "files",
|
|
95
|
+
GDRIVE: "gdrive",
|
|
96
|
+
PROXY: "proxy",
|
|
97
|
+
};
|
|
98
|
+
export const SyncDataSourceMode = {
|
|
99
|
+
FULL: "full",
|
|
100
|
+
INCREMENTAL: "incremental",
|
|
101
|
+
UNKNOWN: "unknown",
|
|
102
|
+
};
|
|
103
|
+
export const SyncDataSourceStatus = {
|
|
104
|
+
FAILED: "failed",
|
|
105
|
+
IDLE: "idle",
|
|
106
|
+
RUNNING: "running",
|
|
107
|
+
SUCCESS: "success",
|
|
108
|
+
};
|
|
109
109
|
export const DocumentStatus = {
|
|
110
110
|
COMPLETED: "completed",
|
|
111
|
+
DRAFT: "draft",
|
|
111
112
|
FAILED: "failed",
|
|
112
113
|
PENDING: "pending",
|
|
113
114
|
PROCESSING: "processing",
|