@aws-sdk/client-polly 3.1075.0 → 3.1076.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/index.js +1104 -16
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +7 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -1
- package/package.json +11 -11
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -40
- package/dist-cjs/endpoint/bdd.js +0 -46
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/PollyServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -299
- package/dist-cjs/runtimeConfig.browser.js +0 -37
- package/dist-cjs/runtimeConfig.js +0 -52
- package/dist-cjs/runtimeConfig.native.js +0 -16
- package/dist-cjs/runtimeConfig.shared.js +0 -40
- package/dist-cjs/schemas/schemas_0.js +0 -580
|
@@ -16,7 +16,7 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
16
16
|
requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
|
|
17
17
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
18
18
|
sha256: import("@smithy/types").HashConstructor;
|
|
19
|
-
streamCollector: import("
|
|
19
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
20
20
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
21
21
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
22
22
|
cacheMiddleware?: boolean | undefined;
|
|
@@ -17,7 +17,7 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
17
17
|
requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
|
|
18
18
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
19
19
|
sha256: import("@smithy/types").HashConstructor;
|
|
20
|
-
streamCollector: import("
|
|
20
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
21
21
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
22
22
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
23
23
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -16,7 +16,7 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
16
16
|
apiVersion: string;
|
|
17
17
|
urlParser: import("@smithy/types").UrlParser;
|
|
18
18
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
19
|
-
streamCollector: import("
|
|
19
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
20
20
|
base64Decoder: import("@smithy/types").Decoder;
|
|
21
21
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
22
22
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -23,7 +23,13 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
23
23
|
| RequestHandler;
|
|
24
24
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
25
25
|
sha256: import("@smithy/types").HashConstructor;
|
|
26
|
-
streamCollector:
|
|
26
|
+
streamCollector: (
|
|
27
|
+
stream:
|
|
28
|
+
| import("stream").Readable
|
|
29
|
+
| import("stream/web").ReadableStream
|
|
30
|
+
| ReadableStream
|
|
31
|
+
| Blob
|
|
32
|
+
) => Promise<Uint8Array>;
|
|
27
33
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
28
34
|
(boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
29
35
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
@@ -24,7 +24,13 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
24
24
|
| import("@smithy/core/protocols").HttpHandler<any>;
|
|
25
25
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
26
26
|
sha256: import("@smithy/types").HashConstructor;
|
|
27
|
-
streamCollector:
|
|
27
|
+
streamCollector: (
|
|
28
|
+
stream:
|
|
29
|
+
| import("stream").Readable
|
|
30
|
+
| import("stream/web").ReadableStream
|
|
31
|
+
| ReadableStream
|
|
32
|
+
| Blob
|
|
33
|
+
) => Promise<Uint8Array>;
|
|
28
34
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
29
35
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
30
36
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -21,7 +21,13 @@ export declare const getRuntimeConfig: (config: PollyClientConfig) => {
|
|
|
21
21
|
apiVersion: string;
|
|
22
22
|
urlParser: import("@smithy/types").UrlParser;
|
|
23
23
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
24
|
-
streamCollector:
|
|
24
|
+
streamCollector: (
|
|
25
|
+
stream:
|
|
26
|
+
| import("stream").Readable
|
|
27
|
+
| import("stream/web").ReadableStream
|
|
28
|
+
| ReadableStream
|
|
29
|
+
| Blob
|
|
30
|
+
) => Promise<Uint8Array>;
|
|
25
31
|
base64Decoder: import("@smithy/types").Decoder;
|
|
26
32
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
27
33
|
utf8Decoder: import("@smithy/types").Decoder;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-polly",
|
|
3
3
|
"description": "AWS SDK for JavaScript Polly Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1076.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
27
27
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
28
|
-
"@aws-sdk/core": "^3.974.
|
|
29
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
30
|
-
"@aws-sdk/eventstream-handler-node": "^3.972.
|
|
31
|
-
"@aws-sdk/middleware-eventstream": "^3.972.
|
|
32
|
-
"@aws-sdk/types": "^3.973.
|
|
33
|
-
"@smithy/core": "^3.
|
|
34
|
-
"@smithy/fetch-http-handler": "^5.
|
|
35
|
-
"@smithy/node-http-handler": "^4.
|
|
36
|
-
"@smithy/types": "^4.
|
|
28
|
+
"@aws-sdk/core": "^3.974.24",
|
|
29
|
+
"@aws-sdk/credential-provider-node": "^3.972.59",
|
|
30
|
+
"@aws-sdk/eventstream-handler-node": "^3.972.23",
|
|
31
|
+
"@aws-sdk/middleware-eventstream": "^3.972.19",
|
|
32
|
+
"@aws-sdk/types": "^3.973.14",
|
|
33
|
+
"@smithy/core": "^3.27.0",
|
|
34
|
+
"@smithy/fetch-http-handler": "^5.6.0",
|
|
35
|
+
"@smithy/node-http-handler": "^4.9.0",
|
|
36
|
+
"@smithy/types": "^4.15.0",
|
|
37
37
|
"tslib": "^2.6.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@smithy/snapshot-testing": "^2.
|
|
40
|
+
"@smithy/snapshot-testing": "^2.2.3",
|
|
41
41
|
"@tsconfig/node20": "20.1.8",
|
|
42
42
|
"@types/node": "^20.14.8",
|
|
43
43
|
"concurrently": "7.0.0",
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
-
exports.defaultPollyHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
-
return {
|
|
5
|
-
operation: getSmithyContext(context).operation,
|
|
6
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
7
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
8
|
-
})(),
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
12
|
-
return {
|
|
13
|
-
schemeId: "aws.auth#sigv4",
|
|
14
|
-
signingProperties: {
|
|
15
|
-
name: "polly",
|
|
16
|
-
region: authParameters.region,
|
|
17
|
-
},
|
|
18
|
-
propertiesExtractor: (config, context) => ({
|
|
19
|
-
signingProperties: {
|
|
20
|
-
config,
|
|
21
|
-
context,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.defaultPollyHttpAuthSchemeProvider = (authParameters) => {
|
|
27
|
-
const options = [];
|
|
28
|
-
switch (authParameters.operation) {
|
|
29
|
-
default: {
|
|
30
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return options;
|
|
34
|
-
};
|
|
35
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
37
|
-
return Object.assign(config_0, {
|
|
38
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
39
|
-
});
|
|
40
|
-
};
|
package/dist-cjs/endpoint/bdd.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
2
|
-
const k = "ref";
|
|
3
|
-
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
4
|
-
const _data = {
|
|
5
|
-
conditions: [
|
|
6
|
-
[c, [g]],
|
|
7
|
-
[c, j],
|
|
8
|
-
["aws.partition", j, d],
|
|
9
|
-
[e, [{ [k]: "UseFIPS" }, b]],
|
|
10
|
-
[e, [{ [k]: "UseDualStack" }, b]],
|
|
11
|
-
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
12
|
-
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
|
|
13
|
-
],
|
|
14
|
-
results: [
|
|
15
|
-
[a],
|
|
16
|
-
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
17
|
-
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
18
|
-
[g, i],
|
|
19
|
-
["https://polly-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
20
|
-
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
21
|
-
["https://polly-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
22
|
-
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
23
|
-
["https://polly.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
24
|
-
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
25
|
-
["https://polly.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
26
|
-
[a, "Invalid Configuration: Missing Region"]
|
|
27
|
-
]
|
|
28
|
-
};
|
|
29
|
-
const root = 2;
|
|
30
|
-
const r = 100_000_000;
|
|
31
|
-
const nodes = new Int32Array([
|
|
32
|
-
-1, 1, -1,
|
|
33
|
-
0, 12, 3,
|
|
34
|
-
1, 4, r + 11,
|
|
35
|
-
2, 5, r + 11,
|
|
36
|
-
3, 8, 6,
|
|
37
|
-
4, 7, r + 10,
|
|
38
|
-
5, r + 8, r + 9,
|
|
39
|
-
4, 10, 9,
|
|
40
|
-
6, r + 6, r + 7,
|
|
41
|
-
5, 11, r + 5,
|
|
42
|
-
6, r + 4, r + 5,
|
|
43
|
-
3, r + 1, 13,
|
|
44
|
-
4, r + 2, r + 3,
|
|
45
|
-
]);
|
|
46
|
-
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,14 +0,0 @@
|
|
|
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({
|
|
5
|
-
size: 50,
|
|
6
|
-
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
-
});
|
|
8
|
-
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
-
endpointParams: endpointParams,
|
|
11
|
-
logger: context.logger,
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
14
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
-
exports.__ServiceException = __ServiceException;
|
|
3
|
-
exports.PollyServiceException = class PollyServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, PollyServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
const { PollyServiceException: __BaseException } = require("./PollyServiceException");
|
|
2
|
-
exports.LexiconNotFoundException = class LexiconNotFoundException extends __BaseException {
|
|
3
|
-
name = "LexiconNotFoundException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "LexiconNotFoundException",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts,
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, LexiconNotFoundException.prototype);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.ServiceFailureException = class ServiceFailureException extends __BaseException {
|
|
15
|
-
name = "ServiceFailureException";
|
|
16
|
-
$fault = "server";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "ServiceFailureException",
|
|
20
|
-
$fault: "server",
|
|
21
|
-
...opts,
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, ServiceFailureException.prototype);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
|
|
27
|
-
name = "InvalidNextTokenException";
|
|
28
|
-
$fault = "client";
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "InvalidNextTokenException",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.EngineNotSupportedException = class EngineNotSupportedException extends __BaseException {
|
|
39
|
-
name = "EngineNotSupportedException";
|
|
40
|
-
$fault = "client";
|
|
41
|
-
constructor(opts) {
|
|
42
|
-
super({
|
|
43
|
-
name: "EngineNotSupportedException",
|
|
44
|
-
$fault: "client",
|
|
45
|
-
...opts,
|
|
46
|
-
});
|
|
47
|
-
Object.setPrototypeOf(this, EngineNotSupportedException.prototype);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.InvalidTaskIdException = class InvalidTaskIdException extends __BaseException {
|
|
51
|
-
name = "InvalidTaskIdException";
|
|
52
|
-
$fault = "client";
|
|
53
|
-
constructor(opts) {
|
|
54
|
-
super({
|
|
55
|
-
name: "InvalidTaskIdException",
|
|
56
|
-
$fault: "client",
|
|
57
|
-
...opts,
|
|
58
|
-
});
|
|
59
|
-
Object.setPrototypeOf(this, InvalidTaskIdException.prototype);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.SynthesisTaskNotFoundException = class SynthesisTaskNotFoundException extends __BaseException {
|
|
63
|
-
name = "SynthesisTaskNotFoundException";
|
|
64
|
-
$fault = "client";
|
|
65
|
-
constructor(opts) {
|
|
66
|
-
super({
|
|
67
|
-
name: "SynthesisTaskNotFoundException",
|
|
68
|
-
$fault: "client",
|
|
69
|
-
...opts,
|
|
70
|
-
});
|
|
71
|
-
Object.setPrototypeOf(this, SynthesisTaskNotFoundException.prototype);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
exports.InvalidLexiconException = class InvalidLexiconException extends __BaseException {
|
|
75
|
-
name = "InvalidLexiconException";
|
|
76
|
-
$fault = "client";
|
|
77
|
-
constructor(opts) {
|
|
78
|
-
super({
|
|
79
|
-
name: "InvalidLexiconException",
|
|
80
|
-
$fault: "client",
|
|
81
|
-
...opts,
|
|
82
|
-
});
|
|
83
|
-
Object.setPrototypeOf(this, InvalidLexiconException.prototype);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
exports.InvalidS3BucketException = class InvalidS3BucketException extends __BaseException {
|
|
87
|
-
name = "InvalidS3BucketException";
|
|
88
|
-
$fault = "client";
|
|
89
|
-
constructor(opts) {
|
|
90
|
-
super({
|
|
91
|
-
name: "InvalidS3BucketException",
|
|
92
|
-
$fault: "client",
|
|
93
|
-
...opts,
|
|
94
|
-
});
|
|
95
|
-
Object.setPrototypeOf(this, InvalidS3BucketException.prototype);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
exports.InvalidS3KeyException = class InvalidS3KeyException extends __BaseException {
|
|
99
|
-
name = "InvalidS3KeyException";
|
|
100
|
-
$fault = "client";
|
|
101
|
-
constructor(opts) {
|
|
102
|
-
super({
|
|
103
|
-
name: "InvalidS3KeyException",
|
|
104
|
-
$fault: "client",
|
|
105
|
-
...opts,
|
|
106
|
-
});
|
|
107
|
-
Object.setPrototypeOf(this, InvalidS3KeyException.prototype);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.InvalidSampleRateException = class InvalidSampleRateException extends __BaseException {
|
|
111
|
-
name = "InvalidSampleRateException";
|
|
112
|
-
$fault = "client";
|
|
113
|
-
constructor(opts) {
|
|
114
|
-
super({
|
|
115
|
-
name: "InvalidSampleRateException",
|
|
116
|
-
$fault: "client",
|
|
117
|
-
...opts,
|
|
118
|
-
});
|
|
119
|
-
Object.setPrototypeOf(this, InvalidSampleRateException.prototype);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
exports.InvalidSnsTopicArnException = class InvalidSnsTopicArnException extends __BaseException {
|
|
123
|
-
name = "InvalidSnsTopicArnException";
|
|
124
|
-
$fault = "client";
|
|
125
|
-
constructor(opts) {
|
|
126
|
-
super({
|
|
127
|
-
name: "InvalidSnsTopicArnException",
|
|
128
|
-
$fault: "client",
|
|
129
|
-
...opts,
|
|
130
|
-
});
|
|
131
|
-
Object.setPrototypeOf(this, InvalidSnsTopicArnException.prototype);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
exports.InvalidSsmlException = class InvalidSsmlException extends __BaseException {
|
|
135
|
-
name = "InvalidSsmlException";
|
|
136
|
-
$fault = "client";
|
|
137
|
-
constructor(opts) {
|
|
138
|
-
super({
|
|
139
|
-
name: "InvalidSsmlException",
|
|
140
|
-
$fault: "client",
|
|
141
|
-
...opts,
|
|
142
|
-
});
|
|
143
|
-
Object.setPrototypeOf(this, InvalidSsmlException.prototype);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
exports.LanguageNotSupportedException = class LanguageNotSupportedException extends __BaseException {
|
|
147
|
-
name = "LanguageNotSupportedException";
|
|
148
|
-
$fault = "client";
|
|
149
|
-
constructor(opts) {
|
|
150
|
-
super({
|
|
151
|
-
name: "LanguageNotSupportedException",
|
|
152
|
-
$fault: "client",
|
|
153
|
-
...opts,
|
|
154
|
-
});
|
|
155
|
-
Object.setPrototypeOf(this, LanguageNotSupportedException.prototype);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
exports.LexiconSizeExceededException = class LexiconSizeExceededException extends __BaseException {
|
|
159
|
-
name = "LexiconSizeExceededException";
|
|
160
|
-
$fault = "client";
|
|
161
|
-
constructor(opts) {
|
|
162
|
-
super({
|
|
163
|
-
name: "LexiconSizeExceededException",
|
|
164
|
-
$fault: "client",
|
|
165
|
-
...opts,
|
|
166
|
-
});
|
|
167
|
-
Object.setPrototypeOf(this, LexiconSizeExceededException.prototype);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
exports.MarksNotSupportedForFormatException = class MarksNotSupportedForFormatException extends __BaseException {
|
|
171
|
-
name = "MarksNotSupportedForFormatException";
|
|
172
|
-
$fault = "client";
|
|
173
|
-
constructor(opts) {
|
|
174
|
-
super({
|
|
175
|
-
name: "MarksNotSupportedForFormatException",
|
|
176
|
-
$fault: "client",
|
|
177
|
-
...opts,
|
|
178
|
-
});
|
|
179
|
-
Object.setPrototypeOf(this, MarksNotSupportedForFormatException.prototype);
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
exports.MaxLexemeLengthExceededException = class MaxLexemeLengthExceededException extends __BaseException {
|
|
183
|
-
name = "MaxLexemeLengthExceededException";
|
|
184
|
-
$fault = "client";
|
|
185
|
-
constructor(opts) {
|
|
186
|
-
super({
|
|
187
|
-
name: "MaxLexemeLengthExceededException",
|
|
188
|
-
$fault: "client",
|
|
189
|
-
...opts,
|
|
190
|
-
});
|
|
191
|
-
Object.setPrototypeOf(this, MaxLexemeLengthExceededException.prototype);
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
exports.MaxLexiconsNumberExceededException = class MaxLexiconsNumberExceededException extends __BaseException {
|
|
195
|
-
name = "MaxLexiconsNumberExceededException";
|
|
196
|
-
$fault = "client";
|
|
197
|
-
constructor(opts) {
|
|
198
|
-
super({
|
|
199
|
-
name: "MaxLexiconsNumberExceededException",
|
|
200
|
-
$fault: "client",
|
|
201
|
-
...opts,
|
|
202
|
-
});
|
|
203
|
-
Object.setPrototypeOf(this, MaxLexiconsNumberExceededException.prototype);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
exports.UnsupportedPlsAlphabetException = class UnsupportedPlsAlphabetException extends __BaseException {
|
|
207
|
-
name = "UnsupportedPlsAlphabetException";
|
|
208
|
-
$fault = "client";
|
|
209
|
-
constructor(opts) {
|
|
210
|
-
super({
|
|
211
|
-
name: "UnsupportedPlsAlphabetException",
|
|
212
|
-
$fault: "client",
|
|
213
|
-
...opts,
|
|
214
|
-
});
|
|
215
|
-
Object.setPrototypeOf(this, UnsupportedPlsAlphabetException.prototype);
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
exports.UnsupportedPlsLanguageException = class UnsupportedPlsLanguageException extends __BaseException {
|
|
219
|
-
name = "UnsupportedPlsLanguageException";
|
|
220
|
-
$fault = "client";
|
|
221
|
-
constructor(opts) {
|
|
222
|
-
super({
|
|
223
|
-
name: "UnsupportedPlsLanguageException",
|
|
224
|
-
$fault: "client",
|
|
225
|
-
...opts,
|
|
226
|
-
});
|
|
227
|
-
Object.setPrototypeOf(this, UnsupportedPlsLanguageException.prototype);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
|
|
231
|
-
name = "ServiceQuotaExceededException";
|
|
232
|
-
$fault = "client";
|
|
233
|
-
quotaCode;
|
|
234
|
-
serviceCode;
|
|
235
|
-
constructor(opts) {
|
|
236
|
-
super({
|
|
237
|
-
name: "ServiceQuotaExceededException",
|
|
238
|
-
$fault: "client",
|
|
239
|
-
...opts,
|
|
240
|
-
});
|
|
241
|
-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
242
|
-
this.quotaCode = opts.quotaCode;
|
|
243
|
-
this.serviceCode = opts.serviceCode;
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
exports.ThrottlingException = class ThrottlingException extends __BaseException {
|
|
247
|
-
name = "ThrottlingException";
|
|
248
|
-
$fault = "client";
|
|
249
|
-
throttlingReasons;
|
|
250
|
-
constructor(opts) {
|
|
251
|
-
super({
|
|
252
|
-
name: "ThrottlingException",
|
|
253
|
-
$fault: "client",
|
|
254
|
-
...opts,
|
|
255
|
-
});
|
|
256
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
257
|
-
this.throttlingReasons = opts.throttlingReasons;
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
exports.ValidationException = class ValidationException extends __BaseException {
|
|
261
|
-
name = "ValidationException";
|
|
262
|
-
$fault = "client";
|
|
263
|
-
reason;
|
|
264
|
-
fields;
|
|
265
|
-
constructor(opts) {
|
|
266
|
-
super({
|
|
267
|
-
name: "ValidationException",
|
|
268
|
-
$fault: "client",
|
|
269
|
-
...opts,
|
|
270
|
-
});
|
|
271
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
272
|
-
this.reason = opts.reason;
|
|
273
|
-
this.fields = opts.fields;
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
exports.SsmlMarksNotSupportedForTextTypeException = class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
|
|
277
|
-
name = "SsmlMarksNotSupportedForTextTypeException";
|
|
278
|
-
$fault = "client";
|
|
279
|
-
constructor(opts) {
|
|
280
|
-
super({
|
|
281
|
-
name: "SsmlMarksNotSupportedForTextTypeException",
|
|
282
|
-
$fault: "client",
|
|
283
|
-
...opts,
|
|
284
|
-
});
|
|
285
|
-
Object.setPrototypeOf(this, SsmlMarksNotSupportedForTextTypeException.prototype);
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
exports.TextLengthExceededException = class TextLengthExceededException extends __BaseException {
|
|
289
|
-
name = "TextLengthExceededException";
|
|
290
|
-
$fault = "client";
|
|
291
|
-
constructor(opts) {
|
|
292
|
-
super({
|
|
293
|
-
name: "TextLengthExceededException",
|
|
294
|
-
$fault: "client",
|
|
295
|
-
...opts,
|
|
296
|
-
});
|
|
297
|
-
Object.setPrototypeOf(this, TextLengthExceededException.prototype);
|
|
298
|
-
}
|
|
299
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
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");
|
|
11
|
-
const getRuntimeConfig = (config) => {
|
|
12
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
13
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
14
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
15
|
-
return {
|
|
16
|
-
...clientSharedValues,
|
|
17
|
-
...config,
|
|
18
|
-
runtime: "browser",
|
|
19
|
-
defaultsMode,
|
|
20
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
21
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
22
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
23
|
-
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
|
|
24
|
-
handle: invalidFunction("event stream request is not supported in browser."),
|
|
25
|
-
})),
|
|
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)),
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,52 +0,0 @@
|
|
|
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");
|
|
13
|
-
const getRuntimeConfig = (config) => {
|
|
14
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
15
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
-
awsCheckVersion(process.version);
|
|
19
|
-
const loaderConfig = {
|
|
20
|
-
profile: config?.profile,
|
|
21
|
-
logger: clientSharedValues.logger,
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
...clientSharedValues,
|
|
25
|
-
...config,
|
|
26
|
-
runtime: "node",
|
|
27
|
-
defaultsMode,
|
|
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 () => ({
|
|
37
|
-
...await defaultConfigProvider(),
|
|
38
|
-
disableConcurrentStreams: true
|
|
39
|
-
}))),
|
|
40
|
-
retryMode: config?.retryMode ??
|
|
41
|
-
loadNodeConfig({
|
|
42
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
|
-
}, config),
|
|
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),
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { invalidFunction } = require("@smithy/core/client");
|
|
3
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
4
|
-
const getRuntimeConfig = (config) => {
|
|
5
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
6
|
-
return {
|
|
7
|
-
...browserDefaults,
|
|
8
|
-
...config,
|
|
9
|
-
runtime: "react-native",
|
|
10
|
-
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
|
|
11
|
-
handle: invalidFunction("event stream request is not supported in ReactNative."),
|
|
12
|
-
})),
|
|
13
|
-
sha256: config?.sha256 ?? Sha256,
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|