@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.
Files changed (157) hide show
  1. package/dist-cjs/WilmaCopilot.js +75 -0
  2. package/dist-cjs/WilmaCopilotClient.js +49 -0
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +58 -0
  5. package/dist-cjs/commands/AttachProfileResourceCommand.js +20 -0
  6. package/dist-cjs/commands/CompareProfileVersionsCommand.js +20 -0
  7. package/dist-cjs/commands/CreateAssetCommand.js +20 -0
  8. package/dist-cjs/commands/CreateAutomationCommand.js +20 -0
  9. package/dist-cjs/commands/CreateEvaluationCommand.js +20 -0
  10. package/dist-cjs/commands/CreateIntentCommand.js +20 -0
  11. package/dist-cjs/commands/CreateProfileCommand.js +20 -0
  12. package/dist-cjs/commands/DeleteAssetCommand.js +20 -0
  13. package/dist-cjs/commands/DeleteAutomationCommand.js +20 -0
  14. package/dist-cjs/commands/DeleteEvaluationCommand.js +20 -0
  15. package/dist-cjs/commands/DeleteIntentCommand.js +20 -0
  16. package/dist-cjs/commands/DeleteProfileCommand.js +20 -0
  17. package/dist-cjs/commands/DeleteProfileResourceCommand.js +20 -0
  18. package/dist-cjs/commands/GetAssetCommand.js +20 -0
  19. package/dist-cjs/commands/GetAutomationCommand.js +20 -0
  20. package/dist-cjs/commands/GetEvaluationCommand.js +20 -0
  21. package/dist-cjs/commands/GetIntentCommand.js +20 -0
  22. package/dist-cjs/commands/GetProfileCommand.js +20 -0
  23. package/dist-cjs/commands/GetProfileVersionCommand.js +20 -0
  24. package/dist-cjs/commands/ListAssetsCommand.js +20 -0
  25. package/dist-cjs/commands/ListAutomationsCommand.js +20 -0
  26. package/dist-cjs/commands/ListEvaluationsCommand.js +20 -0
  27. package/dist-cjs/commands/ListIntentsCommand.js +20 -0
  28. package/dist-cjs/commands/ListProfileVersionsCommand.js +20 -0
  29. package/dist-cjs/commands/ListProfilesCommand.js +20 -0
  30. package/dist-cjs/commands/PublishProfileVersionCommand.js +20 -0
  31. package/dist-cjs/commands/RestoreProfileVersionToDraftCommand.js +20 -0
  32. package/dist-cjs/commands/UpdateAssetCommand.js +20 -0
  33. package/dist-cjs/commands/UpdateAutomationCommand.js +20 -0
  34. package/dist-cjs/commands/UpdateEvaluationCommand.js +20 -0
  35. package/dist-cjs/commands/UpdateIntentCommand.js +20 -0
  36. package/dist-cjs/commands/UpdateProfileCommand.js +20 -0
  37. package/dist-cjs/commands/index.js +35 -0
  38. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  39. package/dist-cjs/endpoint/bdd.js +28 -0
  40. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  41. package/dist-cjs/extensionConfiguration.js +2 -0
  42. package/dist-cjs/index.js +13 -0
  43. package/dist-cjs/models/WilmaCopilotServiceException.js +12 -0
  44. package/dist-cjs/models/enums.js +95 -0
  45. package/dist-cjs/models/errors.js +287 -0
  46. package/dist-cjs/models/models_0.js +2 -0
  47. package/dist-cjs/runtimeConfig.browser.js +32 -0
  48. package/dist-cjs/runtimeConfig.js +41 -0
  49. package/dist-cjs/runtimeConfig.native.js +15 -0
  50. package/dist-cjs/runtimeConfig.shared.js +41 -0
  51. package/dist-cjs/runtimeExtensions.js +12 -0
  52. package/dist-cjs/schemas/schemas_0.js +1249 -0
  53. package/dist-es/WilmaCopilot.js +71 -0
  54. package/dist-es/WilmaCopilotClient.js +45 -0
  55. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  56. package/dist-es/auth/httpAuthSchemeProvider.js +52 -0
  57. package/dist-es/commands/AttachProfileResourceCommand.js +16 -0
  58. package/dist-es/commands/CompareProfileVersionsCommand.js +16 -0
  59. package/dist-es/commands/CreateAssetCommand.js +16 -0
  60. package/dist-es/commands/CreateAutomationCommand.js +16 -0
  61. package/dist-es/commands/CreateEvaluationCommand.js +16 -0
  62. package/dist-es/commands/CreateIntentCommand.js +16 -0
  63. package/dist-es/commands/CreateProfileCommand.js +16 -0
  64. package/dist-es/commands/DeleteAssetCommand.js +16 -0
  65. package/dist-es/commands/DeleteAutomationCommand.js +16 -0
  66. package/dist-es/commands/DeleteEvaluationCommand.js +16 -0
  67. package/dist-es/commands/DeleteIntentCommand.js +16 -0
  68. package/dist-es/commands/DeleteProfileCommand.js +16 -0
  69. package/dist-es/commands/DeleteProfileResourceCommand.js +16 -0
  70. package/dist-es/commands/GetAssetCommand.js +16 -0
  71. package/dist-es/commands/GetAutomationCommand.js +16 -0
  72. package/dist-es/commands/GetEvaluationCommand.js +16 -0
  73. package/dist-es/commands/GetIntentCommand.js +16 -0
  74. package/dist-es/commands/GetProfileCommand.js +16 -0
  75. package/dist-es/commands/GetProfileVersionCommand.js +16 -0
  76. package/dist-es/commands/ListAssetsCommand.js +16 -0
  77. package/dist-es/commands/ListAutomationsCommand.js +16 -0
  78. package/dist-es/commands/ListEvaluationsCommand.js +16 -0
  79. package/dist-es/commands/ListIntentsCommand.js +16 -0
  80. package/dist-es/commands/ListProfileVersionsCommand.js +16 -0
  81. package/dist-es/commands/ListProfilesCommand.js +16 -0
  82. package/dist-es/commands/PublishProfileVersionCommand.js +16 -0
  83. package/dist-es/commands/RestoreProfileVersionToDraftCommand.js +16 -0
  84. package/dist-es/commands/UpdateAssetCommand.js +16 -0
  85. package/dist-es/commands/UpdateAutomationCommand.js +16 -0
  86. package/dist-es/commands/UpdateEvaluationCommand.js +16 -0
  87. package/dist-es/commands/UpdateIntentCommand.js +16 -0
  88. package/dist-es/commands/UpdateProfileCommand.js +16 -0
  89. package/dist-es/commands/index.js +32 -0
  90. package/dist-es/endpoint/EndpointParameters.js +12 -0
  91. package/dist-es/endpoint/bdd.js +25 -0
  92. package/dist-es/endpoint/endpointResolver.js +12 -0
  93. package/dist-es/extensionConfiguration.js +1 -0
  94. package/dist-es/index.js +8 -0
  95. package/dist-es/models/WilmaCopilotServiceException.js +8 -0
  96. package/dist-es/models/enums.js +92 -0
  97. package/dist-es/models/errors.js +265 -0
  98. package/dist-es/models/models_0.js +1 -0
  99. package/dist-es/runtimeConfig.browser.js +27 -0
  100. package/dist-es/runtimeConfig.js +36 -0
  101. package/dist-es/runtimeConfig.native.js +11 -0
  102. package/dist-es/runtimeConfig.shared.js +37 -0
  103. package/dist-es/runtimeExtensions.js +8 -0
  104. package/dist-es/schemas/schemas_0.js +1243 -0
  105. package/dist-types/WilmaCopilot.d.ts +254 -0
  106. package/dist-types/WilmaCopilotClient.d.ts +209 -0
  107. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  108. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  109. package/dist-types/commands/AttachProfileResourceCommand.d.ts +165 -0
  110. package/dist-types/commands/CompareProfileVersionsCommand.d.ts +91 -0
  111. package/dist-types/commands/CreateAssetCommand.d.ts +328 -0
  112. package/dist-types/commands/CreateAutomationCommand.d.ts +176 -0
  113. package/dist-types/commands/CreateEvaluationCommand.d.ts +196 -0
  114. package/dist-types/commands/CreateIntentCommand.d.ts +202 -0
  115. package/dist-types/commands/CreateProfileCommand.d.ts +181 -0
  116. package/dist-types/commands/DeleteAssetCommand.d.ts +83 -0
  117. package/dist-types/commands/DeleteAutomationCommand.d.ts +83 -0
  118. package/dist-types/commands/DeleteEvaluationCommand.d.ts +83 -0
  119. package/dist-types/commands/DeleteIntentCommand.d.ts +83 -0
  120. package/dist-types/commands/DeleteProfileCommand.d.ts +79 -0
  121. package/dist-types/commands/DeleteProfileResourceCommand.d.ts +147 -0
  122. package/dist-types/commands/GetAssetCommand.d.ts +213 -0
  123. package/dist-types/commands/GetAutomationCommand.d.ts +137 -0
  124. package/dist-types/commands/GetEvaluationCommand.d.ts +147 -0
  125. package/dist-types/commands/GetIntentCommand.d.ts +150 -0
  126. package/dist-types/commands/GetProfileCommand.d.ts +141 -0
  127. package/dist-types/commands/GetProfileVersionCommand.d.ts +82 -0
  128. package/dist-types/commands/ListAssetsCommand.d.ts +107 -0
  129. package/dist-types/commands/ListAutomationsCommand.d.ts +103 -0
  130. package/dist-types/commands/ListEvaluationsCommand.d.ts +104 -0
  131. package/dist-types/commands/ListIntentsCommand.d.ts +103 -0
  132. package/dist-types/commands/ListProfileVersionsCommand.d.ts +95 -0
  133. package/dist-types/commands/ListProfilesCommand.d.ts +110 -0
  134. package/dist-types/commands/PublishProfileVersionCommand.d.ts +87 -0
  135. package/dist-types/commands/RestoreProfileVersionToDraftCommand.d.ts +146 -0
  136. package/dist-types/commands/UpdateAssetCommand.d.ts +335 -0
  137. package/dist-types/commands/UpdateAutomationCommand.d.ts +183 -0
  138. package/dist-types/commands/UpdateEvaluationCommand.d.ts +203 -0
  139. package/dist-types/commands/UpdateIntentCommand.d.ts +209 -0
  140. package/dist-types/commands/UpdateProfileCommand.d.ts +160 -0
  141. package/dist-types/commands/index.d.ts +32 -0
  142. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  143. package/dist-types/endpoint/bdd.d.ts +2 -0
  144. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  145. package/dist-types/extensionConfiguration.d.ts +8 -0
  146. package/dist-types/index.d.ts +31 -0
  147. package/dist-types/models/WilmaCopilotServiceException.d.ts +14 -0
  148. package/dist-types/models/enums.d.ts +287 -0
  149. package/dist-types/models/errors.d.ts +239 -0
  150. package/dist-types/models/models_0.d.ts +2808 -0
  151. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  152. package/dist-types/runtimeConfig.d.ts +55 -0
  153. package/dist-types/runtimeConfig.native.d.ts +54 -0
  154. package/dist-types/runtimeConfig.shared.d.ts +32 -0
  155. package/dist-types/runtimeExtensions.d.ts +17 -0
  156. package/dist-types/schemas/schemas_0.d.ts +182 -0
  157. 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 {};
@@ -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
+ };