@wildix/wim-knowledge-base-client 0.0.7
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 +57 -0
- package/dist-cjs/KnowledgeBaseClient.js +41 -0
- package/dist-cjs/commands/CreateDataSourceCommand.js +21 -0
- package/dist-cjs/commands/CreateDocumentCommand.js +21 -0
- package/dist-cjs/commands/CreateKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/DeleteDataSourceCommand.js +21 -0
- package/dist-cjs/commands/DeleteDocumentCommand.js +21 -0
- package/dist-cjs/commands/DeleteKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/GetAuthorizationSessionForDataSourceCommand.js +21 -0
- package/dist-cjs/commands/GetDataSourceCommand.js +21 -0
- package/dist-cjs/commands/GetDocumentCommand.js +21 -0
- package/dist-cjs/commands/GetDocumentPresignedDownloadUrlCommand.js +21 -0
- package/dist-cjs/commands/GetDocumentPresignedUploadUrlCommand.js +21 -0
- package/dist-cjs/commands/GetKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/GetSyncLogsCommand.js +21 -0
- package/dist-cjs/commands/GetSyncStatusCommand.js +21 -0
- package/dist-cjs/commands/ListDataSourcesCommand.js +21 -0
- package/dist-cjs/commands/ListDocumentsCommand.js +21 -0
- package/dist-cjs/commands/ListKnowledgeBasesCommand.js +21 -0
- package/dist-cjs/commands/QueryKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/SearchKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/SyncDataSourceCommand.js +21 -0
- package/dist-cjs/commands/UpdateDataSourceCommand.js +21 -0
- package/dist-cjs/commands/UpdateDocumentCommand.js +21 -0
- package/dist-cjs/commands/UpdateKnowledgeBaseCommand.js +21 -0
- package/dist-cjs/commands/index.js +26 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/KnowledgeBaseServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +132 -0
- package/dist-cjs/protocols/Aws_restJson1.js +936 -0
- package/dist-cjs/runtimeConfig.browser.js +32 -0
- package/dist-cjs/runtimeConfig.js +37 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +21 -0
- package/dist-cjs/runtimeExtensions.js +11 -0
- package/dist-es/KnowledgeBase.js +53 -0
- package/dist-es/KnowledgeBaseClient.js +37 -0
- package/dist-es/commands/CreateDataSourceCommand.js +17 -0
- package/dist-es/commands/CreateDocumentCommand.js +17 -0
- package/dist-es/commands/CreateKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/DeleteDataSourceCommand.js +17 -0
- package/dist-es/commands/DeleteDocumentCommand.js +17 -0
- package/dist-es/commands/DeleteKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/GetAuthorizationSessionForDataSourceCommand.js +17 -0
- package/dist-es/commands/GetDataSourceCommand.js +17 -0
- package/dist-es/commands/GetDocumentCommand.js +17 -0
- package/dist-es/commands/GetDocumentPresignedDownloadUrlCommand.js +17 -0
- package/dist-es/commands/GetDocumentPresignedUploadUrlCommand.js +17 -0
- package/dist-es/commands/GetKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/GetSyncLogsCommand.js +17 -0
- package/dist-es/commands/GetSyncStatusCommand.js +17 -0
- package/dist-es/commands/ListDataSourcesCommand.js +17 -0
- package/dist-es/commands/ListDocumentsCommand.js +17 -0
- package/dist-es/commands/ListKnowledgeBasesCommand.js +17 -0
- package/dist-es/commands/QueryKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/SearchKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/SyncDataSourceCommand.js +17 -0
- package/dist-es/commands/UpdateDataSourceCommand.js +17 -0
- package/dist-es/commands/UpdateDocumentCommand.js +17 -0
- package/dist-es/commands/UpdateKnowledgeBaseCommand.js +17 -0
- package/dist-es/commands/index.js +23 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/KnowledgeBaseServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +123 -0
- package/dist-es/protocols/Aws_restJson1.js +887 -0
- package/dist-es/runtimeConfig.browser.js +27 -0
- package/dist-es/runtimeConfig.js +32 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +17 -0
- package/dist-es/runtimeExtensions.js +7 -0
- package/dist-types/KnowledgeBase.d.ts +172 -0
- package/dist-types/KnowledgeBaseClient.d.ts +166 -0
- package/dist-types/commands/CreateDataSourceCommand.d.ts +167 -0
- package/dist-types/commands/CreateDocumentCommand.d.ts +107 -0
- package/dist-types/commands/CreateKnowledgeBaseCommand.d.ts +99 -0
- package/dist-types/commands/DeleteDataSourceCommand.d.ts +83 -0
- package/dist-types/commands/DeleteDocumentCommand.d.ts +84 -0
- package/dist-types/commands/DeleteKnowledgeBaseCommand.d.ts +83 -0
- package/dist-types/commands/GetAuthorizationSessionForDataSourceCommand.d.ts +85 -0
- package/dist-types/commands/GetDataSourceCommand.d.ts +131 -0
- package/dist-types/commands/GetDocumentCommand.d.ts +102 -0
- package/dist-types/commands/GetDocumentPresignedDownloadUrlCommand.d.ts +87 -0
- package/dist-types/commands/GetDocumentPresignedUploadUrlCommand.d.ts +86 -0
- package/dist-types/commands/GetKnowledgeBaseCommand.d.ts +95 -0
- package/dist-types/commands/GetSyncLogsCommand.d.ts +91 -0
- package/dist-types/commands/GetSyncStatusCommand.d.ts +87 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +132 -0
- package/dist-types/commands/ListDocumentsCommand.d.ts +103 -0
- package/dist-types/commands/ListKnowledgeBasesCommand.d.ts +96 -0
- package/dist-types/commands/QueryKnowledgeBaseCommand.d.ts +98 -0
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +99 -0
- package/dist-types/commands/SyncDataSourceCommand.d.ts +84 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +168 -0
- package/dist-types/commands/UpdateDocumentCommand.d.ts +108 -0
- package/dist-types/commands/UpdateKnowledgeBaseCommand.d.ts +100 -0
- package/dist-types/commands/index.d.ts +23 -0
- package/dist-types/extensionConfiguration.d.ts +7 -0
- package/dist-types/index.d.ts +7 -0
- package/dist-types/models/KnowledgeBaseServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +981 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +209 -0
- package/dist-types/runtimeConfig.browser.d.ts +31 -0
- package/dist-types/runtimeConfig.d.ts +31 -0
- package/dist-types/runtimeConfig.native.d.ts +30 -0
- package/dist-types/runtimeConfig.shared.d.ts +15 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/package.json +83 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
|
|
5
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
6
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
|
|
7
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
8
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
9
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
return {
|
|
15
|
+
...clientSharedValues,
|
|
16
|
+
...config,
|
|
17
|
+
runtime: "browser",
|
|
18
|
+
defaultsMode,
|
|
19
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
24
|
+
sha256: config?.sha256 ?? Sha256,
|
|
25
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
|
|
3
|
+
import { Hash } from "@smithy/hash-node";
|
|
4
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
|
|
5
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
6
|
+
import { NodeHttpHandler as RequestHandler, streamCollector, } from "@smithy/node-http-handler";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
8
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
12
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
13
|
+
export const getRuntimeConfig = (config) => {
|
|
14
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "node",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
|
|
28
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
29
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
3
|
+
import { fromBase64, toBase64, } from "@smithy/util-base64";
|
|
4
|
+
import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
|
|
5
|
+
export const getRuntimeConfig = (config) => {
|
|
6
|
+
return {
|
|
7
|
+
apiVersion: "v1",
|
|
8
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
9
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
|
+
extensions: config?.extensions ?? [],
|
|
12
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
13
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
14
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
15
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
|
|
2
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
|
|
3
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
4
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
|
|
5
|
+
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
6
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
|
|
7
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { KnowledgeBaseClient } from "./KnowledgeBaseClient";
|
|
2
|
+
import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
|
|
3
|
+
import { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
|
|
4
|
+
import { CreateKnowledgeBaseCommandInput, CreateKnowledgeBaseCommandOutput } from "./commands/CreateKnowledgeBaseCommand";
|
|
5
|
+
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand";
|
|
6
|
+
import { DeleteDocumentCommandInput, DeleteDocumentCommandOutput } from "./commands/DeleteDocumentCommand";
|
|
7
|
+
import { DeleteKnowledgeBaseCommandInput, DeleteKnowledgeBaseCommandOutput } from "./commands/DeleteKnowledgeBaseCommand";
|
|
8
|
+
import { GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
9
|
+
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand";
|
|
10
|
+
import { GetDocumentCommandInput, GetDocumentCommandOutput } from "./commands/GetDocumentCommand";
|
|
11
|
+
import { GetDocumentPresignedDownloadUrlCommandInput, GetDocumentPresignedDownloadUrlCommandOutput } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
12
|
+
import { GetDocumentPresignedUploadUrlCommandInput, GetDocumentPresignedUploadUrlCommandOutput } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
13
|
+
import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand";
|
|
14
|
+
import { GetSyncLogsCommandInput, GetSyncLogsCommandOutput } from "./commands/GetSyncLogsCommand";
|
|
15
|
+
import { GetSyncStatusCommandInput, GetSyncStatusCommandOutput } from "./commands/GetSyncStatusCommand";
|
|
16
|
+
import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand";
|
|
17
|
+
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
18
|
+
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
19
|
+
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
20
|
+
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
21
|
+
import { SyncDataSourceCommandInput, SyncDataSourceCommandOutput } from "./commands/SyncDataSourceCommand";
|
|
22
|
+
import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand";
|
|
23
|
+
import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
|
|
24
|
+
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
25
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
26
|
+
export interface KnowledgeBase {
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link CreateDataSourceCommand}
|
|
29
|
+
*/
|
|
30
|
+
createDataSource(args: CreateDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<CreateDataSourceCommandOutput>;
|
|
31
|
+
createDataSource(args: CreateDataSourceCommandInput, cb: (err: any, data?: CreateDataSourceCommandOutput) => void): void;
|
|
32
|
+
createDataSource(args: CreateDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateDataSourceCommandOutput) => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* @see {@link CreateDocumentCommand}
|
|
35
|
+
*/
|
|
36
|
+
createDocument(args: CreateDocumentCommandInput, options?: __HttpHandlerOptions): Promise<CreateDocumentCommandOutput>;
|
|
37
|
+
createDocument(args: CreateDocumentCommandInput, cb: (err: any, data?: CreateDocumentCommandOutput) => void): void;
|
|
38
|
+
createDocument(args: CreateDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateDocumentCommandOutput) => void): void;
|
|
39
|
+
/**
|
|
40
|
+
* @see {@link CreateKnowledgeBaseCommand}
|
|
41
|
+
*/
|
|
42
|
+
createKnowledgeBase(args: CreateKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<CreateKnowledgeBaseCommandOutput>;
|
|
43
|
+
createKnowledgeBase(args: CreateKnowledgeBaseCommandInput, cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void): void;
|
|
44
|
+
createKnowledgeBase(args: CreateKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateKnowledgeBaseCommandOutput) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* @see {@link DeleteDataSourceCommand}
|
|
47
|
+
*/
|
|
48
|
+
deleteDataSource(args: DeleteDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<DeleteDataSourceCommandOutput>;
|
|
49
|
+
deleteDataSource(args: DeleteDataSourceCommandInput, cb: (err: any, data?: DeleteDataSourceCommandOutput) => void): void;
|
|
50
|
+
deleteDataSource(args: DeleteDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteDataSourceCommandOutput) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* @see {@link DeleteDocumentCommand}
|
|
53
|
+
*/
|
|
54
|
+
deleteDocument(args: DeleteDocumentCommandInput, options?: __HttpHandlerOptions): Promise<DeleteDocumentCommandOutput>;
|
|
55
|
+
deleteDocument(args: DeleteDocumentCommandInput, cb: (err: any, data?: DeleteDocumentCommandOutput) => void): void;
|
|
56
|
+
deleteDocument(args: DeleteDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteDocumentCommandOutput) => void): void;
|
|
57
|
+
/**
|
|
58
|
+
* @see {@link DeleteKnowledgeBaseCommand}
|
|
59
|
+
*/
|
|
60
|
+
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<DeleteKnowledgeBaseCommandOutput>;
|
|
61
|
+
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void): void;
|
|
62
|
+
deleteKnowledgeBase(args: DeleteKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteKnowledgeBaseCommandOutput) => void): void;
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link GetAuthorizationSessionForDataSourceCommand}
|
|
65
|
+
*/
|
|
66
|
+
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<GetAuthorizationSessionForDataSourceCommandOutput>;
|
|
67
|
+
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, cb: (err: any, data?: GetAuthorizationSessionForDataSourceCommandOutput) => void): void;
|
|
68
|
+
getAuthorizationSessionForDataSource(args: GetAuthorizationSessionForDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAuthorizationSessionForDataSourceCommandOutput) => void): void;
|
|
69
|
+
/**
|
|
70
|
+
* @see {@link GetDataSourceCommand}
|
|
71
|
+
*/
|
|
72
|
+
getDataSource(args: GetDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<GetDataSourceCommandOutput>;
|
|
73
|
+
getDataSource(args: GetDataSourceCommandInput, cb: (err: any, data?: GetDataSourceCommandOutput) => void): void;
|
|
74
|
+
getDataSource(args: GetDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDataSourceCommandOutput) => void): void;
|
|
75
|
+
/**
|
|
76
|
+
* @see {@link GetDocumentCommand}
|
|
77
|
+
*/
|
|
78
|
+
getDocument(args: GetDocumentCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentCommandOutput>;
|
|
79
|
+
getDocument(args: GetDocumentCommandInput, cb: (err: any, data?: GetDocumentCommandOutput) => void): void;
|
|
80
|
+
getDocument(args: GetDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentCommandOutput) => void): void;
|
|
81
|
+
/**
|
|
82
|
+
* @see {@link GetDocumentPresignedDownloadUrlCommand}
|
|
83
|
+
*/
|
|
84
|
+
getDocumentPresignedDownloadUrl(args: GetDocumentPresignedDownloadUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentPresignedDownloadUrlCommandOutput>;
|
|
85
|
+
getDocumentPresignedDownloadUrl(args: GetDocumentPresignedDownloadUrlCommandInput, cb: (err: any, data?: GetDocumentPresignedDownloadUrlCommandOutput) => void): void;
|
|
86
|
+
getDocumentPresignedDownloadUrl(args: GetDocumentPresignedDownloadUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentPresignedDownloadUrlCommandOutput) => void): void;
|
|
87
|
+
/**
|
|
88
|
+
* @see {@link GetDocumentPresignedUploadUrlCommand}
|
|
89
|
+
*/
|
|
90
|
+
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, options?: __HttpHandlerOptions): Promise<GetDocumentPresignedUploadUrlCommandOutput>;
|
|
91
|
+
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, cb: (err: any, data?: GetDocumentPresignedUploadUrlCommandOutput) => void): void;
|
|
92
|
+
getDocumentPresignedUploadUrl(args: GetDocumentPresignedUploadUrlCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDocumentPresignedUploadUrlCommandOutput) => void): void;
|
|
93
|
+
/**
|
|
94
|
+
* @see {@link GetKnowledgeBaseCommand}
|
|
95
|
+
*/
|
|
96
|
+
getKnowledgeBase(args: GetKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<GetKnowledgeBaseCommandOutput>;
|
|
97
|
+
getKnowledgeBase(args: GetKnowledgeBaseCommandInput, cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void): void;
|
|
98
|
+
getKnowledgeBase(args: GetKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetKnowledgeBaseCommandOutput) => void): void;
|
|
99
|
+
/**
|
|
100
|
+
* @see {@link GetSyncLogsCommand}
|
|
101
|
+
*/
|
|
102
|
+
getSyncLogs(args: GetSyncLogsCommandInput, options?: __HttpHandlerOptions): Promise<GetSyncLogsCommandOutput>;
|
|
103
|
+
getSyncLogs(args: GetSyncLogsCommandInput, cb: (err: any, data?: GetSyncLogsCommandOutput) => void): void;
|
|
104
|
+
getSyncLogs(args: GetSyncLogsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSyncLogsCommandOutput) => void): void;
|
|
105
|
+
/**
|
|
106
|
+
* @see {@link GetSyncStatusCommand}
|
|
107
|
+
*/
|
|
108
|
+
getSyncStatus(args: GetSyncStatusCommandInput, options?: __HttpHandlerOptions): Promise<GetSyncStatusCommandOutput>;
|
|
109
|
+
getSyncStatus(args: GetSyncStatusCommandInput, cb: (err: any, data?: GetSyncStatusCommandOutput) => void): void;
|
|
110
|
+
getSyncStatus(args: GetSyncStatusCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSyncStatusCommandOutput) => void): void;
|
|
111
|
+
/**
|
|
112
|
+
* @see {@link ListDataSourcesCommand}
|
|
113
|
+
*/
|
|
114
|
+
listDataSources(): Promise<ListDataSourcesCommandOutput>;
|
|
115
|
+
listDataSources(args: ListDataSourcesCommandInput, options?: __HttpHandlerOptions): Promise<ListDataSourcesCommandOutput>;
|
|
116
|
+
listDataSources(args: ListDataSourcesCommandInput, cb: (err: any, data?: ListDataSourcesCommandOutput) => void): void;
|
|
117
|
+
listDataSources(args: ListDataSourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDataSourcesCommandOutput) => void): void;
|
|
118
|
+
/**
|
|
119
|
+
* @see {@link ListDocumentsCommand}
|
|
120
|
+
*/
|
|
121
|
+
listDocuments(args: ListDocumentsCommandInput, options?: __HttpHandlerOptions): Promise<ListDocumentsCommandOutput>;
|
|
122
|
+
listDocuments(args: ListDocumentsCommandInput, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
|
|
123
|
+
listDocuments(args: ListDocumentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
|
|
124
|
+
/**
|
|
125
|
+
* @see {@link ListKnowledgeBasesCommand}
|
|
126
|
+
*/
|
|
127
|
+
listKnowledgeBases(): Promise<ListKnowledgeBasesCommandOutput>;
|
|
128
|
+
listKnowledgeBases(args: ListKnowledgeBasesCommandInput, options?: __HttpHandlerOptions): Promise<ListKnowledgeBasesCommandOutput>;
|
|
129
|
+
listKnowledgeBases(args: ListKnowledgeBasesCommandInput, cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void): void;
|
|
130
|
+
listKnowledgeBases(args: ListKnowledgeBasesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListKnowledgeBasesCommandOutput) => void): void;
|
|
131
|
+
/**
|
|
132
|
+
* @see {@link QueryKnowledgeBaseCommand}
|
|
133
|
+
*/
|
|
134
|
+
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<QueryKnowledgeBaseCommandOutput>;
|
|
135
|
+
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, cb: (err: any, data?: QueryKnowledgeBaseCommandOutput) => void): void;
|
|
136
|
+
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryKnowledgeBaseCommandOutput) => void): void;
|
|
137
|
+
/**
|
|
138
|
+
* @see {@link SearchKnowledgeBaseCommand}
|
|
139
|
+
*/
|
|
140
|
+
searchKnowledgeBase(args: SearchKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<SearchKnowledgeBaseCommandOutput>;
|
|
141
|
+
searchKnowledgeBase(args: SearchKnowledgeBaseCommandInput, cb: (err: any, data?: SearchKnowledgeBaseCommandOutput) => void): void;
|
|
142
|
+
searchKnowledgeBase(args: SearchKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchKnowledgeBaseCommandOutput) => void): void;
|
|
143
|
+
/**
|
|
144
|
+
* @see {@link SyncDataSourceCommand}
|
|
145
|
+
*/
|
|
146
|
+
syncDataSource(args: SyncDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<SyncDataSourceCommandOutput>;
|
|
147
|
+
syncDataSource(args: SyncDataSourceCommandInput, cb: (err: any, data?: SyncDataSourceCommandOutput) => void): void;
|
|
148
|
+
syncDataSource(args: SyncDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SyncDataSourceCommandOutput) => void): void;
|
|
149
|
+
/**
|
|
150
|
+
* @see {@link UpdateDataSourceCommand}
|
|
151
|
+
*/
|
|
152
|
+
updateDataSource(args: UpdateDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<UpdateDataSourceCommandOutput>;
|
|
153
|
+
updateDataSource(args: UpdateDataSourceCommandInput, cb: (err: any, data?: UpdateDataSourceCommandOutput) => void): void;
|
|
154
|
+
updateDataSource(args: UpdateDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateDataSourceCommandOutput) => void): void;
|
|
155
|
+
/**
|
|
156
|
+
* @see {@link UpdateDocumentCommand}
|
|
157
|
+
*/
|
|
158
|
+
updateDocument(args: UpdateDocumentCommandInput, options?: __HttpHandlerOptions): Promise<UpdateDocumentCommandOutput>;
|
|
159
|
+
updateDocument(args: UpdateDocumentCommandInput, cb: (err: any, data?: UpdateDocumentCommandOutput) => void): void;
|
|
160
|
+
updateDocument(args: UpdateDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateDocumentCommandOutput) => void): void;
|
|
161
|
+
/**
|
|
162
|
+
* @see {@link UpdateKnowledgeBaseCommand}
|
|
163
|
+
*/
|
|
164
|
+
updateKnowledgeBase(args: UpdateKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<UpdateKnowledgeBaseCommandOutput>;
|
|
165
|
+
updateKnowledgeBase(args: UpdateKnowledgeBaseCommandInput, cb: (err: any, data?: UpdateKnowledgeBaseCommandOutput) => void): void;
|
|
166
|
+
updateKnowledgeBase(args: UpdateKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateKnowledgeBaseCommandOutput) => void): void;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @public
|
|
170
|
+
*/
|
|
171
|
+
export declare class KnowledgeBase extends KnowledgeBaseClient implements KnowledgeBase {
|
|
172
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
|
|
2
|
+
import { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
|
|
3
|
+
import { CreateKnowledgeBaseCommandInput, CreateKnowledgeBaseCommandOutput } from "./commands/CreateKnowledgeBaseCommand";
|
|
4
|
+
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand";
|
|
5
|
+
import { DeleteDocumentCommandInput, DeleteDocumentCommandOutput } from "./commands/DeleteDocumentCommand";
|
|
6
|
+
import { DeleteKnowledgeBaseCommandInput, DeleteKnowledgeBaseCommandOutput } from "./commands/DeleteKnowledgeBaseCommand";
|
|
7
|
+
import { GetAuthorizationSessionForDataSourceCommandInput, GetAuthorizationSessionForDataSourceCommandOutput } from "./commands/GetAuthorizationSessionForDataSourceCommand";
|
|
8
|
+
import { GetDataSourceCommandInput, GetDataSourceCommandOutput } from "./commands/GetDataSourceCommand";
|
|
9
|
+
import { GetDocumentCommandInput, GetDocumentCommandOutput } from "./commands/GetDocumentCommand";
|
|
10
|
+
import { GetDocumentPresignedDownloadUrlCommandInput, GetDocumentPresignedDownloadUrlCommandOutput } from "./commands/GetDocumentPresignedDownloadUrlCommand";
|
|
11
|
+
import { GetDocumentPresignedUploadUrlCommandInput, GetDocumentPresignedUploadUrlCommandOutput } from "./commands/GetDocumentPresignedUploadUrlCommand";
|
|
12
|
+
import { GetKnowledgeBaseCommandInput, GetKnowledgeBaseCommandOutput } from "./commands/GetKnowledgeBaseCommand";
|
|
13
|
+
import { GetSyncLogsCommandInput, GetSyncLogsCommandOutput } from "./commands/GetSyncLogsCommand";
|
|
14
|
+
import { GetSyncStatusCommandInput, GetSyncStatusCommandOutput } from "./commands/GetSyncStatusCommand";
|
|
15
|
+
import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand";
|
|
16
|
+
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
17
|
+
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
18
|
+
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
19
|
+
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
20
|
+
import { SyncDataSourceCommandInput, SyncDataSourceCommandOutput } from "./commands/SyncDataSourceCommand";
|
|
21
|
+
import { UpdateDataSourceCommandInput, UpdateDataSourceCommandOutput } from "./commands/UpdateDataSourceCommand";
|
|
22
|
+
import { UpdateDocumentCommandInput, UpdateDocumentCommandOutput } from "./commands/UpdateDocumentCommand";
|
|
23
|
+
import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } from "./commands/UpdateKnowledgeBaseCommand";
|
|
24
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
25
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
26
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
27
|
+
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
28
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
29
|
+
import { Provider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
30
|
+
import { TokenProvider } from '@wildix/smithy-utils';
|
|
31
|
+
export { __Client };
|
|
32
|
+
/**
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export type ServiceInputTypes = CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetAuthorizationSessionForDataSourceCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | SyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export type ServiceOutputTypes = CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAuthorizationSessionForDataSourceCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | SyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
|
|
40
|
+
/**
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
44
|
+
/**
|
|
45
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
46
|
+
*/
|
|
47
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
48
|
+
/**
|
|
49
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
50
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
54
|
+
/**
|
|
55
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
urlParser?: __UrlParser;
|
|
59
|
+
/**
|
|
60
|
+
* A function that can calculate the length of a request body.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
64
|
+
/**
|
|
65
|
+
* A function that converts a stream into an array of bytes.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
streamCollector?: __StreamCollector;
|
|
69
|
+
/**
|
|
70
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
base64Decoder?: __Decoder;
|
|
74
|
+
/**
|
|
75
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
base64Encoder?: __Encoder;
|
|
79
|
+
/**
|
|
80
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
utf8Decoder?: __Decoder;
|
|
84
|
+
/**
|
|
85
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
utf8Encoder?: __Encoder;
|
|
89
|
+
/**
|
|
90
|
+
* The runtime environment.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
runtime?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
96
|
+
* trait of an operation.
|
|
97
|
+
*/
|
|
98
|
+
disableHostPrefix?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
104
|
+
/**
|
|
105
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
106
|
+
*/
|
|
107
|
+
maxAttempts?: number | __Provider<number>;
|
|
108
|
+
/**
|
|
109
|
+
* Specifies which retry algorithm to use.
|
|
110
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
retryMode?: string | __Provider<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Optional logger for logging debug/info/warn/error.
|
|
116
|
+
*/
|
|
117
|
+
logger?: __Logger;
|
|
118
|
+
/**
|
|
119
|
+
* Optional extensions
|
|
120
|
+
*/
|
|
121
|
+
extensions?: RuntimeExtension[];
|
|
122
|
+
/**
|
|
123
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
124
|
+
*/
|
|
125
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
export type KnowledgeBaseClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig;
|
|
131
|
+
/**
|
|
132
|
+
* @public
|
|
133
|
+
*
|
|
134
|
+
* The configuration interface of KnowledgeBaseClient class constructor that set the region, credentials and other options.
|
|
135
|
+
*/
|
|
136
|
+
export interface KnowledgeBaseClientConfig extends KnowledgeBaseClientConfigType {
|
|
137
|
+
env?: 'stage' | 'stable' | 'prod';
|
|
138
|
+
token: TokenProvider;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
export type KnowledgeBaseClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig;
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*
|
|
147
|
+
* The resolved configuration interface of KnowledgeBaseClient class. This is resolved and normalized from the {@link KnowledgeBaseClientConfig | constructor configuration interface}.
|
|
148
|
+
*/
|
|
149
|
+
export interface KnowledgeBaseClientResolvedConfig extends KnowledgeBaseClientResolvedConfigType {
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
export declare class KnowledgeBaseClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, KnowledgeBaseClientResolvedConfig> {
|
|
155
|
+
/**
|
|
156
|
+
* The resolved configuration of KnowledgeBaseClient class. This is resolved and normalized from the {@link KnowledgeBaseClientConfig | constructor configuration interface}.
|
|
157
|
+
*/
|
|
158
|
+
readonly config: KnowledgeBaseClientResolvedConfig;
|
|
159
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<KnowledgeBaseClientConfig>);
|
|
160
|
+
/**
|
|
161
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
162
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
163
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
164
|
+
*/
|
|
165
|
+
destroy(): void;
|
|
166
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
+
import { CreateDataSourceInput, CreateDataSourceOutput } 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 CreateDataSourceCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface CreateDataSourceCommandInput extends CreateDataSourceInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link CreateDataSourceCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateDataSourceCommandOutput extends CreateDataSourceOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const CreateDataSourceCommand_base: {
|
|
25
|
+
new (input: CreateDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<CreateDataSourceCommandInput, CreateDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: CreateDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<CreateDataSourceCommandInput, CreateDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Create a new 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, CreateDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
+
* // const { KnowledgeBaseClient, CreateDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
+
* const client = new KnowledgeBaseClient(config);
|
|
37
|
+
* const input = { // CreateDataSourceInput
|
|
38
|
+
* name: "STRING_VALUE", // required
|
|
39
|
+
* description: "STRING_VALUE",
|
|
40
|
+
* type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
41
|
+
* config: { // DataSourceConfig Union: only one key present
|
|
42
|
+
* confluence: { // ConfluenceConfig
|
|
43
|
+
* url: "STRING_VALUE", // required
|
|
44
|
+
* username: "STRING_VALUE", // required
|
|
45
|
+
* apiKey: "STRING_VALUE", // required
|
|
46
|
+
* spaceId: "STRING_VALUE", // required
|
|
47
|
+
* pages: { // ConfluencePagesConfig
|
|
48
|
+
* enabled: [ // ConfluencePageIdsList // required
|
|
49
|
+
* "STRING_VALUE",
|
|
50
|
+
* ],
|
|
51
|
+
* disabled: [ // required
|
|
52
|
+
* "STRING_VALUE",
|
|
53
|
+
* ],
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* gdrive: { // GDriveConfig
|
|
57
|
+
* nangoConnectionId: "STRING_VALUE", // required
|
|
58
|
+
* folders: { // GDriveFoldersConfig
|
|
59
|
+
* enabled: [ // GDriveFolderIds // required
|
|
60
|
+
* "STRING_VALUE",
|
|
61
|
+
* ],
|
|
62
|
+
* disabled: [ // required
|
|
63
|
+
* "STRING_VALUE",
|
|
64
|
+
* ],
|
|
65
|
+
* },
|
|
66
|
+
* },
|
|
67
|
+
* files: { // UserFilesConfig
|
|
68
|
+
* allowedExtensions: [ // StringList // required
|
|
69
|
+
* "STRING_VALUE",
|
|
70
|
+
* ],
|
|
71
|
+
* },
|
|
72
|
+
* },
|
|
73
|
+
* enabled: true || false, // required
|
|
74
|
+
* syncSchedule: "STRING_VALUE",
|
|
75
|
+
* companyId: "STRING_VALUE",
|
|
76
|
+
* };
|
|
77
|
+
* const command = new CreateDataSourceCommand(input);
|
|
78
|
+
* const response = await client.send(command);
|
|
79
|
+
* // { // CreateDataSourceOutput
|
|
80
|
+
* // dataSource: { // DataSourceItem
|
|
81
|
+
* // name: "STRING_VALUE", // required
|
|
82
|
+
* // description: "STRING_VALUE",
|
|
83
|
+
* // type: "files" || "confluence" || "gdrive" || "proxy", // required
|
|
84
|
+
* // config: { // DataSourceConfig Union: only one key present
|
|
85
|
+
* // confluence: { // ConfluenceConfig
|
|
86
|
+
* // url: "STRING_VALUE", // required
|
|
87
|
+
* // username: "STRING_VALUE", // required
|
|
88
|
+
* // apiKey: "STRING_VALUE", // required
|
|
89
|
+
* // spaceId: "STRING_VALUE", // required
|
|
90
|
+
* // pages: { // ConfluencePagesConfig
|
|
91
|
+
* // enabled: [ // ConfluencePageIdsList // required
|
|
92
|
+
* // "STRING_VALUE",
|
|
93
|
+
* // ],
|
|
94
|
+
* // disabled: [ // required
|
|
95
|
+
* // "STRING_VALUE",
|
|
96
|
+
* // ],
|
|
97
|
+
* // },
|
|
98
|
+
* // },
|
|
99
|
+
* // gdrive: { // GDriveConfig
|
|
100
|
+
* // nangoConnectionId: "STRING_VALUE", // required
|
|
101
|
+
* // folders: { // GDriveFoldersConfig
|
|
102
|
+
* // enabled: [ // GDriveFolderIds // required
|
|
103
|
+
* // "STRING_VALUE",
|
|
104
|
+
* // ],
|
|
105
|
+
* // disabled: [ // required
|
|
106
|
+
* // "STRING_VALUE",
|
|
107
|
+
* // ],
|
|
108
|
+
* // },
|
|
109
|
+
* // },
|
|
110
|
+
* // files: { // UserFilesConfig
|
|
111
|
+
* // allowedExtensions: [ // StringList // required
|
|
112
|
+
* // "STRING_VALUE",
|
|
113
|
+
* // ],
|
|
114
|
+
* // },
|
|
115
|
+
* // },
|
|
116
|
+
* // enabled: true || false, // required
|
|
117
|
+
* // syncSchedule: "STRING_VALUE",
|
|
118
|
+
* // id: "STRING_VALUE", // required
|
|
119
|
+
* // companyId: "STRING_VALUE", // required
|
|
120
|
+
* // createdAt: "STRING_VALUE", // required
|
|
121
|
+
* // updatedAt: "STRING_VALUE", // required
|
|
122
|
+
* // syncStatus: "idle" || "running" || "success" || "failed", // required
|
|
123
|
+
* // lastSyncedAt: "STRING_VALUE",
|
|
124
|
+
* // lastSyncMode: "full" || "incremental" || "unknown",
|
|
125
|
+
* // lastSyncErrorMessage: "STRING_VALUE",
|
|
126
|
+
* // },
|
|
127
|
+
* // };
|
|
128
|
+
*
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @param CreateDataSourceCommandInput - {@link CreateDataSourceCommandInput}
|
|
132
|
+
* @returns {@link CreateDataSourceCommandOutput}
|
|
133
|
+
* @see {@link CreateDataSourceCommandInput} for command's `input` shape.
|
|
134
|
+
* @see {@link CreateDataSourceCommandOutput} for command's `response` shape.
|
|
135
|
+
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link ValidationException} (client fault)
|
|
138
|
+
*
|
|
139
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link DocumentNotFoundException} (client fault)
|
|
148
|
+
*
|
|
149
|
+
* @throws {@link KnowledgeBaseServiceException}
|
|
150
|
+
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
151
|
+
*
|
|
152
|
+
*
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
export declare class CreateDataSourceCommand extends CreateDataSourceCommand_base {
|
|
156
|
+
/** @internal type navigation helper, not in runtime. */
|
|
157
|
+
protected static __types: {
|
|
158
|
+
api: {
|
|
159
|
+
input: CreateDataSourceInput;
|
|
160
|
+
output: CreateDataSourceOutput;
|
|
161
|
+
};
|
|
162
|
+
sdk: {
|
|
163
|
+
input: CreateDataSourceCommandInput;
|
|
164
|
+
output: CreateDataSourceCommandOutput;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
}
|