@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.
- package/dist-cjs/WilmaAgents.js +57 -0
- package/dist-cjs/WilmaAgentsClient.js +49 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +58 -0
- package/dist-cjs/commands/CompareAgentVersionsCommand.js +20 -0
- package/dist-cjs/commands/CreateAgentApiKeyCommand.js +20 -0
- package/dist-cjs/commands/CreateAgentCommand.js +20 -0
- package/dist-cjs/commands/CreateGuardrailCommand.js +20 -0
- package/dist-cjs/commands/DeleteAgentAliasCommand.js +20 -0
- package/dist-cjs/commands/DeleteAgentApiKeyCommand.js +20 -0
- package/dist-cjs/commands/DeleteAgentCommand.js +20 -0
- package/dist-cjs/commands/DeleteGuardrailCommand.js +20 -0
- package/dist-cjs/commands/ExecuteAgentCommand.js +20 -0
- package/dist-cjs/commands/GetAgentCommand.js +20 -0
- package/dist-cjs/commands/GetAgentVersionCommand.js +20 -0
- package/dist-cjs/commands/GetGuardrailCommand.js +20 -0
- package/dist-cjs/commands/ListAgentAliasesCommand.js +20 -0
- package/dist-cjs/commands/ListAgentApiKeysCommand.js +20 -0
- package/dist-cjs/commands/ListAgentVersionsCommand.js +20 -0
- package/dist-cjs/commands/ListAgentsCommand.js +20 -0
- package/dist-cjs/commands/ListAgentsNamesCommand.js +20 -0
- package/dist-cjs/commands/ListAuditRecordsCommand.js +20 -0
- package/dist-cjs/commands/ListGuardrailsCommand.js +20 -0
- package/dist-cjs/commands/PublishAgentVersionCommand.js +20 -0
- package/dist-cjs/commands/PutAgentAliasCommand.js +20 -0
- package/dist-cjs/commands/UpdateAgentCommand.js +20 -0
- package/dist-cjs/commands/UpdateGuardrailCommand.js +20 -0
- package/dist-cjs/commands/index.js +26 -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/WilmaAgentsServiceException.js +12 -0
- package/dist-cjs/models/enums.js +118 -0
- package/dist-cjs/models/errors.js +154 -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 +1168 -0
- package/dist-es/WilmaAgents.js +53 -0
- package/dist-es/WilmaAgentsClient.js +45 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +52 -0
- package/dist-es/commands/CompareAgentVersionsCommand.js +16 -0
- package/dist-es/commands/CreateAgentApiKeyCommand.js +16 -0
- package/dist-es/commands/CreateAgentCommand.js +16 -0
- package/dist-es/commands/CreateGuardrailCommand.js +16 -0
- package/dist-es/commands/DeleteAgentAliasCommand.js +16 -0
- package/dist-es/commands/DeleteAgentApiKeyCommand.js +16 -0
- package/dist-es/commands/DeleteAgentCommand.js +16 -0
- package/dist-es/commands/DeleteGuardrailCommand.js +16 -0
- package/dist-es/commands/ExecuteAgentCommand.js +16 -0
- package/dist-es/commands/GetAgentCommand.js +16 -0
- package/dist-es/commands/GetAgentVersionCommand.js +16 -0
- package/dist-es/commands/GetGuardrailCommand.js +16 -0
- package/dist-es/commands/ListAgentAliasesCommand.js +16 -0
- package/dist-es/commands/ListAgentApiKeysCommand.js +16 -0
- package/dist-es/commands/ListAgentVersionsCommand.js +16 -0
- package/dist-es/commands/ListAgentsCommand.js +16 -0
- package/dist-es/commands/ListAgentsNamesCommand.js +16 -0
- package/dist-es/commands/ListAuditRecordsCommand.js +16 -0
- package/dist-es/commands/ListGuardrailsCommand.js +16 -0
- package/dist-es/commands/PublishAgentVersionCommand.js +16 -0
- package/dist-es/commands/PutAgentAliasCommand.js +16 -0
- package/dist-es/commands/UpdateAgentCommand.js +16 -0
- package/dist-es/commands/UpdateGuardrailCommand.js +16 -0
- package/dist-es/commands/index.js +23 -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/WilmaAgentsServiceException.js +8 -0
- package/dist-es/models/enums.js +115 -0
- package/dist-es/models/errors.js +141 -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 +1162 -0
- package/dist-types/WilmaAgents.d.ts +182 -0
- package/dist-types/WilmaAgentsClient.d.ts +192 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CompareAgentVersionsCommand.d.ts +91 -0
- package/dist-types/commands/CreateAgentApiKeyCommand.d.ts +96 -0
- package/dist-types/commands/CreateAgentCommand.d.ts +654 -0
- package/dist-types/commands/CreateGuardrailCommand.d.ts +172 -0
- package/dist-types/commands/DeleteAgentAliasCommand.d.ts +82 -0
- package/dist-types/commands/DeleteAgentApiKeyCommand.d.ts +82 -0
- package/dist-types/commands/DeleteAgentCommand.d.ts +77 -0
- package/dist-types/commands/DeleteGuardrailCommand.d.ts +80 -0
- package/dist-types/commands/ExecuteAgentCommand.d.ts +112 -0
- package/dist-types/commands/GetAgentCommand.d.ts +386 -0
- package/dist-types/commands/GetAgentVersionCommand.d.ts +365 -0
- package/dist-types/commands/GetGuardrailCommand.d.ts +135 -0
- package/dist-types/commands/ListAgentAliasesCommand.d.ts +99 -0
- package/dist-types/commands/ListAgentApiKeysCommand.d.ts +95 -0
- package/dist-types/commands/ListAgentVersionsCommand.d.ts +99 -0
- package/dist-types/commands/ListAgentsCommand.d.ts +391 -0
- package/dist-types/commands/ListAgentsNamesCommand.d.ts +90 -0
- package/dist-types/commands/ListAuditRecordsCommand.d.ts +109 -0
- package/dist-types/commands/ListGuardrailsCommand.d.ts +137 -0
- package/dist-types/commands/PublishAgentVersionCommand.d.ts +370 -0
- package/dist-types/commands/PutAgentAliasCommand.d.ts +107 -0
- package/dist-types/commands/UpdateAgentCommand.d.ts +661 -0
- package/dist-types/commands/UpdateGuardrailCommand.d.ts +175 -0
- package/dist-types/commands/index.d.ts +23 -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 +23 -0
- package/dist-types/models/WilmaAgentsServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +301 -0
- package/dist-types/models/errors.d.ts +129 -0
- package/dist-types/models/models_0.d.ts +2186 -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 +160 -0
- package/package.json +57 -0
|
@@ -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 "./WilmaAgentsClient";
|
|
2
|
+
export * from "./WilmaAgents";
|
|
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 { WilmaAgentsServiceException } from "./models/WilmaAgentsServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class WilmaAgentsServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, WilmaAgentsServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export const ActorType = {
|
|
2
|
+
API_KEY: "api_key",
|
|
3
|
+
SERVICE: "service",
|
|
4
|
+
USER: "user",
|
|
5
|
+
};
|
|
6
|
+
export const AgentGrantPermission = {
|
|
7
|
+
EDIT: "edit",
|
|
8
|
+
USE: "use",
|
|
9
|
+
VIEW: "view",
|
|
10
|
+
};
|
|
11
|
+
export const AgentVisibility = {
|
|
12
|
+
EXPLICIT: "explicit",
|
|
13
|
+
ORGANIZATION: "organization",
|
|
14
|
+
};
|
|
15
|
+
export const SpeechProvider = {
|
|
16
|
+
ELEVENLABS: "elevenlabs",
|
|
17
|
+
GOOGLE: "google",
|
|
18
|
+
};
|
|
19
|
+
export const WebhookMethod = {
|
|
20
|
+
DELETE: "delete",
|
|
21
|
+
GET: "get",
|
|
22
|
+
PATCH: "patch",
|
|
23
|
+
POST: "post",
|
|
24
|
+
PUT: "put",
|
|
25
|
+
};
|
|
26
|
+
export const SandboxNetworkAccess = {
|
|
27
|
+
ALL: "allow-all",
|
|
28
|
+
ALLOWLIST: "allowlist",
|
|
29
|
+
NONE: "deny-all",
|
|
30
|
+
};
|
|
31
|
+
export const WebSearchContextSize = {
|
|
32
|
+
HIGH: "high",
|
|
33
|
+
LOW: "low",
|
|
34
|
+
MEDIUM: "medium",
|
|
35
|
+
};
|
|
36
|
+
export const AgentVariableType = {
|
|
37
|
+
BOOLEAN: "boolean",
|
|
38
|
+
NUMBER: "number",
|
|
39
|
+
NUMBER_ARRAY: "number_array",
|
|
40
|
+
STRING: "string",
|
|
41
|
+
STRING_ARRAY: "string_array",
|
|
42
|
+
};
|
|
43
|
+
export const AgentStatus = {
|
|
44
|
+
ACTIVE: "active",
|
|
45
|
+
ARCHIVED: "archived",
|
|
46
|
+
DRAFT: "draft",
|
|
47
|
+
};
|
|
48
|
+
export const AgentFileScope = {
|
|
49
|
+
AGENT: "agent",
|
|
50
|
+
USER: "user",
|
|
51
|
+
};
|
|
52
|
+
export const ChannelType = {
|
|
53
|
+
API: "api",
|
|
54
|
+
ASSISTANT: "assistant",
|
|
55
|
+
CHAT: "chat",
|
|
56
|
+
VOICE: "voice",
|
|
57
|
+
};
|
|
58
|
+
export const AuditAction = {
|
|
59
|
+
ALIAS_DELETED: "alias_deleted",
|
|
60
|
+
ALIAS_UPDATED: "alias_updated",
|
|
61
|
+
API_KEY_CREATED: "api_key_created",
|
|
62
|
+
API_KEY_DELETED: "api_key_deleted",
|
|
63
|
+
ARCHIVED: "archived",
|
|
64
|
+
CREATED: "created",
|
|
65
|
+
DELETED: "deleted",
|
|
66
|
+
EVALUATION_CANCELLED: "evaluation_cancelled",
|
|
67
|
+
EVALUATION_STARTED: "evaluation_started",
|
|
68
|
+
PUBLISHED: "published",
|
|
69
|
+
UPDATED: "updated",
|
|
70
|
+
};
|
|
71
|
+
export const AuditResourceType = {
|
|
72
|
+
AGENT: "agent",
|
|
73
|
+
AGENT_ALIAS: "agent_alias",
|
|
74
|
+
AGENT_API_KEY: "agent_api_key",
|
|
75
|
+
AGENT_VERSION: "agent_version",
|
|
76
|
+
DATASET: "dataset",
|
|
77
|
+
EVALUATION: "evaluation",
|
|
78
|
+
EVALUATOR: "evaluator",
|
|
79
|
+
GUARDRAIL: "guardrail",
|
|
80
|
+
SKILL: "skill",
|
|
81
|
+
TEST_CASE: "test_case",
|
|
82
|
+
};
|
|
83
|
+
export const GuardrailContentCategory = {
|
|
84
|
+
HATE: "hate",
|
|
85
|
+
INSULTS: "insults",
|
|
86
|
+
MISCONDUCT: "misconduct",
|
|
87
|
+
PROMPT_ATTACK: "prompt_attack",
|
|
88
|
+
SEXUAL: "sexual",
|
|
89
|
+
VIOLENCE: "violence",
|
|
90
|
+
};
|
|
91
|
+
export const GuardrailFilterStrength = {
|
|
92
|
+
HIGH: "high",
|
|
93
|
+
LOW: "low",
|
|
94
|
+
MEDIUM: "medium",
|
|
95
|
+
NONE: "none",
|
|
96
|
+
};
|
|
97
|
+
export const GuardrailPiiAction = {
|
|
98
|
+
ANONYMIZE: "anonymize",
|
|
99
|
+
BLOCK: "block",
|
|
100
|
+
};
|
|
101
|
+
export const GuardrailPiiEntityType = {
|
|
102
|
+
ADDRESS: "address",
|
|
103
|
+
CREDIT_CARD: "credit_card",
|
|
104
|
+
CUSTOM: "custom",
|
|
105
|
+
EMAIL: "email",
|
|
106
|
+
IBAN: "iban",
|
|
107
|
+
NAME: "name",
|
|
108
|
+
NATIONAL_ID: "national_id",
|
|
109
|
+
PASSWORD: "password",
|
|
110
|
+
PHONE_NUMBER: "phone_number",
|
|
111
|
+
};
|
|
112
|
+
export const GuardrailAction = {
|
|
113
|
+
BLOCK: "block",
|
|
114
|
+
DETECT: "detect",
|
|
115
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { WilmaAgentsServiceException as __BaseException } from "./WilmaAgentsServiceException";
|
|
2
|
+
export class ValidationException extends __BaseException {
|
|
3
|
+
name = "ValidationException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "ValidationException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class AgentAliasNotFoundException extends __BaseException {
|
|
15
|
+
name = "AgentAliasNotFoundException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
type;
|
|
18
|
+
constructor(opts) {
|
|
19
|
+
super({
|
|
20
|
+
name: "AgentAliasNotFoundException",
|
|
21
|
+
$fault: "client",
|
|
22
|
+
...opts,
|
|
23
|
+
});
|
|
24
|
+
Object.setPrototypeOf(this, AgentAliasNotFoundException.prototype);
|
|
25
|
+
this.type = opts.type;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class AgentApiKeyNotFoundException extends __BaseException {
|
|
29
|
+
name = "AgentApiKeyNotFoundException";
|
|
30
|
+
$fault = "client";
|
|
31
|
+
type;
|
|
32
|
+
constructor(opts) {
|
|
33
|
+
super({
|
|
34
|
+
name: "AgentApiKeyNotFoundException",
|
|
35
|
+
$fault: "client",
|
|
36
|
+
...opts,
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, AgentApiKeyNotFoundException.prototype);
|
|
39
|
+
this.type = opts.type;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class AgentNonUniqueNameException extends __BaseException {
|
|
43
|
+
name = "AgentNonUniqueNameException";
|
|
44
|
+
$fault = "client";
|
|
45
|
+
type;
|
|
46
|
+
constructor(opts) {
|
|
47
|
+
super({
|
|
48
|
+
name: "AgentNonUniqueNameException",
|
|
49
|
+
$fault: "client",
|
|
50
|
+
...opts,
|
|
51
|
+
});
|
|
52
|
+
Object.setPrototypeOf(this, AgentNonUniqueNameException.prototype);
|
|
53
|
+
this.type = opts.type;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export class AgentNotFoundException extends __BaseException {
|
|
57
|
+
name = "AgentNotFoundException";
|
|
58
|
+
$fault = "client";
|
|
59
|
+
type;
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "AgentNotFoundException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
Object.setPrototypeOf(this, AgentNotFoundException.prototype);
|
|
67
|
+
this.type = opts.type;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export class AgentVersionNotFoundException extends __BaseException {
|
|
71
|
+
name = "AgentVersionNotFoundException";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
type;
|
|
74
|
+
constructor(opts) {
|
|
75
|
+
super({
|
|
76
|
+
name: "AgentVersionNotFoundException",
|
|
77
|
+
$fault: "client",
|
|
78
|
+
...opts,
|
|
79
|
+
});
|
|
80
|
+
Object.setPrototypeOf(this, AgentVersionNotFoundException.prototype);
|
|
81
|
+
this.type = opts.type;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export class GuardrailInUseException extends __BaseException {
|
|
85
|
+
name = "GuardrailInUseException";
|
|
86
|
+
$fault = "client";
|
|
87
|
+
type;
|
|
88
|
+
constructor(opts) {
|
|
89
|
+
super({
|
|
90
|
+
name: "GuardrailInUseException",
|
|
91
|
+
$fault: "client",
|
|
92
|
+
...opts,
|
|
93
|
+
});
|
|
94
|
+
Object.setPrototypeOf(this, GuardrailInUseException.prototype);
|
|
95
|
+
this.type = opts.type;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
export class GuardrailNotFoundException extends __BaseException {
|
|
99
|
+
name = "GuardrailNotFoundException";
|
|
100
|
+
$fault = "client";
|
|
101
|
+
type;
|
|
102
|
+
constructor(opts) {
|
|
103
|
+
super({
|
|
104
|
+
name: "GuardrailNotFoundException",
|
|
105
|
+
$fault: "client",
|
|
106
|
+
...opts,
|
|
107
|
+
});
|
|
108
|
+
Object.setPrototypeOf(this, GuardrailNotFoundException.prototype);
|
|
109
|
+
this.type = opts.type;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export class NothingToPublishException extends __BaseException {
|
|
113
|
+
name = "NothingToPublishException";
|
|
114
|
+
$fault = "client";
|
|
115
|
+
type;
|
|
116
|
+
constructor(opts) {
|
|
117
|
+
super({
|
|
118
|
+
name: "NothingToPublishException",
|
|
119
|
+
$fault: "client",
|
|
120
|
+
...opts,
|
|
121
|
+
});
|
|
122
|
+
Object.setPrototypeOf(this, NothingToPublishException.prototype);
|
|
123
|
+
this.type = opts.type;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export class RevisionConflictException extends __BaseException {
|
|
127
|
+
name = "RevisionConflictException";
|
|
128
|
+
$fault = "client";
|
|
129
|
+
type;
|
|
130
|
+
currentRevision;
|
|
131
|
+
constructor(opts) {
|
|
132
|
+
super({
|
|
133
|
+
name: "RevisionConflictException",
|
|
134
|
+
$fault: "client",
|
|
135
|
+
...opts,
|
|
136
|
+
});
|
|
137
|
+
Object.setPrototypeOf(this, RevisionConflictException.prototype);
|
|
138
|
+
this.type = opts.type;
|
|
139
|
+
this.currentRevision = opts.currentRevision;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
|
+
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
4
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
5
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
6
|
+
import { defaultWilmaAgentsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
return {
|
|
11
|
+
apiVersion: "v1",
|
|
12
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
14
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
16
|
+
extensions: config?.extensions ?? [],
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultWilmaAgentsHttpAuthSchemeProvider,
|
|
18
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
+
{
|
|
20
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
21
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
|
|
22
|
+
signer: new HttpBearerAuthSigner(),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
27
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
+
defaultNamespace: "wildix.wilma.agents",
|
|
29
|
+
errorTypeRegistries,
|
|
30
|
+
version: "v1",
|
|
31
|
+
serviceTarget: "WilmaAgents",
|
|
32
|
+
},
|
|
33
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
34
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
35
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
3
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
4
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
5
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
6
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
7
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
8
|
+
};
|