@aws-sdk/client-transcribe-streaming 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 +74 -94
- package/dist-cjs/models/TranscribeStreamingServiceException.js +4 -8
- package/dist-cjs/models/errors.js +13 -22
- package/dist-cjs/runtimeConfig.browser.js +28 -32
- package/dist-cjs/runtimeConfig.js +34 -38
- package/dist-cjs/runtimeConfig.native.js +6 -9
- package/dist-cjs/runtimeConfig.shared.js +20 -24
- package/dist-cjs/schemas/schemas_0.js +188 -128
- package/package.json +18 -18
|
@@ -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 defaultTranscribeStreamingHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
1
|
+
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
+
exports.defaultTranscribeStreamingHttpAuthSchemeParametersProvider = 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.defaultTranscribeStreamingHttpAuthSchemeParametersProvider = defaultTranscribeStreamingHttpAuthSchemeParametersProvider;
|
|
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.defaultTranscribeStreamingHttpAuthSchemeProvider = (authParameters) => {
|
|
31
27
|
const options = [];
|
|
32
28
|
switch (authParameters.operation) {
|
|
33
29
|
default: {
|
|
@@ -36,11 +32,9 @@ const defaultTranscribeStreamingHttpAuthSchemeProvider = (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,22 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 { resolveWebSocketConfig, getWebSocketPlugin } = require("@aws-sdk/middleware-websocket");
|
|
5
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
|
|
6
|
+
const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
|
|
7
|
+
exports.$Command = Command;
|
|
8
|
+
exports.__Client = Client;
|
|
9
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
10
|
+
const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
11
|
+
const { resolveEventStreamSerdeConfig } = require("@smithy/core/event-streams");
|
|
12
|
+
const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
13
|
+
const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
14
|
+
const { getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
15
|
+
const { resolveHttpAuthSchemeConfig, defaultTranscribeStreamingHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
|
|
16
|
+
const { getRuntimeConfig } = require("./runtimeConfig");
|
|
17
|
+
const { GetMedicalScribeStream$, StartCallAnalyticsStreamTranscription$, StartMedicalScribeStream$, StartMedicalStreamTranscription$, StartStreamTranscription$ } = require("./schemas/schemas_0");
|
|
18
|
+
__exportStar(require("./schemas/schemas_0"), exports);
|
|
19
|
+
const { getTranscribeStreamingPlugin } = require("@aws-sdk/middleware-sdk-transcribe-streaming");
|
|
20
|
+
__exportStar(require("./models/errors"), exports);
|
|
21
|
+
const { TranscribeStreamingServiceException } = require("./models/TranscribeStreamingServiceException");
|
|
22
|
+
exports.TranscribeStreamingServiceException = TranscribeStreamingServiceException;
|
|
20
23
|
|
|
21
24
|
const resolveClientEndpointParameters = (options) => {
|
|
22
25
|
return Object.assign(options, {
|
|
@@ -72,72 +75,72 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
72
75
|
};
|
|
73
76
|
|
|
74
77
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
75
|
-
const extensionConfiguration = Object.assign(
|
|
78
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
76
79
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
77
|
-
return Object.assign(runtimeConfig,
|
|
80
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
78
81
|
};
|
|
79
82
|
|
|
80
|
-
class TranscribeStreamingClient extends
|
|
83
|
+
class TranscribeStreamingClient extends Client {
|
|
81
84
|
config;
|
|
82
85
|
constructor(...[configuration]) {
|
|
83
|
-
const _config_0 =
|
|
86
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
84
87
|
super(_config_0);
|
|
85
88
|
this.initConfig = _config_0;
|
|
86
89
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
87
|
-
const _config_2 =
|
|
88
|
-
const _config_3 =
|
|
89
|
-
const _config_4 =
|
|
90
|
-
const _config_5 =
|
|
91
|
-
const _config_6 =
|
|
92
|
-
const _config_7 =
|
|
93
|
-
const _config_8 =
|
|
94
|
-
const _config_9 =
|
|
95
|
-
const _config_10 =
|
|
90
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
91
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
92
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
93
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
94
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
95
|
+
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
|
|
96
|
+
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
|
|
97
|
+
const _config_9 = resolveEventStreamConfig(_config_8);
|
|
98
|
+
const _config_10 = resolveWebSocketConfig(_config_9);
|
|
96
99
|
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
|
|
97
100
|
this.config = _config_11;
|
|
98
|
-
this.middlewareStack.use(
|
|
99
|
-
this.middlewareStack.use(
|
|
100
|
-
this.middlewareStack.use(
|
|
101
|
-
this.middlewareStack.use(
|
|
102
|
-
this.middlewareStack.use(
|
|
103
|
-
this.middlewareStack.use(
|
|
104
|
-
this.middlewareStack.use(
|
|
105
|
-
this.middlewareStack.use(
|
|
106
|
-
httpAuthSchemeParametersProvider:
|
|
107
|
-
identityProviderConfigProvider: async (config) => new
|
|
101
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
104
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
105
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
106
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
107
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
108
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
109
|
+
httpAuthSchemeParametersProvider: defaultTranscribeStreamingHttpAuthSchemeParametersProvider,
|
|
110
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
108
111
|
"aws.auth#sigv4": config.credentials,
|
|
109
112
|
}),
|
|
110
113
|
}));
|
|
111
|
-
this.middlewareStack.use(
|
|
114
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
112
115
|
}
|
|
113
116
|
destroy() {
|
|
114
117
|
super.destroy();
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
class GetMedicalScribeStreamCommand extends
|
|
121
|
+
class GetMedicalScribeStreamCommand extends Command
|
|
119
122
|
.classBuilder()
|
|
120
123
|
.ep(commonParams)
|
|
121
124
|
.m(function (Command, cs, config, o) {
|
|
122
|
-
return [
|
|
125
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
123
126
|
})
|
|
124
127
|
.s("Transcribe", "GetMedicalScribeStream", {})
|
|
125
128
|
.n("TranscribeStreamingClient", "GetMedicalScribeStreamCommand")
|
|
126
|
-
.sc(
|
|
129
|
+
.sc(GetMedicalScribeStream$)
|
|
127
130
|
.build() {
|
|
128
131
|
}
|
|
129
132
|
|
|
130
|
-
class StartCallAnalyticsStreamTranscriptionCommand extends
|
|
133
|
+
class StartCallAnalyticsStreamTranscriptionCommand extends Command
|
|
131
134
|
.classBuilder()
|
|
132
135
|
.ep(commonParams)
|
|
133
136
|
.m(function (Command, cs, config, o) {
|
|
134
137
|
return [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
139
|
+
getEventStreamPlugin(config),
|
|
140
|
+
getWebSocketPlugin(config, {
|
|
138
141
|
headerPrefix: 'x-amzn-transcribe-',
|
|
139
142
|
}),
|
|
140
|
-
|
|
143
|
+
getTranscribeStreamingPlugin(config),
|
|
141
144
|
];
|
|
142
145
|
})
|
|
143
146
|
.s("Transcribe", "StartCallAnalyticsStreamTranscription", {
|
|
@@ -147,21 +150,21 @@ class StartCallAnalyticsStreamTranscriptionCommand extends client.Command
|
|
|
147
150
|
},
|
|
148
151
|
})
|
|
149
152
|
.n("TranscribeStreamingClient", "StartCallAnalyticsStreamTranscriptionCommand")
|
|
150
|
-
.sc(
|
|
153
|
+
.sc(StartCallAnalyticsStreamTranscription$)
|
|
151
154
|
.build() {
|
|
152
155
|
}
|
|
153
156
|
|
|
154
|
-
class StartMedicalScribeStreamCommand extends
|
|
157
|
+
class StartMedicalScribeStreamCommand extends Command
|
|
155
158
|
.classBuilder()
|
|
156
159
|
.ep(commonParams)
|
|
157
160
|
.m(function (Command, cs, config, o) {
|
|
158
161
|
return [
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
163
|
+
getEventStreamPlugin(config),
|
|
164
|
+
getWebSocketPlugin(config, {
|
|
162
165
|
headerPrefix: 'x-amzn-transcribe-',
|
|
163
166
|
}),
|
|
164
|
-
|
|
167
|
+
getTranscribeStreamingPlugin(config),
|
|
165
168
|
];
|
|
166
169
|
})
|
|
167
170
|
.s("Transcribe", "StartMedicalScribeStream", {
|
|
@@ -171,21 +174,21 @@ class StartMedicalScribeStreamCommand extends client.Command
|
|
|
171
174
|
},
|
|
172
175
|
})
|
|
173
176
|
.n("TranscribeStreamingClient", "StartMedicalScribeStreamCommand")
|
|
174
|
-
.sc(
|
|
177
|
+
.sc(StartMedicalScribeStream$)
|
|
175
178
|
.build() {
|
|
176
179
|
}
|
|
177
180
|
|
|
178
|
-
class StartMedicalStreamTranscriptionCommand extends
|
|
181
|
+
class StartMedicalStreamTranscriptionCommand extends Command
|
|
179
182
|
.classBuilder()
|
|
180
183
|
.ep(commonParams)
|
|
181
184
|
.m(function (Command, cs, config, o) {
|
|
182
185
|
return [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
187
|
+
getEventStreamPlugin(config),
|
|
188
|
+
getWebSocketPlugin(config, {
|
|
186
189
|
headerPrefix: 'x-amzn-transcribe-',
|
|
187
190
|
}),
|
|
188
|
-
|
|
191
|
+
getTranscribeStreamingPlugin(config),
|
|
189
192
|
];
|
|
190
193
|
})
|
|
191
194
|
.s("Transcribe", "StartMedicalStreamTranscription", {
|
|
@@ -195,21 +198,21 @@ class StartMedicalStreamTranscriptionCommand extends client.Command
|
|
|
195
198
|
},
|
|
196
199
|
})
|
|
197
200
|
.n("TranscribeStreamingClient", "StartMedicalStreamTranscriptionCommand")
|
|
198
|
-
.sc(
|
|
201
|
+
.sc(StartMedicalStreamTranscription$)
|
|
199
202
|
.build() {
|
|
200
203
|
}
|
|
201
204
|
|
|
202
|
-
class StartStreamTranscriptionCommand extends
|
|
205
|
+
class StartStreamTranscriptionCommand extends Command
|
|
203
206
|
.classBuilder()
|
|
204
207
|
.ep(commonParams)
|
|
205
208
|
.m(function (Command, cs, config, o) {
|
|
206
209
|
return [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
211
|
+
getEventStreamPlugin(config),
|
|
212
|
+
getWebSocketPlugin(config, {
|
|
210
213
|
headerPrefix: 'x-amzn-transcribe-',
|
|
211
214
|
}),
|
|
212
|
-
|
|
215
|
+
getTranscribeStreamingPlugin(config),
|
|
213
216
|
];
|
|
214
217
|
})
|
|
215
218
|
.s("Transcribe", "StartStreamTranscription", {
|
|
@@ -219,7 +222,7 @@ class StartStreamTranscriptionCommand extends client.Command
|
|
|
219
222
|
},
|
|
220
223
|
})
|
|
221
224
|
.n("TranscribeStreamingClient", "StartStreamTranscriptionCommand")
|
|
222
|
-
.sc(
|
|
225
|
+
.sc(StartStreamTranscription$)
|
|
223
226
|
.build() {
|
|
224
227
|
}
|
|
225
228
|
|
|
@@ -232,7 +235,7 @@ const commands = {
|
|
|
232
235
|
};
|
|
233
236
|
class TranscribeStreaming extends TranscribeStreamingClient {
|
|
234
237
|
}
|
|
235
|
-
|
|
238
|
+
createAggregatedClient(commands, TranscribeStreaming);
|
|
236
239
|
|
|
237
240
|
const ItemType = {
|
|
238
241
|
PRONUNCIATION: "pronunciation",
|
|
@@ -450,9 +453,6 @@ const Type = {
|
|
|
450
453
|
DICTATION: "DICTATION",
|
|
451
454
|
};
|
|
452
455
|
|
|
453
|
-
exports.$Command = client.Command;
|
|
454
|
-
exports.__Client = client.Client;
|
|
455
|
-
exports.TranscribeStreamingServiceException = TranscribeStreamingServiceException.TranscribeStreamingServiceException;
|
|
456
456
|
exports.CallAnalyticsLanguageCode = CallAnalyticsLanguageCode;
|
|
457
457
|
exports.ClinicalNoteGenerationStatus = ClinicalNoteGenerationStatus;
|
|
458
458
|
exports.ContentIdentificationType = ContentIdentificationType;
|
|
@@ -484,23 +484,3 @@ exports.TranscribeStreaming = TranscribeStreaming;
|
|
|
484
484
|
exports.TranscribeStreamingClient = TranscribeStreamingClient;
|
|
485
485
|
exports.Type = Type;
|
|
486
486
|
exports.VocabularyFilterMethod = VocabularyFilterMethod;
|
|
487
|
-
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
488
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
489
|
-
Object.defineProperty(exports, '__proto__', {
|
|
490
|
-
enumerable: true,
|
|
491
|
-
value: schemas_0['__proto__']
|
|
492
|
-
});
|
|
493
|
-
|
|
494
|
-
Object.keys(schemas_0).forEach(function (k) {
|
|
495
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
496
|
-
});
|
|
497
|
-
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
498
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
499
|
-
Object.defineProperty(exports, '__proto__', {
|
|
500
|
-
enumerable: true,
|
|
501
|
-
value: errors['__proto__']
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
Object.keys(errors).forEach(function (k) {
|
|
505
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
506
|
-
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TranscribeStreamingServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class TranscribeStreamingServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.TranscribeStreamingServiceException = class TranscribeStreamingServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, TranscribeStreamingServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.TranscribeStreamingServiceException = TranscribeStreamingServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ResourceNotFoundException = exports.ServiceUnavailableException = exports.LimitExceededException = exports.InternalFailureException = exports.ConflictException = exports.BadRequestException = void 0;
|
|
4
|
-
const TranscribeStreamingServiceException_1 = require("./TranscribeStreamingServiceException");
|
|
5
|
-
class BadRequestException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
1
|
+
const { TranscribeStreamingServiceException: __BaseException } = require("./TranscribeStreamingServiceException");
|
|
2
|
+
exports.BadRequestException = class BadRequestException extends __BaseException {
|
|
6
3
|
name = "BadRequestException";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
Message;
|
|
@@ -15,9 +12,8 @@ class BadRequestException extends TranscribeStreamingServiceException_1.Transcri
|
|
|
15
12
|
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
16
13
|
this.Message = opts.Message;
|
|
17
14
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.
|
|
20
|
-
class ConflictException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
15
|
+
};
|
|
16
|
+
exports.ConflictException = class ConflictException extends __BaseException {
|
|
21
17
|
name = "ConflictException";
|
|
22
18
|
$fault = "client";
|
|
23
19
|
Message;
|
|
@@ -30,9 +26,8 @@ class ConflictException extends TranscribeStreamingServiceException_1.Transcribe
|
|
|
30
26
|
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
31
27
|
this.Message = opts.Message;
|
|
32
28
|
}
|
|
33
|
-
}
|
|
34
|
-
exports.
|
|
35
|
-
class InternalFailureException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
29
|
+
};
|
|
30
|
+
exports.InternalFailureException = class InternalFailureException extends __BaseException {
|
|
36
31
|
name = "InternalFailureException";
|
|
37
32
|
$fault = "server";
|
|
38
33
|
Message;
|
|
@@ -45,9 +40,8 @@ class InternalFailureException extends TranscribeStreamingServiceException_1.Tra
|
|
|
45
40
|
Object.setPrototypeOf(this, InternalFailureException.prototype);
|
|
46
41
|
this.Message = opts.Message;
|
|
47
42
|
}
|
|
48
|
-
}
|
|
49
|
-
exports.
|
|
50
|
-
class LimitExceededException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
43
|
+
};
|
|
44
|
+
exports.LimitExceededException = class LimitExceededException extends __BaseException {
|
|
51
45
|
name = "LimitExceededException";
|
|
52
46
|
$fault = "client";
|
|
53
47
|
Message;
|
|
@@ -60,9 +54,8 @@ class LimitExceededException extends TranscribeStreamingServiceException_1.Trans
|
|
|
60
54
|
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
61
55
|
this.Message = opts.Message;
|
|
62
56
|
}
|
|
63
|
-
}
|
|
64
|
-
exports.
|
|
65
|
-
class ServiceUnavailableException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
57
|
+
};
|
|
58
|
+
exports.ServiceUnavailableException = class ServiceUnavailableException extends __BaseException {
|
|
66
59
|
name = "ServiceUnavailableException";
|
|
67
60
|
$fault = "server";
|
|
68
61
|
Message;
|
|
@@ -75,9 +68,8 @@ class ServiceUnavailableException extends TranscribeStreamingServiceException_1.
|
|
|
75
68
|
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
76
69
|
this.Message = opts.Message;
|
|
77
70
|
}
|
|
78
|
-
}
|
|
79
|
-
exports.
|
|
80
|
-
class ResourceNotFoundException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
|
|
71
|
+
};
|
|
72
|
+
exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
|
|
81
73
|
name = "ResourceNotFoundException";
|
|
82
74
|
$fault = "client";
|
|
83
75
|
Message;
|
|
@@ -90,5 +82,4 @@ class ResourceNotFoundException extends TranscribeStreamingServiceException_1.Tr
|
|
|
90
82
|
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
91
83
|
this.Message = opts.Message;
|
|
92
84
|
}
|
|
93
|
-
}
|
|
94
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
85
|
+
};
|
|
@@ -1,42 +1,38 @@
|
|
|
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 fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
16
|
-
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 { eventStreamPayloadHandler } = require("@aws-sdk/middleware-sdk-transcribe-streaming");
|
|
5
|
+
const { WebSocketFetchHandler: WebSocketRequestHandler } = require("@aws-sdk/middleware-websocket");
|
|
6
|
+
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
7
|
+
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
8
|
+
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
9
|
+
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
10
|
+
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
11
|
+
const { FetchHttpHandler: HttpRequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
12
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
17
13
|
const getRuntimeConfig = (config) => {
|
|
18
|
-
const defaultsMode =
|
|
19
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
20
|
-
const clientSharedValues = (
|
|
14
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
17
|
return {
|
|
22
18
|
...clientSharedValues,
|
|
23
19
|
...config,
|
|
24
20
|
runtime: "browser",
|
|
25
21
|
defaultsMode,
|
|
26
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
22
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
27
23
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
28
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
29
|
-
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() =>
|
|
30
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
31
|
-
maxAttempts: config?.maxAttempts ??
|
|
32
|
-
region: config?.region ??
|
|
33
|
-
requestHandler:
|
|
34
|
-
?? defaultConfigProvider,
|
|
35
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
36
|
-
sha256: config?.sha256 ??
|
|
37
|
-
streamCollector: config?.streamCollector ??
|
|
38
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
39
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => eventStreamPayloadHandler),
|
|
26
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
27
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
28
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
29
|
+
requestHandler: WebSocketRequestHandler.create(config?.requestHandler
|
|
30
|
+
?? defaultConfigProvider, HttpRequestHandler.create(defaultConfigProvider)),
|
|
31
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
32
|
+
sha256: config?.sha256 ?? Sha256,
|
|
33
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
34
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
35
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
40
36
|
};
|
|
41
37
|
};
|
|
42
38
|
exports.getRuntimeConfig = getRuntimeConfig;
|