@wildix/wilma-agents-client 1.0.1

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 (130) hide show
  1. package/dist-cjs/WilmaAgents.js +57 -0
  2. package/dist-cjs/WilmaAgentsClient.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/CompareAgentVersionsCommand.js +20 -0
  6. package/dist-cjs/commands/CreateAgentApiKeyCommand.js +20 -0
  7. package/dist-cjs/commands/CreateAgentCommand.js +20 -0
  8. package/dist-cjs/commands/CreateGuardrailCommand.js +20 -0
  9. package/dist-cjs/commands/DeleteAgentAliasCommand.js +20 -0
  10. package/dist-cjs/commands/DeleteAgentApiKeyCommand.js +20 -0
  11. package/dist-cjs/commands/DeleteAgentCommand.js +20 -0
  12. package/dist-cjs/commands/DeleteGuardrailCommand.js +20 -0
  13. package/dist-cjs/commands/ExecuteAgentCommand.js +20 -0
  14. package/dist-cjs/commands/GetAgentCommand.js +20 -0
  15. package/dist-cjs/commands/GetAgentVersionCommand.js +20 -0
  16. package/dist-cjs/commands/GetGuardrailCommand.js +20 -0
  17. package/dist-cjs/commands/ListAgentAliasesCommand.js +20 -0
  18. package/dist-cjs/commands/ListAgentApiKeysCommand.js +20 -0
  19. package/dist-cjs/commands/ListAgentVersionsCommand.js +20 -0
  20. package/dist-cjs/commands/ListAgentsCommand.js +20 -0
  21. package/dist-cjs/commands/ListAgentsNamesCommand.js +20 -0
  22. package/dist-cjs/commands/ListAuditRecordsCommand.js +20 -0
  23. package/dist-cjs/commands/ListGuardrailsCommand.js +20 -0
  24. package/dist-cjs/commands/PublishAgentVersionCommand.js +20 -0
  25. package/dist-cjs/commands/PutAgentAliasCommand.js +20 -0
  26. package/dist-cjs/commands/UpdateAgentCommand.js +20 -0
  27. package/dist-cjs/commands/UpdateGuardrailCommand.js +20 -0
  28. package/dist-cjs/commands/index.js +26 -0
  29. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  30. package/dist-cjs/endpoint/bdd.js +28 -0
  31. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  32. package/dist-cjs/extensionConfiguration.js +2 -0
  33. package/dist-cjs/index.js +13 -0
  34. package/dist-cjs/models/WilmaAgentsServiceException.js +12 -0
  35. package/dist-cjs/models/enums.js +118 -0
  36. package/dist-cjs/models/errors.js +154 -0
  37. package/dist-cjs/models/models_0.js +2 -0
  38. package/dist-cjs/runtimeConfig.browser.js +32 -0
  39. package/dist-cjs/runtimeConfig.js +41 -0
  40. package/dist-cjs/runtimeConfig.native.js +15 -0
  41. package/dist-cjs/runtimeConfig.shared.js +41 -0
  42. package/dist-cjs/runtimeExtensions.js +12 -0
  43. package/dist-cjs/schemas/schemas_0.js +1168 -0
  44. package/dist-es/WilmaAgents.js +53 -0
  45. package/dist-es/WilmaAgentsClient.js +45 -0
  46. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  47. package/dist-es/auth/httpAuthSchemeProvider.js +52 -0
  48. package/dist-es/commands/CompareAgentVersionsCommand.js +16 -0
  49. package/dist-es/commands/CreateAgentApiKeyCommand.js +16 -0
  50. package/dist-es/commands/CreateAgentCommand.js +16 -0
  51. package/dist-es/commands/CreateGuardrailCommand.js +16 -0
  52. package/dist-es/commands/DeleteAgentAliasCommand.js +16 -0
  53. package/dist-es/commands/DeleteAgentApiKeyCommand.js +16 -0
  54. package/dist-es/commands/DeleteAgentCommand.js +16 -0
  55. package/dist-es/commands/DeleteGuardrailCommand.js +16 -0
  56. package/dist-es/commands/ExecuteAgentCommand.js +16 -0
  57. package/dist-es/commands/GetAgentCommand.js +16 -0
  58. package/dist-es/commands/GetAgentVersionCommand.js +16 -0
  59. package/dist-es/commands/GetGuardrailCommand.js +16 -0
  60. package/dist-es/commands/ListAgentAliasesCommand.js +16 -0
  61. package/dist-es/commands/ListAgentApiKeysCommand.js +16 -0
  62. package/dist-es/commands/ListAgentVersionsCommand.js +16 -0
  63. package/dist-es/commands/ListAgentsCommand.js +16 -0
  64. package/dist-es/commands/ListAgentsNamesCommand.js +16 -0
  65. package/dist-es/commands/ListAuditRecordsCommand.js +16 -0
  66. package/dist-es/commands/ListGuardrailsCommand.js +16 -0
  67. package/dist-es/commands/PublishAgentVersionCommand.js +16 -0
  68. package/dist-es/commands/PutAgentAliasCommand.js +16 -0
  69. package/dist-es/commands/UpdateAgentCommand.js +16 -0
  70. package/dist-es/commands/UpdateGuardrailCommand.js +16 -0
  71. package/dist-es/commands/index.js +23 -0
  72. package/dist-es/endpoint/EndpointParameters.js +12 -0
  73. package/dist-es/endpoint/bdd.js +25 -0
  74. package/dist-es/endpoint/endpointResolver.js +12 -0
  75. package/dist-es/extensionConfiguration.js +1 -0
  76. package/dist-es/index.js +8 -0
  77. package/dist-es/models/WilmaAgentsServiceException.js +8 -0
  78. package/dist-es/models/enums.js +115 -0
  79. package/dist-es/models/errors.js +141 -0
  80. package/dist-es/models/models_0.js +1 -0
  81. package/dist-es/runtimeConfig.browser.js +27 -0
  82. package/dist-es/runtimeConfig.js +36 -0
  83. package/dist-es/runtimeConfig.native.js +11 -0
  84. package/dist-es/runtimeConfig.shared.js +37 -0
  85. package/dist-es/runtimeExtensions.js +8 -0
  86. package/dist-es/schemas/schemas_0.js +1162 -0
  87. package/dist-types/WilmaAgents.d.ts +182 -0
  88. package/dist-types/WilmaAgentsClient.d.ts +192 -0
  89. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  90. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  91. package/dist-types/commands/CompareAgentVersionsCommand.d.ts +91 -0
  92. package/dist-types/commands/CreateAgentApiKeyCommand.d.ts +96 -0
  93. package/dist-types/commands/CreateAgentCommand.d.ts +654 -0
  94. package/dist-types/commands/CreateGuardrailCommand.d.ts +172 -0
  95. package/dist-types/commands/DeleteAgentAliasCommand.d.ts +82 -0
  96. package/dist-types/commands/DeleteAgentApiKeyCommand.d.ts +82 -0
  97. package/dist-types/commands/DeleteAgentCommand.d.ts +77 -0
  98. package/dist-types/commands/DeleteGuardrailCommand.d.ts +80 -0
  99. package/dist-types/commands/ExecuteAgentCommand.d.ts +112 -0
  100. package/dist-types/commands/GetAgentCommand.d.ts +386 -0
  101. package/dist-types/commands/GetAgentVersionCommand.d.ts +365 -0
  102. package/dist-types/commands/GetGuardrailCommand.d.ts +135 -0
  103. package/dist-types/commands/ListAgentAliasesCommand.d.ts +99 -0
  104. package/dist-types/commands/ListAgentApiKeysCommand.d.ts +95 -0
  105. package/dist-types/commands/ListAgentVersionsCommand.d.ts +99 -0
  106. package/dist-types/commands/ListAgentsCommand.d.ts +391 -0
  107. package/dist-types/commands/ListAgentsNamesCommand.d.ts +90 -0
  108. package/dist-types/commands/ListAuditRecordsCommand.d.ts +109 -0
  109. package/dist-types/commands/ListGuardrailsCommand.d.ts +137 -0
  110. package/dist-types/commands/PublishAgentVersionCommand.d.ts +370 -0
  111. package/dist-types/commands/PutAgentAliasCommand.d.ts +107 -0
  112. package/dist-types/commands/UpdateAgentCommand.d.ts +661 -0
  113. package/dist-types/commands/UpdateGuardrailCommand.d.ts +175 -0
  114. package/dist-types/commands/index.d.ts +23 -0
  115. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  116. package/dist-types/endpoint/bdd.d.ts +2 -0
  117. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  118. package/dist-types/extensionConfiguration.d.ts +8 -0
  119. package/dist-types/index.d.ts +23 -0
  120. package/dist-types/models/WilmaAgentsServiceException.d.ts +14 -0
  121. package/dist-types/models/enums.d.ts +301 -0
  122. package/dist-types/models/errors.d.ts +129 -0
  123. package/dist-types/models/models_0.d.ts +2186 -0
  124. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  125. package/dist-types/runtimeConfig.d.ts +55 -0
  126. package/dist-types/runtimeConfig.native.d.ts +54 -0
  127. package/dist-types/runtimeConfig.shared.d.ts +32 -0
  128. package/dist-types/runtimeExtensions.d.ts +17 -0
  129. package/dist-types/schemas/schemas_0.d.ts +160 -0
  130. package/package.json +57 -0
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutAgentAliasCommand = exports.$Command = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
6
+ const endpoints_1 = require("@smithy/core/endpoints");
7
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
8
+ const schemas_0_1 = require("../schemas/schemas_0");
9
+ class PutAgentAliasCommand extends client_1.Command
10
+ .classBuilder()
11
+ .ep(EndpointParameters_1.commonParams)
12
+ .m(function (Command, cs, config, o) {
13
+ return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
14
+ })
15
+ .s("WilmaAgents", "PutAgentAlias", {})
16
+ .n("WilmaAgentsClient", "PutAgentAliasCommand")
17
+ .sc(schemas_0_1.PutAgentAlias$)
18
+ .build() {
19
+ }
20
+ exports.PutAgentAliasCommand = PutAgentAliasCommand;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateAgentCommand = exports.$Command = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
6
+ const endpoints_1 = require("@smithy/core/endpoints");
7
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
8
+ const schemas_0_1 = require("../schemas/schemas_0");
9
+ class UpdateAgentCommand extends client_1.Command
10
+ .classBuilder()
11
+ .ep(EndpointParameters_1.commonParams)
12
+ .m(function (Command, cs, config, o) {
13
+ return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
14
+ })
15
+ .s("WilmaAgents", "UpdateAgent", {})
16
+ .n("WilmaAgentsClient", "UpdateAgentCommand")
17
+ .sc(schemas_0_1.UpdateAgent$)
18
+ .build() {
19
+ }
20
+ exports.UpdateAgentCommand = UpdateAgentCommand;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateGuardrailCommand = exports.$Command = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return client_1.Command; } });
6
+ const endpoints_1 = require("@smithy/core/endpoints");
7
+ const EndpointParameters_1 = require("../endpoint/EndpointParameters");
8
+ const schemas_0_1 = require("../schemas/schemas_0");
9
+ class UpdateGuardrailCommand extends client_1.Command
10
+ .classBuilder()
11
+ .ep(EndpointParameters_1.commonParams)
12
+ .m(function (Command, cs, config, o) {
13
+ return [(0, endpoints_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())];
14
+ })
15
+ .s("WilmaAgents", "UpdateGuardrail", {})
16
+ .n("WilmaAgentsClient", "UpdateGuardrailCommand")
17
+ .sc(schemas_0_1.UpdateGuardrail$)
18
+ .build() {
19
+ }
20
+ exports.UpdateGuardrailCommand = UpdateGuardrailCommand;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./CompareAgentVersionsCommand"), exports);
5
+ tslib_1.__exportStar(require("./CreateAgentApiKeyCommand"), exports);
6
+ tslib_1.__exportStar(require("./CreateAgentCommand"), exports);
7
+ tslib_1.__exportStar(require("./CreateGuardrailCommand"), exports);
8
+ tslib_1.__exportStar(require("./DeleteAgentAliasCommand"), exports);
9
+ tslib_1.__exportStar(require("./DeleteAgentApiKeyCommand"), exports);
10
+ tslib_1.__exportStar(require("./DeleteAgentCommand"), exports);
11
+ tslib_1.__exportStar(require("./DeleteGuardrailCommand"), exports);
12
+ tslib_1.__exportStar(require("./ExecuteAgentCommand"), exports);
13
+ tslib_1.__exportStar(require("./GetAgentCommand"), exports);
14
+ tslib_1.__exportStar(require("./GetAgentVersionCommand"), exports);
15
+ tslib_1.__exportStar(require("./GetGuardrailCommand"), exports);
16
+ tslib_1.__exportStar(require("./ListAgentAliasesCommand"), exports);
17
+ tslib_1.__exportStar(require("./ListAgentApiKeysCommand"), exports);
18
+ tslib_1.__exportStar(require("./ListAgentVersionsCommand"), exports);
19
+ tslib_1.__exportStar(require("./ListAgentsCommand"), exports);
20
+ tslib_1.__exportStar(require("./ListAgentsNamesCommand"), exports);
21
+ tslib_1.__exportStar(require("./ListAuditRecordsCommand"), exports);
22
+ tslib_1.__exportStar(require("./ListGuardrailsCommand"), exports);
23
+ tslib_1.__exportStar(require("./PublishAgentVersionCommand"), exports);
24
+ tslib_1.__exportStar(require("./PutAgentAliasCommand"), exports);
25
+ tslib_1.__exportStar(require("./UpdateAgentCommand"), exports);
26
+ tslib_1.__exportStar(require("./UpdateGuardrailCommand"), exports);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
+ const clientContextParamDefaults = {};
5
+ const resolveClientEndpointParameters = (options) => {
6
+ return Object.assign(options, {
7
+ env: options.env ?? "prod",
8
+ defaultSigningName: "",
9
+ clientContextParams: Object.assign(clientContextParamDefaults, options.clientContextParams),
10
+ });
11
+ };
12
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
+ exports.commonParams = {
14
+ env: { type: "clientContextParams", name: "env" },
15
+ endpoint: { type: "builtInParams", name: "endpoint" },
16
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bdd = void 0;
4
+ const endpoints_1 = require("@smithy/core/endpoints");
5
+ const a = "stringEquals", b = { "ref": "endpoint" }, c = { "ref": "env" };
6
+ const _data = {
7
+ conditions: [
8
+ ["isSet", [b]],
9
+ [a, [c, "stable"]],
10
+ [a, [c, "stage"]]
11
+ ],
12
+ results: [
13
+ [-1],
14
+ [b, {}],
15
+ ["https://api-stable.wilma.wildix.com", {}],
16
+ ["https://api-stage.wilma.wildix.com", {}],
17
+ ["https://api.wilma.wildix.com", {}]
18
+ ]
19
+ };
20
+ const root = 2;
21
+ const r = 100_000_000;
22
+ const nodes = new Int32Array([
23
+ -1, 1, -1,
24
+ 0, r + 1, 3,
25
+ 1, r + 2, 4,
26
+ 2, r + 3, r + 4,
27
+ ]);
28
+ exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultEndpointResolver = void 0;
4
+ const endpoints_1 = require("@smithy/core/endpoints");
5
+ const bdd_1 = require("./bdd");
6
+ const cache = new endpoints_1.EndpointCache({
7
+ size: 50,
8
+ params: ["endpoint", "env"],
9
+ });
10
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
11
+ return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
12
+ endpointParams: endpointParams,
13
+ logger: context.logger,
14
+ }));
15
+ };
16
+ exports.defaultEndpointResolver = defaultEndpointResolver;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WilmaAgentsServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./WilmaAgentsClient"), exports);
6
+ tslib_1.__exportStar(require("./WilmaAgents"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./schemas/schemas_0"), exports);
9
+ tslib_1.__exportStar(require("./models/enums"), exports);
10
+ tslib_1.__exportStar(require("./models/errors"), exports);
11
+ tslib_1.__exportStar(require("./models/models_0"), exports);
12
+ var WilmaAgentsServiceException_1 = require("./models/WilmaAgentsServiceException");
13
+ Object.defineProperty(exports, "WilmaAgentsServiceException", { enumerable: true, get: function () { return WilmaAgentsServiceException_1.WilmaAgentsServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WilmaAgentsServiceException = exports.__ServiceException = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
6
+ class WilmaAgentsServiceException extends client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, WilmaAgentsServiceException.prototype);
10
+ }
11
+ }
12
+ exports.WilmaAgentsServiceException = WilmaAgentsServiceException;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuardrailAction = exports.GuardrailPiiEntityType = exports.GuardrailPiiAction = exports.GuardrailFilterStrength = exports.GuardrailContentCategory = exports.AuditResourceType = exports.AuditAction = exports.ChannelType = exports.AgentFileScope = exports.AgentStatus = exports.AgentVariableType = exports.WebSearchContextSize = exports.SandboxNetworkAccess = exports.WebhookMethod = exports.SpeechProvider = exports.AgentVisibility = exports.AgentGrantPermission = exports.ActorType = void 0;
4
+ exports.ActorType = {
5
+ API_KEY: "api_key",
6
+ SERVICE: "service",
7
+ USER: "user",
8
+ };
9
+ exports.AgentGrantPermission = {
10
+ EDIT: "edit",
11
+ USE: "use",
12
+ VIEW: "view",
13
+ };
14
+ exports.AgentVisibility = {
15
+ EXPLICIT: "explicit",
16
+ ORGANIZATION: "organization",
17
+ };
18
+ exports.SpeechProvider = {
19
+ ELEVENLABS: "elevenlabs",
20
+ GOOGLE: "google",
21
+ };
22
+ exports.WebhookMethod = {
23
+ DELETE: "delete",
24
+ GET: "get",
25
+ PATCH: "patch",
26
+ POST: "post",
27
+ PUT: "put",
28
+ };
29
+ exports.SandboxNetworkAccess = {
30
+ ALL: "allow-all",
31
+ ALLOWLIST: "allowlist",
32
+ NONE: "deny-all",
33
+ };
34
+ exports.WebSearchContextSize = {
35
+ HIGH: "high",
36
+ LOW: "low",
37
+ MEDIUM: "medium",
38
+ };
39
+ exports.AgentVariableType = {
40
+ BOOLEAN: "boolean",
41
+ NUMBER: "number",
42
+ NUMBER_ARRAY: "number_array",
43
+ STRING: "string",
44
+ STRING_ARRAY: "string_array",
45
+ };
46
+ exports.AgentStatus = {
47
+ ACTIVE: "active",
48
+ ARCHIVED: "archived",
49
+ DRAFT: "draft",
50
+ };
51
+ exports.AgentFileScope = {
52
+ AGENT: "agent",
53
+ USER: "user",
54
+ };
55
+ exports.ChannelType = {
56
+ API: "api",
57
+ ASSISTANT: "assistant",
58
+ CHAT: "chat",
59
+ VOICE: "voice",
60
+ };
61
+ exports.AuditAction = {
62
+ ALIAS_DELETED: "alias_deleted",
63
+ ALIAS_UPDATED: "alias_updated",
64
+ API_KEY_CREATED: "api_key_created",
65
+ API_KEY_DELETED: "api_key_deleted",
66
+ ARCHIVED: "archived",
67
+ CREATED: "created",
68
+ DELETED: "deleted",
69
+ EVALUATION_CANCELLED: "evaluation_cancelled",
70
+ EVALUATION_STARTED: "evaluation_started",
71
+ PUBLISHED: "published",
72
+ UPDATED: "updated",
73
+ };
74
+ exports.AuditResourceType = {
75
+ AGENT: "agent",
76
+ AGENT_ALIAS: "agent_alias",
77
+ AGENT_API_KEY: "agent_api_key",
78
+ AGENT_VERSION: "agent_version",
79
+ DATASET: "dataset",
80
+ EVALUATION: "evaluation",
81
+ EVALUATOR: "evaluator",
82
+ GUARDRAIL: "guardrail",
83
+ SKILL: "skill",
84
+ TEST_CASE: "test_case",
85
+ };
86
+ exports.GuardrailContentCategory = {
87
+ HATE: "hate",
88
+ INSULTS: "insults",
89
+ MISCONDUCT: "misconduct",
90
+ PROMPT_ATTACK: "prompt_attack",
91
+ SEXUAL: "sexual",
92
+ VIOLENCE: "violence",
93
+ };
94
+ exports.GuardrailFilterStrength = {
95
+ HIGH: "high",
96
+ LOW: "low",
97
+ MEDIUM: "medium",
98
+ NONE: "none",
99
+ };
100
+ exports.GuardrailPiiAction = {
101
+ ANONYMIZE: "anonymize",
102
+ BLOCK: "block",
103
+ };
104
+ exports.GuardrailPiiEntityType = {
105
+ ADDRESS: "address",
106
+ CREDIT_CARD: "credit_card",
107
+ CUSTOM: "custom",
108
+ EMAIL: "email",
109
+ IBAN: "iban",
110
+ NAME: "name",
111
+ NATIONAL_ID: "national_id",
112
+ PASSWORD: "password",
113
+ PHONE_NUMBER: "phone_number",
114
+ };
115
+ exports.GuardrailAction = {
116
+ BLOCK: "block",
117
+ DETECT: "detect",
118
+ };
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RevisionConflictException = exports.NothingToPublishException = exports.GuardrailNotFoundException = exports.GuardrailInUseException = exports.AgentVersionNotFoundException = exports.AgentNotFoundException = exports.AgentNonUniqueNameException = exports.AgentApiKeyNotFoundException = exports.AgentAliasNotFoundException = exports.ValidationException = void 0;
4
+ const WilmaAgentsServiceException_1 = require("./WilmaAgentsServiceException");
5
+ class ValidationException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
6
+ name = "ValidationException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "ValidationException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, ValidationException.prototype);
15
+ }
16
+ }
17
+ exports.ValidationException = ValidationException;
18
+ class AgentAliasNotFoundException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
19
+ name = "AgentAliasNotFoundException";
20
+ $fault = "client";
21
+ type;
22
+ constructor(opts) {
23
+ super({
24
+ name: "AgentAliasNotFoundException",
25
+ $fault: "client",
26
+ ...opts,
27
+ });
28
+ Object.setPrototypeOf(this, AgentAliasNotFoundException.prototype);
29
+ this.type = opts.type;
30
+ }
31
+ }
32
+ exports.AgentAliasNotFoundException = AgentAliasNotFoundException;
33
+ class AgentApiKeyNotFoundException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
34
+ name = "AgentApiKeyNotFoundException";
35
+ $fault = "client";
36
+ type;
37
+ constructor(opts) {
38
+ super({
39
+ name: "AgentApiKeyNotFoundException",
40
+ $fault: "client",
41
+ ...opts,
42
+ });
43
+ Object.setPrototypeOf(this, AgentApiKeyNotFoundException.prototype);
44
+ this.type = opts.type;
45
+ }
46
+ }
47
+ exports.AgentApiKeyNotFoundException = AgentApiKeyNotFoundException;
48
+ class AgentNonUniqueNameException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
49
+ name = "AgentNonUniqueNameException";
50
+ $fault = "client";
51
+ type;
52
+ constructor(opts) {
53
+ super({
54
+ name: "AgentNonUniqueNameException",
55
+ $fault: "client",
56
+ ...opts,
57
+ });
58
+ Object.setPrototypeOf(this, AgentNonUniqueNameException.prototype);
59
+ this.type = opts.type;
60
+ }
61
+ }
62
+ exports.AgentNonUniqueNameException = AgentNonUniqueNameException;
63
+ class AgentNotFoundException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
64
+ name = "AgentNotFoundException";
65
+ $fault = "client";
66
+ type;
67
+ constructor(opts) {
68
+ super({
69
+ name: "AgentNotFoundException",
70
+ $fault: "client",
71
+ ...opts,
72
+ });
73
+ Object.setPrototypeOf(this, AgentNotFoundException.prototype);
74
+ this.type = opts.type;
75
+ }
76
+ }
77
+ exports.AgentNotFoundException = AgentNotFoundException;
78
+ class AgentVersionNotFoundException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
79
+ name = "AgentVersionNotFoundException";
80
+ $fault = "client";
81
+ type;
82
+ constructor(opts) {
83
+ super({
84
+ name: "AgentVersionNotFoundException",
85
+ $fault: "client",
86
+ ...opts,
87
+ });
88
+ Object.setPrototypeOf(this, AgentVersionNotFoundException.prototype);
89
+ this.type = opts.type;
90
+ }
91
+ }
92
+ exports.AgentVersionNotFoundException = AgentVersionNotFoundException;
93
+ class GuardrailInUseException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
94
+ name = "GuardrailInUseException";
95
+ $fault = "client";
96
+ type;
97
+ constructor(opts) {
98
+ super({
99
+ name: "GuardrailInUseException",
100
+ $fault: "client",
101
+ ...opts,
102
+ });
103
+ Object.setPrototypeOf(this, GuardrailInUseException.prototype);
104
+ this.type = opts.type;
105
+ }
106
+ }
107
+ exports.GuardrailInUseException = GuardrailInUseException;
108
+ class GuardrailNotFoundException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
109
+ name = "GuardrailNotFoundException";
110
+ $fault = "client";
111
+ type;
112
+ constructor(opts) {
113
+ super({
114
+ name: "GuardrailNotFoundException",
115
+ $fault: "client",
116
+ ...opts,
117
+ });
118
+ Object.setPrototypeOf(this, GuardrailNotFoundException.prototype);
119
+ this.type = opts.type;
120
+ }
121
+ }
122
+ exports.GuardrailNotFoundException = GuardrailNotFoundException;
123
+ class NothingToPublishException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
124
+ name = "NothingToPublishException";
125
+ $fault = "client";
126
+ type;
127
+ constructor(opts) {
128
+ super({
129
+ name: "NothingToPublishException",
130
+ $fault: "client",
131
+ ...opts,
132
+ });
133
+ Object.setPrototypeOf(this, NothingToPublishException.prototype);
134
+ this.type = opts.type;
135
+ }
136
+ }
137
+ exports.NothingToPublishException = NothingToPublishException;
138
+ class RevisionConflictException extends WilmaAgentsServiceException_1.WilmaAgentsServiceException {
139
+ name = "RevisionConflictException";
140
+ $fault = "client";
141
+ type;
142
+ currentRevision;
143
+ constructor(opts) {
144
+ super({
145
+ name: "RevisionConflictException",
146
+ $fault: "client",
147
+ ...opts,
148
+ });
149
+ Object.setPrototypeOf(this, RevisionConflictException.prototype);
150
+ this.type = opts.type;
151
+ this.currentRevision = opts.currentRevision;
152
+ }
153
+ }
154
+ exports.RevisionConflictException = RevisionConflictException;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const client_1 = require("@aws-sdk/core/client");
8
+ const client_2 = require("@smithy/core/client");
9
+ const config_1 = require("@smithy/core/config");
10
+ const retry_1 = require("@smithy/core/retry");
11
+ const serde_1 = require("@smithy/core/serde");
12
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const getRuntimeConfig = (config) => {
15
+ const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
17
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "browser",
22
+ defaultsMode,
23
+ bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ clientVersion: package_json_1.default.version }),
25
+ maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
26
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
28
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
29
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
30
+ };
31
+ };
32
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_1 = require("@aws-sdk/core/client");
7
+ const client_2 = require("@smithy/core/client");
8
+ const config_1 = require("@smithy/core/config");
9
+ const retry_1 = require("@smithy/core/retry");
10
+ const serde_1 = require("@smithy/core/serde");
11
+ const node_http_handler_1 = require("@smithy/node-http-handler");
12
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
13
+ const getRuntimeConfig = (config) => {
14
+ (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
15
+ const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
17
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
18
+ const loaderConfig = {
19
+ profile: config?.profile,
20
+ logger: clientSharedValues.logger,
21
+ };
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
30
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ??
32
+ (0, config_1.loadConfig)({
33
+ ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
34
+ default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
35
+ }, config),
36
+ sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
37
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
38
+ userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
39
+ };
40
+ };
41
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const protocols_1 = require("@aws-sdk/core/protocols");
5
+ const core_1 = require("@smithy/core");
6
+ const client_1 = require("@smithy/core/client");
7
+ const protocols_2 = require("@smithy/core/protocols");
8
+ const serde_1 = require("@smithy/core/serde");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
10
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
11
+ const schemas_0_1 = require("./schemas/schemas_0");
12
+ const getRuntimeConfig = (config) => {
13
+ return {
14
+ apiVersion: "v1",
15
+ base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
16
+ base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
17
+ disableHostPrefix: config?.disableHostPrefix ?? false,
18
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
19
+ extensions: config?.extensions ?? [],
20
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultWilmaAgentsHttpAuthSchemeProvider,
21
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
22
+ {
23
+ schemeId: "smithy.api#httpBearerAuth",
24
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
25
+ signer: new core_1.HttpBearerAuthSigner(),
26
+ },
27
+ ],
28
+ logger: config?.logger ?? new client_1.NoOpLogger(),
29
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
30
+ protocolSettings: config?.protocolSettings ?? {
31
+ defaultNamespace: "wildix.wilma.agents",
32
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
33
+ version: "v1",
34
+ serviceTarget: "WilmaAgents",
35
+ },
36
+ urlParser: config?.urlParser ?? protocols_2.parseUrl,
37
+ utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
38
+ utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
39
+ };
40
+ };
41
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ const protocols_1 = require("@smithy/core/protocols");
6
+ const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
7
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
8
+ const extensionConfiguration = Object.assign((0, client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocols_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
9
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
10
+ return Object.assign(runtimeConfig, (0, client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocols_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
11
+ };
12
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;