@aws-sdk/client-lex-runtime-v2 3.1067.0 → 3.1069.0
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/auth/httpAuthSchemeProvider.js +9 -15
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +63 -83
- package/dist-cjs/models/LexRuntimeV2ServiceException.js +4 -8
- package/dist-cjs/models/errors.js +17 -28
- package/dist-cjs/runtimeConfig.browser.js +25 -29
- package/dist-cjs/runtimeConfig.js +34 -38
- package/dist-cjs/runtimeConfig.native.js +6 -9
- package/dist-cjs/runtimeConfig.shared.js +21 -25
- package/dist-cjs/schemas/schemas_0.js +154 -104
- package/package.json +12 -12
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.
|
|
4
|
-
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
5
|
-
const client_1 = require("@smithy/core/client");
|
|
6
|
-
const defaultLexRuntimeV2HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
1
|
+
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
+
exports.defaultLexRuntimeV2HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
7
4
|
return {
|
|
8
|
-
operation:
|
|
9
|
-
region: await
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
10
7
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
11
8
|
})(),
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
|
-
exports.defaultLexRuntimeV2HttpAuthSchemeParametersProvider = defaultLexRuntimeV2HttpAuthSchemeParametersProvider;
|
|
15
11
|
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
16
12
|
return {
|
|
17
13
|
schemeId: "aws.auth#sigv4",
|
|
@@ -27,7 +23,7 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
27
23
|
}),
|
|
28
24
|
};
|
|
29
25
|
}
|
|
30
|
-
|
|
26
|
+
exports.defaultLexRuntimeV2HttpAuthSchemeProvider = (authParameters) => {
|
|
31
27
|
const options = [];
|
|
32
28
|
switch (authParameters.operation) {
|
|
33
29
|
default: {
|
|
@@ -36,11 +32,9 @@ const defaultLexRuntimeV2HttpAuthSchemeProvider = (authParameters) => {
|
|
|
36
32
|
}
|
|
37
33
|
return options;
|
|
38
34
|
};
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
41
|
-
const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
|
|
35
|
+
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
42
37
|
return Object.assign(config_0, {
|
|
43
|
-
authSchemePreference:
|
|
38
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
44
39
|
});
|
|
45
40
|
};
|
|
46
|
-
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bdd = void 0;
|
|
4
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
1
|
+
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
5
2
|
const k = "ref";
|
|
6
3
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
7
4
|
const _data = {
|
|
@@ -46,4 +43,4 @@ const nodes = new Int32Array([
|
|
|
46
43
|
3, r + 1, 13,
|
|
47
44
|
4, r + 2, r + 3,
|
|
48
45
|
]);
|
|
49
|
-
exports.bdd =
|
|
46
|
+
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
|
-
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new endpoints_1.EndpointCache({
|
|
1
|
+
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
+
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
+
const { bdd } = require("./bdd");
|
|
4
|
+
const cache = new EndpointCache({
|
|
8
5
|
size: 50,
|
|
9
6
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
10
7
|
});
|
|
11
|
-
|
|
12
|
-
return cache.get(endpointParams, () =>
|
|
8
|
+
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
13
10
|
endpointParams: endpointParams,
|
|
14
11
|
logger: context.logger,
|
|
15
12
|
}));
|
|
16
13
|
};
|
|
17
|
-
|
|
18
|
-
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
var __exportStar = (m, e) => { Object.assign(e, m); };
|
|
2
|
+
const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
|
|
3
|
+
const { resolveEventStreamConfig, getEventStreamPlugin } = require("@aws-sdk/middleware-eventstream");
|
|
4
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
|
|
5
|
+
const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
|
|
6
|
+
exports.$Command = Command;
|
|
7
|
+
exports.__Client = Client;
|
|
8
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
9
|
+
const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
10
|
+
const { resolveEventStreamSerdeConfig } = require("@smithy/core/event-streams");
|
|
11
|
+
const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
12
|
+
const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
13
|
+
const { getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
14
|
+
const { resolveHttpAuthSchemeConfig, defaultLexRuntimeV2HttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
|
|
15
|
+
const { getRuntimeConfig } = require("./runtimeConfig");
|
|
16
|
+
const { DeleteSession$, GetSession$, PutSession$, RecognizeText$, RecognizeUtterance$, StartConversation$ } = require("./schemas/schemas_0");
|
|
17
|
+
__exportStar(require("./schemas/schemas_0"), exports);
|
|
18
|
+
__exportStar(require("./models/errors"), exports);
|
|
19
|
+
const { LexRuntimeV2ServiceException } = require("./models/LexRuntimeV2ServiceException");
|
|
20
|
+
exports.LexRuntimeV2ServiceException = LexRuntimeV2ServiceException;
|
|
18
21
|
|
|
19
22
|
const resolveClientEndpointParameters = (options) => {
|
|
20
23
|
return Object.assign(options, {
|
|
@@ -70,115 +73,115 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
73
|
-
const extensionConfiguration = Object.assign(
|
|
76
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
74
77
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
75
|
-
return Object.assign(runtimeConfig,
|
|
78
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
class LexRuntimeV2Client extends
|
|
81
|
+
class LexRuntimeV2Client extends Client {
|
|
79
82
|
config;
|
|
80
83
|
constructor(...[configuration]) {
|
|
81
|
-
const _config_0 =
|
|
84
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
82
85
|
super(_config_0);
|
|
83
86
|
this.initConfig = _config_0;
|
|
84
87
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
85
|
-
const _config_2 =
|
|
86
|
-
const _config_3 =
|
|
87
|
-
const _config_4 =
|
|
88
|
-
const _config_5 =
|
|
89
|
-
const _config_6 =
|
|
90
|
-
const _config_7 =
|
|
91
|
-
const _config_8 =
|
|
92
|
-
const _config_9 =
|
|
88
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
89
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
90
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
91
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
92
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
93
|
+
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
|
|
94
|
+
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
|
|
95
|
+
const _config_9 = resolveEventStreamConfig(_config_8);
|
|
93
96
|
const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
|
|
94
97
|
this.config = _config_10;
|
|
95
|
-
this.middlewareStack.use(
|
|
96
|
-
this.middlewareStack.use(
|
|
97
|
-
this.middlewareStack.use(
|
|
98
|
-
this.middlewareStack.use(
|
|
99
|
-
this.middlewareStack.use(
|
|
100
|
-
this.middlewareStack.use(
|
|
101
|
-
this.middlewareStack.use(
|
|
102
|
-
this.middlewareStack.use(
|
|
103
|
-
httpAuthSchemeParametersProvider:
|
|
104
|
-
identityProviderConfigProvider: async (config) => new
|
|
98
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
104
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
105
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
106
|
+
httpAuthSchemeParametersProvider: defaultLexRuntimeV2HttpAuthSchemeParametersProvider,
|
|
107
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
105
108
|
"aws.auth#sigv4": config.credentials,
|
|
106
109
|
}),
|
|
107
110
|
}));
|
|
108
|
-
this.middlewareStack.use(
|
|
111
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
109
112
|
}
|
|
110
113
|
destroy() {
|
|
111
114
|
super.destroy();
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
|
|
115
|
-
class DeleteSessionCommand extends
|
|
118
|
+
class DeleteSessionCommand extends Command
|
|
116
119
|
.classBuilder()
|
|
117
120
|
.ep(commonParams)
|
|
118
121
|
.m(function (Command, cs, config, o) {
|
|
119
|
-
return [
|
|
122
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
120
123
|
})
|
|
121
124
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "DeleteSession", {})
|
|
122
125
|
.n("LexRuntimeV2Client", "DeleteSessionCommand")
|
|
123
|
-
.sc(
|
|
126
|
+
.sc(DeleteSession$)
|
|
124
127
|
.build() {
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
class GetSessionCommand extends
|
|
130
|
+
class GetSessionCommand extends Command
|
|
128
131
|
.classBuilder()
|
|
129
132
|
.ep(commonParams)
|
|
130
133
|
.m(function (Command, cs, config, o) {
|
|
131
|
-
return [
|
|
134
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
132
135
|
})
|
|
133
136
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "GetSession", {})
|
|
134
137
|
.n("LexRuntimeV2Client", "GetSessionCommand")
|
|
135
|
-
.sc(
|
|
138
|
+
.sc(GetSession$)
|
|
136
139
|
.build() {
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
class PutSessionCommand extends
|
|
142
|
+
class PutSessionCommand extends Command
|
|
140
143
|
.classBuilder()
|
|
141
144
|
.ep(commonParams)
|
|
142
145
|
.m(function (Command, cs, config, o) {
|
|
143
|
-
return [
|
|
146
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
144
147
|
})
|
|
145
148
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "PutSession", {})
|
|
146
149
|
.n("LexRuntimeV2Client", "PutSessionCommand")
|
|
147
|
-
.sc(
|
|
150
|
+
.sc(PutSession$)
|
|
148
151
|
.build() {
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
class RecognizeTextCommand extends
|
|
154
|
+
class RecognizeTextCommand extends Command
|
|
152
155
|
.classBuilder()
|
|
153
156
|
.ep(commonParams)
|
|
154
157
|
.m(function (Command, cs, config, o) {
|
|
155
|
-
return [
|
|
158
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
156
159
|
})
|
|
157
160
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "RecognizeText", {})
|
|
158
161
|
.n("LexRuntimeV2Client", "RecognizeTextCommand")
|
|
159
|
-
.sc(
|
|
162
|
+
.sc(RecognizeText$)
|
|
160
163
|
.build() {
|
|
161
164
|
}
|
|
162
165
|
|
|
163
|
-
class RecognizeUtteranceCommand extends
|
|
166
|
+
class RecognizeUtteranceCommand extends Command
|
|
164
167
|
.classBuilder()
|
|
165
168
|
.ep(commonParams)
|
|
166
169
|
.m(function (Command, cs, config, o) {
|
|
167
|
-
return [
|
|
170
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
168
171
|
})
|
|
169
172
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "RecognizeUtterance", {})
|
|
170
173
|
.n("LexRuntimeV2Client", "RecognizeUtteranceCommand")
|
|
171
|
-
.sc(
|
|
174
|
+
.sc(RecognizeUtterance$)
|
|
172
175
|
.build() {
|
|
173
176
|
}
|
|
174
177
|
|
|
175
|
-
class StartConversationCommand extends
|
|
178
|
+
class StartConversationCommand extends Command
|
|
176
179
|
.classBuilder()
|
|
177
180
|
.ep(commonParams)
|
|
178
181
|
.m(function (Command, cs, config, o) {
|
|
179
182
|
return [
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
184
|
+
getEventStreamPlugin(config),
|
|
182
185
|
];
|
|
183
186
|
})
|
|
184
187
|
.s("AWSDeepSenseRunTimeServiceApi2_0", "StartConversation", {
|
|
@@ -188,7 +191,7 @@ class StartConversationCommand extends client.Command
|
|
|
188
191
|
},
|
|
189
192
|
})
|
|
190
193
|
.n("LexRuntimeV2Client", "StartConversationCommand")
|
|
191
|
-
.sc(
|
|
194
|
+
.sc(StartConversation$)
|
|
192
195
|
.build() {
|
|
193
196
|
}
|
|
194
197
|
|
|
@@ -202,7 +205,7 @@ const commands = {
|
|
|
202
205
|
};
|
|
203
206
|
class LexRuntimeV2 extends LexRuntimeV2Client {
|
|
204
207
|
}
|
|
205
|
-
|
|
208
|
+
createAggregatedClient(commands, LexRuntimeV2);
|
|
206
209
|
|
|
207
210
|
const ConfirmationState = {
|
|
208
211
|
CONFIRMED: "Confirmed",
|
|
@@ -266,9 +269,6 @@ const PlaybackInterruptionReason = {
|
|
|
266
269
|
VOICE_START_DETECTED: "VOICE_START_DETECTED",
|
|
267
270
|
};
|
|
268
271
|
|
|
269
|
-
exports.$Command = client.Command;
|
|
270
|
-
exports.__Client = client.Client;
|
|
271
|
-
exports.LexRuntimeV2ServiceException = LexRuntimeV2ServiceException.LexRuntimeV2ServiceException;
|
|
272
272
|
exports.ConfirmationState = ConfirmationState;
|
|
273
273
|
exports.ConversationMode = ConversationMode;
|
|
274
274
|
exports.DeleteSessionCommand = DeleteSessionCommand;
|
|
@@ -288,23 +288,3 @@ exports.SentimentType = SentimentType;
|
|
|
288
288
|
exports.Shape = Shape;
|
|
289
289
|
exports.StartConversationCommand = StartConversationCommand;
|
|
290
290
|
exports.StyleType = StyleType;
|
|
291
|
-
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
292
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
293
|
-
Object.defineProperty(exports, '__proto__', {
|
|
294
|
-
enumerable: true,
|
|
295
|
-
value: schemas_0['__proto__']
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
Object.keys(schemas_0).forEach(function (k) {
|
|
299
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
300
|
-
});
|
|
301
|
-
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
302
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
303
|
-
Object.defineProperty(exports, '__proto__', {
|
|
304
|
-
enumerable: true,
|
|
305
|
-
value: errors['__proto__']
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
Object.keys(errors).forEach(function (k) {
|
|
309
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
310
|
-
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.LexRuntimeV2ServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class LexRuntimeV2ServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.LexRuntimeV2ServiceException = class LexRuntimeV2ServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, LexRuntimeV2ServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.LexRuntimeV2ServiceException = LexRuntimeV2ServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DependencyFailedException = exports.BadGatewayException = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
|
-
const LexRuntimeV2ServiceException_1 = require("./LexRuntimeV2ServiceException");
|
|
5
|
-
class AccessDeniedException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
1
|
+
const { LexRuntimeV2ServiceException: __BaseException } = require("./LexRuntimeV2ServiceException");
|
|
2
|
+
exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
|
|
6
3
|
name = "AccessDeniedException";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
constructor(opts) {
|
|
@@ -13,9 +10,8 @@ class AccessDeniedException extends LexRuntimeV2ServiceException_1.LexRuntimeV2S
|
|
|
13
10
|
});
|
|
14
11
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
12
|
}
|
|
16
|
-
}
|
|
17
|
-
exports.
|
|
18
|
-
class ConflictException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
13
|
+
};
|
|
14
|
+
exports.ConflictException = class ConflictException extends __BaseException {
|
|
19
15
|
name = "ConflictException";
|
|
20
16
|
$fault = "client";
|
|
21
17
|
constructor(opts) {
|
|
@@ -26,9 +22,8 @@ class ConflictException extends LexRuntimeV2ServiceException_1.LexRuntimeV2Servi
|
|
|
26
22
|
});
|
|
27
23
|
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
28
24
|
}
|
|
29
|
-
}
|
|
30
|
-
exports.
|
|
31
|
-
class InternalServerException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
25
|
+
};
|
|
26
|
+
exports.InternalServerException = class InternalServerException extends __BaseException {
|
|
32
27
|
name = "InternalServerException";
|
|
33
28
|
$fault = "server";
|
|
34
29
|
constructor(opts) {
|
|
@@ -39,9 +34,8 @@ class InternalServerException extends LexRuntimeV2ServiceException_1.LexRuntimeV
|
|
|
39
34
|
});
|
|
40
35
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
exports.
|
|
44
|
-
class ResourceNotFoundException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
37
|
+
};
|
|
38
|
+
exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
|
|
45
39
|
name = "ResourceNotFoundException";
|
|
46
40
|
$fault = "client";
|
|
47
41
|
constructor(opts) {
|
|
@@ -52,9 +46,8 @@ class ResourceNotFoundException extends LexRuntimeV2ServiceException_1.LexRuntim
|
|
|
52
46
|
});
|
|
53
47
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
54
48
|
}
|
|
55
|
-
}
|
|
56
|
-
exports.
|
|
57
|
-
class ThrottlingException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
49
|
+
};
|
|
50
|
+
exports.ThrottlingException = class ThrottlingException extends __BaseException {
|
|
58
51
|
name = "ThrottlingException";
|
|
59
52
|
$fault = "client";
|
|
60
53
|
constructor(opts) {
|
|
@@ -65,9 +58,8 @@ class ThrottlingException extends LexRuntimeV2ServiceException_1.LexRuntimeV2Ser
|
|
|
65
58
|
});
|
|
66
59
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
67
60
|
}
|
|
68
|
-
}
|
|
69
|
-
exports.
|
|
70
|
-
class ValidationException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
61
|
+
};
|
|
62
|
+
exports.ValidationException = class ValidationException extends __BaseException {
|
|
71
63
|
name = "ValidationException";
|
|
72
64
|
$fault = "client";
|
|
73
65
|
constructor(opts) {
|
|
@@ -78,9 +70,8 @@ class ValidationException extends LexRuntimeV2ServiceException_1.LexRuntimeV2Ser
|
|
|
78
70
|
});
|
|
79
71
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
80
72
|
}
|
|
81
|
-
}
|
|
82
|
-
exports.
|
|
83
|
-
class BadGatewayException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
73
|
+
};
|
|
74
|
+
exports.BadGatewayException = class BadGatewayException extends __BaseException {
|
|
84
75
|
name = "BadGatewayException";
|
|
85
76
|
$fault = "server";
|
|
86
77
|
constructor(opts) {
|
|
@@ -91,9 +82,8 @@ class BadGatewayException extends LexRuntimeV2ServiceException_1.LexRuntimeV2Ser
|
|
|
91
82
|
});
|
|
92
83
|
Object.setPrototypeOf(this, BadGatewayException.prototype);
|
|
93
84
|
}
|
|
94
|
-
}
|
|
95
|
-
exports.
|
|
96
|
-
class DependencyFailedException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
|
|
85
|
+
};
|
|
86
|
+
exports.DependencyFailedException = class DependencyFailedException extends __BaseException {
|
|
97
87
|
name = "DependencyFailedException";
|
|
98
88
|
$fault = "client";
|
|
99
89
|
constructor(opts) {
|
|
@@ -104,5 +94,4 @@ class DependencyFailedException extends LexRuntimeV2ServiceException_1.LexRuntim
|
|
|
104
94
|
});
|
|
105
95
|
Object.setPrototypeOf(this, DependencyFailedException.prototype);
|
|
106
96
|
}
|
|
107
|
-
}
|
|
108
|
-
exports.DependencyFailedException = DependencyFailedException;
|
|
97
|
+
};
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const retry_1 = require("@smithy/core/retry");
|
|
12
|
-
const serde_1 = require("@smithy/core/serde");
|
|
13
|
-
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
14
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
+
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
+
const { invalidFunction, invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
+
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
+
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
7
|
+
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
8
|
+
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
9
|
+
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
10
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
15
11
|
const getRuntimeConfig = (config) => {
|
|
16
|
-
const defaultsMode =
|
|
17
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
18
|
-
const clientSharedValues = (
|
|
12
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
13
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
14
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
19
15
|
return {
|
|
20
16
|
...clientSharedValues,
|
|
21
17
|
...config,
|
|
22
18
|
runtime: "browser",
|
|
23
19
|
defaultsMode,
|
|
24
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
20
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
25
21
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
26
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
22
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
27
23
|
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
|
|
28
|
-
handle:
|
|
24
|
+
handle: invalidFunction("event stream request is not supported in browser."),
|
|
29
25
|
})),
|
|
30
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
31
|
-
maxAttempts: config?.maxAttempts ??
|
|
32
|
-
region: config?.region ??
|
|
33
|
-
requestHandler:
|
|
34
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
35
|
-
sha256: config?.sha256 ??
|
|
36
|
-
streamCollector: config?.streamCollector ??
|
|
37
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
38
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
26
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
27
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
28
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
29
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
30
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
31
|
+
sha256: config?.sha256 ?? Sha256,
|
|
32
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
33
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
34
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
39
35
|
};
|
|
40
36
|
};
|
|
41
37
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const retry_1 = require("@smithy/core/retry");
|
|
14
|
-
const serde_1 = require("@smithy/core/serde");
|
|
15
|
-
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
16
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
+
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
+
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
+
const { eventStreamPayloadHandlerProvider } = require("@aws-sdk/eventstream-handler-node");
|
|
6
|
+
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
7
|
+
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
8
|
+
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
9
|
+
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
10
|
+
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
11
|
+
const { NodeHttp2Handler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
12
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
17
13
|
const getRuntimeConfig = (config) => {
|
|
18
|
-
|
|
19
|
-
const defaultsMode =
|
|
20
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
21
|
-
const clientSharedValues = (
|
|
22
|
-
(
|
|
14
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
awsCheckVersion(process.version);
|
|
23
19
|
const loaderConfig = {
|
|
24
20
|
profile: config?.profile,
|
|
25
21
|
logger: clientSharedValues.logger,
|
|
@@ -29,28 +25,28 @@ const getRuntimeConfig = (config) => {
|
|
|
29
25
|
...config,
|
|
30
26
|
runtime: "node",
|
|
31
27
|
defaultsMode,
|
|
32
|
-
authSchemePreference: config?.authSchemePreference ?? (
|
|
33
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
34
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
35
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
36
|
-
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ??
|
|
37
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
38
|
-
maxAttempts: config?.maxAttempts ?? (
|
|
39
|
-
region: config?.region ?? (
|
|
40
|
-
requestHandler:
|
|
28
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
32
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
|
|
33
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
34
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
35
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
36
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? (async () => ({
|
|
41
37
|
...await defaultConfigProvider(),
|
|
42
38
|
disableConcurrentStreams: true
|
|
43
39
|
}))),
|
|
44
40
|
retryMode: config?.retryMode ??
|
|
45
|
-
(
|
|
46
|
-
...
|
|
47
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
41
|
+
loadNodeConfig({
|
|
42
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
48
44
|
}, config),
|
|
49
|
-
sha256: config?.sha256 ??
|
|
50
|
-
streamCollector: config?.streamCollector ??
|
|
51
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (
|
|
52
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (
|
|
53
|
-
userAgentAppId: config?.userAgentAppId ?? (
|
|
45
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
46
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
47
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
48
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
49
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
54
50
|
};
|
|
55
51
|
};
|
|
56
52
|
exports.getRuntimeConfig = getRuntimeConfig;
|