@cdk8s/awscdk-resolver 0.0.300 → 0.0.302

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.
Files changed (144) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@smithy/abort-controller/package.json +2 -2
  4. package/node_modules/@smithy/config-resolver/package.json +4 -4
  5. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +209 -0
  6. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +667 -2
  7. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +771 -0
  8. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +108 -53
  9. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +136 -0
  10. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +74 -0
  11. package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +3 -1
  12. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +183 -0
  13. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +164 -0
  14. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +68 -0
  15. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +7 -0
  16. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +64 -0
  17. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +38 -0
  18. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +30 -0
  19. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +87 -0
  20. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +20 -0
  21. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +49 -0
  22. package/node_modules/@smithy/core/dist-es/submodules/schema/deref.js +6 -0
  23. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +12 -0
  24. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +23 -0
  25. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schema-middleware-types.js +1 -0
  26. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +60 -0
  27. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +16 -0
  28. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +17 -0
  29. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +15 -0
  30. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +16 -0
  31. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +291 -0
  32. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +16 -0
  33. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +6 -0
  34. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +15 -0
  35. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +22 -0
  36. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +16 -0
  37. package/node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +53 -0
  38. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +4 -3
  39. package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +29 -0
  40. package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +22 -0
  41. package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +3 -1
  42. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpBindingProtocol.d.ts +15 -0
  43. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +29 -0
  44. package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +11 -0
  45. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +7 -0
  46. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +14 -0
  47. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +18 -0
  48. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +20 -0
  49. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts +15 -0
  50. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/determineTimestampFormat.d.ts +9 -0
  51. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +55 -0
  52. package/node_modules/@smithy/core/dist-types/submodules/schema/deref.d.ts +6 -0
  53. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +12 -0
  54. package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/getSchemaSerdePlugin.d.ts +14 -0
  55. package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schema-middleware-types.d.ts +8 -0
  56. package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schemaDeserializationMiddleware.d.ts +9 -0
  57. package/node_modules/@smithy/core/dist-types/submodules/schema/middleware/schemaSerializationMiddleware.d.ts +6 -0
  58. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ErrorSchema.d.ts +38 -0
  59. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ListSchema.d.ts +20 -0
  60. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/MapSchema.d.ts +25 -0
  61. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +122 -0
  62. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/OperationSchema.d.ts +20 -0
  63. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/Schema.d.ts +11 -0
  64. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts +20 -0
  65. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/StructureSchema.d.ts +21 -0
  66. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +21 -0
  67. package/node_modules/@smithy/core/dist-types/submodules/serde/copyDocumentWithTransform.d.ts +5 -0
  68. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +4 -3
  69. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +29 -0
  70. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +22 -0
  71. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +3 -1
  72. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpBindingProtocol.d.ts +15 -0
  73. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +29 -0
  74. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +11 -0
  75. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +7 -0
  76. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +14 -0
  77. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +18 -0
  78. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +20 -0
  79. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +15 -0
  80. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/determineTimestampFormat.d.ts +9 -0
  81. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +55 -0
  82. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/deref.d.ts +6 -0
  83. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +12 -0
  84. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/getSchemaSerdePlugin.d.ts +14 -0
  85. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schema-middleware-types.d.ts +11 -0
  86. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schemaDeserializationMiddleware.d.ts +9 -0
  87. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/middleware/schemaSerializationMiddleware.d.ts +6 -0
  88. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +38 -0
  89. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ListSchema.d.ts +20 -0
  90. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/MapSchema.d.ts +25 -0
  91. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +125 -0
  92. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/OperationSchema.d.ts +20 -0
  93. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/Schema.d.ts +11 -0
  94. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +20 -0
  95. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/StructureSchema.d.ts +24 -0
  96. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +21 -0
  97. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/copyDocumentWithTransform.d.ts +5 -0
  98. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +4 -3
  99. package/node_modules/@smithy/core/package.json +17 -7
  100. package/node_modules/@smithy/core/schema.d.ts +7 -0
  101. package/node_modules/@smithy/core/schema.js +6 -0
  102. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  103. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  104. package/node_modules/@smithy/hash-node/package.json +2 -2
  105. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  106. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  107. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  108. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  109. package/node_modules/@smithy/middleware-serde/dist-types/deserializerMiddleware.d.ts +1 -0
  110. package/node_modules/@smithy/middleware-serde/dist-types/serdePlugin.d.ts +7 -1
  111. package/node_modules/@smithy/middleware-serde/dist-types/serializerMiddleware.d.ts +1 -0
  112. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/deserializerMiddleware.d.ts +1 -0
  113. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts +7 -1
  114. package/node_modules/@smithy/middleware-serde/dist-types/ts3.4/serializerMiddleware.d.ts +1 -0
  115. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  116. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  117. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  118. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  119. package/node_modules/@smithy/property-provider/package.json +2 -2
  120. package/node_modules/@smithy/protocol-http/package.json +2 -2
  121. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  122. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  123. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  124. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  125. package/node_modules/@smithy/signature-v4/package.json +4 -4
  126. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +10 -0
  127. package/node_modules/@smithy/smithy-client/dist-es/command.js +6 -0
  128. package/node_modules/@smithy/smithy-client/dist-types/command.d.ts +7 -1
  129. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts +7 -1
  130. package/node_modules/@smithy/smithy-client/package.json +7 -7
  131. package/node_modules/@smithy/types/dist-types/command.d.ts +5 -2
  132. package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +2 -4
  133. package/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +5 -2
  134. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +2 -4
  135. package/node_modules/@smithy/types/package.json +1 -1
  136. package/node_modules/@smithy/url-parser/package.json +3 -3
  137. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  138. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  139. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  140. package/node_modules/@smithy/util-middleware/package.json +2 -2
  141. package/node_modules/@smithy/util-retry/package.json +3 -3
  142. package/node_modules/@smithy/util-stream/package.json +4 -4
  143. package/node_modules/@smithy/util-waiter/package.json +3 -3
  144. package/package.json +5 -5
