@wildix/wim-tools-client 1.0.6 → 4.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/Tools.js +3 -3
- package/dist-cjs/ToolsClient.js +34 -25
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/commands/CreateToolCommand.js +10 -11
- package/dist-cjs/commands/DeleteToolCommand.js +10 -11
- package/dist-cjs/commands/DescribeToolsCommand.js +10 -11
- package/dist-cjs/commands/DiscoverToolsCommand.js +10 -11
- package/dist-cjs/commands/ExecuteToolCommand.js +10 -11
- package/dist-cjs/commands/GetToolCommand.js +10 -11
- package/dist-cjs/commands/ListToolsCommand.js +10 -11
- package/dist-cjs/commands/UpdateToolCommand.js +10 -11
- 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/index.js +4 -1
- package/dist-cjs/models/ToolsServiceException.js +3 -3
- package/dist-cjs/models/enums.js +18 -0
- package/dist-cjs/models/errors.js +99 -0
- package/dist-cjs/models/models_0.js +0 -183
- package/dist-cjs/runtimeConfig.browser.js +11 -11
- package/dist-cjs/runtimeConfig.js +22 -18
- package/dist-cjs/runtimeConfig.shared.js +30 -10
- package/dist-cjs/runtimeExtensions.js +6 -5
- package/dist-cjs/schemas/schemas_0.js +458 -0
- package/dist-es/Tools.js +4 -4
- package/dist-es/ToolsClient.js +30 -21
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/CreateToolCommand.js +9 -10
- package/dist-es/commands/DeleteToolCommand.js +9 -10
- package/dist-es/commands/DescribeToolsCommand.js +9 -10
- package/dist-es/commands/DiscoverToolsCommand.js +9 -10
- package/dist-es/commands/ExecuteToolCommand.js +9 -10
- package/dist-es/commands/GetToolCommand.js +9 -10
- package/dist-es/commands/ListToolsCommand.js +9 -10
- package/dist-es/commands/UpdateToolCommand.js +9 -10
- 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/index.js +4 -1
- package/dist-es/models/ToolsServiceException.js +1 -1
- package/dist-es/models/enums.js +15 -0
- package/dist-es/models/errors.js +89 -0
- package/dist-es/models/models_0.js +1 -175
- package/dist-es/runtimeConfig.browser.js +7 -7
- package/dist-es/runtimeConfig.js +17 -13
- package/dist-es/runtimeConfig.shared.js +24 -4
- package/dist-es/runtimeExtensions.js +6 -5
- package/dist-es/schemas/schemas_0.js +454 -0
- package/dist-types/Tools.d.ts +9 -9
- package/dist-types/ToolsClient.d.ts +38 -21
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CreateToolCommand.d.ts +11 -13
- package/dist-types/commands/DeleteToolCommand.d.ts +11 -7
- package/dist-types/commands/DescribeToolsCommand.d.ts +11 -7
- package/dist-types/commands/DiscoverToolsCommand.d.ts +11 -7
- package/dist-types/commands/ExecuteToolCommand.d.ts +11 -7
- package/dist-types/commands/GetToolCommand.d.ts +11 -10
- package/dist-types/commands/ListToolsCommand.d.ts +11 -10
- package/dist-types/commands/UpdateToolCommand.d.ts +11 -13
- 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 +4 -3
- package/dist-types/index.d.ts +5 -1
- package/dist-types/models/ToolsServiceException.d.ts +1 -1
- package/dist-types/models/enums.d.ts +31 -0
- package/dist-types/models/errors.d.ts +90 -0
- package/dist-types/models/models_0.d.ts +33 -182
- package/dist-types/runtimeConfig.browser.d.ts +35 -17
- package/dist-types/runtimeConfig.d.ts +34 -16
- package/dist-types/runtimeConfig.native.d.ts +36 -18
- package/dist-types/runtimeConfig.shared.d.ts +20 -3
- package/dist-types/runtimeExtensions.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +66 -0
- package/package.json +13 -38
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/protocols/Aws_restJson1.js +0 -518
- package/dist-es/models/index.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -499
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -74
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ValidationException = exports.UnauthorizedException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
|
|
4
|
+
const ToolsServiceException_1 = require("./ToolsServiceException");
|
|
5
|
+
class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
|
|
6
|
+
name = "AlreadyExistException";
|
|
7
|
+
$fault = "client";
|
|
8
|
+
constructor(opts) {
|
|
9
|
+
super({
|
|
10
|
+
name: "AlreadyExistException",
|
|
11
|
+
$fault: "client",
|
|
12
|
+
...opts,
|
|
13
|
+
});
|
|
14
|
+
Object.setPrototypeOf(this, AlreadyExistException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.AlreadyExistException = AlreadyExistException;
|
|
18
|
+
class ForbiddenException extends ToolsServiceException_1.ToolsServiceException {
|
|
19
|
+
name = "ForbiddenException";
|
|
20
|
+
$fault = "client";
|
|
21
|
+
constructor(opts) {
|
|
22
|
+
super({
|
|
23
|
+
name: "ForbiddenException",
|
|
24
|
+
$fault: "client",
|
|
25
|
+
...opts,
|
|
26
|
+
});
|
|
27
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ForbiddenException = ForbiddenException;
|
|
31
|
+
class NotFoundException extends ToolsServiceException_1.ToolsServiceException {
|
|
32
|
+
name = "NotFoundException";
|
|
33
|
+
$fault = "client";
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
super({
|
|
36
|
+
name: "NotFoundException",
|
|
37
|
+
$fault: "client",
|
|
38
|
+
...opts,
|
|
39
|
+
});
|
|
40
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.NotFoundException = NotFoundException;
|
|
44
|
+
class UnauthorizedException extends ToolsServiceException_1.ToolsServiceException {
|
|
45
|
+
name = "UnauthorizedException";
|
|
46
|
+
$fault = "client";
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "UnauthorizedException",
|
|
50
|
+
$fault: "client",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.UnauthorizedException = UnauthorizedException;
|
|
57
|
+
class ValidationException extends ToolsServiceException_1.ToolsServiceException {
|
|
58
|
+
name = "ValidationException";
|
|
59
|
+
$fault = "client";
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ValidationException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ValidationException = ValidationException;
|
|
70
|
+
class ToolExecutionException extends ToolsServiceException_1.ToolsServiceException {
|
|
71
|
+
name = "ToolExecutionException";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
details;
|
|
74
|
+
constructor(opts) {
|
|
75
|
+
super({
|
|
76
|
+
name: "ToolExecutionException",
|
|
77
|
+
$fault: "client",
|
|
78
|
+
...opts,
|
|
79
|
+
});
|
|
80
|
+
Object.setPrototypeOf(this, ToolExecutionException.prototype);
|
|
81
|
+
this.details = opts.details;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.ToolExecutionException = ToolExecutionException;
|
|
85
|
+
class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceException {
|
|
86
|
+
name = "ToolExecutionServerException";
|
|
87
|
+
$fault = "server";
|
|
88
|
+
details;
|
|
89
|
+
constructor(opts) {
|
|
90
|
+
super({
|
|
91
|
+
name: "ToolExecutionServerException",
|
|
92
|
+
$fault: "server",
|
|
93
|
+
...opts,
|
|
94
|
+
});
|
|
95
|
+
Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
|
|
96
|
+
this.details = opts.details;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.ToolExecutionServerException = ToolExecutionServerException;
|
|
@@ -1,185 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolMcpAuthorization = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolCalendarOperation = exports.ValidationException = exports.UnauthorizedException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
|
|
4
|
-
const ToolsServiceException_1 = require("./ToolsServiceException");
|
|
5
|
-
class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
|
|
6
|
-
name = "AlreadyExistException";
|
|
7
|
-
$fault = "client";
|
|
8
|
-
constructor(opts) {
|
|
9
|
-
super({
|
|
10
|
-
name: "AlreadyExistException",
|
|
11
|
-
$fault: "client",
|
|
12
|
-
...opts
|
|
13
|
-
});
|
|
14
|
-
Object.setPrototypeOf(this, AlreadyExistException.prototype);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.AlreadyExistException = AlreadyExistException;
|
|
18
|
-
class ForbiddenException extends ToolsServiceException_1.ToolsServiceException {
|
|
19
|
-
name = "ForbiddenException";
|
|
20
|
-
$fault = "client";
|
|
21
|
-
constructor(opts) {
|
|
22
|
-
super({
|
|
23
|
-
name: "ForbiddenException",
|
|
24
|
-
$fault: "client",
|
|
25
|
-
...opts
|
|
26
|
-
});
|
|
27
|
-
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.ForbiddenException = ForbiddenException;
|
|
31
|
-
class NotFoundException extends ToolsServiceException_1.ToolsServiceException {
|
|
32
|
-
name = "NotFoundException";
|
|
33
|
-
$fault = "client";
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "NotFoundException",
|
|
37
|
-
$fault: "client",
|
|
38
|
-
...opts
|
|
39
|
-
});
|
|
40
|
-
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.NotFoundException = NotFoundException;
|
|
44
|
-
class UnauthorizedException extends ToolsServiceException_1.ToolsServiceException {
|
|
45
|
-
name = "UnauthorizedException";
|
|
46
|
-
$fault = "client";
|
|
47
|
-
constructor(opts) {
|
|
48
|
-
super({
|
|
49
|
-
name: "UnauthorizedException",
|
|
50
|
-
$fault: "client",
|
|
51
|
-
...opts
|
|
52
|
-
});
|
|
53
|
-
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.UnauthorizedException = UnauthorizedException;
|
|
57
|
-
class ValidationException extends ToolsServiceException_1.ToolsServiceException {
|
|
58
|
-
name = "ValidationException";
|
|
59
|
-
$fault = "client";
|
|
60
|
-
constructor(opts) {
|
|
61
|
-
super({
|
|
62
|
-
name: "ValidationException",
|
|
63
|
-
$fault: "client",
|
|
64
|
-
...opts
|
|
65
|
-
});
|
|
66
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
exports.ValidationException = ValidationException;
|
|
70
|
-
exports.ToolCalendarOperation = {
|
|
71
|
-
CANCEL: "cancel",
|
|
72
|
-
GET_SLOTS: "get_slots",
|
|
73
|
-
LIST_RESOURCE_EVENTS: "list_resource_events",
|
|
74
|
-
RESCHEDULE: "reschedule",
|
|
75
|
-
SCHEDULE: "schedule",
|
|
76
|
-
};
|
|
77
|
-
var ToolChatRecipient;
|
|
78
|
-
(function (ToolChatRecipient) {
|
|
79
|
-
ToolChatRecipient.visit = (value, visitor) => {
|
|
80
|
-
if (value.channelId !== undefined)
|
|
81
|
-
return visitor.channelId(value.channelId);
|
|
82
|
-
if (value.userId !== undefined)
|
|
83
|
-
return visitor.userId(value.userId);
|
|
84
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
85
|
-
};
|
|
86
|
-
})(ToolChatRecipient || (exports.ToolChatRecipient = ToolChatRecipient = {}));
|
|
87
|
-
var ToolEmailHandler;
|
|
88
|
-
(function (ToolEmailHandler) {
|
|
89
|
-
ToolEmailHandler.visit = (value, visitor) => {
|
|
90
|
-
if (value.wns !== undefined)
|
|
91
|
-
return visitor.wns(value.wns);
|
|
92
|
-
if (value.custom !== undefined)
|
|
93
|
-
return visitor.custom(value.custom);
|
|
94
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
95
|
-
};
|
|
96
|
-
})(ToolEmailHandler || (exports.ToolEmailHandler = ToolEmailHandler = {}));
|
|
97
|
-
var ToolMcpAuthorization;
|
|
98
|
-
(function (ToolMcpAuthorization) {
|
|
99
|
-
ToolMcpAuthorization.visit = (value, visitor) => {
|
|
100
|
-
if (value.bearer !== undefined)
|
|
101
|
-
return visitor.bearer(value.bearer);
|
|
102
|
-
if (value.customHeaders !== undefined)
|
|
103
|
-
return visitor.customHeaders(value.customHeaders);
|
|
104
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
105
|
-
};
|
|
106
|
-
})(ToolMcpAuthorization || (exports.ToolMcpAuthorization = ToolMcpAuthorization = {}));
|
|
107
|
-
var ToolWebhookAuth;
|
|
108
|
-
(function (ToolWebhookAuth) {
|
|
109
|
-
ToolWebhookAuth.visit = (value, visitor) => {
|
|
110
|
-
if (value.basic !== undefined)
|
|
111
|
-
return visitor.basic(value.basic);
|
|
112
|
-
if (value.bearer !== undefined)
|
|
113
|
-
return visitor.bearer(value.bearer);
|
|
114
|
-
if (value.oauth !== undefined)
|
|
115
|
-
return visitor.oauth(value.oauth);
|
|
116
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
117
|
-
};
|
|
118
|
-
})(ToolWebhookAuth || (exports.ToolWebhookAuth = ToolWebhookAuth = {}));
|
|
119
|
-
exports.ToolWebhookMethod = {
|
|
120
|
-
DELETE: "DELETE",
|
|
121
|
-
GET: "GET",
|
|
122
|
-
PATCH: "PATCH",
|
|
123
|
-
POST: "POST",
|
|
124
|
-
PUT: "PUT",
|
|
125
|
-
};
|
|
126
|
-
var ToolHandler;
|
|
127
|
-
(function (ToolHandler) {
|
|
128
|
-
ToolHandler.visit = (value, visitor) => {
|
|
129
|
-
if (value.email !== undefined)
|
|
130
|
-
return visitor.email(value.email);
|
|
131
|
-
if (value.webhook !== undefined)
|
|
132
|
-
return visitor.webhook(value.webhook);
|
|
133
|
-
if (value.search !== undefined)
|
|
134
|
-
return visitor.search(value.search);
|
|
135
|
-
if (value.chat !== undefined)
|
|
136
|
-
return visitor.chat(value.chat);
|
|
137
|
-
if (value.sms !== undefined)
|
|
138
|
-
return visitor.sms(value.sms);
|
|
139
|
-
if (value.calendar !== undefined)
|
|
140
|
-
return visitor.calendar(value.calendar);
|
|
141
|
-
if (value.mcp !== undefined)
|
|
142
|
-
return visitor.mcp(value.mcp);
|
|
143
|
-
if (value.mcpTool !== undefined)
|
|
144
|
-
return visitor.mcpTool(value.mcpTool);
|
|
145
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
146
|
-
};
|
|
147
|
-
})(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
|
|
148
|
-
exports.ToolVariableType = {
|
|
149
|
-
BOOLEAN: "boolean",
|
|
150
|
-
NUMBER: "number",
|
|
151
|
-
NUMBER_ARRAY: "number_array",
|
|
152
|
-
SCHEMA: "schema",
|
|
153
|
-
STRING: "string",
|
|
154
|
-
STRING_ARRAY: "string_array",
|
|
155
|
-
};
|
|
156
|
-
class ToolExecutionException extends ToolsServiceException_1.ToolsServiceException {
|
|
157
|
-
name = "ToolExecutionException";
|
|
158
|
-
$fault = "client";
|
|
159
|
-
details;
|
|
160
|
-
constructor(opts) {
|
|
161
|
-
super({
|
|
162
|
-
name: "ToolExecutionException",
|
|
163
|
-
$fault: "client",
|
|
164
|
-
...opts
|
|
165
|
-
});
|
|
166
|
-
Object.setPrototypeOf(this, ToolExecutionException.prototype);
|
|
167
|
-
this.details = opts.details;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
exports.ToolExecutionException = ToolExecutionException;
|
|
171
|
-
class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceException {
|
|
172
|
-
name = "ToolExecutionServerException";
|
|
173
|
-
$fault = "server";
|
|
174
|
-
details;
|
|
175
|
-
constructor(opts) {
|
|
176
|
-
super({
|
|
177
|
-
name: "ToolExecutionServerException",
|
|
178
|
-
$fault: "server",
|
|
179
|
-
...opts
|
|
180
|
-
});
|
|
181
|
-
Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
|
|
182
|
-
this.details = opts.details;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
exports.ToolExecutionServerException = ToolExecutionServerException;
|
|
@@ -4,27 +4,27 @@ exports.getRuntimeConfig = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
-
const
|
|
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");
|
|
8
12
|
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
9
|
-
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
10
|
-
const util_retry_1 = require("@smithy/util-retry");
|
|
11
13
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
12
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
13
|
-
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
14
14
|
const getRuntimeConfig = (config) => {
|
|
15
|
-
const defaultsMode = (0,
|
|
16
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
15
|
+
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
|
17
17
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
18
18
|
return {
|
|
19
19
|
...clientSharedValues,
|
|
20
20
|
...config,
|
|
21
21
|
runtime: "browser",
|
|
22
22
|
defaultsMode,
|
|
23
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0,
|
|
25
|
-
maxAttempts: config?.maxAttempts ??
|
|
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
26
|
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
27
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
|
|
28
28
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
29
29
|
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
30
30
|
};
|
|
@@ -3,35 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
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");
|
|
10
11
|
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
11
|
-
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
12
|
-
const util_retry_1 = require("@smithy/util-retry");
|
|
13
12
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
|
-
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
16
|
-
const smithy_client_2 = require("@smithy/smithy-client");
|
|
17
13
|
const getRuntimeConfig = (config) => {
|
|
18
|
-
(0,
|
|
19
|
-
const defaultsMode = (0,
|
|
20
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
14
|
+
(0, client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
15
|
+
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
|
21
17
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
18
|
+
const loaderConfig = {
|
|
19
|
+
profile: config?.profile,
|
|
20
|
+
logger: clientSharedValues.logger,
|
|
21
|
+
};
|
|
22
22
|
return {
|
|
23
23
|
...clientSharedValues,
|
|
24
24
|
...config,
|
|
25
25
|
runtime: "node",
|
|
26
26
|
defaultsMode,
|
|
27
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
28
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0,
|
|
29
|
-
maxAttempts: config?.maxAttempts ?? (0,
|
|
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
30
|
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
31
|
-
retryMode: config?.retryMode ??
|
|
32
|
-
|
|
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"),
|
|
33
37
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
34
|
-
userAgentAppId: config?.userAgentAppId ?? (0,
|
|
38
|
+
userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
35
39
|
};
|
|
36
40
|
};
|
|
37
41
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
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");
|
|
8
12
|
const getRuntimeConfig = (config) => {
|
|
9
13
|
return {
|
|
10
14
|
apiVersion: "v1",
|
|
11
|
-
base64Decoder: config?.base64Decoder ??
|
|
12
|
-
base64Encoder: config?.base64Encoder ??
|
|
15
|
+
base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
|
|
16
|
+
base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
|
|
13
17
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
18
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
14
19
|
extensions: config?.extensions ?? [],
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultToolsHttpAuthSchemeProvider,
|
|
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.wim.tools",
|
|
32
|
+
errorTypeRegistries: schemas_0_1.errorTypeRegistries,
|
|
33
|
+
version: "v1",
|
|
34
|
+
serviceTarget: "Tools",
|
|
35
|
+
},
|
|
36
|
+
urlParser: config?.urlParser ?? protocols_2.parseUrl,
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
|
|
19
39
|
};
|
|
20
40
|
};
|
|
21
41
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const client_1 = require("@smithy/core/client");
|
|
5
|
+
const protocols_1 = require("@smithy/core/protocols");
|
|
6
|
+
const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
|
|
6
7
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
-
const extensionConfiguration = Object.assign((0,
|
|
8
|
-
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
9
|
-
return Object.assign(runtimeConfig, (0,
|
|
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));
|
|
10
11
|
};
|
|
11
12
|
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|