@aws-sdk/core 3.882.0 → 3.883.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,7 +97,8 @@ var ProtocolLib = class {
|
|
|
97
97
|
} else if (!inputSchema.isUnitSchema()) {
|
|
98
98
|
const hasBody = Object.values(members).find((m) => {
|
|
99
99
|
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
|
|
100
|
-
|
|
100
|
+
const noPrefixHeaders = httpPrefixHeaders === void 0;
|
|
101
|
+
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
|
|
101
102
|
});
|
|
102
103
|
if (hasBody) {
|
|
103
104
|
return defaultContentType;
|
|
@@ -1288,7 +1289,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
|
|
|
1288
1289
|
if ((0, import_schema9.deref)(operationSchema.input) === "unit" || !request.body) {
|
|
1289
1290
|
request.body = "";
|
|
1290
1291
|
}
|
|
1291
|
-
|
|
1292
|
+
const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
1293
|
+
request.body = `Action=${action}&Version=${this.options.version}` + request.body;
|
|
1292
1294
|
if (request.body.endsWith("&")) {
|
|
1293
1295
|
request.body = request.body.slice(-1);
|
|
1294
1296
|
}
|
|
@@ -1314,7 +1316,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
|
|
|
1314
1316
|
delete response.headers[header];
|
|
1315
1317
|
response.headers[header.toLowerCase()] = value;
|
|
1316
1318
|
}
|
|
1317
|
-
const
|
|
1319
|
+
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
1320
|
+
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
1318
1321
|
const bytes = await (0, import_protocols5.collectBody)(response.body, context);
|
|
1319
1322
|
if (bytes.byteLength > 0) {
|
|
1320
1323
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
@@ -28,7 +28,8 @@ export class ProtocolLib {
|
|
|
28
28
|
else if (!inputSchema.isUnitSchema()) {
|
|
29
29
|
const hasBody = Object.values(members).find((m) => {
|
|
30
30
|
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
|
|
31
|
-
|
|
31
|
+
const noPrefixHeaders = httpPrefixHeaders === void 0;
|
|
32
|
+
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
|
|
32
33
|
});
|
|
33
34
|
if (hasBody) {
|
|
34
35
|
return defaultContentType;
|
|
@@ -47,7 +47,8 @@ export class AwsQueryProtocol extends RpcProtocol {
|
|
|
47
47
|
if (deref(operationSchema.input) === "unit" || !request.body) {
|
|
48
48
|
request.body = "";
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
51
|
+
request.body = `Action=${action}&Version=${this.options.version}` + request.body;
|
|
51
52
|
if (request.body.endsWith("&")) {
|
|
52
53
|
request.body = request.body.slice(-1);
|
|
53
54
|
}
|
|
@@ -73,7 +74,8 @@ export class AwsQueryProtocol extends RpcProtocol {
|
|
|
73
74
|
delete response.headers[header];
|
|
74
75
|
response.headers[header.toLowerCase()] = value;
|
|
75
76
|
}
|
|
76
|
-
const
|
|
77
|
+
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
78
|
+
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined;
|
|
77
79
|
const bytes = await collectBody(response.body, context);
|
|
78
80
|
if (bytes.byteLength > 0) {
|
|
79
81
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
package/package.json
CHANGED