@cdk8s/awscdk-resolver 0.0.301 → 0.0.303
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
- package/node_modules/@aws-sdk/client-sso/package.json +32 -32
- package/node_modules/@aws-sdk/core/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +209 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +667 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +771 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +108 -53
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +136 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +74 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +3 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +183 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +164 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +68 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +64 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +38 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +30 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +87 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +20 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +49 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/deref.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +12 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +23 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schema-middleware-types.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +60 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +16 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +15 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +16 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +291 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +16 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +15 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +16 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +53 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +4 -3
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +3 -1
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingProtocol.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/determineTimestampFormat.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +55 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/deref.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/getSchemaSerdePlugin.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schema-middleware-types.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schemaDeserializationMiddleware.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schemaSerializationMiddleware.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ErrorSchema.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ListSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/MapSchema.d.ts +25 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +122 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/OperationSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/Schema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/StructureSchema.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/copyDocumentWithTransform.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +4 -3
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +3 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +7 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/determineTimestampFormat.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +55 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/deref.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/getSchemaSerdePlugin.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schema-middleware-types.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schemaDeserializationMiddleware.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schemaSerializationMiddleware.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ListSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/MapSchema.d.ts +25 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +125 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/OperationSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/Schema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +20 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/StructureSchema.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/copyDocumentWithTransform.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +4 -3
- package/node_modules/@smithy/core/package.json +17 -7
- package/node_modules/@smithy/core/schema.d.ts +7 -0
- package/node_modules/@smithy/core/schema.js +6 -0
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts +1 -0
- package/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts +7 -1
- package/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts +1 -0
- package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts +1 -0
- package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts +7 -1
- package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts +1 -0
- package/node_modules/@smithy/middleware-serde/package.json +3 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +10 -0
- package/node_modules/@smithy/smithy-client/dist-es/command.js +6 -0
- package/node_modules/@smithy/smithy-client/dist-types/command.d.ts +7 -1
- package/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts +7 -1
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/command.d.ts +5 -2
- package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +2 -4
- package/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +5 -2
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +2 -4
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/package.json +6 -6
@@ -0,0 +1,20 @@
|
|
1
|
+
import { CodecSettings, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
2
|
+
import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
3
|
+
/**
|
4
|
+
* This serializer decides whether to dispatch to a string serializer or a codec serializer
|
5
|
+
* depending on HTTP binding traits within the given schema.
|
6
|
+
*
|
7
|
+
* For example, a JavaScript array is serialized differently when being written
|
8
|
+
* to a REST JSON HTTP header (comma-delimited string) and a REST JSON HTTP body (JSON array).
|
9
|
+
*
|
10
|
+
* @alpha
|
11
|
+
*/
|
12
|
+
export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>> implements ShapeSerializer<string | Uint8Array> {
|
13
|
+
private codecSerializer;
|
14
|
+
private stringSerializer;
|
15
|
+
private buffer;
|
16
|
+
constructor(codecSerializer: CodecShapeSerializer, codecSettings: CodecSettings, stringSerializer?: ToStringShapeSerializer);
|
17
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
18
|
+
write(schema: ISchema, value: unknown): void;
|
19
|
+
flush(): string | Uint8Array;
|
20
|
+
}
|
package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import { CodecSettings, Schema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Serializes a shape to string.
|
4
|
+
*
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export declare class ToStringShapeSerializer implements ShapeSerializer<string> {
|
8
|
+
private settings;
|
9
|
+
private stringBuffer;
|
10
|
+
private serdeContext;
|
11
|
+
constructor(settings: CodecSettings);
|
12
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
13
|
+
write(schema: Schema, value: unknown): void;
|
14
|
+
flush(): string;
|
15
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
2
|
+
import { type TimestampDateTimeSchema, type TimestampEpochSecondsSchema, type TimestampHttpDateSchema, CodecSettings } from "@smithy/types";
|
3
|
+
/**
|
4
|
+
* Assuming the schema is a timestamp type, the function resolves the format using
|
5
|
+
* either the timestamp's own traits, or the default timestamp format from the CodecSettings.
|
6
|
+
*
|
7
|
+
* @internal
|
8
|
+
*/
|
9
|
+
export declare function determineTimestampFormat(ns: NormalizedSchema, settings: CodecSettings): TimestampDateTimeSchema | TimestampHttpDateSchema | TimestampEpochSecondsSchema;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import type { Schema as ISchema } from "@smithy/types";
|
2
|
+
import { ErrorSchema } from "./schemas/ErrorSchema";
|
3
|
+
/**
|
4
|
+
* A way to look up schema by their ShapeId values.
|
5
|
+
*
|
6
|
+
* @alpha
|
7
|
+
*/
|
8
|
+
export declare class TypeRegistry {
|
9
|
+
readonly namespace: string;
|
10
|
+
private schemas;
|
11
|
+
static readonly registries: Map<string, TypeRegistry>;
|
12
|
+
private constructor();
|
13
|
+
/**
|
14
|
+
* @param namespace - specifier.
|
15
|
+
* @returns the schema for that namespace, creating it if necessary.
|
16
|
+
*/
|
17
|
+
static for(namespace: string): TypeRegistry;
|
18
|
+
/**
|
19
|
+
* Adds the given schema to a type registry with the same namespace.
|
20
|
+
*
|
21
|
+
* @param shapeId - to be registered.
|
22
|
+
* @param schema - to be registered.
|
23
|
+
*/
|
24
|
+
register(shapeId: string, schema: ISchema): void;
|
25
|
+
/**
|
26
|
+
* @param shapeId - query.
|
27
|
+
* @returns the schema.
|
28
|
+
*/
|
29
|
+
getSchema(shapeId: string): ISchema;
|
30
|
+
/**
|
31
|
+
* The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,
|
32
|
+
* because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which
|
33
|
+
* is unique per service/model.
|
34
|
+
*
|
35
|
+
* This is generated under a unique prefix that is combined with the service namespace, and this
|
36
|
+
* method is used to retrieve it.
|
37
|
+
*
|
38
|
+
* The base exception synthetic schema is used when an error is returned by a service, but we cannot
|
39
|
+
* determine what existing schema to use to deserialize it.
|
40
|
+
*
|
41
|
+
* @returns the synthetic base exception of the service namespace associated with this registry instance.
|
42
|
+
*/
|
43
|
+
getBaseException(): ErrorSchema | undefined;
|
44
|
+
/**
|
45
|
+
* @param predicate - criterion.
|
46
|
+
* @returns a schema in this registry matching the predicate.
|
47
|
+
*/
|
48
|
+
find(predicate: (schema: ISchema) => boolean): ISchema | undefined;
|
49
|
+
/**
|
50
|
+
* Unloads the current TypeRegistry.
|
51
|
+
*/
|
52
|
+
destroy(): void;
|
53
|
+
private normalizeShapeId;
|
54
|
+
private getNamespace;
|
55
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export * from "./deref";
|
2
|
+
export * from "./middleware/getSchemaSerdePlugin";
|
3
|
+
export * from "./schemas/ListSchema";
|
4
|
+
export * from "./schemas/MapSchema";
|
5
|
+
export * from "./schemas/OperationSchema";
|
6
|
+
export * from "./schemas/ErrorSchema";
|
7
|
+
export * from "./schemas/NormalizedSchema";
|
8
|
+
export * from "./schemas/Schema";
|
9
|
+
export * from "./schemas/SimpleSchema";
|
10
|
+
export * from "./schemas/StructureSchema";
|
11
|
+
export * from "./schemas/sentinels";
|
12
|
+
export * from "./TypeRegistry";
|
package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/getSchemaSerdePlugin.d.ts
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
import { DeserializeHandlerOptions, MetadataBearer, Pluggable, SerializeHandlerOptions } from "@smithy/types";
|
2
|
+
import { PreviouslyResolved } from "./schema-middleware-types";
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export declare const deserializerMiddlewareOption: DeserializeHandlerOptions;
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
export declare const serializerMiddlewareOption: SerializeHandlerOptions;
|
11
|
+
/**
|
12
|
+
* @internal
|
13
|
+
*/
|
14
|
+
export declare function getSchemaSerdePlugin<InputType extends object = any, OutputType extends MetadataBearer = any>(config: PreviouslyResolved): Pluggable<InputType, OutputType>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { DeserializeHandler, DeserializeHandlerArguments, HandlerExecutionContext } from "@smithy/types";
|
2
|
+
import { PreviouslyResolved } from "./schema-middleware-types";
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export declare const schemaDeserializationMiddleware: <O>(config: PreviouslyResolved) => (next: DeserializeHandler<any, any>, context: HandlerExecutionContext) => (args: DeserializeHandlerArguments<any>) => Promise<{
|
7
|
+
response: unknown;
|
8
|
+
output: O;
|
9
|
+
}>;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { HandlerExecutionContext, SerializeHandler, SerializeHandlerArguments } from "@smithy/types";
|
2
|
+
import { PreviouslyResolved } from "./schema-middleware-types";
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
export declare const schemaSerializationMiddleware: (config: PreviouslyResolved) => (next: SerializeHandler<any, any>, context: HandlerExecutionContext) => (args: SerializeHandlerArguments<any>) => Promise<import("@smithy/types").SerializeHandlerOutput<any>>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import type { SchemaRef, SchemaTraits } from "@smithy/types";
|
2
|
+
import { StructureSchema } from "./StructureSchema";
|
3
|
+
/**
|
4
|
+
* A schema for a structure shape having the error trait. These represent enumerated operation errors.
|
5
|
+
* Because Smithy-TS SDKs use classes for exceptions, whereas plain objects are used for all other data,
|
6
|
+
* and have an existing notion of a XYZServiceBaseException, the ErrorSchema differs from a StructureSchema
|
7
|
+
* by additionally holding the class reference for the corresponding ServiceException class.
|
8
|
+
*
|
9
|
+
* @alpha
|
10
|
+
*/
|
11
|
+
export declare class ErrorSchema extends StructureSchema {
|
12
|
+
name: string;
|
13
|
+
traits: SchemaTraits;
|
14
|
+
memberNames: string[];
|
15
|
+
memberList: SchemaRef[];
|
16
|
+
/**
|
17
|
+
* Constructor for a modeled service exception class that extends Error.
|
18
|
+
*/
|
19
|
+
ctor: any;
|
20
|
+
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[],
|
21
|
+
/**
|
22
|
+
* Constructor for a modeled service exception class that extends Error.
|
23
|
+
*/
|
24
|
+
ctor: any);
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Factory for ErrorSchema, to reduce codegen output and register the schema.
|
28
|
+
*
|
29
|
+
* @internal
|
30
|
+
*
|
31
|
+
* @param namespace - shapeId namespace.
|
32
|
+
* @param name - shapeId name.
|
33
|
+
* @param traits - shape level serde traits.
|
34
|
+
* @param memberNames - list of member names.
|
35
|
+
* @param memberList - list of schemaRef corresponding to each
|
36
|
+
* @param ctor - class reference for the existing Error extending class.
|
37
|
+
*/
|
38
|
+
export declare function error(namespace: string, name: string, traits: SchemaTraits | undefined, memberNames: string[], memberList: SchemaRef[], ctor: any): ErrorSchema;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { ListSchema as IListSchema, SchemaRef, SchemaTraits } from "@smithy/types";
|
2
|
+
import { Schema } from "./Schema";
|
3
|
+
/**
|
4
|
+
* A schema with a single member schema.
|
5
|
+
* The deprecated Set type may be represented as a list.
|
6
|
+
*
|
7
|
+
* @alpha
|
8
|
+
*/
|
9
|
+
export declare class ListSchema extends Schema implements IListSchema {
|
10
|
+
name: string;
|
11
|
+
traits: SchemaTraits;
|
12
|
+
valueSchema: SchemaRef;
|
13
|
+
constructor(name: string, traits: SchemaTraits, valueSchema: SchemaRef);
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Factory for ListSchema.
|
17
|
+
*
|
18
|
+
* @internal
|
19
|
+
*/
|
20
|
+
export declare function list(namespace: string, name: string, traits: SchemaTraits | undefined, valueSchema: SchemaRef): ListSchema;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { MapSchema as IMapSchema, SchemaRef, SchemaTraits } from "@smithy/types";
|
2
|
+
import { Schema } from "./Schema";
|
3
|
+
/**
|
4
|
+
* A schema with a key schema and value schema.
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export declare class MapSchema extends Schema implements IMapSchema {
|
8
|
+
name: string;
|
9
|
+
traits: SchemaTraits;
|
10
|
+
/**
|
11
|
+
* This is expected to be StringSchema, but may have traits.
|
12
|
+
*/
|
13
|
+
keySchema: SchemaRef;
|
14
|
+
valueSchema: SchemaRef;
|
15
|
+
constructor(name: string, traits: SchemaTraits,
|
16
|
+
/**
|
17
|
+
* This is expected to be StringSchema, but may have traits.
|
18
|
+
*/
|
19
|
+
keySchema: SchemaRef, valueSchema: SchemaRef);
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Factory for MapSchema.
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
export declare function map(namespace: string, name: string, traits: SchemaTraits | undefined, keySchema: SchemaRef, valueSchema: SchemaRef): MapSchema;
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraits, SchemaTraitsObject } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Wraps both class instances, numeric sentinel values, and member schema pairs.
|
4
|
+
* Presents a consistent interface for interacting with polymorphic schema representations.
|
5
|
+
*
|
6
|
+
* @alpha
|
7
|
+
*/
|
8
|
+
export declare class NormalizedSchema implements INormalizedSchema {
|
9
|
+
private readonly ref;
|
10
|
+
private memberName?;
|
11
|
+
private readonly name;
|
12
|
+
private readonly traits;
|
13
|
+
private _isMemberSchema;
|
14
|
+
private schema;
|
15
|
+
private memberTraits;
|
16
|
+
private normalizedTraits?;
|
17
|
+
/**
|
18
|
+
* @param ref - a polymorphic SchemaRef to be dereferenced/normalized.
|
19
|
+
* @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.
|
20
|
+
*/
|
21
|
+
constructor(ref: SchemaRef, memberName?: string | undefined);
|
22
|
+
/**
|
23
|
+
* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
|
24
|
+
*/
|
25
|
+
static of(ref: SchemaRef, memberName?: string): NormalizedSchema;
|
26
|
+
/**
|
27
|
+
* @param indicator - numeric indicator for preset trait combination.
|
28
|
+
* @returns equivalent trait object.
|
29
|
+
*/
|
30
|
+
static translateTraits(indicator: SchemaTraits): SchemaTraitsObject;
|
31
|
+
/**
|
32
|
+
* Creates a normalized member schema from the given schema and member name.
|
33
|
+
*/
|
34
|
+
private static memberFrom;
|
35
|
+
/**
|
36
|
+
* @returns the underlying non-normalized schema.
|
37
|
+
*/
|
38
|
+
getSchema(): Exclude<ISchema, MemberSchema | INormalizedSchema>;
|
39
|
+
/**
|
40
|
+
* @param withNamespace - qualifies the name.
|
41
|
+
* @returns e.g. `MyShape` or `com.namespace#MyShape`.
|
42
|
+
*/
|
43
|
+
getName(withNamespace?: boolean): string | undefined;
|
44
|
+
/**
|
45
|
+
* @returns the member name if the schema is a member schema.
|
46
|
+
* @throws Error when the schema isn't a member schema.
|
47
|
+
*/
|
48
|
+
getMemberName(): string;
|
49
|
+
isMemberSchema(): boolean;
|
50
|
+
isUnitSchema(): boolean;
|
51
|
+
/**
|
52
|
+
* boolean methods on this class help control flow in shape serialization and deserialization.
|
53
|
+
*/
|
54
|
+
isListSchema(): boolean;
|
55
|
+
isMapSchema(): boolean;
|
56
|
+
isDocumentSchema(): boolean;
|
57
|
+
isStructSchema(): boolean;
|
58
|
+
isBlobSchema(): boolean;
|
59
|
+
isTimestampSchema(): boolean;
|
60
|
+
isStringSchema(): boolean;
|
61
|
+
isBooleanSchema(): boolean;
|
62
|
+
isNumericSchema(): boolean;
|
63
|
+
isBigIntegerSchema(): boolean;
|
64
|
+
isBigDecimalSchema(): boolean;
|
65
|
+
isStreaming(): boolean;
|
66
|
+
/**
|
67
|
+
* @returns own traits merged with member traits, where member traits of the same trait key take priority.
|
68
|
+
* This method is cached.
|
69
|
+
*/
|
70
|
+
getMergedTraits(): SchemaTraitsObject;
|
71
|
+
/**
|
72
|
+
* @returns only the member traits. If the schema is not a member, this returns empty.
|
73
|
+
*/
|
74
|
+
getMemberTraits(): SchemaTraitsObject;
|
75
|
+
/**
|
76
|
+
* @returns only the traits inherent to the shape or member target shape if this schema is a member.
|
77
|
+
* If there are any member traits they are excluded.
|
78
|
+
*/
|
79
|
+
getOwnTraits(): SchemaTraitsObject;
|
80
|
+
/**
|
81
|
+
* @returns the map's key's schema. Returns a dummy Document schema if this schema is a Document.
|
82
|
+
*
|
83
|
+
* @throws Error if the schema is not a Map or Document.
|
84
|
+
*/
|
85
|
+
getKeySchema(): NormalizedSchema;
|
86
|
+
/**
|
87
|
+
* @returns the schema of the map's value or list's member.
|
88
|
+
* Returns a dummy Document schema if this schema is a Document.
|
89
|
+
*
|
90
|
+
* @throws Error if the schema is not a Map, List, nor Document.
|
91
|
+
*/
|
92
|
+
getValueSchema(): NormalizedSchema;
|
93
|
+
/**
|
94
|
+
* @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`
|
95
|
+
* and will have the member name given.
|
96
|
+
* @param member - which member to retrieve and wrap.
|
97
|
+
*
|
98
|
+
* @throws Error if member does not exist or the schema is neither a document nor structure.
|
99
|
+
* Note that errors are assumed to be structures and unions are considered structures for these purposes.
|
100
|
+
*/
|
101
|
+
getMemberSchema(member: string): NormalizedSchema;
|
102
|
+
/**
|
103
|
+
* This can be used for checking the members as a hashmap.
|
104
|
+
* Prefer the structIterator method for iteration.
|
105
|
+
*
|
106
|
+
* This does NOT return list and map members, it is only for structures.
|
107
|
+
*
|
108
|
+
* @returns a map of member names to member schemas (normalized).
|
109
|
+
*/
|
110
|
+
getMemberSchemas(): Record<string, NormalizedSchema>;
|
111
|
+
/**
|
112
|
+
* Allows iteration over members of a structure schema.
|
113
|
+
* Each yield is a pair of the member name and member schema.
|
114
|
+
*
|
115
|
+
* This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).
|
116
|
+
*/
|
117
|
+
structIterator(): Generator<[string, NormalizedSchema], undefined, undefined>;
|
118
|
+
/**
|
119
|
+
* @returns a last-resort human-readable name for the schema if it has no other identifiers.
|
120
|
+
*/
|
121
|
+
private getSchemaName;
|
122
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { OperationSchema as IOperationSchema, SchemaRef, SchemaTraits } from "@smithy/types";
|
2
|
+
import { Schema } from "./Schema";
|
3
|
+
/**
|
4
|
+
* This is used as a reference container for the input/output pair of schema, and for trait
|
5
|
+
* detection on the operation that may affect client protocol logic.
|
6
|
+
*
|
7
|
+
* @alpha
|
8
|
+
*/
|
9
|
+
export declare class OperationSchema extends Schema implements IOperationSchema {
|
10
|
+
name: string;
|
11
|
+
traits: SchemaTraits;
|
12
|
+
input: SchemaRef;
|
13
|
+
output: SchemaRef;
|
14
|
+
constructor(name: string, traits: SchemaTraits, input: SchemaRef, output: SchemaRef);
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Factory for OperationSchema.
|
18
|
+
* @internal
|
19
|
+
*/
|
20
|
+
export declare function op(namespace: string, name: string, traits: SchemaTraits | undefined, input: SchemaRef, output: SchemaRef): OperationSchema;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { SchemaTraits, TraitsSchema } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Abstract base for class-based Schema except NormalizedSchema.
|
4
|
+
*
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export declare abstract class Schema implements TraitsSchema {
|
8
|
+
name: string;
|
9
|
+
traits: SchemaTraits;
|
10
|
+
protected constructor(name: string, traits: SchemaTraits);
|
11
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { SchemaRef, SchemaTraits, TraitsSchema } from "@smithy/types";
|
2
|
+
import { Schema } from "./Schema";
|
3
|
+
/**
|
4
|
+
* Although numeric values exist for most simple schema, this class is used for cases where traits are
|
5
|
+
* attached to those schema, since a single number cannot easily represent both a schema and its traits.
|
6
|
+
*
|
7
|
+
* @alpha
|
8
|
+
*/
|
9
|
+
export declare class SimpleSchema extends Schema implements TraitsSchema {
|
10
|
+
name: string;
|
11
|
+
schemaRef: SchemaRef;
|
12
|
+
traits: SchemaTraits;
|
13
|
+
constructor(name: string, schemaRef: SchemaRef, traits: SchemaTraits);
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Factory for simple schema class objects.
|
17
|
+
*
|
18
|
+
* @internal
|
19
|
+
*/
|
20
|
+
export declare function sim(namespace: string, name: string, schemaRef: SchemaRef, traits: SchemaTraits): SimpleSchema;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { SchemaRef, SchemaTraits, StructureSchema as IStructureSchema } from "@smithy/types";
|
2
|
+
import { Schema } from "./Schema";
|
3
|
+
/**
|
4
|
+
* A structure schema has a known list of members. This is also used for unions.
|
5
|
+
*
|
6
|
+
* @alpha
|
7
|
+
*/
|
8
|
+
export declare class StructureSchema extends Schema implements IStructureSchema {
|
9
|
+
name: string;
|
10
|
+
traits: SchemaTraits;
|
11
|
+
memberNames: string[];
|
12
|
+
memberList: SchemaRef[];
|
13
|
+
members: Record<string, [SchemaRef, SchemaTraits]>;
|
14
|
+
constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[]);
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Factory for StructureSchema.
|
18
|
+
*
|
19
|
+
* @internal
|
20
|
+
*/
|
21
|
+
export declare function struct(namespace: string, name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[]): StructureSchema;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { BigDecimalSchema, BigIntegerSchema, BlobSchema, BooleanSchema, DocumentSchema, ListSchemaModifier, MapSchemaModifier, NumericSchema, StreamingBlobSchema, StringSchema, TimestampDateTimeSchema, TimestampDefaultSchema, TimestampEpochSecondsSchema, TimestampHttpDateSchema } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Schema sentinel runtime values.
|
4
|
+
* @alpha
|
5
|
+
*/
|
6
|
+
export declare const SCHEMA: {
|
7
|
+
BLOB: BlobSchema;
|
8
|
+
STREAMING_BLOB: StreamingBlobSchema;
|
9
|
+
BOOLEAN: BooleanSchema;
|
10
|
+
STRING: StringSchema;
|
11
|
+
NUMERIC: NumericSchema;
|
12
|
+
BIG_INTEGER: BigIntegerSchema;
|
13
|
+
BIG_DECIMAL: BigDecimalSchema;
|
14
|
+
DOCUMENT: DocumentSchema;
|
15
|
+
TIMESTAMP_DEFAULT: TimestampDefaultSchema;
|
16
|
+
TIMESTAMP_DATE_TIME: TimestampDateTimeSchema;
|
17
|
+
TIMESTAMP_HTTP_DATE: TimestampHttpDateSchema;
|
18
|
+
TIMESTAMP_EPOCH_SECONDS: TimestampEpochSecondsSchema;
|
19
|
+
LIST_MODIFIER: ListSchemaModifier;
|
20
|
+
MAP_MODIFIER: MapSchemaModifier;
|
21
|
+
};
|
@@ -1,7 +1,8 @@
|
|
1
|
-
export * from "./
|
1
|
+
export * from "./copyDocumentWithTransform";
|
2
2
|
export * from "./date-utils";
|
3
|
+
export * from "./lazy-json";
|
4
|
+
export * from "./parse-utils";
|
3
5
|
export * from "./quote-header";
|
6
|
+
export * from "./split-every";
|
4
7
|
export * from "./split-header";
|
5
8
|
export * from "./value/NumericValue";
|
6
|
-
export * from "./lazy-json";
|
7
|
-
export * from "./split-every";
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Codec, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* @alpha
|
4
|
+
*/
|
5
|
+
export declare class CborCodec implements Codec<Uint8Array, Uint8Array> {
|
6
|
+
private serdeContext?;
|
7
|
+
createSerializer(): CborShapeSerializer;
|
8
|
+
createDeserializer(): CborShapeDeserializer;
|
9
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* @alpha
|
13
|
+
*/
|
14
|
+
export declare class CborShapeSerializer implements ShapeSerializer {
|
15
|
+
private serdeContext?;
|
16
|
+
private value;
|
17
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
18
|
+
write(schema: Schema, value: unknown): void;
|
19
|
+
flush(): Uint8Array;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* @alpha
|
23
|
+
*/
|
24
|
+
export declare class CborShapeDeserializer implements ShapeDeserializer {
|
25
|
+
private serdeContext?;
|
26
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
27
|
+
read(schema: Schema, bytes: Uint8Array): any;
|
28
|
+
private readValue;
|
29
|
+
}
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
import { RpcProtocol } from "@smithy/core/protocols";
|
2
|
+
import { OperationSchema } from "@smithy/core/schema";
|
3
|
+
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, ResponseMetadata, SerdeFunctions } from "@smithy/types";
|
4
|
+
import { CborCodec } from "./CborCodec";
|
5
|
+
/**
|
6
|
+
* Client protocol for Smithy RPCv2 CBOR.
|
7
|
+
*
|
8
|
+
* @alpha
|
9
|
+
*/
|
10
|
+
export declare class SmithyRpcV2CborProtocol extends RpcProtocol {
|
11
|
+
private codec;
|
12
|
+
protected serializer: import("./CborCodec").CborShapeSerializer;
|
13
|
+
protected deserializer: import("./CborCodec").CborShapeDeserializer;
|
14
|
+
constructor({ defaultNamespace }: {
|
15
|
+
defaultNamespace: string;
|
16
|
+
});
|
17
|
+
getShapeId(): string;
|
18
|
+
getPayloadCodec(): CborCodec;
|
19
|
+
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
20
|
+
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
21
|
+
protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
22
|
+
}
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
2
|
+
import { HttpRequest } from "@smithy/protocol-http";
|
3
|
+
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, SerdeFunctions } from "@smithy/types";
|
4
|
+
import { HttpProtocol } from "./HttpProtocol";
|
5
|
+
/**
|
6
|
+
* Base for HTTP-binding protocols. Downstream examples
|
7
|
+
* include AWS REST JSON and AWS REST XML.
|
8
|
+
*
|
9
|
+
* @alpha
|
10
|
+
*/
|
11
|
+
export declare abstract class HttpBindingProtocol extends HttpProtocol {
|
12
|
+
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
13
|
+
protected serializeQuery(ns: NormalizedSchema, data: any, query: HttpRequest["query"]): void;
|
14
|
+
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
15
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* Abstract base for HTTP-based client protocols.
|
4
|
+
*
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export declare abstract class HttpProtocol implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
8
|
+
readonly options: {
|
9
|
+
defaultNamespace: string;
|
10
|
+
};
|
11
|
+
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
|
12
|
+
protected abstract deserializer: ShapeDeserializer<string | Uint8Array>;
|
13
|
+
protected serdeContext?: SerdeFunctions;
|
14
|
+
protected constructor(options: {
|
15
|
+
defaultNamespace: string;
|
16
|
+
});
|
17
|
+
abstract getShapeId(): string;
|
18
|
+
abstract getPayloadCodec(): Codec<any, any>;
|
19
|
+
getRequestType(): new (...args: any[]) => IHttpRequest;
|
20
|
+
getResponseType(): new (...args: any[]) => IHttpResponse;
|
21
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
22
|
+
abstract serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
23
|
+
updateServiceEndpoint(request: IHttpRequest, endpoint: EndpointV2 | Endpoint): IHttpRequest;
|
24
|
+
abstract deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
25
|
+
protected setHostPrefix<Input extends object>(request: IHttpRequest, operationSchema: OperationSchema, input: Input): void;
|
26
|
+
protected abstract handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
|
27
|
+
protected deserializeMetadata(output: IHttpResponse): ResponseMetadata;
|
28
|
+
protected deserializeHttpMessage(schema: Schema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, headerBindings: Set<string>, dataObject: any): Promise<string[]>;
|
29
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, SerdeFunctions } from "@smithy/types";
|
2
|
+
import { HttpProtocol } from "./HttpProtocol";
|
3
|
+
/**
|
4
|
+
* Abstract base for RPC-over-HTTP protocols.
|
5
|
+
*
|
6
|
+
* @alpha
|
7
|
+
*/
|
8
|
+
export declare abstract class RpcProtocol extends HttpProtocol {
|
9
|
+
serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
10
|
+
deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
|
11
|
+
}
|
@@ -1,4 +1,11 @@
|
|
1
1
|
export * from "./collect-stream-body";
|
2
2
|
export * from "./extended-encode-uri-component";
|
3
|
+
export * from "./HttpBindingProtocol";
|
4
|
+
export * from "./RpcProtocol";
|
3
5
|
export * from "./requestBuilder";
|
4
6
|
export * from "./resolve-path";
|
7
|
+
export * from "./serde/FromStringShapeDeserializer";
|
8
|
+
export * from "./serde/HttpInterceptingShapeDeserializer";
|
9
|
+
export * from "./serde/HttpInterceptingShapeSerializer";
|
10
|
+
export * from "./serde/ToStringShapeSerializer";
|
11
|
+
export * from "./serde/determineTimestampFormat";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
2
|
+
/**
|
3
|
+
* This deserializer reads strings.
|
4
|
+
*
|
5
|
+
* @alpha
|
6
|
+
*/
|
7
|
+
export declare class FromStringShapeDeserializer implements ShapeDeserializer<string> {
|
8
|
+
private settings;
|
9
|
+
private serdeContext;
|
10
|
+
constructor(settings: CodecSettings);
|
11
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
12
|
+
read(_schema: Schema, data: string): any;
|
13
|
+
private base64ToUtf8;
|
14
|
+
}
|