@@ -0,0 +1,18 @@
1
+ import { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
2
+ /**
3
+ * This deserializer is a dispatcher that decides whether to use a string deserializer
4
+ * or a codec deserializer based on HTTP traits.
5
+ *
6
+ * For example, in a JSON HTTP message, the deserialization of a field will differ depending on whether
7
+ * it is bound to the HTTP header (string) or body (JSON).
8
+ *
9
+ * @alpha
10
+ */
11
+ export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>> implements ShapeDeserializer<string | Uint8Array> {
12
+ private codecDeserializer;
13
+ private stringDeserializer;
14
+ private serdeContext;
15
+ constructor(codecDeserializer: CodecShapeDeserializer, codecSettings: CodecSettings);
16
+ setSerdeContext(serdeContext: SerdeFunctions): void;
17
+ read(schema: Schema, data: string | Uint8Array): any | Promise<any>;
18
+ }
@@ -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
+ }
@@ -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 { TimestampDateTimeSchema, TimestampEpochSecondsSchema, 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 { 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,6 @@
1
+ import { Schema, SchemaRef } from "@smithy/types";
2
+ /**
3
+ * Dereferences a SchemaRef if needed.
4
+ * @internal
5
+ */
6
+ export declare const deref: (schemaRef: SchemaRef) => Schema;
@@ -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";
@@ -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,11 @@
1
+ import { ClientProtocol, SerdeContext, UrlParser } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export type PreviouslyResolved = Pick<SerdeContext & {
6
+ urlParser: UrlParser;
7
+ protocol: ClientProtocol<any, any>;
8
+ }, Exclude<keyof (SerdeContext & {
9
+ urlParser: UrlParser;
10
+ protocol: ClientProtocol<any, any>;
11
+ }), "endpoint">>;
@@ -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 { 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 { 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 { 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,125 @@
1
+ import { 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<[
118
+ string,
119
+ NormalizedSchema
120
+ ], undefined, undefined>;
121
+ /**
122
+ * @returns a last-resort human-readable name for the schema if it has no other identifiers.
123
+ */
124
+ private getSchemaName;
125
+ }
@@ -0,0 +1,20 @@
1
+ import { 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 { 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,24 @@
1
+ import { 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, [
14
+ SchemaRef,
15
+ SchemaTraits
16
+ ]>;
17
+ constructor(name: string, traits: SchemaTraits, memberNames: string[], memberList: SchemaRef[]);
18
+ }
19
+ /**
20
+ * Factory for StructureSchema.
21
+ *
22
+ * @internal
23
+ */
24
+ 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
+ };
@@ -0,0 +1,5 @@
1
+ import { SchemaRef } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const copyDocumentWithTransform: (source: any, schemaRef: SchemaRef, transform?: (_: any, schemaRef: SchemaRef) => any) => any;
@@ -1,7 +1,8 @@
1
- export * from "./parse-utils";
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";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -12,8 +12,8 @@
12
12
  "lint": "npx eslint -c ../../.eslintrc.js \"src/**/*.ts\" --fix && node ./scripts/lint",
13
13
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
14
14
  "extract:docs": "api-extractor run --local",
15
- "test": "yarn g:vitest run",
16
15
  "test:cbor:perf": "node ./scripts/cbor-perf.mjs",
16
+ "test": "yarn g:vitest run",
17
17
  "test:watch": "yarn g:vitest watch"
18
18
  },
19
19
  "main": "./dist-cjs/index.js",
@@ -53,6 +53,13 @@
53
53
  "import": "./dist-es/submodules/serde/index.js",
54
54
  "require": "./dist-cjs/submodules/serde/index.js",
55
55
  "types": "./dist-types/submodules/serde/index.d.ts"
56
+ },
57
+ "./schema": {
58
+ "module": "./dist-es/submodules/schema/index.js",
59
+ "node": "./dist-cjs/submodules/schema/index.js",
60
+ "import": "./dist-es/submodules/schema/index.js",
61
+ "require": "./dist-cjs/submodules/schema/index.js",
62
+ "types": "./dist-types/submodules/schema/index.d.ts"
56
63
  }
57
64
  },
58
65
  "author": {
@@ -62,12 +69,13 @@
62
69
  },
63
70
  "license": "Apache-2.0",
64
71
  "dependencies": {
65
- "@smithy/middleware-serde": "^4.0.6",
66
- "@smithy/protocol-http": "^5.1.1",
67
- "@smithy/types": "^4.3.0",
72
+ "@smithy/middleware-serde": "^4.0.8",
73
+ "@smithy/protocol-http": "^5.1.2",
74
+ "@smithy/types": "^4.3.1",
75
+ "@smithy/util-base64": "^4.0.0",
68
76
  "@smithy/util-body-length-browser": "^4.0.0",
69
- "@smithy/util-middleware": "^4.0.3",
70
- "@smithy/util-stream": "^4.2.1",
77
+ "@smithy/util-middleware": "^4.0.4",
78
+ "@smithy/util-stream": "^4.2.2",
71
79
  "@smithy/util-utf8": "^4.0.0",
72
80
  "tslib": "^2.6.2"
73
81
  },
@@ -86,6 +94,8 @@
86
94
  "./cbor.js",
87
95
  "./protocols.d.ts",
88
96
  "./protocols.js",
97
+ "./schema.d.ts",
98
+ "./schema.js",
89
99
  "./serde.d.ts",
90
100
  "./serde.js",
91
101
  "dist-*/**"
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ declare module "@smithy/core/schema" {
6
+ export * from "@smithy/core/dist-types/submodules/schema/index.d";
7
+ }
@@ -0,0 +1,6 @@
1
+
2
+ /**
3
+ * Do not edit:
4
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
5
+ */
6
+ module.exports = require("./dist-cjs/submodules/schema/index.js");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/credential-provider-imds",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@smithy/node-config-provider": "^4.1.2",
31
- "@smithy/property-provider": "^4.0.3",
32
- "@smithy/types": "^4.3.0",
33
- "@smithy/url-parser": "^4.0.3",
30
+ "@smithy/node-config-provider": "^4.1.3",
31
+ "@smithy/property-provider": "^4.0.4",
32
+ "@smithy/types": "^4.3.1",
33
+ "@smithy/url-parser": "^4.0.4",
34
34
  "tslib": "^2.6.2"
35
35
  },
36
36
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
@@ -27,14 +27,14 @@
27
27
  "module": "./dist-es/index.js",
28
28
  "types": "./dist-types/index.d.ts",
29
29
  "dependencies": {
30
- "@smithy/protocol-http": "^5.1.1",
31
- "@smithy/querystring-builder": "^4.0.3",
32
- "@smithy/types": "^4.3.0",
30
+ "@smithy/protocol-http": "^5.1.2",
31
+ "@smithy/querystring-builder": "^4.0.4",
32
+ "@smithy/types": "^4.3.1",
33
33
  "@smithy/util-base64": "^4.0.0",
34
34
  "tslib": "^2.6.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@smithy/abort-controller": "^4.0.3",
37
+ "@smithy/abort-controller": "^4.0.4",
38
38
  "concurrently": "7.0.0",
39
39
  "downlevel-dts": "0.10.1",
40
40
  "rimraf": "3.0.2",