@probelabs/probe 0.6.0-rc135 → 0.6.0-rc136
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/build/agent/index.js +82351 -215
- package/build/agent/schemaUtils.js +5 -2
- package/build/agent/telemetry.js +3 -4
- package/build/index.js +7 -1
- package/cjs/agent/ProbeAgent.cjs +706 -662
- package/cjs/agent/simpleTelemetry.cjs +250 -0
- package/cjs/agent/telemetry.cjs +373 -0
- package/cjs/index.cjs +1283 -613
- package/index.d.ts +155 -0
- package/package.json +5 -1
- package/src/agent/schemaUtils.js +5 -2
- package/src/agent/telemetry.js +3 -4
- package/src/index.js +7 -1
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -657,10 +657,10 @@ var require_dist_cjs3 = __commonJS({
|
|
|
657
657
|
}
|
|
658
658
|
__name(resolveEventStreamConfig, "resolveEventStreamConfig");
|
|
659
659
|
var import_protocol_http15 = require_dist_cjs2();
|
|
660
|
-
var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next,
|
|
660
|
+
var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context3) => async (args) => {
|
|
661
661
|
const { request } = args;
|
|
662
662
|
if (!import_protocol_http15.HttpRequest.isInstance(request)) return next(args);
|
|
663
|
-
return options.eventStreamPayloadHandler.handle(next, args,
|
|
663
|
+
return options.eventStreamPayloadHandler.handle(next, args, context3);
|
|
664
664
|
}, "eventStreamHandlingMiddleware");
|
|
665
665
|
var eventStreamHandlingMiddlewareOptions = {
|
|
666
666
|
tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"],
|
|
@@ -790,13 +790,13 @@ var require_dist_cjs5 = __commonJS({
|
|
|
790
790
|
loggerMiddlewareOptions: () => loggerMiddlewareOptions
|
|
791
791
|
});
|
|
792
792
|
module2.exports = __toCommonJS2(index_exports);
|
|
793
|
-
var loggerMiddleware = /* @__PURE__ */ __name(() => (next,
|
|
793
|
+
var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context3) => async (args) => {
|
|
794
794
|
try {
|
|
795
795
|
const response = await next(args);
|
|
796
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
796
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
|
|
797
797
|
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
798
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
799
|
-
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ??
|
|
798
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
|
|
799
|
+
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context3.outputFilterSensitiveLog;
|
|
800
800
|
const { $metadata, ...outputWithoutMetadata } = response.output;
|
|
801
801
|
logger2?.info?.({
|
|
802
802
|
clientName,
|
|
@@ -807,9 +807,9 @@ var require_dist_cjs5 = __commonJS({
|
|
|
807
807
|
});
|
|
808
808
|
return response;
|
|
809
809
|
} catch (error2) {
|
|
810
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
810
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
|
|
811
811
|
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
812
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
812
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
|
|
813
813
|
logger2?.error?.({
|
|
814
814
|
clientName,
|
|
815
815
|
commandName,
|
|
@@ -856,8 +856,8 @@ var require_invoke_store = __commonJS({
|
|
|
856
856
|
/**
|
|
857
857
|
* Initialize and run code within an invoke context
|
|
858
858
|
*/
|
|
859
|
-
static run(
|
|
860
|
-
return this.storage.run({ ...
|
|
859
|
+
static run(context3, fn) {
|
|
860
|
+
return this.storage.run({ ...context3 }, fn);
|
|
861
861
|
}
|
|
862
862
|
/**
|
|
863
863
|
* Get the complete current context
|
|
@@ -869,8 +869,8 @@ var require_invoke_store = __commonJS({
|
|
|
869
869
|
* Get a specific value from the context by key
|
|
870
870
|
*/
|
|
871
871
|
static get(key) {
|
|
872
|
-
const
|
|
873
|
-
return
|
|
872
|
+
const context3 = this.storage.getStore();
|
|
873
|
+
return context3?.[key];
|
|
874
874
|
}
|
|
875
875
|
/**
|
|
876
876
|
* Set a custom value in the current context
|
|
@@ -880,9 +880,9 @@ var require_invoke_store = __commonJS({
|
|
|
880
880
|
if (this.isProtectedKey(key)) {
|
|
881
881
|
throw new Error(`Cannot modify protected Lambda context field`);
|
|
882
882
|
}
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
885
|
-
|
|
883
|
+
const context3 = this.storage.getStore();
|
|
884
|
+
if (context3) {
|
|
885
|
+
context3[key] = value;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
888
|
/**
|
|
@@ -1010,7 +1010,7 @@ var import_types, getSmithyContext;
|
|
|
1010
1010
|
var init_getSmithyContext = __esm({
|
|
1011
1011
|
"node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
|
|
1012
1012
|
import_types = __toESM(require_dist_cjs());
|
|
1013
|
-
getSmithyContext = (
|
|
1013
|
+
getSmithyContext = (context3) => context3[import_types.SMITHY_CONTEXT_KEY] || (context3[import_types.SMITHY_CONTEXT_KEY] = {});
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
1016
1016
|
|
|
@@ -1019,7 +1019,7 @@ var require_dist_cjs7 = __commonJS({
|
|
|
1019
1019
|
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
|
|
1020
1020
|
"use strict";
|
|
1021
1021
|
var types2 = require_dist_cjs();
|
|
1022
|
-
var getSmithyContext9 = (
|
|
1022
|
+
var getSmithyContext9 = (context3) => context3[types2.SMITHY_CONTEXT_KEY] || (context3[types2.SMITHY_CONTEXT_KEY] = {});
|
|
1023
1023
|
var normalizeProvider4 = (input) => {
|
|
1024
1024
|
if (typeof input === "function")
|
|
1025
1025
|
return input;
|
|
@@ -1071,12 +1071,12 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1071
1071
|
"node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
|
|
1072
1072
|
import_util_middleware = __toESM(require_dist_cjs7());
|
|
1073
1073
|
init_resolveAuthOptions();
|
|
1074
|
-
httpAuthSchemeMiddleware = (config, mwOptions) => (next,
|
|
1075
|
-
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config,
|
|
1074
|
+
httpAuthSchemeMiddleware = (config, mwOptions) => (next, context3) => async (args) => {
|
|
1075
|
+
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context3, args.input));
|
|
1076
1076
|
const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
|
|
1077
1077
|
const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
|
|
1078
1078
|
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
1079
|
-
const smithyContext = (0, import_util_middleware.getSmithyContext)(
|
|
1079
|
+
const smithyContext = (0, import_util_middleware.getSmithyContext)(context3);
|
|
1080
1080
|
const failureReasons = [];
|
|
1081
1081
|
for (const option of resolvedOptions) {
|
|
1082
1082
|
const scheme = authSchemes.get(option.schemeId);
|
|
@@ -1089,7 +1089,7 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1089
1089
|
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
|
|
1090
1090
|
continue;
|
|
1091
1091
|
}
|
|
1092
|
-
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config,
|
|
1092
|
+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context3) || {};
|
|
1093
1093
|
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
|
|
1094
1094
|
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
|
|
1095
1095
|
smithyContext.selectedHttpAuthScheme = {
|
|
@@ -1136,7 +1136,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1136
1136
|
"node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
|
|
1137
1137
|
"use strict";
|
|
1138
1138
|
var protocolHttp = require_dist_cjs2();
|
|
1139
|
-
var deserializerMiddleware = (options, deserializer) => (next,
|
|
1139
|
+
var deserializerMiddleware = (options, deserializer) => (next, context3) => async (args) => {
|
|
1140
1140
|
const { response } = await next(args);
|
|
1141
1141
|
try {
|
|
1142
1142
|
const parsed = await deserializer(response, options);
|
|
@@ -1153,10 +1153,10 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1153
1153
|
try {
|
|
1154
1154
|
error2.message += "\n " + hint;
|
|
1155
1155
|
} catch (e3) {
|
|
1156
|
-
if (!
|
|
1156
|
+
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
1157
1157
|
console.warn(hint);
|
|
1158
1158
|
} else {
|
|
1159
|
-
|
|
1159
|
+
context3.logger?.warn?.(hint);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -1186,9 +1186,9 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1186
1186
|
return k3.match(pattern);
|
|
1187
1187
|
}) || [void 0, void 0])[1];
|
|
1188
1188
|
};
|
|
1189
|
-
var serializerMiddleware = (options, serializer) => (next,
|
|
1189
|
+
var serializerMiddleware = (options, serializer) => (next, context3) => async (args) => {
|
|
1190
1190
|
const endpointConfig = options;
|
|
1191
|
-
const endpoint =
|
|
1191
|
+
const endpoint = context3.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context3.endpointV2.url) : endpointConfig.endpoint;
|
|
1192
1192
|
if (!endpoint) {
|
|
1193
1193
|
throw new Error("No valid endpoint provider available.");
|
|
1194
1194
|
}
|
|
@@ -1271,11 +1271,11 @@ var init_httpSigningMiddleware = __esm({
|
|
|
1271
1271
|
};
|
|
1272
1272
|
defaultSuccessHandler = (httpResponse, signingProperties) => {
|
|
1273
1273
|
};
|
|
1274
|
-
httpSigningMiddleware = (config) => (next,
|
|
1274
|
+
httpSigningMiddleware = (config) => (next, context3) => async (args) => {
|
|
1275
1275
|
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
|
|
1276
1276
|
return next(args);
|
|
1277
1277
|
}
|
|
1278
|
-
const smithyContext = (0, import_util_middleware2.getSmithyContext)(
|
|
1278
|
+
const smithyContext = (0, import_util_middleware2.getSmithyContext)(context3);
|
|
1279
1279
|
const scheme = smithyContext.selectedHttpAuthScheme;
|
|
1280
1280
|
if (!scheme) {
|
|
1281
1281
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
@@ -3268,14 +3268,14 @@ var import_util_stream, collectBody;
|
|
|
3268
3268
|
var init_collect_stream_body = __esm({
|
|
3269
3269
|
"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
|
|
3270
3270
|
import_util_stream = __toESM(require_dist_cjs18());
|
|
3271
|
-
collectBody = async (streamBody = new Uint8Array(),
|
|
3271
|
+
collectBody = async (streamBody = new Uint8Array(), context3) => {
|
|
3272
3272
|
if (streamBody instanceof Uint8Array) {
|
|
3273
3273
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
3274
3274
|
}
|
|
3275
3275
|
if (!streamBody) {
|
|
3276
3276
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
3277
3277
|
}
|
|
3278
|
-
const fromContext =
|
|
3278
|
+
const fromContext = context3.streamCollector(streamBody);
|
|
3279
3279
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
@@ -3756,16 +3756,16 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3756
3756
|
import_protocol_http2 = __toESM(require_dist_cjs2());
|
|
3757
3757
|
import_util_middleware3 = __toESM(require_dist_cjs7());
|
|
3758
3758
|
init_NormalizedSchema();
|
|
3759
|
-
schemaDeserializationMiddleware = (config) => (next,
|
|
3759
|
+
schemaDeserializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
3760
3760
|
const { response } = await next(args);
|
|
3761
|
-
let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(
|
|
3761
|
+
let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context3);
|
|
3762
3762
|
if (isStaticSchema(operationSchema)) {
|
|
3763
3763
|
operationSchema = hydrate(operationSchema);
|
|
3764
3764
|
}
|
|
3765
3765
|
try {
|
|
3766
3766
|
const parsed = await config.protocol.deserializeResponse(operationSchema, {
|
|
3767
3767
|
...config,
|
|
3768
|
-
...
|
|
3768
|
+
...context3
|
|
3769
3769
|
}, response);
|
|
3770
3770
|
return {
|
|
3771
3771
|
response,
|
|
@@ -3780,10 +3780,10 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3780
3780
|
try {
|
|
3781
3781
|
error2.message += "\n " + hint;
|
|
3782
3782
|
} catch (e3) {
|
|
3783
|
-
if (!
|
|
3783
|
+
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
3784
3784
|
console.warn(hint);
|
|
3785
3785
|
} else {
|
|
3786
|
-
|
|
3786
|
+
context3.logger?.warn?.(hint);
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
3789
3789
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -3822,15 +3822,15 @@ var init_schemaSerializationMiddleware = __esm({
|
|
|
3822
3822
|
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
3823
3823
|
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
3824
3824
|
init_NormalizedSchema();
|
|
3825
|
-
schemaSerializationMiddleware = (config) => (next,
|
|
3826
|
-
let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(
|
|
3825
|
+
schemaSerializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
3826
|
+
let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context3);
|
|
3827
3827
|
if (isStaticSchema(operationSchema)) {
|
|
3828
3828
|
operationSchema = hydrate(operationSchema);
|
|
3829
3829
|
}
|
|
3830
|
-
const endpoint =
|
|
3830
|
+
const endpoint = context3.endpointV2?.url && config.urlParser ? async () => config.urlParser(context3.endpointV2.url) : config.endpoint;
|
|
3831
3831
|
const request = await config.protocol.serializeRequest(operationSchema, args.input, {
|
|
3832
3832
|
...config,
|
|
3833
|
-
...
|
|
3833
|
+
...context3,
|
|
3834
3834
|
endpoint
|
|
3835
3835
|
});
|
|
3836
3836
|
return next({
|
|
@@ -4521,14 +4521,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
|
|
4521
4521
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
4522
4522
|
var _2, done = false;
|
|
4523
4523
|
for (var i3 = decorators.length - 1; i3 >= 0; i3--) {
|
|
4524
|
-
var
|
|
4525
|
-
for (var p3 in contextIn)
|
|
4526
|
-
for (var p3 in contextIn.access)
|
|
4527
|
-
|
|
4524
|
+
var context3 = {};
|
|
4525
|
+
for (var p3 in contextIn) context3[p3] = p3 === "access" ? {} : contextIn[p3];
|
|
4526
|
+
for (var p3 in contextIn.access) context3.access[p3] = contextIn.access[p3];
|
|
4527
|
+
context3.addInitializer = function(f3) {
|
|
4528
4528
|
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
4529
4529
|
extraInitializers.push(accept(f3 || null));
|
|
4530
4530
|
};
|
|
4531
|
-
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key],
|
|
4531
|
+
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
|
4532
4532
|
if (kind === "accessor") {
|
|
4533
4533
|
if (result === void 0) continue;
|
|
4534
4534
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
@@ -5666,20 +5666,20 @@ var init_HttpProtocol = __esm({
|
|
|
5666
5666
|
getDefaultContentType() {
|
|
5667
5667
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
5668
5668
|
}
|
|
5669
|
-
async deserializeHttpMessage(schema,
|
|
5669
|
+
async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
|
|
5670
5670
|
void schema;
|
|
5671
|
-
void
|
|
5671
|
+
void context3;
|
|
5672
5672
|
void response;
|
|
5673
5673
|
void arg4;
|
|
5674
5674
|
void arg5;
|
|
5675
5675
|
return [];
|
|
5676
5676
|
}
|
|
5677
5677
|
getEventStreamMarshaller() {
|
|
5678
|
-
const
|
|
5679
|
-
if (!
|
|
5678
|
+
const context3 = this.serdeContext;
|
|
5679
|
+
if (!context3.eventStreamMarshaller) {
|
|
5680
5680
|
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
5681
5681
|
}
|
|
5682
|
-
return
|
|
5682
|
+
return context3.eventStreamMarshaller;
|
|
5683
5683
|
}
|
|
5684
5684
|
};
|
|
5685
5685
|
}
|
|
@@ -5697,14 +5697,14 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5697
5697
|
init_extended_encode_uri_component();
|
|
5698
5698
|
init_HttpProtocol();
|
|
5699
5699
|
HttpBindingProtocol = class extends HttpProtocol {
|
|
5700
|
-
async serializeRequest(operationSchema, _input,
|
|
5700
|
+
async serializeRequest(operationSchema, _input, context3) {
|
|
5701
5701
|
const input = {
|
|
5702
5702
|
..._input ?? {}
|
|
5703
5703
|
};
|
|
5704
5704
|
const serializer = this.serializer;
|
|
5705
5705
|
const query2 = {};
|
|
5706
5706
|
const headers = {};
|
|
5707
|
-
const endpoint = await
|
|
5707
|
+
const endpoint = await context3.endpoint();
|
|
5708
5708
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
5709
5709
|
const schema = ns.getSchema();
|
|
5710
5710
|
let hasNonHttpBindingMember = false;
|
|
@@ -5829,16 +5829,16 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5829
5829
|
query2[traits.httpQuery] = serializer.flush();
|
|
5830
5830
|
}
|
|
5831
5831
|
}
|
|
5832
|
-
async deserializeResponse(operationSchema,
|
|
5832
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
5833
5833
|
const deserializer = this.deserializer;
|
|
5834
5834
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
5835
5835
|
const dataObject = {};
|
|
5836
5836
|
if (response.statusCode >= 300) {
|
|
5837
|
-
const bytes = await collectBody(response.body,
|
|
5837
|
+
const bytes = await collectBody(response.body, context3);
|
|
5838
5838
|
if (bytes.byteLength > 0) {
|
|
5839
5839
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
5840
5840
|
}
|
|
5841
|
-
await this.handleError(operationSchema,
|
|
5841
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
5842
5842
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
5843
5843
|
}
|
|
5844
5844
|
for (const header in response.headers) {
|
|
@@ -5846,9 +5846,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5846
5846
|
delete response.headers[header];
|
|
5847
5847
|
response.headers[header.toLowerCase()] = value;
|
|
5848
5848
|
}
|
|
5849
|
-
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns,
|
|
5849
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context3, response, dataObject);
|
|
5850
5850
|
if (nonHttpBindingMembers.length) {
|
|
5851
|
-
const bytes = await collectBody(response.body,
|
|
5851
|
+
const bytes = await collectBody(response.body, context3);
|
|
5852
5852
|
if (bytes.byteLength > 0) {
|
|
5853
5853
|
const dataFromBody = await deserializer.read(ns, bytes);
|
|
5854
5854
|
for (const member2 of nonHttpBindingMembers) {
|
|
@@ -5859,7 +5859,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5859
5859
|
dataObject.$metadata = this.deserializeMetadata(response);
|
|
5860
5860
|
return dataObject;
|
|
5861
5861
|
}
|
|
5862
|
-
async deserializeHttpMessage(schema,
|
|
5862
|
+
async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
|
|
5863
5863
|
let dataObject;
|
|
5864
5864
|
if (arg4 instanceof Set) {
|
|
5865
5865
|
dataObject = arg5;
|
|
@@ -5884,7 +5884,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5884
5884
|
dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
|
|
5885
5885
|
}
|
|
5886
5886
|
} else if (response.body) {
|
|
5887
|
-
const bytes = await collectBody(response.body,
|
|
5887
|
+
const bytes = await collectBody(response.body, context3);
|
|
5888
5888
|
if (bytes.byteLength > 0) {
|
|
5889
5889
|
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
5890
5890
|
}
|
|
@@ -5941,11 +5941,11 @@ var init_RpcProtocol = __esm({
|
|
|
5941
5941
|
init_collect_stream_body();
|
|
5942
5942
|
init_HttpProtocol();
|
|
5943
5943
|
RpcProtocol = class extends HttpProtocol {
|
|
5944
|
-
async serializeRequest(operationSchema, input,
|
|
5944
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
5945
5945
|
const serializer = this.serializer;
|
|
5946
5946
|
const query2 = {};
|
|
5947
5947
|
const headers = {};
|
|
5948
|
-
const endpoint = await
|
|
5948
|
+
const endpoint = await context3.endpoint();
|
|
5949
5949
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
5950
5950
|
const schema = ns.getSchema();
|
|
5951
5951
|
let payload2;
|
|
@@ -5994,16 +5994,16 @@ var init_RpcProtocol = __esm({
|
|
|
5994
5994
|
request.method = "POST";
|
|
5995
5995
|
return request;
|
|
5996
5996
|
}
|
|
5997
|
-
async deserializeResponse(operationSchema,
|
|
5997
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
5998
5998
|
const deserializer = this.deserializer;
|
|
5999
5999
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
6000
6000
|
const dataObject = {};
|
|
6001
6001
|
if (response.statusCode >= 300) {
|
|
6002
|
-
const bytes = await collectBody(response.body,
|
|
6002
|
+
const bytes = await collectBody(response.body, context3);
|
|
6003
6003
|
if (bytes.byteLength > 0) {
|
|
6004
6004
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
6005
6005
|
}
|
|
6006
|
-
await this.handleError(operationSchema,
|
|
6006
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
6007
6007
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
6008
6008
|
}
|
|
6009
6009
|
for (const header in response.headers) {
|
|
@@ -6019,7 +6019,7 @@ var init_RpcProtocol = __esm({
|
|
|
6019
6019
|
initialResponseContainer: dataObject
|
|
6020
6020
|
});
|
|
6021
6021
|
} else {
|
|
6022
|
-
const bytes = await collectBody(response.body,
|
|
6022
|
+
const bytes = await collectBody(response.body, context3);
|
|
6023
6023
|
if (bytes.byteLength > 0) {
|
|
6024
6024
|
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
6025
6025
|
}
|
|
@@ -6052,8 +6052,8 @@ var init_resolve_path = __esm({
|
|
|
6052
6052
|
});
|
|
6053
6053
|
|
|
6054
6054
|
// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
|
|
6055
|
-
function requestBuilder(input,
|
|
6056
|
-
return new RequestBuilder(input,
|
|
6055
|
+
function requestBuilder(input, context3) {
|
|
6056
|
+
return new RequestBuilder(input, context3);
|
|
6057
6057
|
}
|
|
6058
6058
|
var import_protocol_http6, RequestBuilder;
|
|
6059
6059
|
var init_requestBuilder = __esm({
|
|
@@ -6070,9 +6070,9 @@ var init_requestBuilder = __esm({
|
|
|
6070
6070
|
body = null;
|
|
6071
6071
|
hostname = "";
|
|
6072
6072
|
resolvePathStack = [];
|
|
6073
|
-
constructor(input,
|
|
6073
|
+
constructor(input, context3) {
|
|
6074
6074
|
this.input = input;
|
|
6075
|
-
this.context =
|
|
6075
|
+
this.context = context3;
|
|
6076
6076
|
}
|
|
6077
6077
|
async build() {
|
|
6078
6078
|
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
@@ -6441,15 +6441,15 @@ var init_requestBuilder2 = __esm({
|
|
|
6441
6441
|
});
|
|
6442
6442
|
|
|
6443
6443
|
// node_modules/@smithy/core/dist-es/setFeature.js
|
|
6444
|
-
function setFeature(
|
|
6445
|
-
if (!
|
|
6446
|
-
|
|
6444
|
+
function setFeature(context3, feature, value) {
|
|
6445
|
+
if (!context3.__smithy_context) {
|
|
6446
|
+
context3.__smithy_context = {
|
|
6447
6447
|
features: {}
|
|
6448
6448
|
};
|
|
6449
|
-
} else if (!
|
|
6450
|
-
|
|
6449
|
+
} else if (!context3.__smithy_context.features) {
|
|
6450
|
+
context3.__smithy_context.features = {};
|
|
6451
6451
|
}
|
|
6452
|
-
|
|
6452
|
+
context3.__smithy_context.features[feature] = value;
|
|
6453
6453
|
}
|
|
6454
6454
|
var init_setFeature = __esm({
|
|
6455
6455
|
"node_modules/@smithy/core/dist-es/setFeature.js"() {
|
|
@@ -7601,15 +7601,15 @@ var init_setCredentialFeature = __esm({
|
|
|
7601
7601
|
});
|
|
7602
7602
|
|
|
7603
7603
|
// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
7604
|
-
function setFeature2(
|
|
7605
|
-
if (!
|
|
7606
|
-
|
|
7604
|
+
function setFeature2(context3, feature, value) {
|
|
7605
|
+
if (!context3.__aws_sdk_context) {
|
|
7606
|
+
context3.__aws_sdk_context = {
|
|
7607
7607
|
features: {}
|
|
7608
7608
|
};
|
|
7609
|
-
} else if (!
|
|
7610
|
-
|
|
7609
|
+
} else if (!context3.__aws_sdk_context.features) {
|
|
7610
|
+
context3.__aws_sdk_context.features = {};
|
|
7611
7611
|
}
|
|
7612
|
-
|
|
7612
|
+
context3.__aws_sdk_context.features[feature] = value;
|
|
7613
7613
|
}
|
|
7614
7614
|
var init_setFeature2 = __esm({
|
|
7615
7615
|
"node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
|
|
@@ -7710,9 +7710,9 @@ var init_AwsSdkSigV4Signer = __esm({
|
|
|
7710
7710
|
return property2;
|
|
7711
7711
|
};
|
|
7712
7712
|
validateSigningProperties = async (signingProperties) => {
|
|
7713
|
-
const
|
|
7713
|
+
const context3 = throwSigningPropertyError("context", signingProperties.context);
|
|
7714
7714
|
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
7715
|
-
const authScheme =
|
|
7715
|
+
const authScheme = context3.endpointV2?.properties?.authSchemes?.[0];
|
|
7716
7716
|
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
7717
7717
|
const signer = await signerFunction(authScheme);
|
|
7718
7718
|
const signingRegion = signingProperties?.signingRegion;
|
|
@@ -9570,8 +9570,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9570
9570
|
getPayloadCodec() {
|
|
9571
9571
|
return this.codec;
|
|
9572
9572
|
}
|
|
9573
|
-
async serializeRequest(operationSchema, input,
|
|
9574
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
9573
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
9574
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
9575
9575
|
Object.assign(request.headers, {
|
|
9576
9576
|
"content-type": this.getDefaultContentType(),
|
|
9577
9577
|
"smithy-protocol": "rpc-v2-cbor",
|
|
@@ -9590,7 +9590,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9590
9590
|
} catch (e3) {
|
|
9591
9591
|
}
|
|
9592
9592
|
}
|
|
9593
|
-
const { service, operation } = (0, import_util_middleware5.getSmithyContext)(
|
|
9593
|
+
const { service, operation } = (0, import_util_middleware5.getSmithyContext)(context3);
|
|
9594
9594
|
const path7 = `/service/${service}/operation/${operation}`;
|
|
9595
9595
|
if (request.path.endsWith("/")) {
|
|
9596
9596
|
request.path += path7.slice(1);
|
|
@@ -9599,10 +9599,10 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9599
9599
|
}
|
|
9600
9600
|
return request;
|
|
9601
9601
|
}
|
|
9602
|
-
async deserializeResponse(operationSchema,
|
|
9603
|
-
return super.deserializeResponse(operationSchema,
|
|
9602
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
9603
|
+
return super.deserializeResponse(operationSchema, context3, response);
|
|
9604
9604
|
}
|
|
9605
|
-
async handleError(operationSchema,
|
|
9605
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
9606
9606
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
9607
9607
|
let namespace = this.options.defaultNamespace;
|
|
9608
9608
|
if (errorName.includes("#")) {
|
|
@@ -9763,14 +9763,14 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({
|
|
|
9763
9763
|
super({ defaultNamespace });
|
|
9764
9764
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
9765
9765
|
}
|
|
9766
|
-
async serializeRequest(operationSchema, input,
|
|
9767
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
9766
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
9767
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
9768
9768
|
if (this.awsQueryCompatible) {
|
|
9769
9769
|
request.headers["x-amzn-query-mode"] = "true";
|
|
9770
9770
|
}
|
|
9771
9771
|
return request;
|
|
9772
9772
|
}
|
|
9773
|
-
async handleError(operationSchema,
|
|
9773
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
9774
9774
|
if (this.awsQueryCompatible) {
|
|
9775
9775
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
9776
9776
|
}
|
|
@@ -9870,9 +9870,9 @@ var init_ConfigurableSerdeContext = __esm({
|
|
|
9870
9870
|
});
|
|
9871
9871
|
|
|
9872
9872
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
9873
|
-
function jsonReviver(key, value,
|
|
9874
|
-
if (
|
|
9875
|
-
const numericString =
|
|
9873
|
+
function jsonReviver(key, value, context3) {
|
|
9874
|
+
if (context3?.source) {
|
|
9875
|
+
const numericString = context3.source;
|
|
9876
9876
|
if (typeof value === "number") {
|
|
9877
9877
|
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
|
|
9878
9878
|
const isFractional = numericString.includes(".");
|
|
@@ -10135,9 +10135,9 @@ var require_dist_cjs26 = __commonJS({
|
|
|
10135
10135
|
identifyOnResolve = toggle;
|
|
10136
10136
|
return identifyOnResolve;
|
|
10137
10137
|
},
|
|
10138
|
-
resolve: (handler,
|
|
10138
|
+
resolve: (handler, context3) => {
|
|
10139
10139
|
for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
|
|
10140
|
-
handler = middleware(handler,
|
|
10140
|
+
handler = middleware(handler, context3);
|
|
10141
10141
|
}
|
|
10142
10142
|
if (identifyOnResolve) {
|
|
10143
10143
|
console.log(stack.identify());
|
|
@@ -10737,7 +10737,7 @@ var init_common = __esm({
|
|
|
10737
10737
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
|
|
10738
10738
|
import_smithy_client = __toESM(require_dist_cjs27());
|
|
10739
10739
|
import_util_utf86 = __toESM(require_dist_cjs11());
|
|
10740
|
-
collectBodyString = (streamBody,
|
|
10740
|
+
collectBodyString = (streamBody, context3) => (0, import_smithy_client.collectBody)(streamBody, context3).then((body) => (context3?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
|
|
10741
10741
|
}
|
|
10742
10742
|
});
|
|
10743
10743
|
|
|
@@ -10746,7 +10746,7 @@ var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
|
|
|
10746
10746
|
var init_parseJsonBody = __esm({
|
|
10747
10747
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
|
10748
10748
|
init_common();
|
|
10749
|
-
parseJsonBody = (streamBody,
|
|
10749
|
+
parseJsonBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
|
|
10750
10750
|
if (encoded.length) {
|
|
10751
10751
|
try {
|
|
10752
10752
|
return JSON.parse(encoded);
|
|
@@ -10761,8 +10761,8 @@ var init_parseJsonBody = __esm({
|
|
|
10761
10761
|
}
|
|
10762
10762
|
return {};
|
|
10763
10763
|
});
|
|
10764
|
-
parseJsonErrorBody = async (errorBody,
|
|
10765
|
-
const value = await parseJsonBody(errorBody,
|
|
10764
|
+
parseJsonErrorBody = async (errorBody, context3) => {
|
|
10765
|
+
const value = await parseJsonBody(errorBody, context3);
|
|
10766
10766
|
value.message = value.message ?? value.Message;
|
|
10767
10767
|
return value;
|
|
10768
10768
|
};
|
|
@@ -11173,8 +11173,8 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11173
11173
|
this.deserializer = this.codec.createDeserializer();
|
|
11174
11174
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
11175
11175
|
}
|
|
11176
|
-
async serializeRequest(operationSchema, input,
|
|
11177
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11176
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
11177
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
11178
11178
|
if (!request.path.endsWith("/")) {
|
|
11179
11179
|
request.path += "/";
|
|
11180
11180
|
}
|
|
@@ -11193,7 +11193,7 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11193
11193
|
getPayloadCodec() {
|
|
11194
11194
|
return this.codec;
|
|
11195
11195
|
}
|
|
11196
|
-
async handleError(operationSchema,
|
|
11196
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
11197
11197
|
if (this.awsQueryCompatible) {
|
|
11198
11198
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
11199
11199
|
}
|
|
@@ -11312,8 +11312,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11312
11312
|
this.codec.setSerdeContext(serdeContext);
|
|
11313
11313
|
super.setSerdeContext(serdeContext);
|
|
11314
11314
|
}
|
|
11315
|
-
async serializeRequest(operationSchema, input,
|
|
11316
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11315
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
11316
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
11317
11317
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
11318
11318
|
if (!request.headers["content-type"]) {
|
|
11319
11319
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -11326,14 +11326,14 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11326
11326
|
}
|
|
11327
11327
|
return request;
|
|
11328
11328
|
}
|
|
11329
|
-
async handleError(operationSchema,
|
|
11329
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
11330
11330
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
11331
11331
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
11332
11332
|
const ns = NormalizedSchema.of(errorSchema);
|
|
11333
11333
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
11334
11334
|
const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
|
|
11335
11335
|
const exception = new ErrorCtor(message);
|
|
11336
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
11336
|
+
await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
|
|
11337
11337
|
const output = {};
|
|
11338
11338
|
for (const [name14, member2] of ns.structIterator()) {
|
|
11339
11339
|
const target = member2.getMergedTraits().jsonName ?? name14;
|
|
@@ -12683,8 +12683,8 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12683
12683
|
getPayloadCodec() {
|
|
12684
12684
|
throw new Error("AWSQuery protocol has no payload codec.");
|
|
12685
12685
|
}
|
|
12686
|
-
async serializeRequest(operationSchema, input,
|
|
12687
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
12686
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
12687
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
12688
12688
|
if (!request.path.endsWith("/")) {
|
|
12689
12689
|
request.path += "/";
|
|
12690
12690
|
}
|
|
@@ -12701,16 +12701,16 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12701
12701
|
}
|
|
12702
12702
|
return request;
|
|
12703
12703
|
}
|
|
12704
|
-
async deserializeResponse(operationSchema,
|
|
12704
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
12705
12705
|
const deserializer = this.deserializer;
|
|
12706
12706
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
12707
12707
|
const dataObject = {};
|
|
12708
12708
|
if (response.statusCode >= 300) {
|
|
12709
|
-
const bytes2 = await collectBody(response.body,
|
|
12709
|
+
const bytes2 = await collectBody(response.body, context3);
|
|
12710
12710
|
if (bytes2.byteLength > 0) {
|
|
12711
12711
|
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
12712
12712
|
}
|
|
12713
|
-
await this.handleError(operationSchema,
|
|
12713
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
12714
12714
|
}
|
|
12715
12715
|
for (const header in response.headers) {
|
|
12716
12716
|
const value = response.headers[header];
|
|
@@ -12719,7 +12719,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12719
12719
|
}
|
|
12720
12720
|
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
12721
12721
|
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
12722
|
-
const bytes = await collectBody(response.body,
|
|
12722
|
+
const bytes = await collectBody(response.body, context3);
|
|
12723
12723
|
if (bytes.byteLength > 0) {
|
|
12724
12724
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
12725
12725
|
}
|
|
@@ -12732,7 +12732,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12732
12732
|
useNestedResult() {
|
|
12733
12733
|
return true;
|
|
12734
12734
|
}
|
|
12735
|
-
async handleError(operationSchema,
|
|
12735
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
12736
12736
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
12737
12737
|
const errorData = this.loadQueryError(dataObject);
|
|
12738
12738
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
@@ -12813,7 +12813,7 @@ var init_parseXmlBody = __esm({
|
|
|
12813
12813
|
import_xml_builder2 = __toESM(require_dist_cjs28());
|
|
12814
12814
|
import_smithy_client5 = __toESM(require_dist_cjs27());
|
|
12815
12815
|
init_common();
|
|
12816
|
-
parseXmlBody = (streamBody,
|
|
12816
|
+
parseXmlBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
|
|
12817
12817
|
if (encoded.length) {
|
|
12818
12818
|
let parsedObj;
|
|
12819
12819
|
try {
|
|
@@ -12837,8 +12837,8 @@ var init_parseXmlBody = __esm({
|
|
|
12837
12837
|
}
|
|
12838
12838
|
return {};
|
|
12839
12839
|
});
|
|
12840
|
-
parseXmlErrorBody = async (errorBody,
|
|
12841
|
-
const value = await parseXmlBody(errorBody,
|
|
12840
|
+
parseXmlErrorBody = async (errorBody, context3) => {
|
|
12841
|
+
const value = await parseXmlBody(errorBody, context3);
|
|
12842
12842
|
if (value.Error) {
|
|
12843
12843
|
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
12844
12844
|
}
|
|
@@ -13183,8 +13183,8 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13183
13183
|
getShapeId() {
|
|
13184
13184
|
return "aws.protocols#restXml";
|
|
13185
13185
|
}
|
|
13186
|
-
async serializeRequest(operationSchema, input,
|
|
13187
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
13186
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
13187
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
13188
13188
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
13189
13189
|
if (!request.headers["content-type"]) {
|
|
13190
13190
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -13199,17 +13199,17 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13199
13199
|
}
|
|
13200
13200
|
return request;
|
|
13201
13201
|
}
|
|
13202
|
-
async deserializeResponse(operationSchema,
|
|
13203
|
-
return super.deserializeResponse(operationSchema,
|
|
13202
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
13203
|
+
return super.deserializeResponse(operationSchema, context3, response);
|
|
13204
13204
|
}
|
|
13205
|
-
async handleError(operationSchema,
|
|
13205
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
13206
13206
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
13207
13207
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
13208
13208
|
const ns = NormalizedSchema.of(errorSchema);
|
|
13209
13209
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
13210
13210
|
const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
|
|
13211
13211
|
const exception = new ErrorCtor(message);
|
|
13212
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
13212
|
+
await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
|
|
13213
13213
|
const output = {};
|
|
13214
13214
|
for (const [name14, member2] of ns.structIterator()) {
|
|
13215
13215
|
const target = member2.getMergedTraits().xmlName ?? name14;
|
|
@@ -13338,48 +13338,48 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13338
13338
|
});
|
|
13339
13339
|
}
|
|
13340
13340
|
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
13341
|
-
async function checkFeatures(
|
|
13341
|
+
async function checkFeatures(context3, config, args) {
|
|
13342
13342
|
const request = args.request;
|
|
13343
13343
|
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
|
|
13344
|
-
core$1.setFeature(
|
|
13344
|
+
core$1.setFeature(context3, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
13345
13345
|
}
|
|
13346
13346
|
if (typeof config.retryStrategy === "function") {
|
|
13347
13347
|
const retryStrategy = await config.retryStrategy();
|
|
13348
13348
|
if (typeof retryStrategy.acquireInitialRetryToken === "function") {
|
|
13349
13349
|
if (retryStrategy.constructor?.name?.includes("Adaptive")) {
|
|
13350
|
-
core$1.setFeature(
|
|
13350
|
+
core$1.setFeature(context3, "RETRY_MODE_ADAPTIVE", "F");
|
|
13351
13351
|
} else {
|
|
13352
|
-
core$1.setFeature(
|
|
13352
|
+
core$1.setFeature(context3, "RETRY_MODE_STANDARD", "E");
|
|
13353
13353
|
}
|
|
13354
13354
|
} else {
|
|
13355
|
-
core$1.setFeature(
|
|
13355
|
+
core$1.setFeature(context3, "RETRY_MODE_LEGACY", "D");
|
|
13356
13356
|
}
|
|
13357
13357
|
}
|
|
13358
13358
|
if (typeof config.accountIdEndpointMode === "function") {
|
|
13359
|
-
const endpointV2 =
|
|
13359
|
+
const endpointV2 = context3.endpointV2;
|
|
13360
13360
|
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
|
|
13361
|
-
core$1.setFeature(
|
|
13361
|
+
core$1.setFeature(context3, "ACCOUNT_ID_ENDPOINT", "O");
|
|
13362
13362
|
}
|
|
13363
13363
|
switch (await config.accountIdEndpointMode?.()) {
|
|
13364
13364
|
case "disabled":
|
|
13365
|
-
core$1.setFeature(
|
|
13365
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
13366
13366
|
break;
|
|
13367
13367
|
case "preferred":
|
|
13368
|
-
core$1.setFeature(
|
|
13368
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
13369
13369
|
break;
|
|
13370
13370
|
case "required":
|
|
13371
|
-
core$1.setFeature(
|
|
13371
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
13372
13372
|
break;
|
|
13373
13373
|
}
|
|
13374
13374
|
}
|
|
13375
|
-
const identity2 =
|
|
13375
|
+
const identity2 = context3.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
13376
13376
|
if (identity2?.$source) {
|
|
13377
13377
|
const credentials = identity2;
|
|
13378
13378
|
if (credentials.accountId) {
|
|
13379
|
-
core$1.setFeature(
|
|
13379
|
+
core$1.setFeature(context3, "RESOLVED_ACCOUNT_ID", "T");
|
|
13380
13380
|
}
|
|
13381
13381
|
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
|
|
13382
|
-
core$1.setFeature(
|
|
13382
|
+
core$1.setFeature(context3, key, value);
|
|
13383
13383
|
}
|
|
13384
13384
|
}
|
|
13385
13385
|
}
|
|
@@ -13407,17 +13407,17 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13407
13407
|
}
|
|
13408
13408
|
return buffer;
|
|
13409
13409
|
}
|
|
13410
|
-
var userAgentMiddleware = (options) => (next,
|
|
13410
|
+
var userAgentMiddleware = (options) => (next, context3) => async (args) => {
|
|
13411
13411
|
const { request } = args;
|
|
13412
13412
|
if (!protocolHttp.HttpRequest.isInstance(request)) {
|
|
13413
13413
|
return next(args);
|
|
13414
13414
|
}
|
|
13415
13415
|
const { headers } = request;
|
|
13416
|
-
const userAgent =
|
|
13416
|
+
const userAgent = context3?.userAgent?.map(escapeUserAgent) || [];
|
|
13417
13417
|
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
|
|
13418
|
-
await checkFeatures(
|
|
13419
|
-
const awsContext =
|
|
13420
|
-
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({},
|
|
13418
|
+
await checkFeatures(context3, options, args);
|
|
13419
|
+
const awsContext = context3;
|
|
13420
|
+
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context3.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
|
|
13421
13421
|
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
|
|
13422
13422
|
const appId = await options.userAgentAppId();
|
|
13423
13423
|
if (appId) {
|
|
@@ -14749,7 +14749,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14749
14749
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
14750
14750
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
14751
14751
|
}
|
|
14752
|
-
async handle(next, args,
|
|
14752
|
+
async handle(next, args, context3 = {}) {
|
|
14753
14753
|
const request = args.request;
|
|
14754
14754
|
const { body: payload2, headers, query: query2 } = request;
|
|
14755
14755
|
if (!(payload2 instanceof ReadableStream)) {
|
|
@@ -15733,7 +15733,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15733
15733
|
}
|
|
15734
15734
|
return urlParser.parseUrl(endpoint);
|
|
15735
15735
|
};
|
|
15736
|
-
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig,
|
|
15736
|
+
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context3) => {
|
|
15737
15737
|
if (!clientConfig.isCustomEndpoint) {
|
|
15738
15738
|
let endpointFromConfig;
|
|
15739
15739
|
if (clientConfig.serviceConfiguredEndpoint) {
|
|
@@ -15750,7 +15750,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15750
15750
|
if (typeof clientConfig.endpointProvider !== "function") {
|
|
15751
15751
|
throw new Error("config.endpointProvider is not set.");
|
|
15752
15752
|
}
|
|
15753
|
-
const endpoint = clientConfig.endpointProvider(endpointParams,
|
|
15753
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context3);
|
|
15754
15754
|
return endpoint;
|
|
15755
15755
|
};
|
|
15756
15756
|
var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
@@ -15784,22 +15784,22 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15784
15784
|
return endpointParams;
|
|
15785
15785
|
};
|
|
15786
15786
|
var endpointMiddleware = ({ config, instructions }) => {
|
|
15787
|
-
return (next,
|
|
15787
|
+
return (next, context3) => async (args) => {
|
|
15788
15788
|
if (config.isCustomEndpoint) {
|
|
15789
|
-
core.setFeature(
|
|
15789
|
+
core.setFeature(context3, "ENDPOINT_OVERRIDE", "N");
|
|
15790
15790
|
}
|
|
15791
15791
|
const endpoint = await getEndpointFromInstructions(args.input, {
|
|
15792
15792
|
getEndpointParameterInstructions() {
|
|
15793
15793
|
return instructions;
|
|
15794
15794
|
}
|
|
15795
|
-
}, { ...config },
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
const authScheme =
|
|
15795
|
+
}, { ...config }, context3);
|
|
15796
|
+
context3.endpointV2 = endpoint;
|
|
15797
|
+
context3.authSchemes = endpoint.properties?.authSchemes;
|
|
15798
|
+
const authScheme = context3.authSchemes?.[0];
|
|
15799
15799
|
if (authScheme) {
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
const smithyContext = utilMiddleware.getSmithyContext(
|
|
15800
|
+
context3["signing_region"] = authScheme.signingRegion;
|
|
15801
|
+
context3["signing_service"] = authScheme.signingName;
|
|
15802
|
+
const smithyContext = utilMiddleware.getSmithyContext(context3);
|
|
15803
15803
|
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
15804
15804
|
if (httpAuthOption) {
|
|
15805
15805
|
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
@@ -16448,12 +16448,12 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16448
16448
|
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
16449
16449
|
}
|
|
16450
16450
|
});
|
|
16451
|
-
var retryMiddleware = (options) => (next,
|
|
16451
|
+
var retryMiddleware = (options) => (next, context3) => async (args) => {
|
|
16452
16452
|
let retryStrategy = await options.retryStrategy();
|
|
16453
16453
|
const maxAttempts = await options.maxAttempts();
|
|
16454
16454
|
if (isRetryStrategyV2(retryStrategy)) {
|
|
16455
16455
|
retryStrategy = retryStrategy;
|
|
16456
|
-
let retryToken = await retryStrategy.acquireInitialRetryToken(
|
|
16456
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context3["partition_id"]);
|
|
16457
16457
|
let lastError = new Error();
|
|
16458
16458
|
let attempts = 0;
|
|
16459
16459
|
let totalRetryDelay = 0;
|
|
@@ -16476,7 +16476,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16476
16476
|
const retryErrorInfo = getRetryErrorInfo(e3);
|
|
16477
16477
|
lastError = asSdkError(e3);
|
|
16478
16478
|
if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
|
|
16479
|
-
(
|
|
16479
|
+
(context3.logger instanceof smithyClient.NoOpLogger ? console : context3.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
16480
16480
|
throw lastError;
|
|
16481
16481
|
}
|
|
16482
16482
|
try {
|
|
@@ -16498,7 +16498,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16498
16498
|
} else {
|
|
16499
16499
|
retryStrategy = retryStrategy;
|
|
16500
16500
|
if (retryStrategy?.mode)
|
|
16501
|
-
|
|
16501
|
+
context3.userAgent = [...context3.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
|
|
16502
16502
|
return retryStrategy.retry(next, args);
|
|
16503
16503
|
}
|
|
16504
16504
|
};
|
|
@@ -16578,9 +16578,9 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16578
16578
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
16579
16579
|
var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
16580
16580
|
var util_middleware_1 = require_dist_cjs7();
|
|
16581
|
-
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config,
|
|
16581
|
+
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
16582
16582
|
return {
|
|
16583
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
16583
|
+
operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
|
|
16584
16584
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
16585
16585
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
16586
16586
|
})()
|
|
@@ -16594,10 +16594,10 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16594
16594
|
name: "bedrock",
|
|
16595
16595
|
region: authParameters.region
|
|
16596
16596
|
},
|
|
16597
|
-
propertiesExtractor: (config,
|
|
16597
|
+
propertiesExtractor: (config, context3) => ({
|
|
16598
16598
|
signingProperties: {
|
|
16599
16599
|
config,
|
|
16600
|
-
context
|
|
16600
|
+
context: context3
|
|
16601
16601
|
}
|
|
16602
16602
|
})
|
|
16603
16603
|
};
|
|
@@ -16605,7 +16605,7 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16605
16605
|
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
16606
16606
|
return {
|
|
16607
16607
|
schemeId: "smithy.api#httpBearerAuth",
|
|
16608
|
-
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache },
|
|
16608
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context3) => ({
|
|
16609
16609
|
identityProperties: {
|
|
16610
16610
|
profile,
|
|
16611
16611
|
filepath,
|
|
@@ -17351,10 +17351,10 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
17351
17351
|
name: "sso-oauth",
|
|
17352
17352
|
region: authParameters.region
|
|
17353
17353
|
},
|
|
17354
|
-
propertiesExtractor: (config,
|
|
17354
|
+
propertiesExtractor: (config, context3) => ({
|
|
17355
17355
|
signingProperties: {
|
|
17356
17356
|
config,
|
|
17357
|
-
context
|
|
17357
|
+
context: context3
|
|
17358
17358
|
}
|
|
17359
17359
|
})
|
|
17360
17360
|
};
|
|
@@ -17369,9 +17369,9 @@ var init_httpAuthSchemeProvider = __esm({
|
|
|
17369
17369
|
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
|
|
17370
17370
|
init_dist_es2();
|
|
17371
17371
|
import_util_middleware6 = __toESM(require_dist_cjs7());
|
|
17372
|
-
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config,
|
|
17372
|
+
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
17373
17373
|
return {
|
|
17374
|
-
operation: (0, import_util_middleware6.getSmithyContext)(
|
|
17374
|
+
operation: (0, import_util_middleware6.getSmithyContext)(context3).operation,
|
|
17375
17375
|
region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => {
|
|
17376
17376
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
17377
17377
|
})()
|
|
@@ -17717,10 +17717,10 @@ var init_endpointResolver = __esm({
|
|
|
17717
17717
|
size: 50,
|
|
17718
17718
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
17719
17719
|
});
|
|
17720
|
-
defaultEndpointResolver = (endpointParams,
|
|
17720
|
+
defaultEndpointResolver = (endpointParams, context3 = {}) => {
|
|
17721
17721
|
return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, {
|
|
17722
17722
|
endpointParams,
|
|
17723
|
-
logger:
|
|
17723
|
+
logger: context3.logger
|
|
17724
17724
|
}));
|
|
17725
17725
|
};
|
|
17726
17726
|
import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions;
|
|
@@ -18330,8 +18330,8 @@ var init_Aws_restJson1 = __esm({
|
|
|
18330
18330
|
import_smithy_client14 = __toESM(require_dist_cjs27());
|
|
18331
18331
|
init_models_0();
|
|
18332
18332
|
init_SSOOIDCServiceException();
|
|
18333
|
-
se_CreateTokenCommand = async (input,
|
|
18334
|
-
const b3 = requestBuilder(input,
|
|
18333
|
+
se_CreateTokenCommand = async (input, context3) => {
|
|
18334
|
+
const b3 = requestBuilder(input, context3);
|
|
18335
18335
|
const headers = {
|
|
18336
18336
|
"content-type": "application/json"
|
|
18337
18337
|
};
|
|
@@ -18351,14 +18351,14 @@ var init_Aws_restJson1 = __esm({
|
|
|
18351
18351
|
b3.m("POST").h(headers).b(body);
|
|
18352
18352
|
return b3.build();
|
|
18353
18353
|
};
|
|
18354
|
-
de_CreateTokenCommand = async (output,
|
|
18354
|
+
de_CreateTokenCommand = async (output, context3) => {
|
|
18355
18355
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
18356
|
-
return de_CommandError(output,
|
|
18356
|
+
return de_CommandError(output, context3);
|
|
18357
18357
|
}
|
|
18358
18358
|
const contents = (0, import_smithy_client14.map)({
|
|
18359
18359
|
$metadata: deserializeMetadata(output)
|
|
18360
18360
|
});
|
|
18361
|
-
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body,
|
|
18361
|
+
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context3)), "body");
|
|
18362
18362
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
18363
18363
|
accessToken: import_smithy_client14.expectString,
|
|
18364
18364
|
expiresIn: import_smithy_client14.expectInt32,
|
|
@@ -18369,46 +18369,46 @@ var init_Aws_restJson1 = __esm({
|
|
|
18369
18369
|
Object.assign(contents, doc);
|
|
18370
18370
|
return contents;
|
|
18371
18371
|
};
|
|
18372
|
-
de_CommandError = async (output,
|
|
18372
|
+
de_CommandError = async (output, context3) => {
|
|
18373
18373
|
const parsedOutput = {
|
|
18374
18374
|
...output,
|
|
18375
|
-
body: await parseJsonErrorBody(output.body,
|
|
18375
|
+
body: await parseJsonErrorBody(output.body, context3)
|
|
18376
18376
|
};
|
|
18377
18377
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
18378
18378
|
switch (errorCode) {
|
|
18379
18379
|
case "AccessDeniedException":
|
|
18380
18380
|
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
18381
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput,
|
|
18381
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context3);
|
|
18382
18382
|
case "AuthorizationPendingException":
|
|
18383
18383
|
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
18384
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput,
|
|
18384
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context3);
|
|
18385
18385
|
case "ExpiredTokenException":
|
|
18386
18386
|
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
18387
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput,
|
|
18387
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context3);
|
|
18388
18388
|
case "InternalServerException":
|
|
18389
18389
|
case "com.amazonaws.ssooidc#InternalServerException":
|
|
18390
|
-
throw await de_InternalServerExceptionRes(parsedOutput,
|
|
18390
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context3);
|
|
18391
18391
|
case "InvalidClientException":
|
|
18392
18392
|
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
18393
|
-
throw await de_InvalidClientExceptionRes(parsedOutput,
|
|
18393
|
+
throw await de_InvalidClientExceptionRes(parsedOutput, context3);
|
|
18394
18394
|
case "InvalidGrantException":
|
|
18395
18395
|
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
18396
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput,
|
|
18396
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput, context3);
|
|
18397
18397
|
case "InvalidRequestException":
|
|
18398
18398
|
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
18399
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput,
|
|
18399
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context3);
|
|
18400
18400
|
case "InvalidScopeException":
|
|
18401
18401
|
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
18402
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput,
|
|
18402
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context3);
|
|
18403
18403
|
case "SlowDownException":
|
|
18404
18404
|
case "com.amazonaws.ssooidc#SlowDownException":
|
|
18405
|
-
throw await de_SlowDownExceptionRes(parsedOutput,
|
|
18405
|
+
throw await de_SlowDownExceptionRes(parsedOutput, context3);
|
|
18406
18406
|
case "UnauthorizedClientException":
|
|
18407
18407
|
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
18408
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput,
|
|
18408
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context3);
|
|
18409
18409
|
case "UnsupportedGrantTypeException":
|
|
18410
18410
|
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
18411
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput,
|
|
18411
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context3);
|
|
18412
18412
|
default:
|
|
18413
18413
|
const parsedBody = parsedOutput.body;
|
|
18414
18414
|
return throwDefaultError({
|
|
@@ -18419,7 +18419,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18419
18419
|
}
|
|
18420
18420
|
};
|
|
18421
18421
|
throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException);
|
|
18422
|
-
de_AccessDeniedExceptionRes = async (parsedOutput,
|
|
18422
|
+
de_AccessDeniedExceptionRes = async (parsedOutput, context3) => {
|
|
18423
18423
|
const contents = (0, import_smithy_client14.map)({});
|
|
18424
18424
|
const data2 = parsedOutput.body;
|
|
18425
18425
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18434,7 +18434,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18434
18434
|
});
|
|
18435
18435
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18436
18436
|
};
|
|
18437
|
-
de_AuthorizationPendingExceptionRes = async (parsedOutput,
|
|
18437
|
+
de_AuthorizationPendingExceptionRes = async (parsedOutput, context3) => {
|
|
18438
18438
|
const contents = (0, import_smithy_client14.map)({});
|
|
18439
18439
|
const data2 = parsedOutput.body;
|
|
18440
18440
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18448,7 +18448,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18448
18448
|
});
|
|
18449
18449
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18450
18450
|
};
|
|
18451
|
-
de_ExpiredTokenExceptionRes = async (parsedOutput,
|
|
18451
|
+
de_ExpiredTokenExceptionRes = async (parsedOutput, context3) => {
|
|
18452
18452
|
const contents = (0, import_smithy_client14.map)({});
|
|
18453
18453
|
const data2 = parsedOutput.body;
|
|
18454
18454
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18462,7 +18462,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18462
18462
|
});
|
|
18463
18463
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18464
18464
|
};
|
|
18465
|
-
de_InternalServerExceptionRes = async (parsedOutput,
|
|
18465
|
+
de_InternalServerExceptionRes = async (parsedOutput, context3) => {
|
|
18466
18466
|
const contents = (0, import_smithy_client14.map)({});
|
|
18467
18467
|
const data2 = parsedOutput.body;
|
|
18468
18468
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18476,7 +18476,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18476
18476
|
});
|
|
18477
18477
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18478
18478
|
};
|
|
18479
|
-
de_InvalidClientExceptionRes = async (parsedOutput,
|
|
18479
|
+
de_InvalidClientExceptionRes = async (parsedOutput, context3) => {
|
|
18480
18480
|
const contents = (0, import_smithy_client14.map)({});
|
|
18481
18481
|
const data2 = parsedOutput.body;
|
|
18482
18482
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18490,7 +18490,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18490
18490
|
});
|
|
18491
18491
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18492
18492
|
};
|
|
18493
|
-
de_InvalidGrantExceptionRes = async (parsedOutput,
|
|
18493
|
+
de_InvalidGrantExceptionRes = async (parsedOutput, context3) => {
|
|
18494
18494
|
const contents = (0, import_smithy_client14.map)({});
|
|
18495
18495
|
const data2 = parsedOutput.body;
|
|
18496
18496
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18504,7 +18504,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18504
18504
|
});
|
|
18505
18505
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18506
18506
|
};
|
|
18507
|
-
de_InvalidRequestExceptionRes = async (parsedOutput,
|
|
18507
|
+
de_InvalidRequestExceptionRes = async (parsedOutput, context3) => {
|
|
18508
18508
|
const contents = (0, import_smithy_client14.map)({});
|
|
18509
18509
|
const data2 = parsedOutput.body;
|
|
18510
18510
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18519,7 +18519,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18519
18519
|
});
|
|
18520
18520
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18521
18521
|
};
|
|
18522
|
-
de_InvalidScopeExceptionRes = async (parsedOutput,
|
|
18522
|
+
de_InvalidScopeExceptionRes = async (parsedOutput, context3) => {
|
|
18523
18523
|
const contents = (0, import_smithy_client14.map)({});
|
|
18524
18524
|
const data2 = parsedOutput.body;
|
|
18525
18525
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18533,7 +18533,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18533
18533
|
});
|
|
18534
18534
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18535
18535
|
};
|
|
18536
|
-
de_SlowDownExceptionRes = async (parsedOutput,
|
|
18536
|
+
de_SlowDownExceptionRes = async (parsedOutput, context3) => {
|
|
18537
18537
|
const contents = (0, import_smithy_client14.map)({});
|
|
18538
18538
|
const data2 = parsedOutput.body;
|
|
18539
18539
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18547,7 +18547,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18547
18547
|
});
|
|
18548
18548
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18549
18549
|
};
|
|
18550
|
-
de_UnauthorizedClientExceptionRes = async (parsedOutput,
|
|
18550
|
+
de_UnauthorizedClientExceptionRes = async (parsedOutput, context3) => {
|
|
18551
18551
|
const contents = (0, import_smithy_client14.map)({});
|
|
18552
18552
|
const data2 = parsedOutput.body;
|
|
18553
18553
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18561,7 +18561,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18561
18561
|
});
|
|
18562
18562
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18563
18563
|
};
|
|
18564
|
-
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput,
|
|
18564
|
+
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context3) => {
|
|
18565
18565
|
const contents = (0, import_smithy_client14.map)({});
|
|
18566
18566
|
const data2 = parsedOutput.body;
|
|
18567
18567
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18829,9 +18829,9 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
18829
18829
|
exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0;
|
|
18830
18830
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
18831
18831
|
var util_middleware_1 = require_dist_cjs7();
|
|
18832
|
-
var defaultSSOHttpAuthSchemeParametersProvider = async (config,
|
|
18832
|
+
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
18833
18833
|
return {
|
|
18834
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
18834
|
+
operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
|
|
18835
18835
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
18836
18836
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
18837
18837
|
})()
|
|
@@ -18845,10 +18845,10 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
18845
18845
|
name: "awsssoportal",
|
|
18846
18846
|
region: authParameters.region
|
|
18847
18847
|
},
|
|
18848
|
-
propertiesExtractor: (config,
|
|
18848
|
+
propertiesExtractor: (config, context3) => ({
|
|
18849
18849
|
signingProperties: {
|
|
18850
18850
|
config,
|
|
18851
|
-
context
|
|
18851
|
+
context: context3
|
|
18852
18852
|
}
|
|
18853
18853
|
})
|
|
18854
18854
|
};
|
|
@@ -19046,10 +19046,10 @@ var require_endpointResolver = __commonJS({
|
|
|
19046
19046
|
size: 50,
|
|
19047
19047
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
19048
19048
|
});
|
|
19049
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
19049
|
+
var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
|
|
19050
19050
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
19051
19051
|
endpointParams,
|
|
19052
|
-
logger:
|
|
19052
|
+
logger: context3.logger
|
|
19053
19053
|
}));
|
|
19054
19054
|
};
|
|
19055
19055
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -19347,8 +19347,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19347
19347
|
...obj,
|
|
19348
19348
|
...obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }
|
|
19349
19349
|
});
|
|
19350
|
-
var se_GetRoleCredentialsCommand = async (input,
|
|
19351
|
-
const b3 = core.requestBuilder(input,
|
|
19350
|
+
var se_GetRoleCredentialsCommand = async (input, context3) => {
|
|
19351
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19352
19352
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19353
19353
|
[_xasbt]: input[_aT]
|
|
19354
19354
|
});
|
|
@@ -19361,8 +19361,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19361
19361
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19362
19362
|
return b3.build();
|
|
19363
19363
|
};
|
|
19364
|
-
var se_ListAccountRolesCommand = async (input,
|
|
19365
|
-
const b3 = core.requestBuilder(input,
|
|
19364
|
+
var se_ListAccountRolesCommand = async (input, context3) => {
|
|
19365
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19366
19366
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19367
19367
|
[_xasbt]: input[_aT]
|
|
19368
19368
|
});
|
|
@@ -19376,8 +19376,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19376
19376
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19377
19377
|
return b3.build();
|
|
19378
19378
|
};
|
|
19379
|
-
var se_ListAccountsCommand = async (input,
|
|
19380
|
-
const b3 = core.requestBuilder(input,
|
|
19379
|
+
var se_ListAccountsCommand = async (input, context3) => {
|
|
19380
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19381
19381
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19382
19382
|
[_xasbt]: input[_aT]
|
|
19383
19383
|
});
|
|
@@ -19390,8 +19390,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19390
19390
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19391
19391
|
return b3.build();
|
|
19392
19392
|
};
|
|
19393
|
-
var se_LogoutCommand = async (input,
|
|
19394
|
-
const b3 = core.requestBuilder(input,
|
|
19393
|
+
var se_LogoutCommand = async (input, context3) => {
|
|
19394
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19395
19395
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19396
19396
|
[_xasbt]: input[_aT]
|
|
19397
19397
|
});
|
|
@@ -19400,28 +19400,28 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19400
19400
|
b3.m("POST").h(headers).b(body);
|
|
19401
19401
|
return b3.build();
|
|
19402
19402
|
};
|
|
19403
|
-
var de_GetRoleCredentialsCommand = async (output,
|
|
19403
|
+
var de_GetRoleCredentialsCommand = async (output, context3) => {
|
|
19404
19404
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19405
|
-
return de_CommandError3(output,
|
|
19405
|
+
return de_CommandError3(output, context3);
|
|
19406
19406
|
}
|
|
19407
19407
|
const contents = smithyClient.map({
|
|
19408
19408
|
$metadata: deserializeMetadata3(output)
|
|
19409
19409
|
});
|
|
19410
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19410
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19411
19411
|
const doc = smithyClient.take(data2, {
|
|
19412
19412
|
roleCredentials: smithyClient._json
|
|
19413
19413
|
});
|
|
19414
19414
|
Object.assign(contents, doc);
|
|
19415
19415
|
return contents;
|
|
19416
19416
|
};
|
|
19417
|
-
var de_ListAccountRolesCommand = async (output,
|
|
19417
|
+
var de_ListAccountRolesCommand = async (output, context3) => {
|
|
19418
19418
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19419
|
-
return de_CommandError3(output,
|
|
19419
|
+
return de_CommandError3(output, context3);
|
|
19420
19420
|
}
|
|
19421
19421
|
const contents = smithyClient.map({
|
|
19422
19422
|
$metadata: deserializeMetadata3(output)
|
|
19423
19423
|
});
|
|
19424
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19424
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19425
19425
|
const doc = smithyClient.take(data2, {
|
|
19426
19426
|
nextToken: smithyClient.expectString,
|
|
19427
19427
|
roleList: smithyClient._json
|
|
@@ -19429,14 +19429,14 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19429
19429
|
Object.assign(contents, doc);
|
|
19430
19430
|
return contents;
|
|
19431
19431
|
};
|
|
19432
|
-
var de_ListAccountsCommand = async (output,
|
|
19432
|
+
var de_ListAccountsCommand = async (output, context3) => {
|
|
19433
19433
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19434
|
-
return de_CommandError3(output,
|
|
19434
|
+
return de_CommandError3(output, context3);
|
|
19435
19435
|
}
|
|
19436
19436
|
const contents = smithyClient.map({
|
|
19437
19437
|
$metadata: deserializeMetadata3(output)
|
|
19438
19438
|
});
|
|
19439
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19439
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19440
19440
|
const doc = smithyClient.take(data2, {
|
|
19441
19441
|
accountList: smithyClient._json,
|
|
19442
19442
|
nextToken: smithyClient.expectString
|
|
@@ -19444,20 +19444,20 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19444
19444
|
Object.assign(contents, doc);
|
|
19445
19445
|
return contents;
|
|
19446
19446
|
};
|
|
19447
|
-
var de_LogoutCommand = async (output,
|
|
19447
|
+
var de_LogoutCommand = async (output, context3) => {
|
|
19448
19448
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19449
|
-
return de_CommandError3(output,
|
|
19449
|
+
return de_CommandError3(output, context3);
|
|
19450
19450
|
}
|
|
19451
19451
|
const contents = smithyClient.map({
|
|
19452
19452
|
$metadata: deserializeMetadata3(output)
|
|
19453
19453
|
});
|
|
19454
|
-
await smithyClient.collectBody(output.body,
|
|
19454
|
+
await smithyClient.collectBody(output.body, context3);
|
|
19455
19455
|
return contents;
|
|
19456
19456
|
};
|
|
19457
|
-
var de_CommandError3 = async (output,
|
|
19457
|
+
var de_CommandError3 = async (output, context3) => {
|
|
19458
19458
|
const parsedOutput = {
|
|
19459
19459
|
...output,
|
|
19460
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
19460
|
+
body: await core$1.parseJsonErrorBody(output.body, context3)
|
|
19461
19461
|
};
|
|
19462
19462
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
19463
19463
|
switch (errorCode) {
|
|
@@ -19483,7 +19483,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19483
19483
|
}
|
|
19484
19484
|
};
|
|
19485
19485
|
var throwDefaultError3 = smithyClient.withBaseException(SSOServiceException);
|
|
19486
|
-
var de_InvalidRequestExceptionRes2 = async (parsedOutput,
|
|
19486
|
+
var de_InvalidRequestExceptionRes2 = async (parsedOutput, context3) => {
|
|
19487
19487
|
const contents = smithyClient.map({});
|
|
19488
19488
|
const data2 = parsedOutput.body;
|
|
19489
19489
|
const doc = smithyClient.take(data2, {
|
|
@@ -19496,7 +19496,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19496
19496
|
});
|
|
19497
19497
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19498
19498
|
};
|
|
19499
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
19499
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
|
|
19500
19500
|
const contents = smithyClient.map({});
|
|
19501
19501
|
const data2 = parsedOutput.body;
|
|
19502
19502
|
const doc = smithyClient.take(data2, {
|
|
@@ -19509,7 +19509,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19509
19509
|
});
|
|
19510
19510
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19511
19511
|
};
|
|
19512
|
-
var de_TooManyRequestsExceptionRes = async (parsedOutput,
|
|
19512
|
+
var de_TooManyRequestsExceptionRes = async (parsedOutput, context3) => {
|
|
19513
19513
|
const contents = smithyClient.map({});
|
|
19514
19514
|
const data2 = parsedOutput.body;
|
|
19515
19515
|
const doc = smithyClient.take(data2, {
|
|
@@ -19522,7 +19522,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19522
19522
|
});
|
|
19523
19523
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19524
19524
|
};
|
|
19525
|
-
var de_UnauthorizedExceptionRes = async (parsedOutput,
|
|
19525
|
+
var de_UnauthorizedExceptionRes = async (parsedOutput, context3) => {
|
|
19526
19526
|
const contents = smithyClient.map({});
|
|
19527
19527
|
const data2 = parsedOutput.body;
|
|
19528
19528
|
const doc = smithyClient.take(data2, {
|
|
@@ -19829,10 +19829,10 @@ function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
|
|
19829
19829
|
name: "sts",
|
|
19830
19830
|
region: authParameters.region
|
|
19831
19831
|
},
|
|
19832
|
-
propertiesExtractor: (config,
|
|
19832
|
+
propertiesExtractor: (config, context3) => ({
|
|
19833
19833
|
signingProperties: {
|
|
19834
19834
|
config,
|
|
19835
|
-
context
|
|
19835
|
+
context: context3
|
|
19836
19836
|
}
|
|
19837
19837
|
})
|
|
19838
19838
|
};
|
|
@@ -19848,9 +19848,9 @@ var init_httpAuthSchemeProvider2 = __esm({
|
|
|
19848
19848
|
init_dist_es2();
|
|
19849
19849
|
import_util_middleware7 = __toESM(require_dist_cjs7());
|
|
19850
19850
|
init_STSClient();
|
|
19851
|
-
defaultSTSHttpAuthSchemeParametersProvider = async (config,
|
|
19851
|
+
defaultSTSHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
19852
19852
|
return {
|
|
19853
|
-
operation: (0, import_util_middleware7.getSmithyContext)(
|
|
19853
|
+
operation: (0, import_util_middleware7.getSmithyContext)(context3).operation,
|
|
19854
19854
|
region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
|
|
19855
19855
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
19856
19856
|
})()
|
|
@@ -19960,10 +19960,10 @@ var init_endpointResolver2 = __esm({
|
|
|
19960
19960
|
size: 50,
|
|
19961
19961
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
|
|
19962
19962
|
});
|
|
19963
|
-
defaultEndpointResolver2 = (endpointParams,
|
|
19963
|
+
defaultEndpointResolver2 = (endpointParams, context3 = {}) => {
|
|
19964
19964
|
return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, {
|
|
19965
19965
|
endpointParams,
|
|
19966
|
-
logger:
|
|
19966
|
+
logger: context3.logger
|
|
19967
19967
|
}));
|
|
19968
19968
|
};
|
|
19969
19969
|
import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions;
|
|
@@ -20325,80 +20325,80 @@ var init_Aws_query = __esm({
|
|
|
20325
20325
|
import_smithy_client24 = __toESM(require_dist_cjs27());
|
|
20326
20326
|
init_models_02();
|
|
20327
20327
|
init_STSServiceException();
|
|
20328
|
-
se_AssumeRoleCommand = async (input,
|
|
20328
|
+
se_AssumeRoleCommand = async (input, context3) => {
|
|
20329
20329
|
const headers = SHARED_HEADERS;
|
|
20330
20330
|
let body;
|
|
20331
20331
|
body = buildFormUrlencodedString({
|
|
20332
|
-
...se_AssumeRoleRequest(input,
|
|
20332
|
+
...se_AssumeRoleRequest(input, context3),
|
|
20333
20333
|
[_A]: _AR,
|
|
20334
20334
|
[_V]: _
|
|
20335
20335
|
});
|
|
20336
|
-
return buildHttpRpcRequest(
|
|
20336
|
+
return buildHttpRpcRequest(context3, headers, "/", void 0, body);
|
|
20337
20337
|
};
|
|
20338
|
-
se_AssumeRoleWithWebIdentityCommand = async (input,
|
|
20338
|
+
se_AssumeRoleWithWebIdentityCommand = async (input, context3) => {
|
|
20339
20339
|
const headers = SHARED_HEADERS;
|
|
20340
20340
|
let body;
|
|
20341
20341
|
body = buildFormUrlencodedString({
|
|
20342
|
-
...se_AssumeRoleWithWebIdentityRequest(input,
|
|
20342
|
+
...se_AssumeRoleWithWebIdentityRequest(input, context3),
|
|
20343
20343
|
[_A]: _ARWWI,
|
|
20344
20344
|
[_V]: _
|
|
20345
20345
|
});
|
|
20346
|
-
return buildHttpRpcRequest(
|
|
20346
|
+
return buildHttpRpcRequest(context3, headers, "/", void 0, body);
|
|
20347
20347
|
};
|
|
20348
|
-
de_AssumeRoleCommand = async (output,
|
|
20348
|
+
de_AssumeRoleCommand = async (output, context3) => {
|
|
20349
20349
|
if (output.statusCode >= 300) {
|
|
20350
|
-
return de_CommandError2(output,
|
|
20350
|
+
return de_CommandError2(output, context3);
|
|
20351
20351
|
}
|
|
20352
|
-
const data2 = await parseXmlBody(output.body,
|
|
20352
|
+
const data2 = await parseXmlBody(output.body, context3);
|
|
20353
20353
|
let contents = {};
|
|
20354
|
-
contents = de_AssumeRoleResponse(data2.AssumeRoleResult,
|
|
20354
|
+
contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context3);
|
|
20355
20355
|
const response = {
|
|
20356
20356
|
$metadata: deserializeMetadata2(output),
|
|
20357
20357
|
...contents
|
|
20358
20358
|
};
|
|
20359
20359
|
return response;
|
|
20360
20360
|
};
|
|
20361
|
-
de_AssumeRoleWithWebIdentityCommand = async (output,
|
|
20361
|
+
de_AssumeRoleWithWebIdentityCommand = async (output, context3) => {
|
|
20362
20362
|
if (output.statusCode >= 300) {
|
|
20363
|
-
return de_CommandError2(output,
|
|
20363
|
+
return de_CommandError2(output, context3);
|
|
20364
20364
|
}
|
|
20365
|
-
const data2 = await parseXmlBody(output.body,
|
|
20365
|
+
const data2 = await parseXmlBody(output.body, context3);
|
|
20366
20366
|
let contents = {};
|
|
20367
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult,
|
|
20367
|
+
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context3);
|
|
20368
20368
|
const response = {
|
|
20369
20369
|
$metadata: deserializeMetadata2(output),
|
|
20370
20370
|
...contents
|
|
20371
20371
|
};
|
|
20372
20372
|
return response;
|
|
20373
20373
|
};
|
|
20374
|
-
de_CommandError2 = async (output,
|
|
20374
|
+
de_CommandError2 = async (output, context3) => {
|
|
20375
20375
|
const parsedOutput = {
|
|
20376
20376
|
...output,
|
|
20377
|
-
body: await parseXmlErrorBody(output.body,
|
|
20377
|
+
body: await parseXmlErrorBody(output.body, context3)
|
|
20378
20378
|
};
|
|
20379
20379
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
20380
20380
|
switch (errorCode) {
|
|
20381
20381
|
case "ExpiredTokenException":
|
|
20382
20382
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
20383
|
-
throw await de_ExpiredTokenExceptionRes2(parsedOutput,
|
|
20383
|
+
throw await de_ExpiredTokenExceptionRes2(parsedOutput, context3);
|
|
20384
20384
|
case "MalformedPolicyDocument":
|
|
20385
20385
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
20386
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput,
|
|
20386
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context3);
|
|
20387
20387
|
case "PackedPolicyTooLarge":
|
|
20388
20388
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
20389
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput,
|
|
20389
|
+
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context3);
|
|
20390
20390
|
case "RegionDisabledException":
|
|
20391
20391
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
20392
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput,
|
|
20392
|
+
throw await de_RegionDisabledExceptionRes(parsedOutput, context3);
|
|
20393
20393
|
case "IDPCommunicationError":
|
|
20394
20394
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
20395
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput,
|
|
20395
|
+
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context3);
|
|
20396
20396
|
case "IDPRejectedClaim":
|
|
20397
20397
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
20398
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput,
|
|
20398
|
+
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context3);
|
|
20399
20399
|
case "InvalidIdentityToken":
|
|
20400
20400
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
20401
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput,
|
|
20401
|
+
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context3);
|
|
20402
20402
|
default:
|
|
20403
20403
|
const parsedBody = parsedOutput.body;
|
|
20404
20404
|
return throwDefaultError2({
|
|
@@ -20408,70 +20408,70 @@ var init_Aws_query = __esm({
|
|
|
20408
20408
|
});
|
|
20409
20409
|
}
|
|
20410
20410
|
};
|
|
20411
|
-
de_ExpiredTokenExceptionRes2 = async (parsedOutput,
|
|
20411
|
+
de_ExpiredTokenExceptionRes2 = async (parsedOutput, context3) => {
|
|
20412
20412
|
const body = parsedOutput.body;
|
|
20413
|
-
const deserialized = de_ExpiredTokenException(body.Error,
|
|
20413
|
+
const deserialized = de_ExpiredTokenException(body.Error, context3);
|
|
20414
20414
|
const exception = new ExpiredTokenException2({
|
|
20415
20415
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20416
20416
|
...deserialized
|
|
20417
20417
|
});
|
|
20418
20418
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20419
20419
|
};
|
|
20420
|
-
de_IDPCommunicationErrorExceptionRes = async (parsedOutput,
|
|
20420
|
+
de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context3) => {
|
|
20421
20421
|
const body = parsedOutput.body;
|
|
20422
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error,
|
|
20422
|
+
const deserialized = de_IDPCommunicationErrorException(body.Error, context3);
|
|
20423
20423
|
const exception = new IDPCommunicationErrorException({
|
|
20424
20424
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20425
20425
|
...deserialized
|
|
20426
20426
|
});
|
|
20427
20427
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20428
20428
|
};
|
|
20429
|
-
de_IDPRejectedClaimExceptionRes = async (parsedOutput,
|
|
20429
|
+
de_IDPRejectedClaimExceptionRes = async (parsedOutput, context3) => {
|
|
20430
20430
|
const body = parsedOutput.body;
|
|
20431
|
-
const deserialized = de_IDPRejectedClaimException(body.Error,
|
|
20431
|
+
const deserialized = de_IDPRejectedClaimException(body.Error, context3);
|
|
20432
20432
|
const exception = new IDPRejectedClaimException({
|
|
20433
20433
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20434
20434
|
...deserialized
|
|
20435
20435
|
});
|
|
20436
20436
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20437
20437
|
};
|
|
20438
|
-
de_InvalidIdentityTokenExceptionRes = async (parsedOutput,
|
|
20438
|
+
de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context3) => {
|
|
20439
20439
|
const body = parsedOutput.body;
|
|
20440
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error,
|
|
20440
|
+
const deserialized = de_InvalidIdentityTokenException(body.Error, context3);
|
|
20441
20441
|
const exception = new InvalidIdentityTokenException({
|
|
20442
20442
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20443
20443
|
...deserialized
|
|
20444
20444
|
});
|
|
20445
20445
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20446
20446
|
};
|
|
20447
|
-
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput,
|
|
20447
|
+
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context3) => {
|
|
20448
20448
|
const body = parsedOutput.body;
|
|
20449
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error,
|
|
20449
|
+
const deserialized = de_MalformedPolicyDocumentException(body.Error, context3);
|
|
20450
20450
|
const exception = new MalformedPolicyDocumentException({
|
|
20451
20451
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20452
20452
|
...deserialized
|
|
20453
20453
|
});
|
|
20454
20454
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20455
20455
|
};
|
|
20456
|
-
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput,
|
|
20456
|
+
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context3) => {
|
|
20457
20457
|
const body = parsedOutput.body;
|
|
20458
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error,
|
|
20458
|
+
const deserialized = de_PackedPolicyTooLargeException(body.Error, context3);
|
|
20459
20459
|
const exception = new PackedPolicyTooLargeException({
|
|
20460
20460
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20461
20461
|
...deserialized
|
|
20462
20462
|
});
|
|
20463
20463
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20464
20464
|
};
|
|
20465
|
-
de_RegionDisabledExceptionRes = async (parsedOutput,
|
|
20465
|
+
de_RegionDisabledExceptionRes = async (parsedOutput, context3) => {
|
|
20466
20466
|
const body = parsedOutput.body;
|
|
20467
|
-
const deserialized = de_RegionDisabledException(body.Error,
|
|
20467
|
+
const deserialized = de_RegionDisabledException(body.Error, context3);
|
|
20468
20468
|
const exception = new RegionDisabledException({
|
|
20469
20469
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20470
20470
|
...deserialized
|
|
20471
20471
|
});
|
|
20472
20472
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20473
20473
|
};
|
|
20474
|
-
se_AssumeRoleRequest = (input,
|
|
20474
|
+
se_AssumeRoleRequest = (input, context3) => {
|
|
20475
20475
|
const entries = {};
|
|
20476
20476
|
if (input[_RA] != null) {
|
|
20477
20477
|
entries[_RA] = input[_RA];
|
|
@@ -20480,7 +20480,7 @@ var init_Aws_query = __esm({
|
|
|
20480
20480
|
entries[_RSN] = input[_RSN];
|
|
20481
20481
|
}
|
|
20482
20482
|
if (input[_PA] != null) {
|
|
20483
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20483
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context3);
|
|
20484
20484
|
if (input[_PA]?.length === 0) {
|
|
20485
20485
|
entries.PolicyArns = [];
|
|
20486
20486
|
}
|
|
@@ -20496,7 +20496,7 @@ var init_Aws_query = __esm({
|
|
|
20496
20496
|
entries[_DS] = input[_DS];
|
|
20497
20497
|
}
|
|
20498
20498
|
if (input[_T] != null) {
|
|
20499
|
-
const memberEntries = se_tagListType(input[_T],
|
|
20499
|
+
const memberEntries = se_tagListType(input[_T], context3);
|
|
20500
20500
|
if (input[_T]?.length === 0) {
|
|
20501
20501
|
entries.Tags = [];
|
|
20502
20502
|
}
|
|
@@ -20506,7 +20506,7 @@ var init_Aws_query = __esm({
|
|
|
20506
20506
|
});
|
|
20507
20507
|
}
|
|
20508
20508
|
if (input[_TTK] != null) {
|
|
20509
|
-
const memberEntries = se_tagKeyListType(input[_TTK],
|
|
20509
|
+
const memberEntries = se_tagKeyListType(input[_TTK], context3);
|
|
20510
20510
|
if (input[_TTK]?.length === 0) {
|
|
20511
20511
|
entries.TransitiveTagKeys = [];
|
|
20512
20512
|
}
|
|
@@ -20528,7 +20528,7 @@ var init_Aws_query = __esm({
|
|
|
20528
20528
|
entries[_SI] = input[_SI];
|
|
20529
20529
|
}
|
|
20530
20530
|
if (input[_PC] != null) {
|
|
20531
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC],
|
|
20531
|
+
const memberEntries = se_ProvidedContextsListType(input[_PC], context3);
|
|
20532
20532
|
if (input[_PC]?.length === 0) {
|
|
20533
20533
|
entries.ProvidedContexts = [];
|
|
20534
20534
|
}
|
|
@@ -20539,7 +20539,7 @@ var init_Aws_query = __esm({
|
|
|
20539
20539
|
}
|
|
20540
20540
|
return entries;
|
|
20541
20541
|
};
|
|
20542
|
-
se_AssumeRoleWithWebIdentityRequest = (input,
|
|
20542
|
+
se_AssumeRoleWithWebIdentityRequest = (input, context3) => {
|
|
20543
20543
|
const entries = {};
|
|
20544
20544
|
if (input[_RA] != null) {
|
|
20545
20545
|
entries[_RA] = input[_RA];
|
|
@@ -20554,7 +20554,7 @@ var init_Aws_query = __esm({
|
|
|
20554
20554
|
entries[_PI] = input[_PI];
|
|
20555
20555
|
}
|
|
20556
20556
|
if (input[_PA] != null) {
|
|
20557
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20557
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context3);
|
|
20558
20558
|
if (input[_PA]?.length === 0) {
|
|
20559
20559
|
entries.PolicyArns = [];
|
|
20560
20560
|
}
|
|
@@ -20571,14 +20571,14 @@ var init_Aws_query = __esm({
|
|
|
20571
20571
|
}
|
|
20572
20572
|
return entries;
|
|
20573
20573
|
};
|
|
20574
|
-
se_policyDescriptorListType = (input,
|
|
20574
|
+
se_policyDescriptorListType = (input, context3) => {
|
|
20575
20575
|
const entries = {};
|
|
20576
20576
|
let counter = 1;
|
|
20577
20577
|
for (const entry of input) {
|
|
20578
20578
|
if (entry === null) {
|
|
20579
20579
|
continue;
|
|
20580
20580
|
}
|
|
20581
|
-
const memberEntries = se_PolicyDescriptorType(entry,
|
|
20581
|
+
const memberEntries = se_PolicyDescriptorType(entry, context3);
|
|
20582
20582
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20583
20583
|
entries[`member.${counter}.${key}`] = value;
|
|
20584
20584
|
});
|
|
@@ -20586,14 +20586,14 @@ var init_Aws_query = __esm({
|
|
|
20586
20586
|
}
|
|
20587
20587
|
return entries;
|
|
20588
20588
|
};
|
|
20589
|
-
se_PolicyDescriptorType = (input,
|
|
20589
|
+
se_PolicyDescriptorType = (input, context3) => {
|
|
20590
20590
|
const entries = {};
|
|
20591
20591
|
if (input[_a15] != null) {
|
|
20592
20592
|
entries[_a15] = input[_a15];
|
|
20593
20593
|
}
|
|
20594
20594
|
return entries;
|
|
20595
20595
|
};
|
|
20596
|
-
se_ProvidedContext = (input,
|
|
20596
|
+
se_ProvidedContext = (input, context3) => {
|
|
20597
20597
|
const entries = {};
|
|
20598
20598
|
if (input[_PAr] != null) {
|
|
20599
20599
|
entries[_PAr] = input[_PAr];
|
|
@@ -20603,14 +20603,14 @@ var init_Aws_query = __esm({
|
|
|
20603
20603
|
}
|
|
20604
20604
|
return entries;
|
|
20605
20605
|
};
|
|
20606
|
-
se_ProvidedContextsListType = (input,
|
|
20606
|
+
se_ProvidedContextsListType = (input, context3) => {
|
|
20607
20607
|
const entries = {};
|
|
20608
20608
|
let counter = 1;
|
|
20609
20609
|
for (const entry of input) {
|
|
20610
20610
|
if (entry === null) {
|
|
20611
20611
|
continue;
|
|
20612
20612
|
}
|
|
20613
|
-
const memberEntries = se_ProvidedContext(entry,
|
|
20613
|
+
const memberEntries = se_ProvidedContext(entry, context3);
|
|
20614
20614
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20615
20615
|
entries[`member.${counter}.${key}`] = value;
|
|
20616
20616
|
});
|
|
@@ -20618,7 +20618,7 @@ var init_Aws_query = __esm({
|
|
|
20618
20618
|
}
|
|
20619
20619
|
return entries;
|
|
20620
20620
|
};
|
|
20621
|
-
se_Tag = (input,
|
|
20621
|
+
se_Tag = (input, context3) => {
|
|
20622
20622
|
const entries = {};
|
|
20623
20623
|
if (input[_K] != null) {
|
|
20624
20624
|
entries[_K] = input[_K];
|
|
@@ -20628,7 +20628,7 @@ var init_Aws_query = __esm({
|
|
|
20628
20628
|
}
|
|
20629
20629
|
return entries;
|
|
20630
20630
|
};
|
|
20631
|
-
se_tagKeyListType = (input,
|
|
20631
|
+
se_tagKeyListType = (input, context3) => {
|
|
20632
20632
|
const entries = {};
|
|
20633
20633
|
let counter = 1;
|
|
20634
20634
|
for (const entry of input) {
|
|
@@ -20640,14 +20640,14 @@ var init_Aws_query = __esm({
|
|
|
20640
20640
|
}
|
|
20641
20641
|
return entries;
|
|
20642
20642
|
};
|
|
20643
|
-
se_tagListType = (input,
|
|
20643
|
+
se_tagListType = (input, context3) => {
|
|
20644
20644
|
const entries = {};
|
|
20645
20645
|
let counter = 1;
|
|
20646
20646
|
for (const entry of input) {
|
|
20647
20647
|
if (entry === null) {
|
|
20648
20648
|
continue;
|
|
20649
20649
|
}
|
|
20650
|
-
const memberEntries = se_Tag(entry,
|
|
20650
|
+
const memberEntries = se_Tag(entry, context3);
|
|
20651
20651
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20652
20652
|
entries[`member.${counter}.${key}`] = value;
|
|
20653
20653
|
});
|
|
@@ -20655,7 +20655,7 @@ var init_Aws_query = __esm({
|
|
|
20655
20655
|
}
|
|
20656
20656
|
return entries;
|
|
20657
20657
|
};
|
|
20658
|
-
de_AssumedRoleUser = (output,
|
|
20658
|
+
de_AssumedRoleUser = (output, context3) => {
|
|
20659
20659
|
const contents = {};
|
|
20660
20660
|
if (output[_ARI] != null) {
|
|
20661
20661
|
contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]);
|
|
@@ -20665,13 +20665,13 @@ var init_Aws_query = __esm({
|
|
|
20665
20665
|
}
|
|
20666
20666
|
return contents;
|
|
20667
20667
|
};
|
|
20668
|
-
de_AssumeRoleResponse = (output,
|
|
20668
|
+
de_AssumeRoleResponse = (output, context3) => {
|
|
20669
20669
|
const contents = {};
|
|
20670
20670
|
if (output[_C] != null) {
|
|
20671
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20671
|
+
contents[_C] = de_Credentials(output[_C], context3);
|
|
20672
20672
|
}
|
|
20673
20673
|
if (output[_ARU] != null) {
|
|
20674
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20674
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
|
|
20675
20675
|
}
|
|
20676
20676
|
if (output[_PPS] != null) {
|
|
20677
20677
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20681,16 +20681,16 @@ var init_Aws_query = __esm({
|
|
|
20681
20681
|
}
|
|
20682
20682
|
return contents;
|
|
20683
20683
|
};
|
|
20684
|
-
de_AssumeRoleWithWebIdentityResponse = (output,
|
|
20684
|
+
de_AssumeRoleWithWebIdentityResponse = (output, context3) => {
|
|
20685
20685
|
const contents = {};
|
|
20686
20686
|
if (output[_C] != null) {
|
|
20687
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20687
|
+
contents[_C] = de_Credentials(output[_C], context3);
|
|
20688
20688
|
}
|
|
20689
20689
|
if (output[_SFWIT] != null) {
|
|
20690
20690
|
contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]);
|
|
20691
20691
|
}
|
|
20692
20692
|
if (output[_ARU] != null) {
|
|
20693
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20693
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
|
|
20694
20694
|
}
|
|
20695
20695
|
if (output[_PPS] != null) {
|
|
20696
20696
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20706,7 +20706,7 @@ var init_Aws_query = __esm({
|
|
|
20706
20706
|
}
|
|
20707
20707
|
return contents;
|
|
20708
20708
|
};
|
|
20709
|
-
de_Credentials = (output,
|
|
20709
|
+
de_Credentials = (output, context3) => {
|
|
20710
20710
|
const contents = {};
|
|
20711
20711
|
if (output[_AKI] != null) {
|
|
20712
20712
|
contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]);
|
|
@@ -20722,49 +20722,49 @@ var init_Aws_query = __esm({
|
|
|
20722
20722
|
}
|
|
20723
20723
|
return contents;
|
|
20724
20724
|
};
|
|
20725
|
-
de_ExpiredTokenException = (output,
|
|
20725
|
+
de_ExpiredTokenException = (output, context3) => {
|
|
20726
20726
|
const contents = {};
|
|
20727
20727
|
if (output[_m] != null) {
|
|
20728
20728
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20729
20729
|
}
|
|
20730
20730
|
return contents;
|
|
20731
20731
|
};
|
|
20732
|
-
de_IDPCommunicationErrorException = (output,
|
|
20732
|
+
de_IDPCommunicationErrorException = (output, context3) => {
|
|
20733
20733
|
const contents = {};
|
|
20734
20734
|
if (output[_m] != null) {
|
|
20735
20735
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20736
20736
|
}
|
|
20737
20737
|
return contents;
|
|
20738
20738
|
};
|
|
20739
|
-
de_IDPRejectedClaimException = (output,
|
|
20739
|
+
de_IDPRejectedClaimException = (output, context3) => {
|
|
20740
20740
|
const contents = {};
|
|
20741
20741
|
if (output[_m] != null) {
|
|
20742
20742
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20743
20743
|
}
|
|
20744
20744
|
return contents;
|
|
20745
20745
|
};
|
|
20746
|
-
de_InvalidIdentityTokenException = (output,
|
|
20746
|
+
de_InvalidIdentityTokenException = (output, context3) => {
|
|
20747
20747
|
const contents = {};
|
|
20748
20748
|
if (output[_m] != null) {
|
|
20749
20749
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20750
20750
|
}
|
|
20751
20751
|
return contents;
|
|
20752
20752
|
};
|
|
20753
|
-
de_MalformedPolicyDocumentException = (output,
|
|
20753
|
+
de_MalformedPolicyDocumentException = (output, context3) => {
|
|
20754
20754
|
const contents = {};
|
|
20755
20755
|
if (output[_m] != null) {
|
|
20756
20756
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20757
20757
|
}
|
|
20758
20758
|
return contents;
|
|
20759
20759
|
};
|
|
20760
|
-
de_PackedPolicyTooLargeException = (output,
|
|
20760
|
+
de_PackedPolicyTooLargeException = (output, context3) => {
|
|
20761
20761
|
const contents = {};
|
|
20762
20762
|
if (output[_m] != null) {
|
|
20763
20763
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20764
20764
|
}
|
|
20765
20765
|
return contents;
|
|
20766
20766
|
};
|
|
20767
|
-
de_RegionDisabledException = (output,
|
|
20767
|
+
de_RegionDisabledException = (output, context3) => {
|
|
20768
20768
|
const contents = {};
|
|
20769
20769
|
if (output[_m] != null) {
|
|
20770
20770
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
@@ -20778,8 +20778,8 @@ var init_Aws_query = __esm({
|
|
|
20778
20778
|
cfId: output.headers["x-amz-cf-id"]
|
|
20779
20779
|
});
|
|
20780
20780
|
throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException);
|
|
20781
|
-
buildHttpRpcRequest = async (
|
|
20782
|
-
const { hostname, protocol = "https", port, path: basePath } = await
|
|
20781
|
+
buildHttpRpcRequest = async (context3, headers, path7, resolvedHostname, body) => {
|
|
20782
|
+
const { hostname, protocol = "https", port, path: basePath } = await context3.endpoint();
|
|
20783
20783
|
const contents = {
|
|
20784
20784
|
protocol,
|
|
20785
20785
|
hostname,
|
|
@@ -21662,7 +21662,7 @@ var require_dist_cjs63 = __commonJS({
|
|
|
21662
21662
|
this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
21663
21663
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
21664
21664
|
}
|
|
21665
|
-
async handle(next, args,
|
|
21665
|
+
async handle(next, args, context3 = {}) {
|
|
21666
21666
|
const request = args.request;
|
|
21667
21667
|
const { body: payload2, query: query2 } = request;
|
|
21668
21668
|
if (!(payload2 instanceof import_stream.Readable)) {
|
|
@@ -21799,10 +21799,10 @@ var require_endpointResolver2 = __commonJS({
|
|
|
21799
21799
|
size: 50,
|
|
21800
21800
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
21801
21801
|
});
|
|
21802
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
21802
|
+
var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
|
|
21803
21803
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
21804
21804
|
endpointParams,
|
|
21805
|
-
logger:
|
|
21805
|
+
logger: context3.logger
|
|
21806
21806
|
}));
|
|
21807
21807
|
};
|
|
21808
21808
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -23210,8 +23210,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23210
23210
|
...obj,
|
|
23211
23211
|
...obj.input && { input: CountTokensInputFilterSensitiveLog(obj.input) }
|
|
23212
23212
|
});
|
|
23213
|
-
var se_ApplyGuardrailCommand = async (input,
|
|
23214
|
-
const b3 = core.requestBuilder(input,
|
|
23213
|
+
var se_ApplyGuardrailCommand = async (input, context3) => {
|
|
23214
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23215
23215
|
const headers = {
|
|
23216
23216
|
"content-type": "application/json"
|
|
23217
23217
|
};
|
|
@@ -23220,15 +23220,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23220
23220
|
b3.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
|
|
23221
23221
|
let body;
|
|
23222
23222
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23223
|
-
content: (_2) => se_GuardrailContentBlockList(_2,
|
|
23223
|
+
content: (_2) => se_GuardrailContentBlockList(_2, context3),
|
|
23224
23224
|
outputScope: [],
|
|
23225
23225
|
source: []
|
|
23226
23226
|
}));
|
|
23227
23227
|
b3.m("POST").h(headers).b(body);
|
|
23228
23228
|
return b3.build();
|
|
23229
23229
|
};
|
|
23230
|
-
var se_ConverseCommand = async (input,
|
|
23231
|
-
const b3 = core.requestBuilder(input,
|
|
23230
|
+
var se_ConverseCommand = async (input, context3) => {
|
|
23231
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23232
23232
|
const headers = {
|
|
23233
23233
|
"content-type": "application/json"
|
|
23234
23234
|
};
|
|
@@ -23240,18 +23240,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23240
23240
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23241
23241
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23242
23242
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23243
|
-
messages: (_2) => se_Messages(_2,
|
|
23243
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
23244
23244
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23245
23245
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23246
23246
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23247
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23247
|
+
system: (_2) => se_SystemContentBlocks(_2, context3),
|
|
23248
23248
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23249
23249
|
}));
|
|
23250
23250
|
b3.m("POST").h(headers).b(body);
|
|
23251
23251
|
return b3.build();
|
|
23252
23252
|
};
|
|
23253
|
-
var se_ConverseStreamCommand = async (input,
|
|
23254
|
-
const b3 = core.requestBuilder(input,
|
|
23253
|
+
var se_ConverseStreamCommand = async (input, context3) => {
|
|
23254
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23255
23255
|
const headers = {
|
|
23256
23256
|
"content-type": "application/json"
|
|
23257
23257
|
};
|
|
@@ -23263,18 +23263,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23263
23263
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23264
23264
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23265
23265
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23266
|
-
messages: (_2) => se_Messages(_2,
|
|
23266
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
23267
23267
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23268
23268
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23269
23269
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23270
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23270
|
+
system: (_2) => se_SystemContentBlocks(_2, context3),
|
|
23271
23271
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23272
23272
|
}));
|
|
23273
23273
|
b3.m("POST").h(headers).b(body);
|
|
23274
23274
|
return b3.build();
|
|
23275
23275
|
};
|
|
23276
|
-
var se_CountTokensCommand = async (input,
|
|
23277
|
-
const b3 = core.requestBuilder(input,
|
|
23276
|
+
var se_CountTokensCommand = async (input, context3) => {
|
|
23277
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23278
23278
|
const headers = {
|
|
23279
23279
|
"content-type": "application/json"
|
|
23280
23280
|
};
|
|
@@ -23282,13 +23282,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23282
23282
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23283
23283
|
let body;
|
|
23284
23284
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23285
|
-
input: (_2) => se_CountTokensInput(_2,
|
|
23285
|
+
input: (_2) => se_CountTokensInput(_2, context3)
|
|
23286
23286
|
}));
|
|
23287
23287
|
b3.m("POST").h(headers).b(body);
|
|
23288
23288
|
return b3.build();
|
|
23289
23289
|
};
|
|
23290
|
-
var se_GetAsyncInvokeCommand = async (input,
|
|
23291
|
-
const b3 = core.requestBuilder(input,
|
|
23290
|
+
var se_GetAsyncInvokeCommand = async (input, context3) => {
|
|
23291
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23292
23292
|
const headers = {};
|
|
23293
23293
|
b3.bp("/async-invoke/{invocationArn}");
|
|
23294
23294
|
b3.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
|
|
@@ -23296,8 +23296,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23296
23296
|
b3.m("GET").h(headers).b(body);
|
|
23297
23297
|
return b3.build();
|
|
23298
23298
|
};
|
|
23299
|
-
var se_InvokeModelCommand = async (input,
|
|
23300
|
-
const b3 = core.requestBuilder(input,
|
|
23299
|
+
var se_InvokeModelCommand = async (input, context3) => {
|
|
23300
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23301
23301
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23302
23302
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23303
23303
|
[_a16]: input[_a16],
|
|
@@ -23315,8 +23315,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23315
23315
|
b3.m("POST").h(headers).b(body);
|
|
23316
23316
|
return b3.build();
|
|
23317
23317
|
};
|
|
23318
|
-
var se_InvokeModelWithBidirectionalStreamCommand = async (input,
|
|
23319
|
-
const b3 = core.requestBuilder(input,
|
|
23318
|
+
var se_InvokeModelWithBidirectionalStreamCommand = async (input, context3) => {
|
|
23319
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23320
23320
|
const headers = {
|
|
23321
23321
|
"content-type": "application/json"
|
|
23322
23322
|
};
|
|
@@ -23324,13 +23324,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23324
23324
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23325
23325
|
let body;
|
|
23326
23326
|
if (input.body !== void 0) {
|
|
23327
|
-
body = se_InvokeModelWithBidirectionalStreamInput(input.body,
|
|
23327
|
+
body = se_InvokeModelWithBidirectionalStreamInput(input.body, context3);
|
|
23328
23328
|
}
|
|
23329
23329
|
b3.m("POST").h(headers).b(body);
|
|
23330
23330
|
return b3.build();
|
|
23331
23331
|
};
|
|
23332
|
-
var se_InvokeModelWithResponseStreamCommand = async (input,
|
|
23333
|
-
const b3 = core.requestBuilder(input,
|
|
23332
|
+
var se_InvokeModelWithResponseStreamCommand = async (input, context3) => {
|
|
23333
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23334
23334
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23335
23335
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23336
23336
|
[_xaba]: input[_a16],
|
|
@@ -23348,8 +23348,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23348
23348
|
b3.m("POST").h(headers).b(body);
|
|
23349
23349
|
return b3.build();
|
|
23350
23350
|
};
|
|
23351
|
-
var se_ListAsyncInvokesCommand = async (input,
|
|
23352
|
-
const b3 = core.requestBuilder(input,
|
|
23351
|
+
var se_ListAsyncInvokesCommand = async (input, context3) => {
|
|
23352
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23353
23353
|
const headers = {};
|
|
23354
23354
|
b3.bp("/async-invoke");
|
|
23355
23355
|
const query2 = smithyClient.map({
|
|
@@ -23365,8 +23365,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23365
23365
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
23366
23366
|
return b3.build();
|
|
23367
23367
|
};
|
|
23368
|
-
var se_StartAsyncInvokeCommand = async (input,
|
|
23369
|
-
const b3 = core.requestBuilder(input,
|
|
23368
|
+
var se_StartAsyncInvokeCommand = async (input, context3) => {
|
|
23369
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23370
23370
|
const headers = {
|
|
23371
23371
|
"content-type": "application/json"
|
|
23372
23372
|
};
|
|
@@ -23382,14 +23382,14 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23382
23382
|
b3.m("POST").h(headers).b(body);
|
|
23383
23383
|
return b3.build();
|
|
23384
23384
|
};
|
|
23385
|
-
var de_ApplyGuardrailCommand = async (output,
|
|
23385
|
+
var de_ApplyGuardrailCommand = async (output, context3) => {
|
|
23386
23386
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23387
|
-
return de_CommandError3(output,
|
|
23387
|
+
return de_CommandError3(output, context3);
|
|
23388
23388
|
}
|
|
23389
23389
|
const contents = smithyClient.map({
|
|
23390
23390
|
$metadata: deserializeMetadata3(output)
|
|
23391
23391
|
});
|
|
23392
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23392
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23393
23393
|
const doc = smithyClient.take(data2, {
|
|
23394
23394
|
action: smithyClient.expectString,
|
|
23395
23395
|
actionReason: smithyClient.expectString,
|
|
@@ -23401,18 +23401,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23401
23401
|
Object.assign(contents, doc);
|
|
23402
23402
|
return contents;
|
|
23403
23403
|
};
|
|
23404
|
-
var de_ConverseCommand = async (output,
|
|
23404
|
+
var de_ConverseCommand = async (output, context3) => {
|
|
23405
23405
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23406
|
-
return de_CommandError3(output,
|
|
23406
|
+
return de_CommandError3(output, context3);
|
|
23407
23407
|
}
|
|
23408
23408
|
const contents = smithyClient.map({
|
|
23409
23409
|
$metadata: deserializeMetadata3(output)
|
|
23410
23410
|
});
|
|
23411
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23411
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23412
23412
|
const doc = smithyClient.take(data2, {
|
|
23413
23413
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
23414
23414
|
metrics: smithyClient._json,
|
|
23415
|
-
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2),
|
|
23415
|
+
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context3),
|
|
23416
23416
|
performanceConfig: smithyClient._json,
|
|
23417
23417
|
stopReason: smithyClient.expectString,
|
|
23418
23418
|
trace: (_2) => de_ConverseTrace(_2),
|
|
@@ -23421,39 +23421,39 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23421
23421
|
Object.assign(contents, doc);
|
|
23422
23422
|
return contents;
|
|
23423
23423
|
};
|
|
23424
|
-
var de_ConverseStreamCommand = async (output,
|
|
23424
|
+
var de_ConverseStreamCommand = async (output, context3) => {
|
|
23425
23425
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23426
|
-
return de_CommandError3(output,
|
|
23426
|
+
return de_CommandError3(output, context3);
|
|
23427
23427
|
}
|
|
23428
23428
|
const contents = smithyClient.map({
|
|
23429
23429
|
$metadata: deserializeMetadata3(output)
|
|
23430
23430
|
});
|
|
23431
23431
|
const data2 = output.body;
|
|
23432
|
-
contents.stream = de_ConverseStreamOutput(data2,
|
|
23432
|
+
contents.stream = de_ConverseStreamOutput(data2, context3);
|
|
23433
23433
|
return contents;
|
|
23434
23434
|
};
|
|
23435
|
-
var de_CountTokensCommand = async (output,
|
|
23435
|
+
var de_CountTokensCommand = async (output, context3) => {
|
|
23436
23436
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23437
|
-
return de_CommandError3(output,
|
|
23437
|
+
return de_CommandError3(output, context3);
|
|
23438
23438
|
}
|
|
23439
23439
|
const contents = smithyClient.map({
|
|
23440
23440
|
$metadata: deserializeMetadata3(output)
|
|
23441
23441
|
});
|
|
23442
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23442
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23443
23443
|
const doc = smithyClient.take(data2, {
|
|
23444
23444
|
inputTokens: smithyClient.expectInt32
|
|
23445
23445
|
});
|
|
23446
23446
|
Object.assign(contents, doc);
|
|
23447
23447
|
return contents;
|
|
23448
23448
|
};
|
|
23449
|
-
var de_GetAsyncInvokeCommand = async (output,
|
|
23449
|
+
var de_GetAsyncInvokeCommand = async (output, context3) => {
|
|
23450
23450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23451
|
-
return de_CommandError3(output,
|
|
23451
|
+
return de_CommandError3(output, context3);
|
|
23452
23452
|
}
|
|
23453
23453
|
const contents = smithyClient.map({
|
|
23454
23454
|
$metadata: deserializeMetadata3(output)
|
|
23455
23455
|
});
|
|
23456
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23456
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23457
23457
|
const doc = smithyClient.take(data2, {
|
|
23458
23458
|
clientRequestToken: smithyClient.expectString,
|
|
23459
23459
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -23468,33 +23468,33 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23468
23468
|
Object.assign(contents, doc);
|
|
23469
23469
|
return contents;
|
|
23470
23470
|
};
|
|
23471
|
-
var de_InvokeModelCommand = async (output,
|
|
23471
|
+
var de_InvokeModelCommand = async (output, context3) => {
|
|
23472
23472
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23473
|
-
return de_CommandError3(output,
|
|
23473
|
+
return de_CommandError3(output, context3);
|
|
23474
23474
|
}
|
|
23475
23475
|
const contents = smithyClient.map({
|
|
23476
23476
|
$metadata: deserializeMetadata3(output),
|
|
23477
23477
|
[_cT]: [, output.headers[_ct]],
|
|
23478
23478
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23479
23479
|
});
|
|
23480
|
-
const data2 = await smithyClient.collectBody(output.body,
|
|
23480
|
+
const data2 = await smithyClient.collectBody(output.body, context3);
|
|
23481
23481
|
contents.body = data2;
|
|
23482
23482
|
return contents;
|
|
23483
23483
|
};
|
|
23484
|
-
var de_InvokeModelWithBidirectionalStreamCommand = async (output,
|
|
23484
|
+
var de_InvokeModelWithBidirectionalStreamCommand = async (output, context3) => {
|
|
23485
23485
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23486
|
-
return de_CommandError3(output,
|
|
23486
|
+
return de_CommandError3(output, context3);
|
|
23487
23487
|
}
|
|
23488
23488
|
const contents = smithyClient.map({
|
|
23489
23489
|
$metadata: deserializeMetadata3(output)
|
|
23490
23490
|
});
|
|
23491
23491
|
const data2 = output.body;
|
|
23492
|
-
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2,
|
|
23492
|
+
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context3);
|
|
23493
23493
|
return contents;
|
|
23494
23494
|
};
|
|
23495
|
-
var de_InvokeModelWithResponseStreamCommand = async (output,
|
|
23495
|
+
var de_InvokeModelWithResponseStreamCommand = async (output, context3) => {
|
|
23496
23496
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23497
|
-
return de_CommandError3(output,
|
|
23497
|
+
return de_CommandError3(output, context3);
|
|
23498
23498
|
}
|
|
23499
23499
|
const contents = smithyClient.map({
|
|
23500
23500
|
$metadata: deserializeMetadata3(output),
|
|
@@ -23502,17 +23502,17 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23502
23502
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23503
23503
|
});
|
|
23504
23504
|
const data2 = output.body;
|
|
23505
|
-
contents.body = de_ResponseStream(data2,
|
|
23505
|
+
contents.body = de_ResponseStream(data2, context3);
|
|
23506
23506
|
return contents;
|
|
23507
23507
|
};
|
|
23508
|
-
var de_ListAsyncInvokesCommand = async (output,
|
|
23508
|
+
var de_ListAsyncInvokesCommand = async (output, context3) => {
|
|
23509
23509
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23510
|
-
return de_CommandError3(output,
|
|
23510
|
+
return de_CommandError3(output, context3);
|
|
23511
23511
|
}
|
|
23512
23512
|
const contents = smithyClient.map({
|
|
23513
23513
|
$metadata: deserializeMetadata3(output)
|
|
23514
23514
|
});
|
|
23515
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23515
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23516
23516
|
const doc = smithyClient.take(data2, {
|
|
23517
23517
|
asyncInvokeSummaries: (_2) => de_AsyncInvokeSummaries(_2),
|
|
23518
23518
|
nextToken: smithyClient.expectString
|
|
@@ -23520,24 +23520,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23520
23520
|
Object.assign(contents, doc);
|
|
23521
23521
|
return contents;
|
|
23522
23522
|
};
|
|
23523
|
-
var de_StartAsyncInvokeCommand = async (output,
|
|
23523
|
+
var de_StartAsyncInvokeCommand = async (output, context3) => {
|
|
23524
23524
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23525
|
-
return de_CommandError3(output,
|
|
23525
|
+
return de_CommandError3(output, context3);
|
|
23526
23526
|
}
|
|
23527
23527
|
const contents = smithyClient.map({
|
|
23528
23528
|
$metadata: deserializeMetadata3(output)
|
|
23529
23529
|
});
|
|
23530
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23530
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23531
23531
|
const doc = smithyClient.take(data2, {
|
|
23532
23532
|
invocationArn: smithyClient.expectString
|
|
23533
23533
|
});
|
|
23534
23534
|
Object.assign(contents, doc);
|
|
23535
23535
|
return contents;
|
|
23536
23536
|
};
|
|
23537
|
-
var de_CommandError3 = async (output,
|
|
23537
|
+
var de_CommandError3 = async (output, context3) => {
|
|
23538
23538
|
const parsedOutput = {
|
|
23539
23539
|
...output,
|
|
23540
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
23540
|
+
body: await core$1.parseJsonErrorBody(output.body, context3)
|
|
23541
23541
|
};
|
|
23542
23542
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
23543
23543
|
switch (errorCode) {
|
|
@@ -23587,7 +23587,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23587
23587
|
}
|
|
23588
23588
|
};
|
|
23589
23589
|
var throwDefaultError3 = smithyClient.withBaseException(BedrockRuntimeServiceException);
|
|
23590
|
-
var de_AccessDeniedExceptionRes2 = async (parsedOutput,
|
|
23590
|
+
var de_AccessDeniedExceptionRes2 = async (parsedOutput, context3) => {
|
|
23591
23591
|
const contents = smithyClient.map({});
|
|
23592
23592
|
const data2 = parsedOutput.body;
|
|
23593
23593
|
const doc = smithyClient.take(data2, {
|
|
@@ -23600,7 +23600,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23600
23600
|
});
|
|
23601
23601
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23602
23602
|
};
|
|
23603
|
-
var de_ConflictExceptionRes = async (parsedOutput,
|
|
23603
|
+
var de_ConflictExceptionRes = async (parsedOutput, context3) => {
|
|
23604
23604
|
const contents = smithyClient.map({});
|
|
23605
23605
|
const data2 = parsedOutput.body;
|
|
23606
23606
|
const doc = smithyClient.take(data2, {
|
|
@@ -23613,7 +23613,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23613
23613
|
});
|
|
23614
23614
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23615
23615
|
};
|
|
23616
|
-
var de_InternalServerExceptionRes2 = async (parsedOutput,
|
|
23616
|
+
var de_InternalServerExceptionRes2 = async (parsedOutput, context3) => {
|
|
23617
23617
|
const contents = smithyClient.map({});
|
|
23618
23618
|
const data2 = parsedOutput.body;
|
|
23619
23619
|
const doc = smithyClient.take(data2, {
|
|
@@ -23626,7 +23626,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23626
23626
|
});
|
|
23627
23627
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23628
23628
|
};
|
|
23629
|
-
var de_ModelErrorExceptionRes = async (parsedOutput,
|
|
23629
|
+
var de_ModelErrorExceptionRes = async (parsedOutput, context3) => {
|
|
23630
23630
|
const contents = smithyClient.map({});
|
|
23631
23631
|
const data2 = parsedOutput.body;
|
|
23632
23632
|
const doc = smithyClient.take(data2, {
|
|
@@ -23641,7 +23641,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23641
23641
|
});
|
|
23642
23642
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23643
23643
|
};
|
|
23644
|
-
var de_ModelNotReadyExceptionRes = async (parsedOutput,
|
|
23644
|
+
var de_ModelNotReadyExceptionRes = async (parsedOutput, context3) => {
|
|
23645
23645
|
const contents = smithyClient.map({});
|
|
23646
23646
|
const data2 = parsedOutput.body;
|
|
23647
23647
|
const doc = smithyClient.take(data2, {
|
|
@@ -23654,7 +23654,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23654
23654
|
});
|
|
23655
23655
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23656
23656
|
};
|
|
23657
|
-
var de_ModelStreamErrorExceptionRes = async (parsedOutput,
|
|
23657
|
+
var de_ModelStreamErrorExceptionRes = async (parsedOutput, context3) => {
|
|
23658
23658
|
const contents = smithyClient.map({});
|
|
23659
23659
|
const data2 = parsedOutput.body;
|
|
23660
23660
|
const doc = smithyClient.take(data2, {
|
|
@@ -23669,7 +23669,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23669
23669
|
});
|
|
23670
23670
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23671
23671
|
};
|
|
23672
|
-
var de_ModelTimeoutExceptionRes = async (parsedOutput,
|
|
23672
|
+
var de_ModelTimeoutExceptionRes = async (parsedOutput, context3) => {
|
|
23673
23673
|
const contents = smithyClient.map({});
|
|
23674
23674
|
const data2 = parsedOutput.body;
|
|
23675
23675
|
const doc = smithyClient.take(data2, {
|
|
@@ -23682,7 +23682,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23682
23682
|
});
|
|
23683
23683
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23684
23684
|
};
|
|
23685
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
23685
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
|
|
23686
23686
|
const contents = smithyClient.map({});
|
|
23687
23687
|
const data2 = parsedOutput.body;
|
|
23688
23688
|
const doc = smithyClient.take(data2, {
|
|
@@ -23695,7 +23695,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23695
23695
|
});
|
|
23696
23696
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23697
23697
|
};
|
|
23698
|
-
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput,
|
|
23698
|
+
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context3) => {
|
|
23699
23699
|
const contents = smithyClient.map({});
|
|
23700
23700
|
const data2 = parsedOutput.body;
|
|
23701
23701
|
const doc = smithyClient.take(data2, {
|
|
@@ -23708,7 +23708,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23708
23708
|
});
|
|
23709
23709
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23710
23710
|
};
|
|
23711
|
-
var de_ServiceUnavailableExceptionRes = async (parsedOutput,
|
|
23711
|
+
var de_ServiceUnavailableExceptionRes = async (parsedOutput, context3) => {
|
|
23712
23712
|
const contents = smithyClient.map({});
|
|
23713
23713
|
const data2 = parsedOutput.body;
|
|
23714
23714
|
const doc = smithyClient.take(data2, {
|
|
@@ -23721,7 +23721,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23721
23721
|
});
|
|
23722
23722
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23723
23723
|
};
|
|
23724
|
-
var de_ThrottlingExceptionRes = async (parsedOutput,
|
|
23724
|
+
var de_ThrottlingExceptionRes = async (parsedOutput, context3) => {
|
|
23725
23725
|
const contents = smithyClient.map({});
|
|
23726
23726
|
const data2 = parsedOutput.body;
|
|
23727
23727
|
const doc = smithyClient.take(data2, {
|
|
@@ -23734,7 +23734,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23734
23734
|
});
|
|
23735
23735
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23736
23736
|
};
|
|
23737
|
-
var de_ValidationExceptionRes = async (parsedOutput,
|
|
23737
|
+
var de_ValidationExceptionRes = async (parsedOutput, context3) => {
|
|
23738
23738
|
const contents = smithyClient.map({});
|
|
23739
23739
|
const data2 = parsedOutput.body;
|
|
23740
23740
|
const doc = smithyClient.take(data2, {
|
|
@@ -23747,367 +23747,367 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23747
23747
|
});
|
|
23748
23748
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23749
23749
|
};
|
|
23750
|
-
var se_InvokeModelWithBidirectionalStreamInput = (input,
|
|
23750
|
+
var se_InvokeModelWithBidirectionalStreamInput = (input, context3) => {
|
|
23751
23751
|
const eventMarshallingVisitor = (event) => exports2.InvokeModelWithBidirectionalStreamInput.visit(event, {
|
|
23752
|
-
chunk: (value) => se_BidirectionalInputPayloadPart_event(value,
|
|
23752
|
+
chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context3),
|
|
23753
23753
|
_: (value) => value
|
|
23754
23754
|
});
|
|
23755
|
-
return
|
|
23755
|
+
return context3.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
23756
23756
|
};
|
|
23757
|
-
var se_BidirectionalInputPayloadPart_event = (input,
|
|
23757
|
+
var se_BidirectionalInputPayloadPart_event = (input, context3) => {
|
|
23758
23758
|
const headers = {
|
|
23759
23759
|
":event-type": { type: "string", value: "chunk" },
|
|
23760
23760
|
":message-type": { type: "string", value: "event" },
|
|
23761
23761
|
":content-type": { type: "string", value: "application/json" }
|
|
23762
23762
|
};
|
|
23763
23763
|
let body = new Uint8Array();
|
|
23764
|
-
body = se_BidirectionalInputPayloadPart(input,
|
|
23765
|
-
body =
|
|
23764
|
+
body = se_BidirectionalInputPayloadPart(input, context3);
|
|
23765
|
+
body = context3.utf8Decoder(JSON.stringify(body));
|
|
23766
23766
|
return { headers, body };
|
|
23767
23767
|
};
|
|
23768
|
-
var de_ConverseStreamOutput = (output,
|
|
23769
|
-
return
|
|
23768
|
+
var de_ConverseStreamOutput = (output, context3) => {
|
|
23769
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23770
23770
|
if (event["messageStart"] != null) {
|
|
23771
23771
|
return {
|
|
23772
|
-
messageStart: await de_MessageStartEvent_event(event["messageStart"],
|
|
23772
|
+
messageStart: await de_MessageStartEvent_event(event["messageStart"], context3)
|
|
23773
23773
|
};
|
|
23774
23774
|
}
|
|
23775
23775
|
if (event["contentBlockStart"] != null) {
|
|
23776
23776
|
return {
|
|
23777
|
-
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"],
|
|
23777
|
+
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context3)
|
|
23778
23778
|
};
|
|
23779
23779
|
}
|
|
23780
23780
|
if (event["contentBlockDelta"] != null) {
|
|
23781
23781
|
return {
|
|
23782
|
-
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"],
|
|
23782
|
+
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context3)
|
|
23783
23783
|
};
|
|
23784
23784
|
}
|
|
23785
23785
|
if (event["contentBlockStop"] != null) {
|
|
23786
23786
|
return {
|
|
23787
|
-
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"],
|
|
23787
|
+
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context3)
|
|
23788
23788
|
};
|
|
23789
23789
|
}
|
|
23790
23790
|
if (event["messageStop"] != null) {
|
|
23791
23791
|
return {
|
|
23792
|
-
messageStop: await de_MessageStopEvent_event(event["messageStop"],
|
|
23792
|
+
messageStop: await de_MessageStopEvent_event(event["messageStop"], context3)
|
|
23793
23793
|
};
|
|
23794
23794
|
}
|
|
23795
23795
|
if (event["metadata"] != null) {
|
|
23796
23796
|
return {
|
|
23797
|
-
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"],
|
|
23797
|
+
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context3)
|
|
23798
23798
|
};
|
|
23799
23799
|
}
|
|
23800
23800
|
if (event["internalServerException"] != null) {
|
|
23801
23801
|
return {
|
|
23802
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23802
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23803
23803
|
};
|
|
23804
23804
|
}
|
|
23805
23805
|
if (event["modelStreamErrorException"] != null) {
|
|
23806
23806
|
return {
|
|
23807
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23807
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23808
23808
|
};
|
|
23809
23809
|
}
|
|
23810
23810
|
if (event["validationException"] != null) {
|
|
23811
23811
|
return {
|
|
23812
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23812
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23813
23813
|
};
|
|
23814
23814
|
}
|
|
23815
23815
|
if (event["throttlingException"] != null) {
|
|
23816
23816
|
return {
|
|
23817
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23817
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23818
23818
|
};
|
|
23819
23819
|
}
|
|
23820
23820
|
if (event["serviceUnavailableException"] != null) {
|
|
23821
23821
|
return {
|
|
23822
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23822
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23823
23823
|
};
|
|
23824
23824
|
}
|
|
23825
23825
|
return { $unknown: event };
|
|
23826
23826
|
});
|
|
23827
23827
|
};
|
|
23828
|
-
var de_InvokeModelWithBidirectionalStreamOutput = (output,
|
|
23829
|
-
return
|
|
23828
|
+
var de_InvokeModelWithBidirectionalStreamOutput = (output, context3) => {
|
|
23829
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23830
23830
|
if (event["chunk"] != null) {
|
|
23831
23831
|
return {
|
|
23832
|
-
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"],
|
|
23832
|
+
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context3)
|
|
23833
23833
|
};
|
|
23834
23834
|
}
|
|
23835
23835
|
if (event["internalServerException"] != null) {
|
|
23836
23836
|
return {
|
|
23837
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23837
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23838
23838
|
};
|
|
23839
23839
|
}
|
|
23840
23840
|
if (event["modelStreamErrorException"] != null) {
|
|
23841
23841
|
return {
|
|
23842
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23842
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23843
23843
|
};
|
|
23844
23844
|
}
|
|
23845
23845
|
if (event["validationException"] != null) {
|
|
23846
23846
|
return {
|
|
23847
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23847
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23848
23848
|
};
|
|
23849
23849
|
}
|
|
23850
23850
|
if (event["throttlingException"] != null) {
|
|
23851
23851
|
return {
|
|
23852
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23852
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23853
23853
|
};
|
|
23854
23854
|
}
|
|
23855
23855
|
if (event["modelTimeoutException"] != null) {
|
|
23856
23856
|
return {
|
|
23857
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
23857
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
|
|
23858
23858
|
};
|
|
23859
23859
|
}
|
|
23860
23860
|
if (event["serviceUnavailableException"] != null) {
|
|
23861
23861
|
return {
|
|
23862
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23862
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23863
23863
|
};
|
|
23864
23864
|
}
|
|
23865
23865
|
return { $unknown: event };
|
|
23866
23866
|
});
|
|
23867
23867
|
};
|
|
23868
|
-
var de_ResponseStream = (output,
|
|
23869
|
-
return
|
|
23868
|
+
var de_ResponseStream = (output, context3) => {
|
|
23869
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23870
23870
|
if (event["chunk"] != null) {
|
|
23871
23871
|
return {
|
|
23872
|
-
chunk: await de_PayloadPart_event(event["chunk"],
|
|
23872
|
+
chunk: await de_PayloadPart_event(event["chunk"], context3)
|
|
23873
23873
|
};
|
|
23874
23874
|
}
|
|
23875
23875
|
if (event["internalServerException"] != null) {
|
|
23876
23876
|
return {
|
|
23877
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23877
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23878
23878
|
};
|
|
23879
23879
|
}
|
|
23880
23880
|
if (event["modelStreamErrorException"] != null) {
|
|
23881
23881
|
return {
|
|
23882
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23882
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23883
23883
|
};
|
|
23884
23884
|
}
|
|
23885
23885
|
if (event["validationException"] != null) {
|
|
23886
23886
|
return {
|
|
23887
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23887
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23888
23888
|
};
|
|
23889
23889
|
}
|
|
23890
23890
|
if (event["throttlingException"] != null) {
|
|
23891
23891
|
return {
|
|
23892
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23892
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23893
23893
|
};
|
|
23894
23894
|
}
|
|
23895
23895
|
if (event["modelTimeoutException"] != null) {
|
|
23896
23896
|
return {
|
|
23897
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
23897
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
|
|
23898
23898
|
};
|
|
23899
23899
|
}
|
|
23900
23900
|
if (event["serviceUnavailableException"] != null) {
|
|
23901
23901
|
return {
|
|
23902
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23902
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23903
23903
|
};
|
|
23904
23904
|
}
|
|
23905
23905
|
return { $unknown: event };
|
|
23906
23906
|
});
|
|
23907
23907
|
};
|
|
23908
|
-
var de_BidirectionalOutputPayloadPart_event = async (output,
|
|
23908
|
+
var de_BidirectionalOutputPayloadPart_event = async (output, context3) => {
|
|
23909
23909
|
const contents = {};
|
|
23910
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23911
|
-
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2,
|
|
23910
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23911
|
+
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context3));
|
|
23912
23912
|
return contents;
|
|
23913
23913
|
};
|
|
23914
|
-
var de_ContentBlockDeltaEvent_event = async (output,
|
|
23914
|
+
var de_ContentBlockDeltaEvent_event = async (output, context3) => {
|
|
23915
23915
|
const contents = {};
|
|
23916
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23917
|
-
Object.assign(contents, de_ContentBlockDeltaEvent(data2,
|
|
23916
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23917
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data2, context3));
|
|
23918
23918
|
return contents;
|
|
23919
23919
|
};
|
|
23920
|
-
var de_ContentBlockStartEvent_event = async (output,
|
|
23920
|
+
var de_ContentBlockStartEvent_event = async (output, context3) => {
|
|
23921
23921
|
const contents = {};
|
|
23922
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23922
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23923
23923
|
Object.assign(contents, smithyClient._json(data2));
|
|
23924
23924
|
return contents;
|
|
23925
23925
|
};
|
|
23926
|
-
var de_ContentBlockStopEvent_event = async (output,
|
|
23926
|
+
var de_ContentBlockStopEvent_event = async (output, context3) => {
|
|
23927
23927
|
const contents = {};
|
|
23928
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23928
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23929
23929
|
Object.assign(contents, smithyClient._json(data2));
|
|
23930
23930
|
return contents;
|
|
23931
23931
|
};
|
|
23932
|
-
var de_ConverseStreamMetadataEvent_event = async (output,
|
|
23932
|
+
var de_ConverseStreamMetadataEvent_event = async (output, context3) => {
|
|
23933
23933
|
const contents = {};
|
|
23934
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23934
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23935
23935
|
Object.assign(contents, de_ConverseStreamMetadataEvent(data2));
|
|
23936
23936
|
return contents;
|
|
23937
23937
|
};
|
|
23938
|
-
var de_InternalServerException_event = async (output,
|
|
23938
|
+
var de_InternalServerException_event = async (output, context3) => {
|
|
23939
23939
|
const parsedOutput = {
|
|
23940
23940
|
...output,
|
|
23941
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23941
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23942
23942
|
};
|
|
23943
23943
|
return de_InternalServerExceptionRes2(parsedOutput);
|
|
23944
23944
|
};
|
|
23945
|
-
var de_MessageStartEvent_event = async (output,
|
|
23945
|
+
var de_MessageStartEvent_event = async (output, context3) => {
|
|
23946
23946
|
const contents = {};
|
|
23947
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23947
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23948
23948
|
Object.assign(contents, smithyClient._json(data2));
|
|
23949
23949
|
return contents;
|
|
23950
23950
|
};
|
|
23951
|
-
var de_MessageStopEvent_event = async (output,
|
|
23951
|
+
var de_MessageStopEvent_event = async (output, context3) => {
|
|
23952
23952
|
const contents = {};
|
|
23953
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23953
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23954
23954
|
Object.assign(contents, de_MessageStopEvent(data2));
|
|
23955
23955
|
return contents;
|
|
23956
23956
|
};
|
|
23957
|
-
var de_ModelStreamErrorException_event = async (output,
|
|
23957
|
+
var de_ModelStreamErrorException_event = async (output, context3) => {
|
|
23958
23958
|
const parsedOutput = {
|
|
23959
23959
|
...output,
|
|
23960
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23960
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23961
23961
|
};
|
|
23962
23962
|
return de_ModelStreamErrorExceptionRes(parsedOutput);
|
|
23963
23963
|
};
|
|
23964
|
-
var de_ModelTimeoutException_event = async (output,
|
|
23964
|
+
var de_ModelTimeoutException_event = async (output, context3) => {
|
|
23965
23965
|
const parsedOutput = {
|
|
23966
23966
|
...output,
|
|
23967
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23967
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23968
23968
|
};
|
|
23969
23969
|
return de_ModelTimeoutExceptionRes(parsedOutput);
|
|
23970
23970
|
};
|
|
23971
|
-
var de_PayloadPart_event = async (output,
|
|
23971
|
+
var de_PayloadPart_event = async (output, context3) => {
|
|
23972
23972
|
const contents = {};
|
|
23973
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23974
|
-
Object.assign(contents, de_PayloadPart(data2,
|
|
23973
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23974
|
+
Object.assign(contents, de_PayloadPart(data2, context3));
|
|
23975
23975
|
return contents;
|
|
23976
23976
|
};
|
|
23977
|
-
var de_ServiceUnavailableException_event = async (output,
|
|
23977
|
+
var de_ServiceUnavailableException_event = async (output, context3) => {
|
|
23978
23978
|
const parsedOutput = {
|
|
23979
23979
|
...output,
|
|
23980
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23980
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23981
23981
|
};
|
|
23982
23982
|
return de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
23983
23983
|
};
|
|
23984
|
-
var de_ThrottlingException_event = async (output,
|
|
23984
|
+
var de_ThrottlingException_event = async (output, context3) => {
|
|
23985
23985
|
const parsedOutput = {
|
|
23986
23986
|
...output,
|
|
23987
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23987
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23988
23988
|
};
|
|
23989
23989
|
return de_ThrottlingExceptionRes(parsedOutput);
|
|
23990
23990
|
};
|
|
23991
|
-
var de_ValidationException_event = async (output,
|
|
23991
|
+
var de_ValidationException_event = async (output, context3) => {
|
|
23992
23992
|
const parsedOutput = {
|
|
23993
23993
|
...output,
|
|
23994
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23994
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23995
23995
|
};
|
|
23996
23996
|
return de_ValidationExceptionRes(parsedOutput);
|
|
23997
23997
|
};
|
|
23998
|
-
var se_BidirectionalInputPayloadPart = (input,
|
|
23998
|
+
var se_BidirectionalInputPayloadPart = (input, context3) => {
|
|
23999
23999
|
return smithyClient.take(input, {
|
|
24000
|
-
bytes:
|
|
24000
|
+
bytes: context3.base64Encoder
|
|
24001
24001
|
});
|
|
24002
24002
|
};
|
|
24003
|
-
var se_ContentBlock = (input,
|
|
24003
|
+
var se_ContentBlock = (input, context3) => {
|
|
24004
24004
|
return exports2.ContentBlock.visit(input, {
|
|
24005
24005
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24006
24006
|
citationsContent: (value) => ({ citationsContent: smithyClient._json(value) }),
|
|
24007
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
24008
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
24009
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
24010
|
-
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value,
|
|
24007
|
+
document: (value) => ({ document: se_DocumentBlock(value, context3) }),
|
|
24008
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
|
|
24009
|
+
image: (value) => ({ image: se_ImageBlock(value, context3) }),
|
|
24010
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context3) }),
|
|
24011
24011
|
text: (value) => ({ text: value }),
|
|
24012
|
-
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value,
|
|
24012
|
+
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context3) }),
|
|
24013
24013
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value) }),
|
|
24014
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24014
|
+
video: (value) => ({ video: se_VideoBlock(value, context3) }),
|
|
24015
24015
|
_: (name14, value) => ({ [name14]: value })
|
|
24016
24016
|
});
|
|
24017
24017
|
};
|
|
24018
|
-
var se_ContentBlocks = (input,
|
|
24018
|
+
var se_ContentBlocks = (input, context3) => {
|
|
24019
24019
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24020
|
-
return se_ContentBlock(entry,
|
|
24020
|
+
return se_ContentBlock(entry, context3);
|
|
24021
24021
|
});
|
|
24022
24022
|
};
|
|
24023
|
-
var se_ConverseTokensRequest = (input,
|
|
24023
|
+
var se_ConverseTokensRequest = (input, context3) => {
|
|
24024
24024
|
return smithyClient.take(input, {
|
|
24025
|
-
messages: (_2) => se_Messages(_2,
|
|
24026
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
24025
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
24026
|
+
system: (_2) => se_SystemContentBlocks(_2, context3)
|
|
24027
24027
|
});
|
|
24028
24028
|
};
|
|
24029
|
-
var se_CountTokensInput = (input,
|
|
24029
|
+
var se_CountTokensInput = (input, context3) => {
|
|
24030
24030
|
return exports2.CountTokensInput.visit(input, {
|
|
24031
|
-
converse: (value) => ({ converse: se_ConverseTokensRequest(value,
|
|
24032
|
-
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value,
|
|
24031
|
+
converse: (value) => ({ converse: se_ConverseTokensRequest(value, context3) }),
|
|
24032
|
+
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context3) }),
|
|
24033
24033
|
_: (name14, value) => ({ [name14]: value })
|
|
24034
24034
|
});
|
|
24035
24035
|
};
|
|
24036
|
-
var se_DocumentBlock = (input,
|
|
24036
|
+
var se_DocumentBlock = (input, context3) => {
|
|
24037
24037
|
return smithyClient.take(input, {
|
|
24038
24038
|
citations: smithyClient._json,
|
|
24039
24039
|
context: [],
|
|
24040
24040
|
format: [],
|
|
24041
24041
|
name: [],
|
|
24042
|
-
source: (_2) => se_DocumentSource(_2,
|
|
24042
|
+
source: (_2) => se_DocumentSource(_2, context3)
|
|
24043
24043
|
});
|
|
24044
24044
|
};
|
|
24045
|
-
var se_DocumentSource = (input,
|
|
24045
|
+
var se_DocumentSource = (input, context3) => {
|
|
24046
24046
|
return exports2.DocumentSource.visit(input, {
|
|
24047
|
-
bytes: (value) => ({ bytes:
|
|
24047
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24048
24048
|
content: (value) => ({ content: smithyClient._json(value) }),
|
|
24049
24049
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24050
24050
|
text: (value) => ({ text: value }),
|
|
24051
24051
|
_: (name14, value) => ({ [name14]: value })
|
|
24052
24052
|
});
|
|
24053
24053
|
};
|
|
24054
|
-
var se_GuardrailContentBlock = (input,
|
|
24054
|
+
var se_GuardrailContentBlock = (input, context3) => {
|
|
24055
24055
|
return exports2.GuardrailContentBlock.visit(input, {
|
|
24056
|
-
image: (value) => ({ image: se_GuardrailImageBlock(value,
|
|
24056
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context3) }),
|
|
24057
24057
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24058
24058
|
_: (name14, value) => ({ [name14]: value })
|
|
24059
24059
|
});
|
|
24060
24060
|
};
|
|
24061
|
-
var se_GuardrailContentBlockList = (input,
|
|
24061
|
+
var se_GuardrailContentBlockList = (input, context3) => {
|
|
24062
24062
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24063
|
-
return se_GuardrailContentBlock(entry,
|
|
24063
|
+
return se_GuardrailContentBlock(entry, context3);
|
|
24064
24064
|
});
|
|
24065
24065
|
};
|
|
24066
|
-
var se_GuardrailConverseContentBlock = (input,
|
|
24066
|
+
var se_GuardrailConverseContentBlock = (input, context3) => {
|
|
24067
24067
|
return exports2.GuardrailConverseContentBlock.visit(input, {
|
|
24068
|
-
image: (value) => ({ image: se_GuardrailConverseImageBlock(value,
|
|
24068
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context3) }),
|
|
24069
24069
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24070
24070
|
_: (name14, value) => ({ [name14]: value })
|
|
24071
24071
|
});
|
|
24072
24072
|
};
|
|
24073
|
-
var se_GuardrailConverseImageBlock = (input,
|
|
24073
|
+
var se_GuardrailConverseImageBlock = (input, context3) => {
|
|
24074
24074
|
return smithyClient.take(input, {
|
|
24075
24075
|
format: [],
|
|
24076
|
-
source: (_2) => se_GuardrailConverseImageSource(_2,
|
|
24076
|
+
source: (_2) => se_GuardrailConverseImageSource(_2, context3)
|
|
24077
24077
|
});
|
|
24078
24078
|
};
|
|
24079
|
-
var se_GuardrailConverseImageSource = (input,
|
|
24079
|
+
var se_GuardrailConverseImageSource = (input, context3) => {
|
|
24080
24080
|
return exports2.GuardrailConverseImageSource.visit(input, {
|
|
24081
|
-
bytes: (value) => ({ bytes:
|
|
24081
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24082
24082
|
_: (name14, value) => ({ [name14]: value })
|
|
24083
24083
|
});
|
|
24084
24084
|
};
|
|
24085
|
-
var se_GuardrailImageBlock = (input,
|
|
24085
|
+
var se_GuardrailImageBlock = (input, context3) => {
|
|
24086
24086
|
return smithyClient.take(input, {
|
|
24087
24087
|
format: [],
|
|
24088
|
-
source: (_2) => se_GuardrailImageSource(_2,
|
|
24088
|
+
source: (_2) => se_GuardrailImageSource(_2, context3)
|
|
24089
24089
|
});
|
|
24090
24090
|
};
|
|
24091
|
-
var se_GuardrailImageSource = (input,
|
|
24091
|
+
var se_GuardrailImageSource = (input, context3) => {
|
|
24092
24092
|
return exports2.GuardrailImageSource.visit(input, {
|
|
24093
|
-
bytes: (value) => ({ bytes:
|
|
24093
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24094
24094
|
_: (name14, value) => ({ [name14]: value })
|
|
24095
24095
|
});
|
|
24096
24096
|
};
|
|
24097
|
-
var se_ImageBlock = (input,
|
|
24097
|
+
var se_ImageBlock = (input, context3) => {
|
|
24098
24098
|
return smithyClient.take(input, {
|
|
24099
24099
|
format: [],
|
|
24100
|
-
source: (_2) => se_ImageSource(_2,
|
|
24100
|
+
source: (_2) => se_ImageSource(_2, context3)
|
|
24101
24101
|
});
|
|
24102
24102
|
};
|
|
24103
|
-
var se_ImageSource = (input,
|
|
24103
|
+
var se_ImageSource = (input, context3) => {
|
|
24104
24104
|
return exports2.ImageSource.visit(input, {
|
|
24105
|
-
bytes: (value) => ({ bytes:
|
|
24105
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24106
24106
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24107
24107
|
_: (name14, value) => ({ [name14]: value })
|
|
24108
24108
|
});
|
|
24109
24109
|
};
|
|
24110
|
-
var se_InferenceConfiguration = (input,
|
|
24110
|
+
var se_InferenceConfiguration = (input, context3) => {
|
|
24111
24111
|
return smithyClient.take(input, {
|
|
24112
24112
|
maxTokens: [],
|
|
24113
24113
|
stopSequences: smithyClient._json,
|
|
@@ -24115,128 +24115,128 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24115
24115
|
topP: smithyClient.serializeFloat
|
|
24116
24116
|
});
|
|
24117
24117
|
};
|
|
24118
|
-
var se_InvokeModelTokensRequest = (input,
|
|
24118
|
+
var se_InvokeModelTokensRequest = (input, context3) => {
|
|
24119
24119
|
return smithyClient.take(input, {
|
|
24120
|
-
body:
|
|
24120
|
+
body: context3.base64Encoder
|
|
24121
24121
|
});
|
|
24122
24122
|
};
|
|
24123
|
-
var se_Message = (input,
|
|
24123
|
+
var se_Message = (input, context3) => {
|
|
24124
24124
|
return smithyClient.take(input, {
|
|
24125
|
-
content: (_2) => se_ContentBlocks(_2,
|
|
24125
|
+
content: (_2) => se_ContentBlocks(_2, context3),
|
|
24126
24126
|
role: []
|
|
24127
24127
|
});
|
|
24128
24128
|
};
|
|
24129
|
-
var se_Messages = (input,
|
|
24129
|
+
var se_Messages = (input, context3) => {
|
|
24130
24130
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24131
|
-
return se_Message(entry,
|
|
24131
|
+
return se_Message(entry, context3);
|
|
24132
24132
|
});
|
|
24133
24133
|
};
|
|
24134
|
-
var se_ModelInputPayload = (input,
|
|
24134
|
+
var se_ModelInputPayload = (input, context3) => {
|
|
24135
24135
|
return input;
|
|
24136
24136
|
};
|
|
24137
|
-
var se_ReasoningContentBlock = (input,
|
|
24137
|
+
var se_ReasoningContentBlock = (input, context3) => {
|
|
24138
24138
|
return exports2.ReasoningContentBlock.visit(input, {
|
|
24139
24139
|
reasoningText: (value) => ({ reasoningText: smithyClient._json(value) }),
|
|
24140
|
-
redactedContent: (value) => ({ redactedContent:
|
|
24140
|
+
redactedContent: (value) => ({ redactedContent: context3.base64Encoder(value) }),
|
|
24141
24141
|
_: (name14, value) => ({ [name14]: value })
|
|
24142
24142
|
});
|
|
24143
24143
|
};
|
|
24144
|
-
var se_SystemContentBlock = (input,
|
|
24144
|
+
var se_SystemContentBlock = (input, context3) => {
|
|
24145
24145
|
return exports2.SystemContentBlock.visit(input, {
|
|
24146
24146
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24147
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
24147
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
|
|
24148
24148
|
text: (value) => ({ text: value }),
|
|
24149
24149
|
_: (name14, value) => ({ [name14]: value })
|
|
24150
24150
|
});
|
|
24151
24151
|
};
|
|
24152
|
-
var se_SystemContentBlocks = (input,
|
|
24152
|
+
var se_SystemContentBlocks = (input, context3) => {
|
|
24153
24153
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24154
|
-
return se_SystemContentBlock(entry,
|
|
24154
|
+
return se_SystemContentBlock(entry, context3);
|
|
24155
24155
|
});
|
|
24156
24156
|
};
|
|
24157
|
-
var se_Tool = (input,
|
|
24157
|
+
var se_Tool = (input, context3) => {
|
|
24158
24158
|
return exports2.Tool.visit(input, {
|
|
24159
24159
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24160
24160
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
|
|
24161
24161
|
_: (name14, value) => ({ [name14]: value })
|
|
24162
24162
|
});
|
|
24163
24163
|
};
|
|
24164
|
-
var se_ToolConfiguration = (input,
|
|
24164
|
+
var se_ToolConfiguration = (input, context3) => {
|
|
24165
24165
|
return smithyClient.take(input, {
|
|
24166
24166
|
toolChoice: smithyClient._json,
|
|
24167
24167
|
tools: (_2) => se_Tools(_2)
|
|
24168
24168
|
});
|
|
24169
24169
|
};
|
|
24170
|
-
var se_ToolInputSchema = (input,
|
|
24170
|
+
var se_ToolInputSchema = (input, context3) => {
|
|
24171
24171
|
return exports2.ToolInputSchema.visit(input, {
|
|
24172
24172
|
json: (value) => ({ json: se_Document(value) }),
|
|
24173
24173
|
_: (name14, value) => ({ [name14]: value })
|
|
24174
24174
|
});
|
|
24175
24175
|
};
|
|
24176
|
-
var se_ToolResultBlock = (input,
|
|
24176
|
+
var se_ToolResultBlock = (input, context3) => {
|
|
24177
24177
|
return smithyClient.take(input, {
|
|
24178
|
-
content: (_2) => se_ToolResultContentBlocks(_2,
|
|
24178
|
+
content: (_2) => se_ToolResultContentBlocks(_2, context3),
|
|
24179
24179
|
status: [],
|
|
24180
24180
|
toolUseId: []
|
|
24181
24181
|
});
|
|
24182
24182
|
};
|
|
24183
|
-
var se_ToolResultContentBlock = (input,
|
|
24183
|
+
var se_ToolResultContentBlock = (input, context3) => {
|
|
24184
24184
|
return exports2.ToolResultContentBlock.visit(input, {
|
|
24185
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
24186
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
24185
|
+
document: (value) => ({ document: se_DocumentBlock(value, context3) }),
|
|
24186
|
+
image: (value) => ({ image: se_ImageBlock(value, context3) }),
|
|
24187
24187
|
json: (value) => ({ json: se_Document(value) }),
|
|
24188
24188
|
text: (value) => ({ text: value }),
|
|
24189
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24189
|
+
video: (value) => ({ video: se_VideoBlock(value, context3) }),
|
|
24190
24190
|
_: (name14, value) => ({ [name14]: value })
|
|
24191
24191
|
});
|
|
24192
24192
|
};
|
|
24193
|
-
var se_ToolResultContentBlocks = (input,
|
|
24193
|
+
var se_ToolResultContentBlocks = (input, context3) => {
|
|
24194
24194
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24195
|
-
return se_ToolResultContentBlock(entry,
|
|
24195
|
+
return se_ToolResultContentBlock(entry, context3);
|
|
24196
24196
|
});
|
|
24197
24197
|
};
|
|
24198
|
-
var se_Tools = (input,
|
|
24198
|
+
var se_Tools = (input, context3) => {
|
|
24199
24199
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24200
24200
|
return se_Tool(entry);
|
|
24201
24201
|
});
|
|
24202
24202
|
};
|
|
24203
|
-
var se_ToolSpecification = (input,
|
|
24203
|
+
var se_ToolSpecification = (input, context3) => {
|
|
24204
24204
|
return smithyClient.take(input, {
|
|
24205
24205
|
description: [],
|
|
24206
24206
|
inputSchema: (_2) => se_ToolInputSchema(_2),
|
|
24207
24207
|
name: []
|
|
24208
24208
|
});
|
|
24209
24209
|
};
|
|
24210
|
-
var se_ToolUseBlock = (input,
|
|
24210
|
+
var se_ToolUseBlock = (input, context3) => {
|
|
24211
24211
|
return smithyClient.take(input, {
|
|
24212
24212
|
input: (_2) => se_Document(_2),
|
|
24213
24213
|
name: [],
|
|
24214
24214
|
toolUseId: []
|
|
24215
24215
|
});
|
|
24216
24216
|
};
|
|
24217
|
-
var se_VideoBlock = (input,
|
|
24217
|
+
var se_VideoBlock = (input, context3) => {
|
|
24218
24218
|
return smithyClient.take(input, {
|
|
24219
24219
|
format: [],
|
|
24220
|
-
source: (_2) => se_VideoSource(_2,
|
|
24220
|
+
source: (_2) => se_VideoSource(_2, context3)
|
|
24221
24221
|
});
|
|
24222
24222
|
};
|
|
24223
|
-
var se_VideoSource = (input,
|
|
24223
|
+
var se_VideoSource = (input, context3) => {
|
|
24224
24224
|
return exports2.VideoSource.visit(input, {
|
|
24225
|
-
bytes: (value) => ({ bytes:
|
|
24225
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24226
24226
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24227
24227
|
_: (name14, value) => ({ [name14]: value })
|
|
24228
24228
|
});
|
|
24229
24229
|
};
|
|
24230
|
-
var se_Document = (input,
|
|
24230
|
+
var se_Document = (input, context3) => {
|
|
24231
24231
|
return input;
|
|
24232
24232
|
};
|
|
24233
|
-
var de_AsyncInvokeSummaries = (output,
|
|
24233
|
+
var de_AsyncInvokeSummaries = (output, context3) => {
|
|
24234
24234
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24235
24235
|
return de_AsyncInvokeSummary(entry);
|
|
24236
24236
|
});
|
|
24237
24237
|
return retVal;
|
|
24238
24238
|
};
|
|
24239
|
-
var de_AsyncInvokeSummary = (output,
|
|
24239
|
+
var de_AsyncInvokeSummary = (output, context3) => {
|
|
24240
24240
|
return smithyClient.take(output, {
|
|
24241
24241
|
clientRequestToken: smithyClient.expectString,
|
|
24242
24242
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -24249,12 +24249,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24249
24249
|
submitTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2))
|
|
24250
24250
|
});
|
|
24251
24251
|
};
|
|
24252
|
-
var de_BidirectionalOutputPayloadPart = (output,
|
|
24252
|
+
var de_BidirectionalOutputPayloadPart = (output, context3) => {
|
|
24253
24253
|
return smithyClient.take(output, {
|
|
24254
|
-
bytes:
|
|
24254
|
+
bytes: context3.base64Decoder
|
|
24255
24255
|
});
|
|
24256
24256
|
};
|
|
24257
|
-
var de_ContentBlock = (output,
|
|
24257
|
+
var de_ContentBlock = (output, context3) => {
|
|
24258
24258
|
if (output.cachePoint != null) {
|
|
24259
24259
|
return {
|
|
24260
24260
|
cachePoint: smithyClient._json(output.cachePoint)
|
|
@@ -24267,22 +24267,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24267
24267
|
}
|
|
24268
24268
|
if (output.document != null) {
|
|
24269
24269
|
return {
|
|
24270
|
-
document: de_DocumentBlock(output.document,
|
|
24270
|
+
document: de_DocumentBlock(output.document, context3)
|
|
24271
24271
|
};
|
|
24272
24272
|
}
|
|
24273
24273
|
if (output.guardContent != null) {
|
|
24274
24274
|
return {
|
|
24275
|
-
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent),
|
|
24275
|
+
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context3)
|
|
24276
24276
|
};
|
|
24277
24277
|
}
|
|
24278
24278
|
if (output.image != null) {
|
|
24279
24279
|
return {
|
|
24280
|
-
image: de_ImageBlock(output.image,
|
|
24280
|
+
image: de_ImageBlock(output.image, context3)
|
|
24281
24281
|
};
|
|
24282
24282
|
}
|
|
24283
24283
|
if (output.reasoningContent != null) {
|
|
24284
24284
|
return {
|
|
24285
|
-
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent),
|
|
24285
|
+
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context3)
|
|
24286
24286
|
};
|
|
24287
24287
|
}
|
|
24288
24288
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24290,7 +24290,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24290
24290
|
}
|
|
24291
24291
|
if (output.toolResult != null) {
|
|
24292
24292
|
return {
|
|
24293
|
-
toolResult: de_ToolResultBlock(output.toolResult,
|
|
24293
|
+
toolResult: de_ToolResultBlock(output.toolResult, context3)
|
|
24294
24294
|
};
|
|
24295
24295
|
}
|
|
24296
24296
|
if (output.toolUse != null) {
|
|
@@ -24300,12 +24300,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24300
24300
|
}
|
|
24301
24301
|
if (output.video != null) {
|
|
24302
24302
|
return {
|
|
24303
|
-
video: de_VideoBlock(output.video,
|
|
24303
|
+
video: de_VideoBlock(output.video, context3)
|
|
24304
24304
|
};
|
|
24305
24305
|
}
|
|
24306
24306
|
return { $unknown: Object.entries(output)[0] };
|
|
24307
24307
|
};
|
|
24308
|
-
var de_ContentBlockDelta = (output,
|
|
24308
|
+
var de_ContentBlockDelta = (output, context3) => {
|
|
24309
24309
|
if (output.citation != null) {
|
|
24310
24310
|
return {
|
|
24311
24311
|
citation: smithyClient._json(output.citation)
|
|
@@ -24313,7 +24313,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24313
24313
|
}
|
|
24314
24314
|
if (output.reasoningContent != null) {
|
|
24315
24315
|
return {
|
|
24316
|
-
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent),
|
|
24316
|
+
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context3)
|
|
24317
24317
|
};
|
|
24318
24318
|
}
|
|
24319
24319
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24326,27 +24326,27 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24326
24326
|
}
|
|
24327
24327
|
return { $unknown: Object.entries(output)[0] };
|
|
24328
24328
|
};
|
|
24329
|
-
var de_ContentBlockDeltaEvent = (output,
|
|
24329
|
+
var de_ContentBlockDeltaEvent = (output, context3) => {
|
|
24330
24330
|
return smithyClient.take(output, {
|
|
24331
24331
|
contentBlockIndex: smithyClient.expectInt32,
|
|
24332
|
-
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2),
|
|
24332
|
+
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context3)
|
|
24333
24333
|
});
|
|
24334
24334
|
};
|
|
24335
|
-
var de_ContentBlocks = (output,
|
|
24335
|
+
var de_ContentBlocks = (output, context3) => {
|
|
24336
24336
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24337
|
-
return de_ContentBlock(core$1.awsExpectUnion(entry),
|
|
24337
|
+
return de_ContentBlock(core$1.awsExpectUnion(entry), context3);
|
|
24338
24338
|
});
|
|
24339
24339
|
return retVal;
|
|
24340
24340
|
};
|
|
24341
|
-
var de_ConverseOutput = (output,
|
|
24341
|
+
var de_ConverseOutput = (output, context3) => {
|
|
24342
24342
|
if (output.message != null) {
|
|
24343
24343
|
return {
|
|
24344
|
-
message: de_Message(output.message,
|
|
24344
|
+
message: de_Message(output.message, context3)
|
|
24345
24345
|
};
|
|
24346
24346
|
}
|
|
24347
24347
|
return { $unknown: Object.entries(output)[0] };
|
|
24348
24348
|
};
|
|
24349
|
-
var de_ConverseStreamMetadataEvent = (output,
|
|
24349
|
+
var de_ConverseStreamMetadataEvent = (output, context3) => {
|
|
24350
24350
|
return smithyClient.take(output, {
|
|
24351
24351
|
metrics: smithyClient._json,
|
|
24352
24352
|
performanceConfig: smithyClient._json,
|
|
@@ -24354,31 +24354,31 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24354
24354
|
usage: smithyClient._json
|
|
24355
24355
|
});
|
|
24356
24356
|
};
|
|
24357
|
-
var de_ConverseStreamTrace = (output,
|
|
24357
|
+
var de_ConverseStreamTrace = (output, context3) => {
|
|
24358
24358
|
return smithyClient.take(output, {
|
|
24359
24359
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24360
24360
|
promptRouter: smithyClient._json
|
|
24361
24361
|
});
|
|
24362
24362
|
};
|
|
24363
|
-
var de_ConverseTrace = (output,
|
|
24363
|
+
var de_ConverseTrace = (output, context3) => {
|
|
24364
24364
|
return smithyClient.take(output, {
|
|
24365
24365
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24366
24366
|
promptRouter: smithyClient._json
|
|
24367
24367
|
});
|
|
24368
24368
|
};
|
|
24369
|
-
var de_DocumentBlock = (output,
|
|
24369
|
+
var de_DocumentBlock = (output, context3) => {
|
|
24370
24370
|
return smithyClient.take(output, {
|
|
24371
24371
|
citations: smithyClient._json,
|
|
24372
24372
|
context: smithyClient.expectString,
|
|
24373
24373
|
format: smithyClient.expectString,
|
|
24374
24374
|
name: smithyClient.expectString,
|
|
24375
|
-
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2),
|
|
24375
|
+
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context3)
|
|
24376
24376
|
});
|
|
24377
24377
|
};
|
|
24378
|
-
var de_DocumentSource = (output,
|
|
24378
|
+
var de_DocumentSource = (output, context3) => {
|
|
24379
24379
|
if (output.bytes != null) {
|
|
24380
24380
|
return {
|
|
24381
|
-
bytes:
|
|
24381
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24382
24382
|
};
|
|
24383
24383
|
}
|
|
24384
24384
|
if (output.content != null) {
|
|
@@ -24396,7 +24396,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24396
24396
|
}
|
|
24397
24397
|
return { $unknown: Object.entries(output)[0] };
|
|
24398
24398
|
};
|
|
24399
|
-
var de_GuardrailAssessment = (output,
|
|
24399
|
+
var de_GuardrailAssessment = (output, context3) => {
|
|
24400
24400
|
return smithyClient.take(output, {
|
|
24401
24401
|
automatedReasoningPolicy: (_2) => de_GuardrailAutomatedReasoningPolicyAssessment(_2),
|
|
24402
24402
|
contentPolicy: smithyClient._json,
|
|
@@ -24407,13 +24407,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24407
24407
|
wordPolicy: smithyClient._json
|
|
24408
24408
|
});
|
|
24409
24409
|
};
|
|
24410
|
-
var de_GuardrailAssessmentList = (output,
|
|
24410
|
+
var de_GuardrailAssessmentList = (output, context3) => {
|
|
24411
24411
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24412
24412
|
return de_GuardrailAssessment(entry);
|
|
24413
24413
|
});
|
|
24414
24414
|
return retVal;
|
|
24415
24415
|
};
|
|
24416
|
-
var de_GuardrailAssessmentListMap = (output,
|
|
24416
|
+
var de_GuardrailAssessmentListMap = (output, context3) => {
|
|
24417
24417
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24418
24418
|
if (value === null) {
|
|
24419
24419
|
return acc;
|
|
@@ -24422,7 +24422,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24422
24422
|
return acc;
|
|
24423
24423
|
}, {});
|
|
24424
24424
|
};
|
|
24425
|
-
var de_GuardrailAssessmentMap = (output,
|
|
24425
|
+
var de_GuardrailAssessmentMap = (output, context3) => {
|
|
24426
24426
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24427
24427
|
if (value === null) {
|
|
24428
24428
|
return acc;
|
|
@@ -24431,7 +24431,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24431
24431
|
return acc;
|
|
24432
24432
|
}, {});
|
|
24433
24433
|
};
|
|
24434
|
-
var de_GuardrailAutomatedReasoningFinding = (output,
|
|
24434
|
+
var de_GuardrailAutomatedReasoningFinding = (output, context3) => {
|
|
24435
24435
|
if (output.impossible != null) {
|
|
24436
24436
|
return {
|
|
24437
24437
|
impossible: de_GuardrailAutomatedReasoningImpossibleFinding(output.impossible)
|
|
@@ -24469,32 +24469,32 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24469
24469
|
}
|
|
24470
24470
|
return { $unknown: Object.entries(output)[0] };
|
|
24471
24471
|
};
|
|
24472
|
-
var de_GuardrailAutomatedReasoningFindingList = (output,
|
|
24472
|
+
var de_GuardrailAutomatedReasoningFindingList = (output, context3) => {
|
|
24473
24473
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24474
24474
|
return de_GuardrailAutomatedReasoningFinding(core$1.awsExpectUnion(entry));
|
|
24475
24475
|
});
|
|
24476
24476
|
return retVal;
|
|
24477
24477
|
};
|
|
24478
|
-
var de_GuardrailAutomatedReasoningImpossibleFinding = (output,
|
|
24478
|
+
var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context3) => {
|
|
24479
24479
|
return smithyClient.take(output, {
|
|
24480
24480
|
contradictingRules: smithyClient._json,
|
|
24481
24481
|
logicWarning: smithyClient._json,
|
|
24482
24482
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24483
24483
|
});
|
|
24484
24484
|
};
|
|
24485
|
-
var de_GuardrailAutomatedReasoningInvalidFinding = (output,
|
|
24485
|
+
var de_GuardrailAutomatedReasoningInvalidFinding = (output, context3) => {
|
|
24486
24486
|
return smithyClient.take(output, {
|
|
24487
24487
|
contradictingRules: smithyClient._json,
|
|
24488
24488
|
logicWarning: smithyClient._json,
|
|
24489
24489
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24490
24490
|
});
|
|
24491
24491
|
};
|
|
24492
|
-
var de_GuardrailAutomatedReasoningPolicyAssessment = (output,
|
|
24492
|
+
var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context3) => {
|
|
24493
24493
|
return smithyClient.take(output, {
|
|
24494
24494
|
findings: (_2) => de_GuardrailAutomatedReasoningFindingList(_2)
|
|
24495
24495
|
});
|
|
24496
24496
|
};
|
|
24497
|
-
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output,
|
|
24497
|
+
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context3) => {
|
|
24498
24498
|
return smithyClient.take(output, {
|
|
24499
24499
|
claimsFalseScenario: smithyClient._json,
|
|
24500
24500
|
claimsTrueScenario: smithyClient._json,
|
|
@@ -24502,7 +24502,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24502
24502
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24503
24503
|
});
|
|
24504
24504
|
};
|
|
24505
|
-
var de_GuardrailAutomatedReasoningTranslation = (output,
|
|
24505
|
+
var de_GuardrailAutomatedReasoningTranslation = (output, context3) => {
|
|
24506
24506
|
return smithyClient.take(output, {
|
|
24507
24507
|
claims: smithyClient._json,
|
|
24508
24508
|
confidence: smithyClient.limitedParseDouble,
|
|
@@ -24511,30 +24511,30 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24511
24511
|
untranslatedPremises: smithyClient._json
|
|
24512
24512
|
});
|
|
24513
24513
|
};
|
|
24514
|
-
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output,
|
|
24514
|
+
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context3) => {
|
|
24515
24515
|
return smithyClient.take(output, {
|
|
24516
24516
|
differenceScenarios: smithyClient._json,
|
|
24517
24517
|
options: (_2) => de_GuardrailAutomatedReasoningTranslationOptionList(_2)
|
|
24518
24518
|
});
|
|
24519
24519
|
};
|
|
24520
|
-
var de_GuardrailAutomatedReasoningTranslationList = (output,
|
|
24520
|
+
var de_GuardrailAutomatedReasoningTranslationList = (output, context3) => {
|
|
24521
24521
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24522
24522
|
return de_GuardrailAutomatedReasoningTranslation(entry);
|
|
24523
24523
|
});
|
|
24524
24524
|
return retVal;
|
|
24525
24525
|
};
|
|
24526
|
-
var de_GuardrailAutomatedReasoningTranslationOption = (output,
|
|
24526
|
+
var de_GuardrailAutomatedReasoningTranslationOption = (output, context3) => {
|
|
24527
24527
|
return smithyClient.take(output, {
|
|
24528
24528
|
translations: (_2) => de_GuardrailAutomatedReasoningTranslationList(_2)
|
|
24529
24529
|
});
|
|
24530
24530
|
};
|
|
24531
|
-
var de_GuardrailAutomatedReasoningTranslationOptionList = (output,
|
|
24531
|
+
var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context3) => {
|
|
24532
24532
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24533
24533
|
return de_GuardrailAutomatedReasoningTranslationOption(entry);
|
|
24534
24534
|
});
|
|
24535
24535
|
return retVal;
|
|
24536
24536
|
};
|
|
24537
|
-
var de_GuardrailAutomatedReasoningValidFinding = (output,
|
|
24537
|
+
var de_GuardrailAutomatedReasoningValidFinding = (output, context3) => {
|
|
24538
24538
|
return smithyClient.take(output, {
|
|
24539
24539
|
claimsTrueScenario: smithyClient._json,
|
|
24540
24540
|
logicWarning: smithyClient._json,
|
|
@@ -24542,7 +24542,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24542
24542
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24543
24543
|
});
|
|
24544
24544
|
};
|
|
24545
|
-
var de_GuardrailContextualGroundingFilter = (output,
|
|
24545
|
+
var de_GuardrailContextualGroundingFilter = (output, context3) => {
|
|
24546
24546
|
return smithyClient.take(output, {
|
|
24547
24547
|
action: smithyClient.expectString,
|
|
24548
24548
|
detected: smithyClient.expectBoolean,
|
|
@@ -24551,21 +24551,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24551
24551
|
type: smithyClient.expectString
|
|
24552
24552
|
});
|
|
24553
24553
|
};
|
|
24554
|
-
var de_GuardrailContextualGroundingFilters = (output,
|
|
24554
|
+
var de_GuardrailContextualGroundingFilters = (output, context3) => {
|
|
24555
24555
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24556
24556
|
return de_GuardrailContextualGroundingFilter(entry);
|
|
24557
24557
|
});
|
|
24558
24558
|
return retVal;
|
|
24559
24559
|
};
|
|
24560
|
-
var de_GuardrailContextualGroundingPolicyAssessment = (output,
|
|
24560
|
+
var de_GuardrailContextualGroundingPolicyAssessment = (output, context3) => {
|
|
24561
24561
|
return smithyClient.take(output, {
|
|
24562
24562
|
filters: (_2) => de_GuardrailContextualGroundingFilters(_2)
|
|
24563
24563
|
});
|
|
24564
24564
|
};
|
|
24565
|
-
var de_GuardrailConverseContentBlock = (output,
|
|
24565
|
+
var de_GuardrailConverseContentBlock = (output, context3) => {
|
|
24566
24566
|
if (output.image != null) {
|
|
24567
24567
|
return {
|
|
24568
|
-
image: de_GuardrailConverseImageBlock(output.image,
|
|
24568
|
+
image: de_GuardrailConverseImageBlock(output.image, context3)
|
|
24569
24569
|
};
|
|
24570
24570
|
}
|
|
24571
24571
|
if (output.text != null) {
|
|
@@ -24575,21 +24575,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24575
24575
|
}
|
|
24576
24576
|
return { $unknown: Object.entries(output)[0] };
|
|
24577
24577
|
};
|
|
24578
|
-
var de_GuardrailConverseImageBlock = (output,
|
|
24578
|
+
var de_GuardrailConverseImageBlock = (output, context3) => {
|
|
24579
24579
|
return smithyClient.take(output, {
|
|
24580
24580
|
format: smithyClient.expectString,
|
|
24581
|
-
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2),
|
|
24581
|
+
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context3)
|
|
24582
24582
|
});
|
|
24583
24583
|
};
|
|
24584
|
-
var de_GuardrailConverseImageSource = (output,
|
|
24584
|
+
var de_GuardrailConverseImageSource = (output, context3) => {
|
|
24585
24585
|
if (output.bytes != null) {
|
|
24586
24586
|
return {
|
|
24587
|
-
bytes:
|
|
24587
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24588
24588
|
};
|
|
24589
24589
|
}
|
|
24590
24590
|
return { $unknown: Object.entries(output)[0] };
|
|
24591
24591
|
};
|
|
24592
|
-
var de_GuardrailTraceAssessment = (output,
|
|
24592
|
+
var de_GuardrailTraceAssessment = (output, context3) => {
|
|
24593
24593
|
return smithyClient.take(output, {
|
|
24594
24594
|
actionReason: smithyClient.expectString,
|
|
24595
24595
|
inputAssessment: (_2) => de_GuardrailAssessmentMap(_2),
|
|
@@ -24597,16 +24597,16 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24597
24597
|
outputAssessments: (_2) => de_GuardrailAssessmentListMap(_2)
|
|
24598
24598
|
});
|
|
24599
24599
|
};
|
|
24600
|
-
var de_ImageBlock = (output,
|
|
24600
|
+
var de_ImageBlock = (output, context3) => {
|
|
24601
24601
|
return smithyClient.take(output, {
|
|
24602
24602
|
format: smithyClient.expectString,
|
|
24603
|
-
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2),
|
|
24603
|
+
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context3)
|
|
24604
24604
|
});
|
|
24605
24605
|
};
|
|
24606
|
-
var de_ImageSource = (output,
|
|
24606
|
+
var de_ImageSource = (output, context3) => {
|
|
24607
24607
|
if (output.bytes != null) {
|
|
24608
24608
|
return {
|
|
24609
|
-
bytes:
|
|
24609
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24610
24610
|
};
|
|
24611
24611
|
}
|
|
24612
24612
|
if (output.s3Location != null) {
|
|
@@ -24616,24 +24616,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24616
24616
|
}
|
|
24617
24617
|
return { $unknown: Object.entries(output)[0] };
|
|
24618
24618
|
};
|
|
24619
|
-
var de_Message = (output,
|
|
24619
|
+
var de_Message = (output, context3) => {
|
|
24620
24620
|
return smithyClient.take(output, {
|
|
24621
|
-
content: (_2) => de_ContentBlocks(_2,
|
|
24621
|
+
content: (_2) => de_ContentBlocks(_2, context3),
|
|
24622
24622
|
role: smithyClient.expectString
|
|
24623
24623
|
});
|
|
24624
24624
|
};
|
|
24625
|
-
var de_MessageStopEvent = (output,
|
|
24625
|
+
var de_MessageStopEvent = (output, context3) => {
|
|
24626
24626
|
return smithyClient.take(output, {
|
|
24627
24627
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
24628
24628
|
stopReason: smithyClient.expectString
|
|
24629
24629
|
});
|
|
24630
24630
|
};
|
|
24631
|
-
var de_PayloadPart = (output,
|
|
24631
|
+
var de_PayloadPart = (output, context3) => {
|
|
24632
24632
|
return smithyClient.take(output, {
|
|
24633
|
-
bytes:
|
|
24633
|
+
bytes: context3.base64Decoder
|
|
24634
24634
|
});
|
|
24635
24635
|
};
|
|
24636
|
-
var de_ReasoningContentBlock = (output,
|
|
24636
|
+
var de_ReasoningContentBlock = (output, context3) => {
|
|
24637
24637
|
if (output.reasoningText != null) {
|
|
24638
24638
|
return {
|
|
24639
24639
|
reasoningText: smithyClient._json(output.reasoningText)
|
|
@@ -24641,15 +24641,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24641
24641
|
}
|
|
24642
24642
|
if (output.redactedContent != null) {
|
|
24643
24643
|
return {
|
|
24644
|
-
redactedContent:
|
|
24644
|
+
redactedContent: context3.base64Decoder(output.redactedContent)
|
|
24645
24645
|
};
|
|
24646
24646
|
}
|
|
24647
24647
|
return { $unknown: Object.entries(output)[0] };
|
|
24648
24648
|
};
|
|
24649
|
-
var de_ReasoningContentBlockDelta = (output,
|
|
24649
|
+
var de_ReasoningContentBlockDelta = (output, context3) => {
|
|
24650
24650
|
if (output.redactedContent != null) {
|
|
24651
24651
|
return {
|
|
24652
|
-
redactedContent:
|
|
24652
|
+
redactedContent: context3.base64Decoder(output.redactedContent)
|
|
24653
24653
|
};
|
|
24654
24654
|
}
|
|
24655
24655
|
if (smithyClient.expectString(output.signature) !== void 0) {
|
|
@@ -24660,22 +24660,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24660
24660
|
}
|
|
24661
24661
|
return { $unknown: Object.entries(output)[0] };
|
|
24662
24662
|
};
|
|
24663
|
-
var de_ToolResultBlock = (output,
|
|
24663
|
+
var de_ToolResultBlock = (output, context3) => {
|
|
24664
24664
|
return smithyClient.take(output, {
|
|
24665
|
-
content: (_2) => de_ToolResultContentBlocks(_2,
|
|
24665
|
+
content: (_2) => de_ToolResultContentBlocks(_2, context3),
|
|
24666
24666
|
status: smithyClient.expectString,
|
|
24667
24667
|
toolUseId: smithyClient.expectString
|
|
24668
24668
|
});
|
|
24669
24669
|
};
|
|
24670
|
-
var de_ToolResultContentBlock = (output,
|
|
24670
|
+
var de_ToolResultContentBlock = (output, context3) => {
|
|
24671
24671
|
if (output.document != null) {
|
|
24672
24672
|
return {
|
|
24673
|
-
document: de_DocumentBlock(output.document,
|
|
24673
|
+
document: de_DocumentBlock(output.document, context3)
|
|
24674
24674
|
};
|
|
24675
24675
|
}
|
|
24676
24676
|
if (output.image != null) {
|
|
24677
24677
|
return {
|
|
24678
|
-
image: de_ImageBlock(output.image,
|
|
24678
|
+
image: de_ImageBlock(output.image, context3)
|
|
24679
24679
|
};
|
|
24680
24680
|
}
|
|
24681
24681
|
if (output.json != null) {
|
|
@@ -24688,34 +24688,34 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24688
24688
|
}
|
|
24689
24689
|
if (output.video != null) {
|
|
24690
24690
|
return {
|
|
24691
|
-
video: de_VideoBlock(output.video,
|
|
24691
|
+
video: de_VideoBlock(output.video, context3)
|
|
24692
24692
|
};
|
|
24693
24693
|
}
|
|
24694
24694
|
return { $unknown: Object.entries(output)[0] };
|
|
24695
24695
|
};
|
|
24696
|
-
var de_ToolResultContentBlocks = (output,
|
|
24696
|
+
var de_ToolResultContentBlocks = (output, context3) => {
|
|
24697
24697
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24698
|
-
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry),
|
|
24698
|
+
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context3);
|
|
24699
24699
|
});
|
|
24700
24700
|
return retVal;
|
|
24701
24701
|
};
|
|
24702
|
-
var de_ToolUseBlock = (output,
|
|
24702
|
+
var de_ToolUseBlock = (output, context3) => {
|
|
24703
24703
|
return smithyClient.take(output, {
|
|
24704
24704
|
input: (_2) => de_Document(_2),
|
|
24705
24705
|
name: smithyClient.expectString,
|
|
24706
24706
|
toolUseId: smithyClient.expectString
|
|
24707
24707
|
});
|
|
24708
24708
|
};
|
|
24709
|
-
var de_VideoBlock = (output,
|
|
24709
|
+
var de_VideoBlock = (output, context3) => {
|
|
24710
24710
|
return smithyClient.take(output, {
|
|
24711
24711
|
format: smithyClient.expectString,
|
|
24712
|
-
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2),
|
|
24712
|
+
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context3)
|
|
24713
24713
|
});
|
|
24714
24714
|
};
|
|
24715
|
-
var de_VideoSource = (output,
|
|
24715
|
+
var de_VideoSource = (output, context3) => {
|
|
24716
24716
|
if (output.bytes != null) {
|
|
24717
24717
|
return {
|
|
24718
|
-
bytes:
|
|
24718
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24719
24719
|
};
|
|
24720
24720
|
}
|
|
24721
24721
|
if (output.s3Location != null) {
|
|
@@ -24725,7 +24725,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24725
24725
|
}
|
|
24726
24726
|
return { $unknown: Object.entries(output)[0] };
|
|
24727
24727
|
};
|
|
24728
|
-
var de_Document = (output,
|
|
24728
|
+
var de_Document = (output, context3) => {
|
|
24729
24729
|
return output;
|
|
24730
24730
|
};
|
|
24731
24731
|
var deserializeMetadata3 = (output) => ({
|
|
@@ -34793,6 +34793,47 @@ var init_simpleTelemetry = __esm({
|
|
|
34793
34793
|
}
|
|
34794
34794
|
});
|
|
34795
34795
|
|
|
34796
|
+
// src/agent/fileSpanExporter.js
|
|
34797
|
+
var import_fs4, import_core17, ExportResultCode;
|
|
34798
|
+
var init_fileSpanExporter = __esm({
|
|
34799
|
+
"src/agent/fileSpanExporter.js"() {
|
|
34800
|
+
"use strict";
|
|
34801
|
+
import_fs4 = require("fs");
|
|
34802
|
+
import_core17 = __toESM(require("@opentelemetry/core"), 1);
|
|
34803
|
+
({ ExportResultCode } = import_core17.default);
|
|
34804
|
+
}
|
|
34805
|
+
});
|
|
34806
|
+
|
|
34807
|
+
// src/agent/telemetry.js
|
|
34808
|
+
var import_sdk_node, import_resources, import_semantic_conventions, import_api, import_exporter_trace_otlp_http, import_sdk_trace_base, import_fs5, import_path8, NodeSDK, Resource, OTLPTraceExporter, BatchSpanProcessor, ConsoleSpanExporter;
|
|
34809
|
+
var init_telemetry = __esm({
|
|
34810
|
+
"src/agent/telemetry.js"() {
|
|
34811
|
+
"use strict";
|
|
34812
|
+
import_sdk_node = __toESM(require("@opentelemetry/sdk-node"), 1);
|
|
34813
|
+
import_resources = __toESM(require("@opentelemetry/resources"), 1);
|
|
34814
|
+
import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
34815
|
+
import_api = require("@opentelemetry/api");
|
|
34816
|
+
import_exporter_trace_otlp_http = __toESM(require("@opentelemetry/exporter-trace-otlp-http"), 1);
|
|
34817
|
+
import_sdk_trace_base = __toESM(require("@opentelemetry/sdk-trace-base"), 1);
|
|
34818
|
+
import_fs5 = require("fs");
|
|
34819
|
+
import_path8 = require("path");
|
|
34820
|
+
init_fileSpanExporter();
|
|
34821
|
+
({ NodeSDK } = import_sdk_node.default);
|
|
34822
|
+
({ Resource } = import_resources.default);
|
|
34823
|
+
({ OTLPTraceExporter } = import_exporter_trace_otlp_http.default);
|
|
34824
|
+
({ BatchSpanProcessor, ConsoleSpanExporter } = import_sdk_trace_base.default);
|
|
34825
|
+
}
|
|
34826
|
+
});
|
|
34827
|
+
|
|
34828
|
+
// src/agent/appTracer.js
|
|
34829
|
+
var import_api2;
|
|
34830
|
+
var init_appTracer = __esm({
|
|
34831
|
+
"src/agent/appTracer.js"() {
|
|
34832
|
+
"use strict";
|
|
34833
|
+
import_api2 = require("@opentelemetry/api");
|
|
34834
|
+
}
|
|
34835
|
+
});
|
|
34836
|
+
|
|
34796
34837
|
// node_modules/balanced-match/index.js
|
|
34797
34838
|
var require_balanced_match = __commonJS({
|
|
34798
34839
|
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
@@ -36567,7 +36608,7 @@ var init_esm2 = __esm({
|
|
|
36567
36608
|
free: c3.#free,
|
|
36568
36609
|
// methods
|
|
36569
36610
|
isBackgroundFetch: (p3) => c3.#isBackgroundFetch(p3),
|
|
36570
|
-
backgroundFetch: (k3, index, options,
|
|
36611
|
+
backgroundFetch: (k3, index, options, context3) => c3.#backgroundFetch(k3, index, options, context3),
|
|
36571
36612
|
moveToTail: (index) => c3.#moveToTail(index),
|
|
36572
36613
|
indexes: (options) => c3.#indexes(options),
|
|
36573
36614
|
rindexes: (options) => c3.#rindexes(options),
|
|
@@ -37354,7 +37395,7 @@ var init_esm2 = __esm({
|
|
|
37354
37395
|
const v3 = this.#valList[index];
|
|
37355
37396
|
return this.#isBackgroundFetch(v3) ? v3.__staleWhileFetching : v3;
|
|
37356
37397
|
}
|
|
37357
|
-
#backgroundFetch(k3, index, options,
|
|
37398
|
+
#backgroundFetch(k3, index, options, context3) {
|
|
37358
37399
|
const v3 = index === void 0 ? void 0 : this.#valList[index];
|
|
37359
37400
|
if (this.#isBackgroundFetch(v3)) {
|
|
37360
37401
|
return v3;
|
|
@@ -37367,7 +37408,7 @@ var init_esm2 = __esm({
|
|
|
37367
37408
|
const fetchOpts = {
|
|
37368
37409
|
signal: ac.signal,
|
|
37369
37410
|
options,
|
|
37370
|
-
context
|
|
37411
|
+
context: context3
|
|
37371
37412
|
};
|
|
37372
37413
|
const cb = (v4, updateCache = false) => {
|
|
37373
37414
|
const { aborted } = ac.signal;
|
|
@@ -37484,7 +37525,7 @@ var init_esm2 = __esm({
|
|
|
37484
37525
|
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
|
37485
37526
|
ignoreFetchAbort = this.ignoreFetchAbort,
|
|
37486
37527
|
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
|
37487
|
-
context,
|
|
37528
|
+
context: context3,
|
|
37488
37529
|
forceRefresh = false,
|
|
37489
37530
|
status,
|
|
37490
37531
|
signal
|
|
@@ -37519,7 +37560,7 @@ var init_esm2 = __esm({
|
|
|
37519
37560
|
if (index === void 0) {
|
|
37520
37561
|
if (status)
|
|
37521
37562
|
status.fetch = "miss";
|
|
37522
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37563
|
+
const p3 = this.#backgroundFetch(k3, index, options, context3);
|
|
37523
37564
|
return p3.__returned = p3;
|
|
37524
37565
|
} else {
|
|
37525
37566
|
const v3 = this.#valList[index];
|
|
@@ -37544,7 +37585,7 @@ var init_esm2 = __esm({
|
|
|
37544
37585
|
this.#statusTTL(status, index);
|
|
37545
37586
|
return v3;
|
|
37546
37587
|
}
|
|
37547
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37588
|
+
const p3 = this.#backgroundFetch(k3, index, options, context3);
|
|
37548
37589
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
37549
37590
|
const staleVal = hasStale && allowStale;
|
|
37550
37591
|
if (status) {
|
|
@@ -37566,13 +37607,13 @@ var init_esm2 = __esm({
|
|
|
37566
37607
|
if (!memoMethod) {
|
|
37567
37608
|
throw new Error("no memoMethod provided to constructor");
|
|
37568
37609
|
}
|
|
37569
|
-
const { context, forceRefresh, ...options } = memoOptions;
|
|
37610
|
+
const { context: context3, forceRefresh, ...options } = memoOptions;
|
|
37570
37611
|
const v3 = this.get(k3, options);
|
|
37571
37612
|
if (!forceRefresh && v3 !== void 0)
|
|
37572
37613
|
return v3;
|
|
37573
37614
|
const vv = memoMethod(k3, v3, {
|
|
37574
37615
|
options,
|
|
37575
|
-
context
|
|
37616
|
+
context: context3
|
|
37576
37617
|
});
|
|
37577
37618
|
this.set(k3, vv, options);
|
|
37578
37619
|
return vv;
|
|
@@ -38626,22 +38667,22 @@ var init_esm3 = __esm({
|
|
|
38626
38667
|
});
|
|
38627
38668
|
|
|
38628
38669
|
// node_modules/path-scurry/dist/esm/index.js
|
|
38629
|
-
var import_node_path, import_node_url,
|
|
38670
|
+
var import_node_path, import_node_url, import_fs6, actualFS, import_promises, realpathSync, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
|
|
38630
38671
|
var init_esm4 = __esm({
|
|
38631
38672
|
"node_modules/path-scurry/dist/esm/index.js"() {
|
|
38632
38673
|
init_esm2();
|
|
38633
38674
|
import_node_path = require("node:path");
|
|
38634
38675
|
import_node_url = require("node:url");
|
|
38635
|
-
|
|
38676
|
+
import_fs6 = require("fs");
|
|
38636
38677
|
actualFS = __toESM(require("node:fs"), 1);
|
|
38637
38678
|
import_promises = require("node:fs/promises");
|
|
38638
38679
|
init_esm3();
|
|
38639
|
-
realpathSync =
|
|
38680
|
+
realpathSync = import_fs6.realpathSync.native;
|
|
38640
38681
|
defaultFS = {
|
|
38641
|
-
lstatSync:
|
|
38642
|
-
readdir:
|
|
38643
|
-
readdirSync:
|
|
38644
|
-
readlinkSync:
|
|
38682
|
+
lstatSync: import_fs6.lstatSync,
|
|
38683
|
+
readdir: import_fs6.readdir,
|
|
38684
|
+
readdirSync: import_fs6.readdirSync,
|
|
38685
|
+
readlinkSync: import_fs6.readlinkSync,
|
|
38645
38686
|
realpathSync,
|
|
38646
38687
|
promises: {
|
|
38647
38688
|
lstat: import_promises.lstat,
|
|
@@ -41536,7 +41577,7 @@ function createWrappedTools(baseTools) {
|
|
|
41536
41577
|
}
|
|
41537
41578
|
return wrappedTools;
|
|
41538
41579
|
}
|
|
41539
|
-
var import_child_process9, import_util12, import_crypto3, import_events,
|
|
41580
|
+
var import_child_process9, import_util12, import_crypto3, import_events, import_fs7, import_fs8, import_path9, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
|
|
41540
41581
|
var init_probeTool = __esm({
|
|
41541
41582
|
"src/agent/probeTool.js"() {
|
|
41542
41583
|
"use strict";
|
|
@@ -41545,9 +41586,9 @@ var init_probeTool = __esm({
|
|
|
41545
41586
|
import_util12 = require("util");
|
|
41546
41587
|
import_crypto3 = require("crypto");
|
|
41547
41588
|
import_events = require("events");
|
|
41548
|
-
|
|
41549
|
-
|
|
41550
|
-
|
|
41589
|
+
import_fs7 = __toESM(require("fs"), 1);
|
|
41590
|
+
import_fs8 = require("fs");
|
|
41591
|
+
import_path9 = __toESM(require("path"), 1);
|
|
41551
41592
|
init_esm5();
|
|
41552
41593
|
toolCallEmitter = new import_events.EventEmitter();
|
|
41553
41594
|
activeToolExecutions = /* @__PURE__ */ new Map();
|
|
@@ -41635,17 +41676,17 @@ var init_probeTool = __esm({
|
|
|
41635
41676
|
execute: async (params) => {
|
|
41636
41677
|
const { directory = ".", workingDirectory } = params;
|
|
41637
41678
|
const baseCwd = workingDirectory || process.cwd();
|
|
41638
|
-
const secureBaseDir =
|
|
41679
|
+
const secureBaseDir = import_path9.default.resolve(baseCwd);
|
|
41639
41680
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
41640
41681
|
let targetDir;
|
|
41641
|
-
if (
|
|
41642
|
-
targetDir =
|
|
41643
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41682
|
+
if (import_path9.default.isAbsolute(directory)) {
|
|
41683
|
+
targetDir = import_path9.default.resolve(directory);
|
|
41684
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41644
41685
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
41645
41686
|
}
|
|
41646
41687
|
} else {
|
|
41647
|
-
targetDir =
|
|
41648
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41688
|
+
targetDir = import_path9.default.resolve(secureBaseDir, directory);
|
|
41689
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41649
41690
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
41650
41691
|
}
|
|
41651
41692
|
}
|
|
@@ -41654,7 +41695,7 @@ var init_probeTool = __esm({
|
|
|
41654
41695
|
console.log(`[DEBUG] Listing files in directory: ${targetDir}`);
|
|
41655
41696
|
}
|
|
41656
41697
|
try {
|
|
41657
|
-
const files = await
|
|
41698
|
+
const files = await import_fs8.promises.readdir(targetDir, { withFileTypes: true });
|
|
41658
41699
|
const formatSize = (size) => {
|
|
41659
41700
|
if (size < 1024) return `${size}B`;
|
|
41660
41701
|
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)}K`;
|
|
@@ -41663,10 +41704,10 @@ var init_probeTool = __esm({
|
|
|
41663
41704
|
};
|
|
41664
41705
|
const entries = await Promise.all(files.map(async (file) => {
|
|
41665
41706
|
const isDirectory = file.isDirectory();
|
|
41666
|
-
const fullPath =
|
|
41707
|
+
const fullPath = import_path9.default.join(targetDir, file.name);
|
|
41667
41708
|
let size = 0;
|
|
41668
41709
|
try {
|
|
41669
|
-
const stats = await
|
|
41710
|
+
const stats = await import_fs8.promises.stat(fullPath);
|
|
41670
41711
|
size = stats.size;
|
|
41671
41712
|
} catch (statError) {
|
|
41672
41713
|
if (debug) {
|
|
@@ -41708,17 +41749,17 @@ var init_probeTool = __esm({
|
|
|
41708
41749
|
throw new Error("Pattern is required for file search");
|
|
41709
41750
|
}
|
|
41710
41751
|
const baseCwd = workingDirectory || process.cwd();
|
|
41711
|
-
const secureBaseDir =
|
|
41752
|
+
const secureBaseDir = import_path9.default.resolve(baseCwd);
|
|
41712
41753
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
41713
41754
|
let targetDir;
|
|
41714
|
-
if (
|
|
41715
|
-
targetDir =
|
|
41716
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41755
|
+
if (import_path9.default.isAbsolute(directory)) {
|
|
41756
|
+
targetDir = import_path9.default.resolve(directory);
|
|
41757
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41717
41758
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
41718
41759
|
}
|
|
41719
41760
|
} else {
|
|
41720
|
-
targetDir =
|
|
41721
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41761
|
+
targetDir = import_path9.default.resolve(secureBaseDir, directory);
|
|
41762
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41722
41763
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
41723
41764
|
}
|
|
41724
41765
|
}
|
|
@@ -41791,6 +41832,8 @@ var init_index = __esm({
|
|
|
41791
41832
|
init_bash();
|
|
41792
41833
|
init_ProbeAgent();
|
|
41793
41834
|
init_simpleTelemetry();
|
|
41835
|
+
init_telemetry();
|
|
41836
|
+
init_appTracer();
|
|
41794
41837
|
init_probeTool();
|
|
41795
41838
|
init_storage();
|
|
41796
41839
|
init_hooks();
|
|
@@ -55071,8 +55114,8 @@ function mapFlowchartParserError(err, text) {
|
|
|
55071
55114
|
};
|
|
55072
55115
|
}
|
|
55073
55116
|
if (tokType === "QuotedString") {
|
|
55074
|
-
const
|
|
55075
|
-
const inLinkRule =
|
|
55117
|
+
const context3 = err?.context;
|
|
55118
|
+
const inLinkRule = context3?.ruleStack?.includes("linkTextInline") || context3?.ruleStack?.includes("link") || false;
|
|
55076
55119
|
const lineContent = allLines[Math.max(0, line - 1)] || "";
|
|
55077
55120
|
const beforeQuote = lineContent.slice(0, Math.max(0, column - 1));
|
|
55078
55121
|
const hasLinkBefore = beforeQuote.match(/--\s*$|==\s*$|-\.\s*$|-\.-\s*$|\[\s*$/);
|
|
@@ -72663,7 +72706,7 @@ ${fixedContent}
|
|
|
72663
72706
|
};
|
|
72664
72707
|
}
|
|
72665
72708
|
}
|
|
72666
|
-
var HTML_ENTITY_MAP, JsonFixingAgent, MermaidFixingAgent;
|
|
72709
|
+
var HTML_ENTITY_MAP, sessionIdCounter, JsonFixingAgent, MermaidFixingAgent;
|
|
72667
72710
|
var init_schemaUtils = __esm({
|
|
72668
72711
|
"src/agent/schemaUtils.js"() {
|
|
72669
72712
|
"use strict";
|
|
@@ -72679,11 +72722,12 @@ var init_schemaUtils = __esm({
|
|
|
72679
72722
|
// Also handle XML/HTML5 apostrophe entity
|
|
72680
72723
|
" ": " "
|
|
72681
72724
|
};
|
|
72725
|
+
sessionIdCounter = 0;
|
|
72682
72726
|
JsonFixingAgent = class {
|
|
72683
72727
|
constructor(options = {}) {
|
|
72684
72728
|
this.ProbeAgent = null;
|
|
72685
72729
|
this.options = {
|
|
72686
|
-
sessionId: options.sessionId || `json-fixer-${Date.now()}`,
|
|
72730
|
+
sessionId: options.sessionId || `json-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
72687
72731
|
path: options.path || process.cwd(),
|
|
72688
72732
|
provider: options.provider,
|
|
72689
72733
|
model: options.model,
|
|
@@ -72833,7 +72877,7 @@ Provide only the corrected JSON without any markdown formatting or explanations.
|
|
|
72833
72877
|
constructor(options = {}) {
|
|
72834
72878
|
this.ProbeAgent = null;
|
|
72835
72879
|
this.options = {
|
|
72836
|
-
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}`,
|
|
72880
|
+
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
72837
72881
|
path: options.path || process.cwd(),
|
|
72838
72882
|
provider: options.provider,
|
|
72839
72883
|
model: options.model,
|
|
@@ -73018,11 +73062,11 @@ function loadMCPConfigurationFromPath(configPath) {
|
|
|
73018
73062
|
if (!configPath) {
|
|
73019
73063
|
throw new Error("Config path is required");
|
|
73020
73064
|
}
|
|
73021
|
-
if (!(0,
|
|
73065
|
+
if (!(0, import_fs9.existsSync)(configPath)) {
|
|
73022
73066
|
throw new Error(`MCP configuration file not found: ${configPath}`);
|
|
73023
73067
|
}
|
|
73024
73068
|
try {
|
|
73025
|
-
const content = (0,
|
|
73069
|
+
const content = (0, import_fs9.readFileSync)(configPath, "utf8");
|
|
73026
73070
|
const config = JSON.parse(content);
|
|
73027
73071
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73028
73072
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73037,19 +73081,19 @@ function loadMCPConfiguration() {
|
|
|
73037
73081
|
// Environment variable path
|
|
73038
73082
|
process.env.MCP_CONFIG_PATH,
|
|
73039
73083
|
// Local project paths
|
|
73040
|
-
(0,
|
|
73041
|
-
(0,
|
|
73084
|
+
(0, import_path10.join)(process.cwd(), ".mcp", "config.json"),
|
|
73085
|
+
(0, import_path10.join)(process.cwd(), "mcp.config.json"),
|
|
73042
73086
|
// Home directory paths
|
|
73043
|
-
(0,
|
|
73044
|
-
(0,
|
|
73087
|
+
(0, import_path10.join)((0, import_os3.homedir)(), ".config", "probe", "mcp.json"),
|
|
73088
|
+
(0, import_path10.join)((0, import_os3.homedir)(), ".mcp", "config.json"),
|
|
73045
73089
|
// Claude-style config location
|
|
73046
|
-
(0,
|
|
73090
|
+
(0, import_path10.join)((0, import_os3.homedir)(), "Library", "Application Support", "Claude", "mcp_config.json")
|
|
73047
73091
|
].filter(Boolean);
|
|
73048
73092
|
let config = null;
|
|
73049
73093
|
for (const configPath of configPaths) {
|
|
73050
|
-
if ((0,
|
|
73094
|
+
if ((0, import_fs9.existsSync)(configPath)) {
|
|
73051
73095
|
try {
|
|
73052
|
-
const content = (0,
|
|
73096
|
+
const content = (0, import_fs9.readFileSync)(configPath, "utf8");
|
|
73053
73097
|
config = JSON.parse(content);
|
|
73054
73098
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73055
73099
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73145,22 +73189,22 @@ function parseEnabledServers(config) {
|
|
|
73145
73189
|
}
|
|
73146
73190
|
return servers;
|
|
73147
73191
|
}
|
|
73148
|
-
var
|
|
73192
|
+
var import_fs9, import_path10, import_os3, import_url4, __filename4, __dirname4, DEFAULT_CONFIG;
|
|
73149
73193
|
var init_config = __esm({
|
|
73150
73194
|
"src/agent/mcp/config.js"() {
|
|
73151
73195
|
"use strict";
|
|
73152
|
-
|
|
73153
|
-
|
|
73196
|
+
import_fs9 = require("fs");
|
|
73197
|
+
import_path10 = require("path");
|
|
73154
73198
|
import_os3 = require("os");
|
|
73155
73199
|
import_url4 = require("url");
|
|
73156
73200
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
73157
|
-
__dirname4 = (0,
|
|
73201
|
+
__dirname4 = (0, import_path10.dirname)(__filename4);
|
|
73158
73202
|
DEFAULT_CONFIG = {
|
|
73159
73203
|
mcpServers: {
|
|
73160
73204
|
// Example probe server configuration
|
|
73161
73205
|
"probe-local": {
|
|
73162
73206
|
command: "node",
|
|
73163
|
-
args: [(0,
|
|
73207
|
+
args: [(0, import_path10.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
|
|
73164
73208
|
transport: "stdio",
|
|
73165
73209
|
enabled: false
|
|
73166
73210
|
},
|
|
@@ -73777,7 +73821,7 @@ __export(ProbeAgent_exports, {
|
|
|
73777
73821
|
ProbeAgent: () => ProbeAgent
|
|
73778
73822
|
});
|
|
73779
73823
|
module.exports = __toCommonJS(ProbeAgent_exports);
|
|
73780
|
-
var import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2,
|
|
73824
|
+
var import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2, import_fs10, import_promises2, import_path11, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, SUPPORTED_IMAGE_EXTENSIONS, MAX_IMAGE_FILE_SIZE, ProbeAgent;
|
|
73781
73825
|
var init_ProbeAgent = __esm({
|
|
73782
73826
|
"src/agent/ProbeAgent.js"() {
|
|
73783
73827
|
import_anthropic = require("@ai-sdk/anthropic");
|
|
@@ -73787,9 +73831,9 @@ var init_ProbeAgent = __esm({
|
|
|
73787
73831
|
import_ai3 = require("ai");
|
|
73788
73832
|
import_crypto5 = require("crypto");
|
|
73789
73833
|
import_events2 = require("events");
|
|
73790
|
-
|
|
73834
|
+
import_fs10 = require("fs");
|
|
73791
73835
|
import_promises2 = require("fs/promises");
|
|
73792
|
-
|
|
73836
|
+
import_path11 = require("path");
|
|
73793
73837
|
init_tokenCounter();
|
|
73794
73838
|
init_InMemoryStorageAdapter();
|
|
73795
73839
|
init_HookManager();
|
|
@@ -74145,7 +74189,7 @@ var init_ProbeAgent = __esm({
|
|
|
74145
74189
|
let resolvedPath2 = imagePath;
|
|
74146
74190
|
if (!imagePath.includes("/") && !imagePath.includes("\\")) {
|
|
74147
74191
|
for (const dir of listFilesDirectories) {
|
|
74148
|
-
const potentialPath = (0,
|
|
74192
|
+
const potentialPath = (0, import_path11.resolve)(dir, imagePath);
|
|
74149
74193
|
const loaded = await this.loadImageIfValid(potentialPath);
|
|
74150
74194
|
if (loaded) {
|
|
74151
74195
|
if (this.debug) {
|
|
@@ -74170,7 +74214,7 @@ var init_ProbeAgent = __esm({
|
|
|
74170
74214
|
let match2;
|
|
74171
74215
|
while ((match2 = fileHeaderPattern.exec(content)) !== null) {
|
|
74172
74216
|
const filePath = match2[1].trim();
|
|
74173
|
-
const dir = (0,
|
|
74217
|
+
const dir = (0, import_path11.dirname)(filePath);
|
|
74174
74218
|
if (dir && dir !== ".") {
|
|
74175
74219
|
directories.push(dir);
|
|
74176
74220
|
if (this.debug) {
|
|
@@ -74215,13 +74259,13 @@ var init_ProbeAgent = __esm({
|
|
|
74215
74259
|
const allowedDirs = this.allowedFolders && this.allowedFolders.length > 0 ? this.allowedFolders : [process.cwd()];
|
|
74216
74260
|
let absolutePath;
|
|
74217
74261
|
let isPathAllowed = false;
|
|
74218
|
-
if ((0,
|
|
74262
|
+
if ((0, import_path11.isAbsolute)(imagePath)) {
|
|
74219
74263
|
absolutePath = imagePath;
|
|
74220
|
-
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0,
|
|
74264
|
+
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0, import_path11.resolve)(dir)));
|
|
74221
74265
|
} else {
|
|
74222
74266
|
for (const dir of allowedDirs) {
|
|
74223
|
-
const resolvedPath2 = (0,
|
|
74224
|
-
if (resolvedPath2.startsWith((0,
|
|
74267
|
+
const resolvedPath2 = (0, import_path11.resolve)(dir, imagePath);
|
|
74268
|
+
if (resolvedPath2.startsWith((0, import_path11.resolve)(dir))) {
|
|
74225
74269
|
absolutePath = resolvedPath2;
|
|
74226
74270
|
isPathAllowed = true;
|
|
74227
74271
|
break;
|