@aws-sdk/core 3.876.0 → 3.879.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/submodules/protocols/index.js +320 -216
- package/dist-es/submodules/protocols/ProtocolLib.js +94 -0
- package/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +39 -0
- package/dist-es/submodules/protocols/common.js +2 -1
- package/dist-es/submodules/protocols/index.js +1 -0
- package/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +2 -1
- package/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +2 -1
- package/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +17 -31
- package/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +8 -56
- package/dist-es/submodules/protocols/query/AwsQueryProtocol.js +5 -32
- package/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +9 -57
- package/dist-types/submodules/protocols/ProtocolLib.d.ts +57 -0
- package/dist-types/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +23 -0
- package/dist-types/submodules/protocols/index.d.ts +1 -0
- package/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -1
- package/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -1
- package/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +6 -3
- package/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -1
- package/dist-types/submodules/protocols/query/AwsQueryProtocol.d.ts +2 -2
- package/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -0
- package/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +39 -0
- package/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +33 -0
- package/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -0
- package/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -0
- package/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +5 -1
- package/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +1 -0
- package/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +2 -1
- package/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
3
|
import { JsonCodec } from "./JsonCodec";
|
|
4
4
|
/**
|
|
5
5
|
* @alpha
|
|
@@ -8,10 +8,13 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
8
8
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
9
9
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
10
10
|
protected serviceTarget: string;
|
|
11
|
-
private codec;
|
|
12
|
-
|
|
11
|
+
private readonly codec;
|
|
12
|
+
private readonly mixin;
|
|
13
|
+
private readonly awsQueryCompatible;
|
|
14
|
+
protected constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }: {
|
|
13
15
|
defaultNamespace: string;
|
|
14
16
|
serviceTarget: string;
|
|
17
|
+
awsQueryCompatible?: boolean;
|
|
15
18
|
});
|
|
16
19
|
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<HttpRequest>;
|
|
17
20
|
getPayloadCodec(): JsonCodec;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpBindingProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import type { EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
3
3
|
import { JsonCodec } from "./JsonCodec";
|
|
4
4
|
/**
|
|
5
5
|
* @alpha
|
|
@@ -8,6 +8,7 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
8
8
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
9
9
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
10
10
|
private readonly codec;
|
|
11
|
+
private readonly mixin;
|
|
11
12
|
constructor({ defaultNamespace }: {
|
|
12
13
|
defaultNamespace: string;
|
|
13
14
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RpcProtocol } from "@smithy/core/protocols";
|
|
2
|
-
import { Codec, EndpointBearer, HandlerExecutionContext, HttpRequest, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
3
|
-
import type { HttpResponse as IHttpResponse } from "@smithy/types/dist-types/http";
|
|
2
|
+
import type { Codec, EndpointBearer, HandlerExecutionContext, HttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
|
4
3
|
import { XmlShapeDeserializer } from "../xml/XmlShapeDeserializer";
|
|
5
4
|
import { QueryShapeSerializer } from "./QueryShapeSerializer";
|
|
6
5
|
/**
|
|
@@ -14,6 +13,7 @@ export declare class AwsQueryProtocol extends RpcProtocol {
|
|
|
14
13
|
};
|
|
15
14
|
protected serializer: QueryShapeSerializer;
|
|
16
15
|
protected deserializer: XmlShapeDeserializer;
|
|
16
|
+
private readonly mixin;
|
|
17
17
|
constructor(options: {
|
|
18
18
|
defaultNamespace: string;
|
|
19
19
|
xmlNamespace: string;
|
|
@@ -9,6 +9,7 @@ export declare class AwsRestXmlProtocol extends HttpBindingProtocol {
|
|
|
9
9
|
private readonly codec;
|
|
10
10
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
11
11
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
12
|
+
private readonly mixin;
|
|
12
13
|
constructor(options: {
|
|
13
14
|
defaultNamespace: string;
|
|
14
15
|
xmlNamespace: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ErrorSchema,
|
|
3
|
+
NormalizedSchema,
|
|
4
|
+
TypeRegistry,
|
|
5
|
+
} from "@smithy/core/schema";
|
|
6
|
+
import {
|
|
7
|
+
HttpResponse as IHttpResponse,
|
|
8
|
+
MetadataBearer,
|
|
9
|
+
ResponseMetadata,
|
|
10
|
+
SerdeFunctions,
|
|
11
|
+
} from "@smithy/types";
|
|
12
|
+
type ErrorMetadataBearer = MetadataBearer & {
|
|
13
|
+
$response: IHttpResponse;
|
|
14
|
+
$fault: "client" | "server";
|
|
15
|
+
};
|
|
16
|
+
export declare class ProtocolLib {
|
|
17
|
+
calculateContentLength(body: any, serdeContext?: SerdeFunctions): string;
|
|
18
|
+
resolveRestContentType(
|
|
19
|
+
defaultContentType: string,
|
|
20
|
+
inputSchema: NormalizedSchema
|
|
21
|
+
): string | undefined;
|
|
22
|
+
getErrorSchemaOrThrowBaseException(
|
|
23
|
+
errorIdentifier: string,
|
|
24
|
+
defaultNamespace: string,
|
|
25
|
+
response: IHttpResponse,
|
|
26
|
+
dataObject: any,
|
|
27
|
+
metadata: ResponseMetadata,
|
|
28
|
+
getErrorSchema?: (registry: TypeRegistry, errorName: string) => ErrorSchema
|
|
29
|
+
): Promise<{
|
|
30
|
+
errorSchema: ErrorSchema;
|
|
31
|
+
errorMetadata: ErrorMetadataBearer;
|
|
32
|
+
}>;
|
|
33
|
+
setQueryCompatError(
|
|
34
|
+
output: Record<string, any>,
|
|
35
|
+
response: IHttpResponse
|
|
36
|
+
): void;
|
|
37
|
+
queryCompatOutput(queryCompatErrorData: any, errorData: any): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SmithyRpcV2CborProtocol } from "@smithy/core/cbor";
|
|
2
|
+
import {
|
|
3
|
+
EndpointBearer,
|
|
4
|
+
HandlerExecutionContext,
|
|
5
|
+
HttpRequest,
|
|
6
|
+
HttpResponse,
|
|
7
|
+
OperationSchema,
|
|
8
|
+
ResponseMetadata,
|
|
9
|
+
SerdeFunctions,
|
|
10
|
+
} from "@smithy/types";
|
|
11
|
+
export declare class AwsSmithyRpcV2CborProtocol extends SmithyRpcV2CborProtocol {
|
|
12
|
+
private readonly awsQueryCompatible;
|
|
13
|
+
private readonly mixin;
|
|
14
|
+
constructor({
|
|
15
|
+
defaultNamespace,
|
|
16
|
+
awsQueryCompatible,
|
|
17
|
+
}: {
|
|
18
|
+
defaultNamespace: string;
|
|
19
|
+
awsQueryCompatible?: boolean;
|
|
20
|
+
});
|
|
21
|
+
serializeRequest<Input extends object>(
|
|
22
|
+
operationSchema: OperationSchema,
|
|
23
|
+
input: Input,
|
|
24
|
+
context: HandlerExecutionContext & SerdeFunctions & EndpointBearer
|
|
25
|
+
): Promise<HttpRequest>;
|
|
26
|
+
protected handleError(
|
|
27
|
+
operationSchema: OperationSchema,
|
|
28
|
+
context: HandlerExecutionContext & SerdeFunctions,
|
|
29
|
+
response: HttpResponse,
|
|
30
|
+
dataObject: any,
|
|
31
|
+
metadata: ResponseMetadata
|
|
32
|
+
): Promise<never>;
|
|
33
|
+
}
|
|
@@ -3,9 +3,11 @@ export declare class AwsJson1_0Protocol extends AwsJsonRpcProtocol {
|
|
|
3
3
|
constructor({
|
|
4
4
|
defaultNamespace,
|
|
5
5
|
serviceTarget,
|
|
6
|
+
awsQueryCompatible,
|
|
6
7
|
}: {
|
|
7
8
|
defaultNamespace: string;
|
|
8
9
|
serviceTarget: string;
|
|
10
|
+
awsQueryCompatible?: boolean;
|
|
9
11
|
});
|
|
10
12
|
getShapeId(): string;
|
|
11
13
|
protected getJsonRpcVersion(): "1.0";
|
|
@@ -3,9 +3,11 @@ export declare class AwsJson1_1Protocol extends AwsJsonRpcProtocol {
|
|
|
3
3
|
constructor({
|
|
4
4
|
defaultNamespace,
|
|
5
5
|
serviceTarget,
|
|
6
|
+
awsQueryCompatible,
|
|
6
7
|
}: {
|
|
7
8
|
defaultNamespace: string;
|
|
8
9
|
serviceTarget: string;
|
|
10
|
+
awsQueryCompatible?: boolean;
|
|
9
11
|
});
|
|
10
12
|
getShapeId(): string;
|
|
11
13
|
protected getJsonRpcVersion(): "1.1";
|
|
@@ -15,13 +15,17 @@ export declare abstract class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
15
15
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
16
16
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
17
17
|
protected serviceTarget: string;
|
|
18
|
-
private codec;
|
|
18
|
+
private readonly codec;
|
|
19
|
+
private readonly mixin;
|
|
20
|
+
private readonly awsQueryCompatible;
|
|
19
21
|
protected constructor({
|
|
20
22
|
defaultNamespace,
|
|
21
23
|
serviceTarget,
|
|
24
|
+
awsQueryCompatible,
|
|
22
25
|
}: {
|
|
23
26
|
defaultNamespace: string;
|
|
24
27
|
serviceTarget: string;
|
|
28
|
+
awsQueryCompatible?: boolean;
|
|
25
29
|
});
|
|
26
30
|
serializeRequest<Input extends object>(
|
|
27
31
|
operationSchema: OperationSchema,
|
|
@@ -15,6 +15,7 @@ export declare class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
15
15
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
16
16
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
17
17
|
private readonly codec;
|
|
18
|
+
private readonly mixin;
|
|
18
19
|
constructor({ defaultNamespace }: { defaultNamespace: string });
|
|
19
20
|
getShapeId(): string;
|
|
20
21
|
getPayloadCodec(): JsonCodec;
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
EndpointBearer,
|
|
5
5
|
HandlerExecutionContext,
|
|
6
6
|
HttpRequest,
|
|
7
|
+
HttpResponse as IHttpResponse,
|
|
7
8
|
MetadataBearer,
|
|
8
9
|
OperationSchema,
|
|
9
10
|
ResponseMetadata,
|
|
10
11
|
SerdeFunctions,
|
|
11
12
|
} from "@smithy/types";
|
|
12
|
-
import { HttpResponse as IHttpResponse } from "@smithy/types/dist-types/http";
|
|
13
13
|
import { XmlShapeDeserializer } from "../xml/XmlShapeDeserializer";
|
|
14
14
|
import { QueryShapeSerializer } from "./QueryShapeSerializer";
|
|
15
15
|
export declare class AwsQueryProtocol extends RpcProtocol {
|
|
@@ -20,6 +20,7 @@ export declare class AwsQueryProtocol extends RpcProtocol {
|
|
|
20
20
|
};
|
|
21
21
|
protected serializer: QueryShapeSerializer;
|
|
22
22
|
protected deserializer: XmlShapeDeserializer;
|
|
23
|
+
private readonly mixin;
|
|
23
24
|
constructor(options: {
|
|
24
25
|
defaultNamespace: string;
|
|
25
26
|
xmlNamespace: string;
|
|
@@ -16,6 +16,7 @@ export declare class AwsRestXmlProtocol extends HttpBindingProtocol {
|
|
|
16
16
|
private readonly codec;
|
|
17
17
|
protected serializer: ShapeSerializer<string | Uint8Array>;
|
|
18
18
|
protected deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
19
|
+
private readonly mixin;
|
|
19
20
|
constructor(options: { defaultNamespace: string; xmlNamespace: string });
|
|
20
21
|
getPayloadCodec(): XmlCodec;
|
|
21
22
|
getShapeId(): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.879.0",
|
|
4
4
|
"description": "Core functions & classes shared by multiple AWS SDK clients.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@aws-sdk/types": "3.862.0",
|
|
85
85
|
"@aws-sdk/xml-builder": "3.873.0",
|
|
86
|
-
"@smithy/core": "^3.
|
|
86
|
+
"@smithy/core": "^3.9.0",
|
|
87
87
|
"@smithy/node-config-provider": "^4.1.4",
|
|
88
88
|
"@smithy/property-provider": "^4.0.5",
|
|
89
89
|
"@smithy/protocol-http": "^5.1.3",
|
|
90
90
|
"@smithy/signature-v4": "^5.1.3",
|
|
91
|
-
"@smithy/smithy-client": "^4.
|
|
91
|
+
"@smithy/smithy-client": "^4.5.0",
|
|
92
92
|
"@smithy/types": "^4.3.2",
|
|
93
93
|
"@smithy/util-base64": "^4.0.0",
|
|
94
94
|
"@smithy/util-body-length-browser": "^4.0.0",
|