https://project.mdnd-it.cc/work_packages/94
This commit is contained in:
2025-08-23 04:25:28 +02:00
parent 725516ad6c
commit 19cfa031d0
25823 changed files with 1095587 additions and 2801760 deletions
@@ -304,7 +304,6 @@ var JsonShapeDeserializer = class extends SerdeContextConfig {
// src/submodules/protocols/json/JsonShapeSerializer.ts
var import_schema2 = require("@smithy/core/schema");
var import_serde4 = require("@smithy/core/serde");
var import_serde5 = require("@smithy/core/serde");
// src/submodules/protocols/json/jsonReplacer.ts
var import_serde3 = require("@smithy/core/serde");
@@ -333,7 +332,7 @@ var JsonReplacer = class {
this.stage = 1;
return (key, value) => {
if (value instanceof import_serde3.NumericValue) {
const v = `${NUMERIC_CONTROL_CHAR + +"nv" + this.counter++}_` + value.string;
const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
this.values.set(`"${v}"`, value.string);
return v;
}
@@ -455,11 +454,16 @@ var JsonShapeSerializer = class extends SerdeContextConfig {
return String(value);
}
}
const mediaType = ns.getMergedTraits().mediaType;
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
if (isJson) {
return import_serde5.LazyJsonString.from(value);
if (ns.isStringSchema()) {
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
return (0, import_serde4.generateIdempotencyToken)();
}
const mediaType = ns.getMergedTraits().mediaType;
if (typeof value === "string" && mediaType) {
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
if (isJson) {
return import_serde4.LazyJsonString.from(value);
}
}
}
return value;
@@ -494,11 +498,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol {
}
serializer;
deserializer;
serviceTarget;
codec;
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace
});
this.serviceTarget = serviceTarget;
this.codec = new JsonCodec({
timestampFormat: {
useTrait: true,
@@ -516,7 +522,7 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol {
}
Object.assign(request.headers, {
"content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
"x-amz-target": (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) + import_schema3.NormalizedSchema.of(operationSchema).getName()
"x-amz-target": `${this.serviceTarget}.${import_schema3.NormalizedSchema.of(operationSchema).getName()}`
});
if ((0, import_schema3.deref)(operationSchema.input) === "unit" || !request.body) {
request.body = "{}";
@@ -574,9 +580,10 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
static {
__name(this, "AwsJson1_0Protocol");
}
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace
defaultNamespace,
serviceTarget
});
}
getShapeId() {
@@ -585,6 +592,12 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
getJsonRpcVersion() {
return "1.0";
}
/**
* @override
*/
getDefaultContentType() {
return "application/x-amz-json-1.0";
}
};
// src/submodules/protocols/json/AwsJson1_1Protocol.ts
@@ -592,9 +605,10 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
static {
__name(this, "AwsJson1_1Protocol");
}
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace
defaultNamespace,
serviceTarget
});
}
getShapeId() {
@@ -603,6 +617,12 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
getJsonRpcVersion() {
return "1.1";
}
/**
* @override
*/
getDefaultContentType() {
return "application/x-amz-json-1.1";
}
};
// src/submodules/protocols/json/AwsRestJsonProtocol.ts
@@ -659,7 +679,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
} else if (httpPayloadMember.isBlobSchema()) {
request.headers["content-type"] = "application/octet-stream";
} else {
request.headers["content-type"] = "application/json";
request.headers["content-type"] = this.getDefaultContentType();
}
} else if (!inputSchema.isUnitSchema()) {
const hasBody = Object.values(members).find((m) => {
@@ -667,7 +687,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
});
if (hasBody) {
request.headers["content-type"] = "application/json";
request.headers["content-type"] = this.getDefaultContentType();
}
}
}
@@ -719,6 +739,12 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {
});
throw exception;
}
/**
* @override
*/
getDefaultContentType() {
return "application/json";
}
};
// src/submodules/protocols/json/awsExpectUnion.ts
@@ -893,7 +919,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig {
// src/submodules/protocols/query/QueryShapeSerializer.ts
var import_protocols4 = require("@smithy/core/protocols");
var import_schema6 = require("@smithy/core/schema");
var import_serde6 = require("@smithy/core/serde");
var import_serde5 = require("@smithy/core/serde");
var import_smithy_client4 = require("@smithy/smithy-client");
var import_util_base642 = require("@smithy/util-base64");
var QueryShapeSerializer = class extends SerdeContextConfig {
@@ -922,6 +948,9 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
if (value != null) {
this.writeKey(prefix);
this.writeValue(String(value));
} else if (ns.isIdempotencyToken()) {
this.writeKey(prefix);
this.writeValue((0, import_serde5.generateIdempotencyToken)());
}
} else if (ns.isBigIntegerSchema()) {
if (value != null) {
@@ -931,7 +960,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
} else if (ns.isBigDecimalSchema()) {
if (value != null) {
this.writeKey(prefix);
this.writeValue(value instanceof import_serde6.NumericValue ? value.string : String(value));
this.writeValue(value instanceof import_serde5.NumericValue ? value.string : String(value));
}
} else if (ns.isTimestampSchema()) {
if (value instanceof Date) {
@@ -995,7 +1024,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig {
} else if (ns.isStructSchema()) {
if (value && typeof value === "object") {
for (const [memberName, member] of ns.structIterator()) {
if (value[memberName] == null) {
if (value[memberName] == null && !member.isIdempotencyToken()) {
continue;
}
const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
@@ -1186,6 +1215,12 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
const errorData = this.loadQueryError(data);
return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
}
/**
* @override
*/
getDefaultContentType() {
return "application/x-www-form-urlencoded";
}
};
// src/submodules/protocols/query/AwsEc2QueryProtocol.ts
@@ -1276,7 +1311,7 @@ var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {
// src/submodules/protocols/xml/XmlShapeSerializer.ts
var import_xml_builder = require("@aws-sdk/xml-builder");
var import_schema8 = require("@smithy/core/schema");
var import_serde7 = require("@smithy/core/serde");
var import_serde6 = require("@smithy/core/serde");
var import_smithy_client6 = require("@smithy/smithy-client");
var import_util_base643 = require("@smithy/util-base64");
var XmlShapeSerializer = class extends SerdeContextConfig {
@@ -1341,7 +1376,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
}
for (const [memberName, memberSchema] of ns.structIterator()) {
const val = value[memberName];
if (val != null) {
if (val != null || memberSchema.isIdempotencyToken()) {
if (memberSchema.getMergedTraits().xmlAttribute) {
structXmlNode.addAttribute(
memberSchema.getMergedTraits().xmlName ?? memberName,
@@ -1502,7 +1537,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
break;
}
} else if (ns.isBigDecimalSchema() && value) {
if (value instanceof import_serde7.NumericValue) {
if (value instanceof import_serde6.NumericValue) {
return value.string;
}
return String(value);
@@ -1518,9 +1553,16 @@ var XmlShapeSerializer = class extends SerdeContextConfig {
);
}
}
if (ns.isStringSchema() || ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
nodeContents = String(value);
}
if (ns.isStringSchema()) {
if (value === void 0 && ns.isIdempotencyToken()) {
nodeContents = (0, import_serde6.generateIdempotencyToken)();
} else {
nodeContents = String(value);
}
}
if (nodeContents === null) {
throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
}
@@ -1616,7 +1658,7 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
} else if (httpPayloadMember.isBlobSchema()) {
request.headers["content-type"] = "application/octet-stream";
} else {
request.headers["content-type"] = "application/xml";
request.headers["content-type"] = this.getDefaultContentType();
}
} else if (!ns.isUnitSchema()) {
const hasBody = Object.values(members).find((m) => {
@@ -1624,11 +1666,11 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
});
if (hasBody) {
request.headers["content-type"] = "application/xml";
request.headers["content-type"] = this.getDefaultContentType();
}
}
}
if (request.headers["content-type"] === "application/xml") {
if (request.headers["content-type"] === this.getDefaultContentType()) {
if (typeof request.body === "string") {
request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
}
@@ -1682,6 +1724,12 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {
});
throw exception;
}
/**
* @override
*/
getDefaultContentType() {
return "application/xml";
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
@@ -1,8 +1,9 @@
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
export class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace,
serviceTarget,
});
}
getShapeId() {
@@ -11,4 +12,7 @@ export class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
getJsonRpcVersion() {
return "1.0";
}
getDefaultContentType() {
return "application/x-amz-json-1.0";
}
}
@@ -1,8 +1,9 @@
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
export class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace,
serviceTarget,
});
}
getShapeId() {
@@ -11,4 +12,7 @@ export class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
getJsonRpcVersion() {
return "1.1";
}
getDefaultContentType() {
return "application/x-amz-json-1.1";
}
}
@@ -6,11 +6,13 @@ import { loadRestJsonErrorCode } from "./parseJsonBody";
export class AwsJsonRpcProtocol extends RpcProtocol {
serializer;
deserializer;
serviceTarget;
codec;
constructor({ defaultNamespace }) {
constructor({ defaultNamespace, serviceTarget }) {
super({
defaultNamespace,
});
this.serviceTarget = serviceTarget;
this.codec = new JsonCodec({
timestampFormat: {
useTrait: true,
@@ -28,8 +30,7 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
}
Object.assign(request.headers, {
"content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
"x-amz-target": (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) +
NormalizedSchema.of(operationSchema).getName(),
"x-amz-target": `${this.serviceTarget}.${NormalizedSchema.of(operationSchema).getName()}`,
});
if (deref(operationSchema.input) === "unit" || !request.body) {
request.body = "{}";
@@ -53,7 +53,7 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
request.headers["content-type"] = "application/octet-stream";
}
else {
request.headers["content-type"] = "application/json";
request.headers["content-type"] = this.getDefaultContentType();
}
}
else if (!inputSchema.isUnitSchema()) {
@@ -62,7 +62,7 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
});
if (hasBody) {
request.headers["content-type"] = "application/json";
request.headers["content-type"] = this.getDefaultContentType();
}
}
}
@@ -115,4 +115,7 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
});
throw exception;
}
getDefaultContentType() {
return "application/json";
}
}
@@ -1,6 +1,5 @@
import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
import { dateToUtcString } from "@smithy/core/serde";
import { LazyJsonString } from "@smithy/core/serde";
import { dateToUtcString, generateIdempotencyToken, LazyJsonString } from "@smithy/core/serde";
import { SerdeContextConfig } from "../ConfigurableSerdeContext";
import { JsonReplacer } from "./jsonReplacer";
export class JsonShapeSerializer extends SerdeContextConfig {
@@ -94,11 +93,16 @@ export class JsonShapeSerializer extends SerdeContextConfig {
return String(value);
}
}
const mediaType = ns.getMergedTraits().mediaType;
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
if (isJson) {
return LazyJsonString.from(value);
if (ns.isStringSchema()) {
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
return generateIdempotencyToken();
}
const mediaType = ns.getMergedTraits().mediaType;
if (typeof value === "string" && mediaType) {
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
if (isJson) {
return LazyJsonString.from(value);
}
}
}
return value;
@@ -14,7 +14,7 @@ export class JsonReplacer {
this.stage = 1;
return (key, value) => {
if (value instanceof NumericValue) {
const v = `${NUMERIC_CONTROL_CHAR + +"nv" + this.counter++}_` + value.string;
const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
this.values.set(`"${v}"`, value.string);
return v;
}
@@ -144,4 +144,7 @@ export class AwsQueryProtocol extends RpcProtocol {
const errorData = this.loadQueryError(data);
return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
}
getDefaultContentType() {
return "application/x-www-form-urlencoded";
}
}
@@ -1,6 +1,6 @@
import { determineTimestampFormat, extendedEncodeURIComponent } from "@smithy/core/protocols";
import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
import { NumericValue } from "@smithy/core/serde";
import { generateIdempotencyToken, NumericValue } from "@smithy/core/serde";
import { dateToUtcString } from "@smithy/smithy-client";
import { toBase64 } from "@smithy/util-base64";
import { SerdeContextConfig } from "../ConfigurableSerdeContext";
@@ -30,6 +30,10 @@ export class QueryShapeSerializer extends SerdeContextConfig {
this.writeKey(prefix);
this.writeValue(String(value));
}
else if (ns.isIdempotencyToken()) {
this.writeKey(prefix);
this.writeValue(generateIdempotencyToken());
}
}
else if (ns.isBigIntegerSchema()) {
if (value != null) {
@@ -110,7 +114,7 @@ export class QueryShapeSerializer extends SerdeContextConfig {
else if (ns.isStructSchema()) {
if (value && typeof value === "object") {
for (const [memberName, member] of ns.structIterator()) {
if (value[memberName] == null) {
if (value[memberName] == null && !member.isIdempotencyToken()) {
continue;
}
const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
@@ -55,7 +55,7 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {
request.headers["content-type"] = "application/octet-stream";
}
else {
request.headers["content-type"] = "application/xml";
request.headers["content-type"] = this.getDefaultContentType();
}
}
else if (!ns.isUnitSchema()) {
@@ -64,11 +64,11 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
});
if (hasBody) {
request.headers["content-type"] = "application/xml";
request.headers["content-type"] = this.getDefaultContentType();
}
}
}
if (request.headers["content-type"] === "application/xml") {
if (request.headers["content-type"] === this.getDefaultContentType()) {
if (typeof request.body === "string") {
request.body = '<?xml version="1.0" encoding="UTF-8"?>' + request.body;
}
@@ -123,4 +123,7 @@ export class AwsRestXmlProtocol extends HttpBindingProtocol {
});
throw exception;
}
getDefaultContentType() {
return "application/xml";
}
}
@@ -1,6 +1,6 @@
import { XmlNode, XmlText } from "@aws-sdk/xml-builder";
import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
import { NumericValue } from "@smithy/core/serde";
import { generateIdempotencyToken, NumericValue } from "@smithy/core/serde";
import { dateToUtcString } from "@smithy/smithy-client";
import { fromBase64, toBase64 } from "@smithy/util-base64";
import { SerdeContextConfig } from "../ConfigurableSerdeContext";
@@ -67,7 +67,7 @@ export class XmlShapeSerializer extends SerdeContextConfig {
}
for (const [memberName, memberSchema] of ns.structIterator()) {
const val = value[memberName];
if (val != null) {
if (val != null || memberSchema.isIdempotencyToken()) {
if (memberSchema.getMergedTraits().xmlAttribute) {
structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));
continue;
@@ -246,13 +246,17 @@ export class XmlShapeSerializer extends SerdeContextConfig {
throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);
}
}
if (ns.isStringSchema() ||
ns.isBooleanSchema() ||
ns.isNumericSchema() ||
ns.isBigIntegerSchema() ||
ns.isBigDecimalSchema()) {
if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
nodeContents = String(value);
}
if (ns.isStringSchema()) {
if (value === undefined && ns.isIdempotencyToken()) {
nodeContents = generateIdempotencyToken();
}
else {
nodeContents = String(value);
}
}
if (nodeContents === null) {
throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
}
@@ -4,9 +4,14 @@ import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
*/
export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }: {
constructor({ defaultNamespace, serviceTarget }: {
defaultNamespace: string;
serviceTarget: string;
});
getShapeId(): string;
protected getJsonRpcVersion(): "1.0";
/**
* @override
*/
protected getDefaultContentType(): string;
}
@@ -4,9 +4,14 @@ import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
* @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1
*/
export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }: {
constructor({ defaultNamespace, serviceTarget }: {
defaultNamespace: string;
serviceTarget: string;
});
getShapeId(): string;
protected getJsonRpcVersion(): "1.1";
/**
* @override
*/
protected getDefaultContentType(): string;
}
@@ -7,9 +7,11 @@ import { JsonCodec } from "./JsonCodec";
export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
protected serializer: ShapeSerializer<string | Uint8Array>;
protected deserializer: ShapeDeserializer<string | Uint8Array>;
protected serviceTarget: string;
private codec;
protected constructor({ defaultNamespace }: {
protected constructor({ defaultNamespace, serviceTarget }: {
defaultNamespace: string;
serviceTarget: string;
});
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
getPayloadCodec(): JsonCodec;
@@ -16,4 +16,8 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
setSerdeContext(serdeContext: SerdeFunctions): void;
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: HttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
/**
* @override
*/
protected getDefaultContentType(): string;
}
@@ -36,4 +36,8 @@ export declare class AwsQueryProtocol extends RpcProtocol {
protected loadQueryErrorCode(output: IHttpResponse, data: any): string | undefined;
protected loadQueryError(data: any): any | undefined;
protected loadQueryErrorMessage(data: any): string;
/**
* @override
*/
protected getDefaultContentType(): string;
}
@@ -18,4 +18,8 @@ export declare class AwsRestXmlProtocol extends HttpBindingProtocol {
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
/**
* @override
*/
protected getDefaultContentType(): string;
}
@@ -1,6 +1,13 @@
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }: { defaultNamespace: string });
constructor({
defaultNamespace,
serviceTarget,
}: {
defaultNamespace: string;
serviceTarget: string;
});
getShapeId(): string;
protected getJsonRpcVersion(): "1.0";
protected getDefaultContentType(): string;
}
@@ -1,6 +1,13 @@
import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol";
export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
constructor({ defaultNamespace }: { defaultNamespace: string });
constructor({
defaultNamespace,
serviceTarget,
}: {
defaultNamespace: string;
serviceTarget: string;
});
getShapeId(): string;
protected getJsonRpcVersion(): "1.1";
protected getDefaultContentType(): string;
}
@@ -14,8 +14,15 @@ import { JsonCodec } from "./JsonCodec";
export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
protected serializer: ShapeSerializer<string | Uint8Array>;
protected deserializer: ShapeDeserializer<string | Uint8Array>;
protected serviceTarget: string;
private codec;
protected constructor({ defaultNamespace }: { defaultNamespace: string });
protected constructor({
defaultNamespace,
serviceTarget,
}: {
defaultNamespace: string;
serviceTarget: string;
});
serializeRequest<Input extends object>(
operationSchema: OperationSchema,
input: Input,
@@ -31,4 +31,5 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
dataObject: any,
metadata: ResponseMetadata
): Promise<never>;
protected getDefaultContentType(): string;
}
@@ -52,4 +52,5 @@ export declare class AwsQueryProtocol extends RpcProtocol {
): string | undefined;
protected loadQueryError(data: any): any | undefined;
protected loadQueryErrorMessage(data: any): string;
protected getDefaultContentType(): string;
}
@@ -36,4 +36,5 @@ export declare class AwsRestXmlProtocol extends HttpBindingProtocol {
dataObject: any,
metadata: ResponseMetadata
): Promise<never>;
protected getDefaultContentType(): string;
}
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "@aws-sdk/core",
"version": "3.846.0",
"version": "3.864.0",
"description": "Core functions & classes shared by multiple AWS SDK clients.",
"scripts": {
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -13,8 +13,8 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"test": "yarn g:vitest run",
"test:integration": "yarn g:vitest run -c vitest.config.integ.ts",
"test:watch": "yarn g:vitest watch",
"test:integration": "yarn g:vitest run -c vitest.config.integ.ts",
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.ts"
},
"main": "./dist-cjs/index.js",
@@ -81,18 +81,18 @@
},
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/types": "3.840.0",
"@aws-sdk/xml-builder": "3.821.0",
"@smithy/core": "^3.7.0",
"@smithy/node-config-provider": "^4.1.3",
"@smithy/property-provider": "^4.0.4",
"@smithy/protocol-http": "^5.1.2",
"@smithy/signature-v4": "^5.1.2",
"@smithy/smithy-client": "^4.4.7",
"@smithy/types": "^4.3.1",
"@aws-sdk/types": "3.862.0",
"@aws-sdk/xml-builder": "3.862.0",
"@smithy/core": "^3.8.0",
"@smithy/node-config-provider": "^4.1.4",
"@smithy/property-provider": "^4.0.5",
"@smithy/protocol-http": "^5.1.3",
"@smithy/signature-v4": "^5.1.3",
"@smithy/smithy-client": "^4.4.10",
"@smithy/types": "^4.3.2",
"@smithy/util-base64": "^4.0.0",
"@smithy/util-body-length-browser": "^4.0.0",
"@smithy/util-middleware": "^4.0.4",
"@smithy/util-middleware": "^4.0.5",
"@smithy/util-utf8": "^4.0.0",
"fast-xml-parser": "5.2.5",
"tslib": "^2.6.2"