@wildix/wilma-copilot-client 1.0.2
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/WilmaCopilot.js +75 -0
- package/dist-cjs/WilmaCopilotClient.js +49 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +58 -0
- package/dist-cjs/commands/AttachProfileResourceCommand.js +20 -0
- package/dist-cjs/commands/CompareProfileVersionsCommand.js +20 -0
- package/dist-cjs/commands/CreateAssetCommand.js +20 -0
- package/dist-cjs/commands/CreateAutomationCommand.js +20 -0
- package/dist-cjs/commands/CreateEvaluationCommand.js +20 -0
- package/dist-cjs/commands/CreateIntentCommand.js +20 -0
- package/dist-cjs/commands/CreateProfileCommand.js +20 -0
- package/dist-cjs/commands/DeleteAssetCommand.js +20 -0
- package/dist-cjs/commands/DeleteAutomationCommand.js +20 -0
- package/dist-cjs/commands/DeleteEvaluationCommand.js +20 -0
- package/dist-cjs/commands/DeleteIntentCommand.js +20 -0
- package/dist-cjs/commands/DeleteProfileCommand.js +20 -0
- package/dist-cjs/commands/DeleteProfileResourceCommand.js +20 -0
- package/dist-cjs/commands/GetAssetCommand.js +20 -0
- package/dist-cjs/commands/GetAutomationCommand.js +20 -0
- package/dist-cjs/commands/GetEvaluationCommand.js +20 -0
- package/dist-cjs/commands/GetIntentCommand.js +20 -0
- package/dist-cjs/commands/GetProfileCommand.js +20 -0
- package/dist-cjs/commands/GetProfileVersionCommand.js +20 -0
- package/dist-cjs/commands/ListAssetsCommand.js +20 -0
- package/dist-cjs/commands/ListAutomationsCommand.js +20 -0
- package/dist-cjs/commands/ListEvaluationsCommand.js +20 -0
- package/dist-cjs/commands/ListIntentsCommand.js +20 -0
- package/dist-cjs/commands/ListProfileVersionsCommand.js +20 -0
- package/dist-cjs/commands/ListProfilesCommand.js +20 -0
- package/dist-cjs/commands/PublishProfileVersionCommand.js +20 -0
- package/dist-cjs/commands/RestoreProfileVersionToDraftCommand.js +20 -0
- package/dist-cjs/commands/UpdateAssetCommand.js +20 -0
- package/dist-cjs/commands/UpdateAutomationCommand.js +20 -0
- package/dist-cjs/commands/UpdateEvaluationCommand.js +20 -0
- package/dist-cjs/commands/UpdateIntentCommand.js +20 -0
- package/dist-cjs/commands/UpdateProfileCommand.js +20 -0
- package/dist-cjs/commands/index.js +35 -0
- package/dist-cjs/endpoint/EndpointParameters.js +16 -0
- package/dist-cjs/endpoint/bdd.js +28 -0
- package/dist-cjs/endpoint/endpointResolver.js +16 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +13 -0
- package/dist-cjs/models/WilmaCopilotServiceException.js +12 -0
- package/dist-cjs/models/enums.js +95 -0
- package/dist-cjs/models/errors.js +287 -0
- package/dist-cjs/models/models_0.js +2 -0
- package/dist-cjs/runtimeConfig.browser.js +32 -0
- package/dist-cjs/runtimeConfig.js +41 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +41 -0
- package/dist-cjs/runtimeExtensions.js +12 -0
- package/dist-cjs/schemas/schemas_0.js +1249 -0
- package/dist-es/WilmaCopilot.js +71 -0
- package/dist-es/WilmaCopilotClient.js +45 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +52 -0
- package/dist-es/commands/AttachProfileResourceCommand.js +16 -0
- package/dist-es/commands/CompareProfileVersionsCommand.js +16 -0
- package/dist-es/commands/CreateAssetCommand.js +16 -0
- package/dist-es/commands/CreateAutomationCommand.js +16 -0
- package/dist-es/commands/CreateEvaluationCommand.js +16 -0
- package/dist-es/commands/CreateIntentCommand.js +16 -0
- package/dist-es/commands/CreateProfileCommand.js +16 -0
- package/dist-es/commands/DeleteAssetCommand.js +16 -0
- package/dist-es/commands/DeleteAutomationCommand.js +16 -0
- package/dist-es/commands/DeleteEvaluationCommand.js +16 -0
- package/dist-es/commands/DeleteIntentCommand.js +16 -0
- package/dist-es/commands/DeleteProfileCommand.js +16 -0
- package/dist-es/commands/DeleteProfileResourceCommand.js +16 -0
- package/dist-es/commands/GetAssetCommand.js +16 -0
- package/dist-es/commands/GetAutomationCommand.js +16 -0
- package/dist-es/commands/GetEvaluationCommand.js +16 -0
- package/dist-es/commands/GetIntentCommand.js +16 -0
- package/dist-es/commands/GetProfileCommand.js +16 -0
- package/dist-es/commands/GetProfileVersionCommand.js +16 -0
- package/dist-es/commands/ListAssetsCommand.js +16 -0
- package/dist-es/commands/ListAutomationsCommand.js +16 -0
- package/dist-es/commands/ListEvaluationsCommand.js +16 -0
- package/dist-es/commands/ListIntentsCommand.js +16 -0
- package/dist-es/commands/ListProfileVersionsCommand.js +16 -0
- package/dist-es/commands/ListProfilesCommand.js +16 -0
- package/dist-es/commands/PublishProfileVersionCommand.js +16 -0
- package/dist-es/commands/RestoreProfileVersionToDraftCommand.js +16 -0
- package/dist-es/commands/UpdateAssetCommand.js +16 -0
- package/dist-es/commands/UpdateAutomationCommand.js +16 -0
- package/dist-es/commands/UpdateEvaluationCommand.js +16 -0
- package/dist-es/commands/UpdateIntentCommand.js +16 -0
- package/dist-es/commands/UpdateProfileCommand.js +16 -0
- package/dist-es/commands/index.js +32 -0
- package/dist-es/endpoint/EndpointParameters.js +12 -0
- package/dist-es/endpoint/bdd.js +25 -0
- package/dist-es/endpoint/endpointResolver.js +12 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +8 -0
- package/dist-es/models/WilmaCopilotServiceException.js +8 -0
- package/dist-es/models/enums.js +92 -0
- package/dist-es/models/errors.js +265 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/runtimeConfig.browser.js +27 -0
- package/dist-es/runtimeConfig.js +36 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +37 -0
- package/dist-es/runtimeExtensions.js +8 -0
- package/dist-es/schemas/schemas_0.js +1243 -0
- package/dist-types/WilmaCopilot.d.ts +254 -0
- package/dist-types/WilmaCopilotClient.d.ts +209 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/AttachProfileResourceCommand.d.ts +165 -0
- package/dist-types/commands/CompareProfileVersionsCommand.d.ts +91 -0
- package/dist-types/commands/CreateAssetCommand.d.ts +328 -0
- package/dist-types/commands/CreateAutomationCommand.d.ts +176 -0
- package/dist-types/commands/CreateEvaluationCommand.d.ts +196 -0
- package/dist-types/commands/CreateIntentCommand.d.ts +202 -0
- package/dist-types/commands/CreateProfileCommand.d.ts +181 -0
- package/dist-types/commands/DeleteAssetCommand.d.ts +83 -0
- package/dist-types/commands/DeleteAutomationCommand.d.ts +83 -0
- package/dist-types/commands/DeleteEvaluationCommand.d.ts +83 -0
- package/dist-types/commands/DeleteIntentCommand.d.ts +83 -0
- package/dist-types/commands/DeleteProfileCommand.d.ts +79 -0
- package/dist-types/commands/DeleteProfileResourceCommand.d.ts +147 -0
- package/dist-types/commands/GetAssetCommand.d.ts +213 -0
- package/dist-types/commands/GetAutomationCommand.d.ts +137 -0
- package/dist-types/commands/GetEvaluationCommand.d.ts +147 -0
- package/dist-types/commands/GetIntentCommand.d.ts +150 -0
- package/dist-types/commands/GetProfileCommand.d.ts +141 -0
- package/dist-types/commands/GetProfileVersionCommand.d.ts +82 -0
- package/dist-types/commands/ListAssetsCommand.d.ts +107 -0
- package/dist-types/commands/ListAutomationsCommand.d.ts +103 -0
- package/dist-types/commands/ListEvaluationsCommand.d.ts +104 -0
- package/dist-types/commands/ListIntentsCommand.d.ts +103 -0
- package/dist-types/commands/ListProfileVersionsCommand.d.ts +95 -0
- package/dist-types/commands/ListProfilesCommand.d.ts +110 -0
- package/dist-types/commands/PublishProfileVersionCommand.d.ts +87 -0
- package/dist-types/commands/RestoreProfileVersionToDraftCommand.d.ts +146 -0
- package/dist-types/commands/UpdateAssetCommand.d.ts +335 -0
- package/dist-types/commands/UpdateAutomationCommand.d.ts +183 -0
- package/dist-types/commands/UpdateEvaluationCommand.d.ts +203 -0
- package/dist-types/commands/UpdateIntentCommand.d.ts +209 -0
- package/dist-types/commands/UpdateProfileCommand.d.ts +160 -0
- package/dist-types/commands/index.d.ts +32 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +31 -0
- package/dist-types/models/WilmaCopilotServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +287 -0
- package/dist-types/models/errors.d.ts +239 -0
- package/dist-types/models/models_0.d.ts +2808 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +182 -0
- package/package.json +57 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { PublishProfileVersion$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class PublishProfileVersionCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "PublishProfileVersion", {})
|
|
13
|
+
.n("WilmaCopilotClient", "PublishProfileVersionCommand")
|
|
14
|
+
.sc(PublishProfileVersion$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { RestoreProfileVersionToDraft$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class RestoreProfileVersionToDraftCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "RestoreProfileVersionToDraft", {})
|
|
13
|
+
.n("WilmaCopilotClient", "RestoreProfileVersionToDraftCommand")
|
|
14
|
+
.sc(RestoreProfileVersionToDraft$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateAsset$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateAssetCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "UpdateAsset", {})
|
|
13
|
+
.n("WilmaCopilotClient", "UpdateAssetCommand")
|
|
14
|
+
.sc(UpdateAsset$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateAutomation$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateAutomationCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "UpdateAutomation", {})
|
|
13
|
+
.n("WilmaCopilotClient", "UpdateAutomationCommand")
|
|
14
|
+
.sc(UpdateAutomation$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateEvaluation$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateEvaluationCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "UpdateEvaluation", {})
|
|
13
|
+
.n("WilmaCopilotClient", "UpdateEvaluationCommand")
|
|
14
|
+
.sc(UpdateEvaluation$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateIntent$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateIntentCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "UpdateIntent", {})
|
|
13
|
+
.n("WilmaCopilotClient", "UpdateIntentCommand")
|
|
14
|
+
.sc(UpdateIntent$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateProfile$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateProfileCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("WilmaCopilot", "UpdateProfile", {})
|
|
13
|
+
.n("WilmaCopilotClient", "UpdateProfileCommand")
|
|
14
|
+
.sc(UpdateProfile$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from "./AttachProfileResourceCommand";
|
|
2
|
+
export * from "./CompareProfileVersionsCommand";
|
|
3
|
+
export * from "./CreateAssetCommand";
|
|
4
|
+
export * from "./CreateAutomationCommand";
|
|
5
|
+
export * from "./CreateEvaluationCommand";
|
|
6
|
+
export * from "./CreateIntentCommand";
|
|
7
|
+
export * from "./CreateProfileCommand";
|
|
8
|
+
export * from "./DeleteAssetCommand";
|
|
9
|
+
export * from "./DeleteAutomationCommand";
|
|
10
|
+
export * from "./DeleteEvaluationCommand";
|
|
11
|
+
export * from "./DeleteIntentCommand";
|
|
12
|
+
export * from "./DeleteProfileCommand";
|
|
13
|
+
export * from "./DeleteProfileResourceCommand";
|
|
14
|
+
export * from "./GetAssetCommand";
|
|
15
|
+
export * from "./GetAutomationCommand";
|
|
16
|
+
export * from "./GetEvaluationCommand";
|
|
17
|
+
export * from "./GetIntentCommand";
|
|
18
|
+
export * from "./GetProfileCommand";
|
|
19
|
+
export * from "./GetProfileVersionCommand";
|
|
20
|
+
export * from "./ListAssetsCommand";
|
|
21
|
+
export * from "./ListAutomationsCommand";
|
|
22
|
+
export * from "./ListEvaluationsCommand";
|
|
23
|
+
export * from "./ListIntentsCommand";
|
|
24
|
+
export * from "./ListProfileVersionsCommand";
|
|
25
|
+
export * from "./ListProfilesCommand";
|
|
26
|
+
export * from "./PublishProfileVersionCommand";
|
|
27
|
+
export * from "./RestoreProfileVersionToDraftCommand";
|
|
28
|
+
export * from "./UpdateAssetCommand";
|
|
29
|
+
export * from "./UpdateAutomationCommand";
|
|
30
|
+
export * from "./UpdateEvaluationCommand";
|
|
31
|
+
export * from "./UpdateIntentCommand";
|
|
32
|
+
export * from "./UpdateProfileCommand";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const clientContextParamDefaults = {};
|
|
2
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
3
|
+
return Object.assign(options, {
|
|
4
|
+
env: options.env ?? "prod",
|
|
5
|
+
defaultSigningName: "",
|
|
6
|
+
clientContextParams: Object.assign(clientContextParamDefaults, options.clientContextParams),
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export const commonParams = {
|
|
10
|
+
env: { type: "clientContextParams", name: "env" },
|
|
11
|
+
endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const a = "stringEquals", b = { "ref": "endpoint" }, c = { "ref": "env" };
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
["isSet", [b]],
|
|
6
|
+
[a, [c, "stable"]],
|
|
7
|
+
[a, [c, "stage"]]
|
|
8
|
+
],
|
|
9
|
+
results: [
|
|
10
|
+
[-1],
|
|
11
|
+
[b, {}],
|
|
12
|
+
["https://api-stable.wilma.wildix.com", {}],
|
|
13
|
+
["https://api-stage.wilma.wildix.com", {}],
|
|
14
|
+
["https://api.wilma.wildix.com", {}]
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
const root = 2;
|
|
18
|
+
const r = 100_000_000;
|
|
19
|
+
const nodes = new Int32Array([
|
|
20
|
+
-1, 1, -1,
|
|
21
|
+
0, r + 1, 3,
|
|
22
|
+
1, r + 2, 4,
|
|
23
|
+
2, r + 3, r + 4,
|
|
24
|
+
]);
|
|
25
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
|
|
2
|
+
import { bdd } from "./bdd";
|
|
3
|
+
const cache = new EndpointCache({
|
|
4
|
+
size: 50,
|
|
5
|
+
params: ["endpoint", "env"],
|
|
6
|
+
});
|
|
7
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
8
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
9
|
+
endpointParams: endpointParams,
|
|
10
|
+
logger: context.logger,
|
|
11
|
+
}));
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./WilmaCopilotClient";
|
|
2
|
+
export * from "./WilmaCopilot";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./models/enums";
|
|
6
|
+
export * from "./models/errors";
|
|
7
|
+
export * from "./models/models_0";
|
|
8
|
+
export { WilmaCopilotServiceException } from "./models/WilmaCopilotServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class WilmaCopilotServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, WilmaCopilotServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const ActorType = {
|
|
2
|
+
API_KEY: "api_key",
|
|
3
|
+
SERVICE: "service",
|
|
4
|
+
USER: "user",
|
|
5
|
+
};
|
|
6
|
+
export const AutomationOutputMode = {
|
|
7
|
+
CARD: "card",
|
|
8
|
+
SILENT: "silent",
|
|
9
|
+
};
|
|
10
|
+
export const CopilotVariableMode = {
|
|
11
|
+
AUTO: "auto",
|
|
12
|
+
GUIDED: "guided",
|
|
13
|
+
PREDEFINED: "predefined",
|
|
14
|
+
};
|
|
15
|
+
export const SmartActionHandoverVariant = {
|
|
16
|
+
AGENT: "agent",
|
|
17
|
+
SERVICE: "service",
|
|
18
|
+
};
|
|
19
|
+
export const SmartActionResultMode = {
|
|
20
|
+
SHOW_CARD: "show_card",
|
|
21
|
+
SILENT: "silent",
|
|
22
|
+
};
|
|
23
|
+
export const AssetIcon = {
|
|
24
|
+
ALERT: "alert",
|
|
25
|
+
BOOK_OPEN: "book_open",
|
|
26
|
+
INFO: "info",
|
|
27
|
+
LIGHTBULB: "lightbulb",
|
|
28
|
+
SHIELD: "shield",
|
|
29
|
+
SPARKLES: "sparkles",
|
|
30
|
+
};
|
|
31
|
+
export const AssetSeverity = {
|
|
32
|
+
DANGER: "danger",
|
|
33
|
+
NEUTRAL: "neutral",
|
|
34
|
+
SUCCESS: "success",
|
|
35
|
+
WARNING: "warning",
|
|
36
|
+
};
|
|
37
|
+
export const AssetType = {
|
|
38
|
+
BATTLE_CARD: "battle_card",
|
|
39
|
+
GUIDANCE: "guidance",
|
|
40
|
+
KNOWLEDGE: "knowledge",
|
|
41
|
+
NEXT_BEST_ACTION: "next_best_action",
|
|
42
|
+
PLAYBOOK: "playbook",
|
|
43
|
+
};
|
|
44
|
+
export const AssetContentType = {
|
|
45
|
+
CARD: "card",
|
|
46
|
+
KNOWLEDGE: "knowledge",
|
|
47
|
+
PLAYBOOK: "playbook",
|
|
48
|
+
SMART_ACTION: "smart_action",
|
|
49
|
+
};
|
|
50
|
+
export const ContextualKnowledgeMode = {
|
|
51
|
+
AUTOMATIC_ANSWER: "automatic_answer",
|
|
52
|
+
SUGGEST_ACTION: "suggest_action",
|
|
53
|
+
};
|
|
54
|
+
export const ContextualKnowledgeSource = {
|
|
55
|
+
AGENT: "agent",
|
|
56
|
+
KNOWLEDGE_BASES: "knowledge_bases",
|
|
57
|
+
};
|
|
58
|
+
export const CopilotVisibility = {
|
|
59
|
+
EXPLICIT: "explicit",
|
|
60
|
+
ORGANIZATION: "organization",
|
|
61
|
+
};
|
|
62
|
+
export const CopilotChannel = {
|
|
63
|
+
ANY: "any",
|
|
64
|
+
CALLS: "calls",
|
|
65
|
+
CHATS: "chats",
|
|
66
|
+
};
|
|
67
|
+
export const ProfileStatus = {
|
|
68
|
+
ACTIVE: "active",
|
|
69
|
+
DRAFT: "draft",
|
|
70
|
+
};
|
|
71
|
+
export const AutomationHandlerType = {
|
|
72
|
+
AGENT: "agent",
|
|
73
|
+
KNOWLEDGE_BASE: "knowledge_base",
|
|
74
|
+
TOOL: "tool",
|
|
75
|
+
};
|
|
76
|
+
export const EvaluationWindow = {
|
|
77
|
+
FULL_TRANSCRIPT: "full_transcript",
|
|
78
|
+
NEW_TRANSCRIPT: "new_transcript",
|
|
79
|
+
NEW_WITH_PRIOR: "new_with_prior",
|
|
80
|
+
};
|
|
81
|
+
export const IntentTextMatchMode = {
|
|
82
|
+
EXACT: "exact",
|
|
83
|
+
FUZZY: "fuzzy",
|
|
84
|
+
REGEX: "regex",
|
|
85
|
+
};
|
|
86
|
+
export const ProfileResourceType = {
|
|
87
|
+
ASSET: "asset",
|
|
88
|
+
AUTOMATION: "automation",
|
|
89
|
+
EVALUATION: "evaluation",
|
|
90
|
+
FEATURE: "feature",
|
|
91
|
+
INTENT: "intent",
|
|
92
|
+
};
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { WilmaCopilotServiceException as __BaseException } from "./WilmaCopilotServiceException";
|
|
2
|
+
export class ForbiddenException extends __BaseException {
|
|
3
|
+
name = "ForbiddenException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "ForbiddenException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ValidationException extends __BaseException {
|
|
15
|
+
name = "ValidationException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "ValidationException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class NothingToPublishException extends __BaseException {
|
|
27
|
+
name = "NothingToPublishException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
type;
|
|
30
|
+
constructor(opts) {
|
|
31
|
+
super({
|
|
32
|
+
name: "NothingToPublishException",
|
|
33
|
+
$fault: "client",
|
|
34
|
+
...opts,
|
|
35
|
+
});
|
|
36
|
+
Object.setPrototypeOf(this, NothingToPublishException.prototype);
|
|
37
|
+
this.type = opts.type;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class RevisionConflictException extends __BaseException {
|
|
41
|
+
name = "RevisionConflictException";
|
|
42
|
+
$fault = "client";
|
|
43
|
+
type;
|
|
44
|
+
currentRevision;
|
|
45
|
+
constructor(opts) {
|
|
46
|
+
super({
|
|
47
|
+
name: "RevisionConflictException",
|
|
48
|
+
$fault: "client",
|
|
49
|
+
...opts,
|
|
50
|
+
});
|
|
51
|
+
Object.setPrototypeOf(this, RevisionConflictException.prototype);
|
|
52
|
+
this.type = opts.type;
|
|
53
|
+
this.currentRevision = opts.currentRevision;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export class AssetInUseException extends __BaseException {
|
|
57
|
+
name = "AssetInUseException";
|
|
58
|
+
$fault = "client";
|
|
59
|
+
type;
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "AssetInUseException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
Object.setPrototypeOf(this, AssetInUseException.prototype);
|
|
67
|
+
this.type = opts.type;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export class AssetNonUniqueNameException extends __BaseException {
|
|
71
|
+
name = "AssetNonUniqueNameException";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
type;
|
|
74
|
+
constructor(opts) {
|
|
75
|
+
super({
|
|
76
|
+
name: "AssetNonUniqueNameException",
|
|
77
|
+
$fault: "client",
|
|
78
|
+
...opts,
|
|
79
|
+
});
|
|
80
|
+
Object.setPrototypeOf(this, AssetNonUniqueNameException.prototype);
|
|
81
|
+
this.type = opts.type;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export class AssetNotFoundException extends __BaseException {
|
|
85
|
+
name = "AssetNotFoundException";
|
|
86
|
+
$fault = "client";
|
|
87
|
+
type;
|
|
88
|
+
constructor(opts) {
|
|
89
|
+
super({
|
|
90
|
+
name: "AssetNotFoundException",
|
|
91
|
+
$fault: "client",
|
|
92
|
+
...opts,
|
|
93
|
+
});
|
|
94
|
+
Object.setPrototypeOf(this, AssetNotFoundException.prototype);
|
|
95
|
+
this.type = opts.type;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export class ProfileNotFoundException extends __BaseException {
|
|
99
|
+
name = "ProfileNotFoundException";
|
|
100
|
+
$fault = "client";
|
|
101
|
+
type;
|
|
102
|
+
constructor(opts) {
|
|
103
|
+
super({
|
|
104
|
+
name: "ProfileNotFoundException",
|
|
105
|
+
$fault: "client",
|
|
106
|
+
...opts,
|
|
107
|
+
});
|
|
108
|
+
Object.setPrototypeOf(this, ProfileNotFoundException.prototype);
|
|
109
|
+
this.type = opts.type;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export class AutomationInUseException extends __BaseException {
|
|
113
|
+
name = "AutomationInUseException";
|
|
114
|
+
$fault = "client";
|
|
115
|
+
type;
|
|
116
|
+
constructor(opts) {
|
|
117
|
+
super({
|
|
118
|
+
name: "AutomationInUseException",
|
|
119
|
+
$fault: "client",
|
|
120
|
+
...opts,
|
|
121
|
+
});
|
|
122
|
+
Object.setPrototypeOf(this, AutomationInUseException.prototype);
|
|
123
|
+
this.type = opts.type;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export class AutomationNonUniqueNameException extends __BaseException {
|
|
127
|
+
name = "AutomationNonUniqueNameException";
|
|
128
|
+
$fault = "client";
|
|
129
|
+
type;
|
|
130
|
+
constructor(opts) {
|
|
131
|
+
super({
|
|
132
|
+
name: "AutomationNonUniqueNameException",
|
|
133
|
+
$fault: "client",
|
|
134
|
+
...opts,
|
|
135
|
+
});
|
|
136
|
+
Object.setPrototypeOf(this, AutomationNonUniqueNameException.prototype);
|
|
137
|
+
this.type = opts.type;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export class AutomationNotFoundException extends __BaseException {
|
|
141
|
+
name = "AutomationNotFoundException";
|
|
142
|
+
$fault = "client";
|
|
143
|
+
type;
|
|
144
|
+
constructor(opts) {
|
|
145
|
+
super({
|
|
146
|
+
name: "AutomationNotFoundException",
|
|
147
|
+
$fault: "client",
|
|
148
|
+
...opts,
|
|
149
|
+
});
|
|
150
|
+
Object.setPrototypeOf(this, AutomationNotFoundException.prototype);
|
|
151
|
+
this.type = opts.type;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export class ProfileVersionNotFoundException extends __BaseException {
|
|
155
|
+
name = "ProfileVersionNotFoundException";
|
|
156
|
+
$fault = "client";
|
|
157
|
+
type;
|
|
158
|
+
constructor(opts) {
|
|
159
|
+
super({
|
|
160
|
+
name: "ProfileVersionNotFoundException",
|
|
161
|
+
$fault: "client",
|
|
162
|
+
...opts,
|
|
163
|
+
});
|
|
164
|
+
Object.setPrototypeOf(this, ProfileVersionNotFoundException.prototype);
|
|
165
|
+
this.type = opts.type;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
export class EvaluationNonUniqueNameException extends __BaseException {
|
|
169
|
+
name = "EvaluationNonUniqueNameException";
|
|
170
|
+
$fault = "client";
|
|
171
|
+
type;
|
|
172
|
+
constructor(opts) {
|
|
173
|
+
super({
|
|
174
|
+
name: "EvaluationNonUniqueNameException",
|
|
175
|
+
$fault: "client",
|
|
176
|
+
...opts,
|
|
177
|
+
});
|
|
178
|
+
Object.setPrototypeOf(this, EvaluationNonUniqueNameException.prototype);
|
|
179
|
+
this.type = opts.type;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
export class IntentNonUniqueNameException extends __BaseException {
|
|
183
|
+
name = "IntentNonUniqueNameException";
|
|
184
|
+
$fault = "client";
|
|
185
|
+
type;
|
|
186
|
+
constructor(opts) {
|
|
187
|
+
super({
|
|
188
|
+
name: "IntentNonUniqueNameException",
|
|
189
|
+
$fault: "client",
|
|
190
|
+
...opts,
|
|
191
|
+
});
|
|
192
|
+
Object.setPrototypeOf(this, IntentNonUniqueNameException.prototype);
|
|
193
|
+
this.type = opts.type;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
export class ProfileNonUniqueNameException extends __BaseException {
|
|
197
|
+
name = "ProfileNonUniqueNameException";
|
|
198
|
+
$fault = "client";
|
|
199
|
+
type;
|
|
200
|
+
constructor(opts) {
|
|
201
|
+
super({
|
|
202
|
+
name: "ProfileNonUniqueNameException",
|
|
203
|
+
$fault: "client",
|
|
204
|
+
...opts,
|
|
205
|
+
});
|
|
206
|
+
Object.setPrototypeOf(this, ProfileNonUniqueNameException.prototype);
|
|
207
|
+
this.type = opts.type;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
export class EvaluationInUseException extends __BaseException {
|
|
211
|
+
name = "EvaluationInUseException";
|
|
212
|
+
$fault = "client";
|
|
213
|
+
type;
|
|
214
|
+
constructor(opts) {
|
|
215
|
+
super({
|
|
216
|
+
name: "EvaluationInUseException",
|
|
217
|
+
$fault: "client",
|
|
218
|
+
...opts,
|
|
219
|
+
});
|
|
220
|
+
Object.setPrototypeOf(this, EvaluationInUseException.prototype);
|
|
221
|
+
this.type = opts.type;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
export class EvaluationNotFoundException extends __BaseException {
|
|
225
|
+
name = "EvaluationNotFoundException";
|
|
226
|
+
$fault = "client";
|
|
227
|
+
type;
|
|
228
|
+
constructor(opts) {
|
|
229
|
+
super({
|
|
230
|
+
name: "EvaluationNotFoundException",
|
|
231
|
+
$fault: "client",
|
|
232
|
+
...opts,
|
|
233
|
+
});
|
|
234
|
+
Object.setPrototypeOf(this, EvaluationNotFoundException.prototype);
|
|
235
|
+
this.type = opts.type;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export class IntentInUseException extends __BaseException {
|
|
239
|
+
name = "IntentInUseException";
|
|
240
|
+
$fault = "client";
|
|
241
|
+
type;
|
|
242
|
+
constructor(opts) {
|
|
243
|
+
super({
|
|
244
|
+
name: "IntentInUseException",
|
|
245
|
+
$fault: "client",
|
|
246
|
+
...opts,
|
|
247
|
+
});
|
|
248
|
+
Object.setPrototypeOf(this, IntentInUseException.prototype);
|
|
249
|
+
this.type = opts.type;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export class IntentNotFoundException extends __BaseException {
|
|
253
|
+
name = "IntentNotFoundException";
|
|
254
|
+
$fault = "client";
|
|
255
|
+
type;
|
|
256
|
+
constructor(opts) {
|
|
257
|
+
super({
|
|
258
|
+
name: "IntentNotFoundException",
|
|
259
|
+
$fault: "client",
|
|
260
|
+
...opts,
|
|
261
|
+
});
|
|
262
|
+
Object.setPrototypeOf(this, IntentNotFoundException.prototype);
|
|
263
|
+
this.type = opts.type;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
4
|
+
import { loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
5
|
+
import { resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
6
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
8
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
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({ 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,36 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/core/client";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { loadConfig as loadNodeConfig, resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength, Hash } from "@smithy/core/serde";
|
|
7
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
8
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
11
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
const loaderConfig = {
|
|
15
|
+
profile: config?.profile,
|
|
16
|
+
logger: clientSharedValues.logger,
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "node",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ 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 ??
|
|
28
|
+
loadNodeConfig({
|
|
29
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
30
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
31
|
+
}, config),
|
|
32
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
33
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -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
|
+
};
|