@jjrawlins/cdk-iam-policy-builder-helper 0.0.58 → 0.0.59

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 (133) hide show
  1. package/.jsii +3 -3
  2. package/cdk-iam-policy-builder-helper/go.mod +1 -1
  3. package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
  4. package/cdk-iam-policy-builder-helper/version +1 -1
  5. package/node_modules/@aws-sdk/client-iam/package.json +5 -5
  6. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  7. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1 -1
  8. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1 -1
  9. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -1
  10. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -2
  11. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -1
  12. package/node_modules/@aws-sdk/core/package.json +2 -2
  13. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  14. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  15. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  16. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  17. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  18. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  19. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  20. package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
  21. package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
  22. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  23. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  24. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +4 -1
  25. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  26. package/node_modules/@smithy/abort-controller/package.json +2 -2
  27. package/node_modules/@smithy/config-resolver/package.json +4 -4
  28. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -2
  29. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +3 -3
  30. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +171 -169
  31. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -2
  32. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -4
  33. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +1 -1
  34. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +1 -0
  35. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +4 -6
  36. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +4 -6
  37. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +26 -35
  38. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +7 -0
  39. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +1 -0
  40. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ErrorSchema.d.ts +2 -0
  41. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ListSchema.d.ts +2 -0
  42. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/MapSchema.d.ts +2 -0
  43. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +4 -21
  44. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/OperationSchema.d.ts +2 -0
  45. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/Schema.d.ts +1 -0
  46. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts +2 -0
  47. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/StructureSchema.d.ts +2 -0
  48. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/operation.d.ts +7 -0
  49. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +1 -0
  50. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +2 -0
  51. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ListSchema.d.ts +2 -0
  52. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/MapSchema.d.ts +2 -0
  53. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +4 -21
  54. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/OperationSchema.d.ts +2 -0
  55. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/Schema.d.ts +1 -0
  56. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +2 -0
  57. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/StructureSchema.d.ts +2 -0
  58. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/operation.d.ts +7 -0
  59. package/node_modules/@smithy/core/package.json +7 -7
  60. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  61. package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
  62. package/node_modules/@smithy/hash-node/package.json +2 -2
  63. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  64. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  65. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  66. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  67. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  68. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  69. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  70. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  71. package/node_modules/@smithy/property-provider/package.json +2 -2
  72. package/node_modules/@smithy/protocol-http/package.json +2 -2
  73. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  74. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  75. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  76. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +2 -1
  77. package/node_modules/@smithy/shared-ini-file-loader/dist-es/constants.js +1 -0
  78. package/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +1 -1
  79. package/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +1 -1
  80. package/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +1 -1
  81. package/node_modules/@smithy/shared-ini-file-loader/dist-types/constants.d.ts +4 -0
  82. package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +1 -4
  83. package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/constants.d.ts +4 -0
  84. package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +1 -4
  85. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  86. package/node_modules/@smithy/signature-v4/package.json +4 -4
  87. package/node_modules/@smithy/smithy-client/package.json +7 -7
  88. package/node_modules/@smithy/types/dist-es/index.js +1 -0
  89. package/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
  90. package/node_modules/@smithy/types/dist-types/index.d.ts +1 -0
  91. package/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +136 -0
  92. package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +26 -68
  93. package/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +8 -8
  94. package/node_modules/@smithy/types/dist-types/serde.d.ts +2 -2
  95. package/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +1 -0
  96. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +142 -0
  97. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +27 -72
  98. package/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +9 -9
  99. package/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +2 -2
  100. package/node_modules/@smithy/types/package.json +1 -1
  101. package/node_modules/@smithy/url-parser/package.json +3 -3
  102. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  103. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  104. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +31 -22
  105. package/node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js +1 -11
  106. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +15 -2
  107. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +17 -2
  108. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTreeRule.js +1 -13
  109. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +25 -2
  110. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperty.js +1 -21
  111. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/callFunction.d.ts +1 -2
  112. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateExpression.d.ts +7 -2
  113. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateRules.d.ts +6 -1
  114. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTreeRule.d.ts +1 -3
  115. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperties.d.ts +6 -0
  116. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperty.d.ts +1 -3
  117. package/node_modules/@smithy/util-endpoints/dist-types/utils/callFunction.d.ts +1 -2
  118. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateExpression.d.ts +7 -2
  119. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateRules.d.ts +6 -1
  120. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTreeRule.d.ts +1 -3
  121. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +6 -0
  122. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperty.d.ts +1 -3
  123. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  124. package/node_modules/@smithy/util-middleware/package.json +2 -2
  125. package/node_modules/@smithy/util-retry/package.json +3 -3
  126. package/node_modules/@smithy/util-stream/dist-cjs/index.js +8 -15
  127. package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +10 -3
  128. package/node_modules/@smithy/util-stream/package.json +4 -4
  129. package/node_modules/@smithy/util-waiter/package.json +3 -3
  130. package/package.json +2 -2
  131. package/node_modules/@smithy/util-stream/dist-es/blob/transforms.js +0 -15
  132. package/node_modules/@smithy/util-stream/dist-types/blob/transforms.d.ts +0 -9
  133. package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/transforms.d.ts +0 -9
@@ -7,9 +7,9 @@ import type { StaticSchema } from "./static-schemas";
7
7
  import type { TraitBitVector } from "./traits";
8
8
  /**
9
9
  * A schema is an object or value that describes how to serialize/deserialize data.
10
- * @public
10
+ * @alpha
11
11
  */
12
- export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema;
12
+ export type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema;
13
13
  /**
14
14
  * Traits attached to schema objects.
15
15
  *
@@ -20,16 +20,6 @@ export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | Map
20
20
  * @public
21
21
  */
22
22
  export type SchemaTraits = TraitBitVector | SchemaTraitsObject;
23
- /**
24
- * A schema that has traits.
25
- *
26
- * @public
27
- */
28
- export interface TraitsSchema {
29
- namespace: string;
30
- name: string;
31
- traits: SchemaTraits;
32
- }
33
23
  /**
34
24
  * Simple schemas are those corresponding to simple Smithy types.
35
25
  * @see https://smithy.io/2.0/spec/simple-types.html
@@ -52,7 +42,7 @@ export type BlobSchemas = BlobSchema | StreamingBlobSchema;
52
42
  * Signal value for the Smithy void value. Typically used for
53
43
  * operation input and outputs.
54
44
  *
55
- * @internal
45
+ * @alpha
56
46
  */
57
47
  export type UnitSchema = "unit";
58
48
  /**
@@ -102,60 +92,28 @@ export type SchemaTraitsObject = {
102
92
  [traitName: string]: unknown;
103
93
  };
104
94
  /**
105
- * Schema for the structure aggregate type.
106
- * @public
107
- */
108
- export interface StructureSchema extends TraitsSchema {
109
- name: string;
110
- traits: SchemaTraits;
111
- memberNames: string[];
112
- memberList: SchemaRef[];
113
- /**
114
- * @deprecated structure member iteration will be linear on the memberNames and memberList arrays.
115
- * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such.
116
- */
117
- members?: Record<string, [SchemaRef, SchemaTraits]> | undefined;
118
- }
119
- /**
120
- * Schema for the list aggregate type.
121
- * @public
95
+ * Indicates the schema is a member of a parent Structure schema.
96
+ * It may also have a set of member traits distinct from its target shape's traits.
97
+ * @alpha
122
98
  */
123
- export interface ListSchema extends TraitsSchema {
124
- name: string;
125
- traits: SchemaTraits;
126
- valueSchema: SchemaRef;
127
- }
128
- /**
129
- * Schema for the map aggregate type.
130
- * @public
131
- */
132
- export interface MapSchema extends TraitsSchema {
133
- name: string;
134
- traits: SchemaTraits;
135
- keySchema: SchemaRef;
136
- valueSchema: SchemaRef;
137
- }
138
- /**
139
- * @public
140
- */
141
- export type MemberSchema = [SchemaRef, SchemaTraits];
99
+ export type $MemberSchema = [$SchemaRef, SchemaTraits];
142
100
  /**
143
101
  * Schema for an operation.
144
- *
145
- * @public
102
+ * @alpha
146
103
  */
147
- export interface OperationSchema extends TraitsSchema {
104
+ export interface $OperationSchema {
105
+ namespace: string;
148
106
  name: string;
149
107
  traits: SchemaTraits;
150
- input: SchemaRef;
151
- output: SchemaRef;
108
+ input: $SchemaRef;
109
+ output: $SchemaRef;
152
110
  }
153
111
  /**
154
112
  * Normalization wrapper for various schema data objects.
155
113
  * @public
156
114
  */
157
115
  export interface NormalizedSchema {
158
- getSchema(): Schema;
116
+ getSchema(): $Schema;
159
117
  getName(): string | undefined;
160
118
  isMemberSchema(): boolean;
161
119
  isListSchema(): boolean;
@@ -186,17 +144,17 @@ export interface NormalizedSchema {
186
144
  * A schema "reference" is either a schema or a function that
187
145
  * provides a schema. This is useful for lazy loading, and to allow
188
146
  * code generation to define schema out of dependency order.
189
- * @public
147
+ * @alpha
190
148
  */
191
- export type SchemaRef = Schema | (() => Schema);
149
+ export type $SchemaRef = $Schema | (() => $Schema);
192
150
  /**
193
151
  * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR.
194
152
  *
195
153
  * @public
196
154
  */
197
- export interface Codec<S, D> extends ConfigurableSerdeContext {
198
- createSerializer(): ShapeSerializer<S>;
199
- createDeserializer(): ShapeDeserializer<D>;
155
+ export interface $Codec<S, D> extends ConfigurableSerdeContext {
156
+ createSerializer(): $ShapeSerializer<S>;
157
+ createDeserializer(): $ShapeDeserializer<D>;
200
158
  }
201
159
  /**
202
160
  * Configuration for codecs. Different protocols may share codecs, but require different behaviors from them.
@@ -223,25 +181,25 @@ export type CodecSettings = {
223
181
  * Turns a serialization into a data object.
224
182
  * @public
225
183
  */
226
- export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
184
+ export interface $ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
227
185
  /**
228
186
  * Optionally async.
229
187
  */
230
- read(schema: Schema, data: SerializationType): any | Promise<any>;
188
+ read(schema: $Schema, data: SerializationType): any | Promise<any>;
231
189
  }
232
190
  /**
233
191
  * Turns a data object into a serialization.
234
192
  * @public
235
193
  */
236
- export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
237
- write(schema: Schema, value: unknown): void;
194
+ export interface $ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
195
+ write(schema: $Schema, value: unknown): void;
238
196
  flush(): SerializationType;
239
197
  }
240
198
  /**
241
199
  * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.
242
200
  * @public
243
201
  */
244
- export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
202
+ export interface $ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
245
203
  /**
246
204
  * @returns the Smithy qualified shape id.
247
205
  */
@@ -256,10 +214,10 @@ export interface ClientProtocol<Request, Response> extends ConfigurableSerdeCont
256
214
  * @returns the payload codec if the requests/responses have a symmetric format.
257
215
  * It otherwise may return null.
258
216
  */
259
- getPayloadCodec(): Codec<any, any>;
260
- serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>;
217
+ getPayloadCodec(): $Codec<any, any>;
218
+ serializeRequest<Input extends object>(operationSchema: $OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>;
261
219
  updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request;
262
- deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>;
220
+ deserializeResponse<Output extends MetadataBearer>(operationSchema: $OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>;
263
221
  }
264
222
  /**
265
223
  * Allows a protocol, codec, or serde utility to accept the serdeContext
@@ -1,4 +1,4 @@
1
- import type { SchemaRef, SchemaTraits } from "../schema/schema";
1
+ import type { $SchemaRef, SchemaTraits } from "../schema/schema";
2
2
  /**
3
3
  * @alpha
4
4
  */
@@ -38,15 +38,15 @@ export type ShapeNamespace = string;
38
38
  /**
39
39
  * @alpha
40
40
  */
41
- export type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef];
41
+ export type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef];
42
42
  /**
43
43
  * @alpha
44
44
  */
45
- export type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef];
45
+ export type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef];
46
46
  /**
47
47
  * @alpha
48
48
  */
49
- export type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef, SchemaRef];
49
+ export type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef, $SchemaRef];
50
50
  /**
51
51
  * @alpha
52
52
  */
@@ -56,7 +56,7 @@ export type StaticStructureSchema = [
56
56
  ShapeName,
57
57
  SchemaTraits,
58
58
  string[],
59
- SchemaRef[]
59
+ $SchemaRef[]
60
60
  ];
61
61
  /**
62
62
  * @alpha
@@ -67,7 +67,7 @@ export type StaticErrorSchema = [
67
67
  ShapeName,
68
68
  SchemaTraits,
69
69
  string[],
70
- SchemaRef[]
70
+ $SchemaRef[]
71
71
  ];
72
72
  /**
73
73
  * @alpha
@@ -77,6 +77,6 @@ export type StaticOperationSchema = [
77
77
  ShapeNamespace,
78
78
  ShapeName,
79
79
  SchemaTraits,
80
- SchemaRef,
81
- SchemaRef
80
+ $SchemaRef,
81
+ $SchemaRef
82
82
  ];
@@ -1,5 +1,5 @@
1
1
  import type { Endpoint } from "./http";
2
- import type { ClientProtocol } from "./schema/schema";
2
+ import type { $ClientProtocol } from "./schema/schema";
3
3
  import type { RequestHandler } from "./transfer";
4
4
  import type { Decoder, Encoder, Provider } from "./util";
5
5
  /**
@@ -29,7 +29,7 @@ export interface StreamCollector {
29
29
  export interface SerdeContext extends SerdeFunctions, EndpointBearer {
30
30
  requestHandler: RequestHandler<any, any>;
31
31
  disableHostPrefix: boolean;
32
- protocol?: ClientProtocol<any, any>;
32
+ protocol?: $ClientProtocol<any, any>;
33
33
  }
34
34
  /**
35
35
  * @public
@@ -22,6 +22,7 @@ export * from "./profile";
22
22
  export * from "./response";
23
23
  export * from "./retry";
24
24
  export * from "./schema/schema";
25
+ export * from "./schema/schema-deprecated";
25
26
  export * from "./schema/sentinels";
26
27
  export * from "./schema/static-schemas";
27
28
  export * from "./serde";
@@ -0,0 +1,142 @@
1
+ import { EndpointV2 } from "../endpoint";
2
+ import { HandlerExecutionContext } from "../middleware";
3
+ import { MetadataBearer } from "../response";
4
+ import { EndpointBearer, SerdeFunctions } from "../serde";
5
+ import { ConfigurableSerdeContext, NormalizedSchema, SchemaTraits, SimpleSchema, UnitSchema } from "./schema";
6
+ import { StaticSchema } from "./static-schemas";
7
+ /**
8
+ * A schema is an object or value that describes how to serialize/deserialize data.
9
+ * @public
10
+ * @deprecated use $Schema
11
+ */
12
+ export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema;
13
+ /**
14
+ * A schema "reference" is either a schema or a function that
15
+ * provides a schema. This is useful for lazy loading, and to allow
16
+ * code generation to define schema out of dependency order.
17
+ * @public
18
+ * @deprecated use $SchemaRef
19
+ */
20
+ export type SchemaRef = Schema | (() => Schema);
21
+ /**
22
+ * A schema that has traits.
23
+ *
24
+ * @public
25
+ * @deprecated use static schema.
26
+ */
27
+ export interface TraitsSchema {
28
+ namespace: string;
29
+ name: string;
30
+ traits: SchemaTraits;
31
+ }
32
+ /**
33
+ * Indicates the schema is a member of a parent Structure schema.
34
+ * It may also have a set of member traits distinct from its target shape's traits.
35
+ * @public
36
+ * @deprecated use $MemberSchema
37
+ */
38
+ export type MemberSchema = [
39
+ SchemaRef,
40
+ SchemaTraits
41
+ ];
42
+ /**
43
+ * Schema for the structure aggregate type.
44
+ * @public
45
+ * @deprecated use static schema.
46
+ */
47
+ export interface StructureSchema extends TraitsSchema {
48
+ memberNames: string[];
49
+ memberList: SchemaRef[];
50
+ /**
51
+ * @deprecated structure member iteration will be linear on the memberNames and memberList arrays.
52
+ * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such.
53
+ */
54
+ members?: Record<string, [
55
+ SchemaRef,
56
+ SchemaTraits
57
+ ]> | undefined;
58
+ }
59
+ /**
60
+ * Schema for the list aggregate type.
61
+ * @public
62
+ * @deprecated use static schema.
63
+ */
64
+ export interface ListSchema extends TraitsSchema {
65
+ valueSchema: SchemaRef;
66
+ }
67
+ /**
68
+ * Schema for the map aggregate type.
69
+ * @public
70
+ * @deprecated use static schema.
71
+ */
72
+ export interface MapSchema extends TraitsSchema {
73
+ keySchema: SchemaRef;
74
+ valueSchema: SchemaRef;
75
+ }
76
+ /**
77
+ * Schema for an operation.
78
+ * @public
79
+ * @deprecated use StaticOperationSchema or $OperationSchema
80
+ */
81
+ export interface OperationSchema {
82
+ namespace: string;
83
+ name: string;
84
+ traits: SchemaTraits;
85
+ input: SchemaRef;
86
+ output: SchemaRef;
87
+ }
88
+ /**
89
+ * Turns a serialization into a data object.
90
+ * @public
91
+ * @deprecated use $ShapeDeserializer
92
+ */
93
+ export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
94
+ /**
95
+ * Optionally async.
96
+ */
97
+ read(schema: Schema, data: SerializationType): any | Promise<any>;
98
+ }
99
+ /**
100
+ * Turns a data object into a serialization.
101
+ * @public
102
+ * @deprecated use $ShapeSerializer
103
+ */
104
+ export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
105
+ write(schema: Schema, value: unknown): void;
106
+ flush(): SerializationType;
107
+ }
108
+ /**
109
+ * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR.
110
+ *
111
+ * @public
112
+ * @deprecated use $Codec
113
+ */
114
+ export interface Codec<S, D> extends ConfigurableSerdeContext {
115
+ createSerializer(): ShapeSerializer<S>;
116
+ createDeserializer(): ShapeDeserializer<D>;
117
+ }
118
+ /**
119
+ * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.
120
+ * @public
121
+ * @deprecated use $ClientProtocol
122
+ */
123
+ export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
124
+ /**
125
+ * @returns the Smithy qualified shape id.
126
+ */
127
+ getShapeId(): string;
128
+ getRequestType(): {
129
+ new (...args: any[]): Request;
130
+ };
131
+ getResponseType(): {
132
+ new (...args: any[]): Response;
133
+ };
134
+ /**
135
+ * @returns the payload codec if the requests/responses have a symmetric format.
136
+ * It otherwise may return null.
137
+ */
138
+ getPayloadCodec(): Codec<any, any>;
139
+ serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>;
140
+ updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request;
141
+ deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>;
142
+ }
@@ -7,9 +7,9 @@ import { StaticSchema } from "./static-schemas";
7
7
  import { TraitBitVector } from "./traits";
8
8
  /**
9
9
  * A schema is an object or value that describes how to serialize/deserialize data.
10
- * @public
10
+ * @alpha
11
11
  */
12
- export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema;
12
+ export type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema;
13
13
  /**
14
14
  * Traits attached to schema objects.
15
15
  *
@@ -20,16 +20,6 @@ export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | Map
20
20
  * @public
21
21
  */
22
22
  export type SchemaTraits = TraitBitVector | SchemaTraitsObject;
23
- /**
24
- * A schema that has traits.
25
- *
26
- * @public
27
- */
28
- export interface TraitsSchema {
29
- namespace: string;
30
- name: string;
31
- traits: SchemaTraits;
32
- }
33
23
  /**
34
24
  * Simple schemas are those corresponding to simple Smithy types.
35
25
  * @see https://smithy.io/2.0/spec/simple-types.html
@@ -52,7 +42,7 @@ export type BlobSchemas = BlobSchema | StreamingBlobSchema;
52
42
  * Signal value for the Smithy void value. Typically used for
53
43
  * operation input and outputs.
54
44
  *
55
- * @internal
45
+ * @alpha
56
46
  */
57
47
  export type UnitSchema = "unit";
58
48
  /**
@@ -111,66 +101,31 @@ export type SchemaTraitsObject = {
111
101
  [traitName: string]: unknown;
112
102
  };
113
103
  /**
114
- * Schema for the structure aggregate type.
115
- * @public
116
- */
117
- export interface StructureSchema extends TraitsSchema {
118
- name: string;
119
- traits: SchemaTraits;
120
- memberNames: string[];
121
- memberList: SchemaRef[];
122
- /**
123
- * @deprecated structure member iteration will be linear on the memberNames and memberList arrays.
124
- * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such.
125
- */
126
- members?: Record<string, [
127
- SchemaRef,
128
- SchemaTraits
129
- ]> | undefined;
130
- }
131
- /**
132
- * Schema for the list aggregate type.
133
- * @public
104
+ * Indicates the schema is a member of a parent Structure schema.
105
+ * It may also have a set of member traits distinct from its target shape's traits.
106
+ * @alpha
134
107
  */
135
- export interface ListSchema extends TraitsSchema {
136
- name: string;
137
- traits: SchemaTraits;
138
- valueSchema: SchemaRef;
139
- }
140
- /**
141
- * Schema for the map aggregate type.
142
- * @public
143
- */
144
- export interface MapSchema extends TraitsSchema {
145
- name: string;
146
- traits: SchemaTraits;
147
- keySchema: SchemaRef;
148
- valueSchema: SchemaRef;
149
- }
150
- /**
151
- * @public
152
- */
153
- export type MemberSchema = [
154
- SchemaRef,
108
+ export type $MemberSchema = [
109
+ $SchemaRef,
155
110
  SchemaTraits
156
111
  ];
157
112
  /**
158
113
  * Schema for an operation.
159
- *
160
- * @public
114
+ * @alpha
161
115
  */
162
- export interface OperationSchema extends TraitsSchema {
116
+ export interface $OperationSchema {
117
+ namespace: string;
163
118
  name: string;
164
119
  traits: SchemaTraits;
165
- input: SchemaRef;
166
- output: SchemaRef;
120
+ input: $SchemaRef;
121
+ output: $SchemaRef;
167
122
  }
168
123
  /**
169
124
  * Normalization wrapper for various schema data objects.
170
125
  * @public
171
126
  */
172
127
  export interface NormalizedSchema {
173
- getSchema(): Schema;
128
+ getSchema(): $Schema;
174
129
  getName(): string | undefined;
175
130
  isMemberSchema(): boolean;
176
131
  isListSchema(): boolean;
@@ -204,17 +159,17 @@ export interface NormalizedSchema {
204
159
  * A schema "reference" is either a schema or a function that
205
160
  * provides a schema. This is useful for lazy loading, and to allow
206
161
  * code generation to define schema out of dependency order.
207
- * @public
162
+ * @alpha
208
163
  */
209
- export type SchemaRef = Schema | (() => Schema);
164
+ export type $SchemaRef = $Schema | (() => $Schema);
210
165
  /**
211
166
  * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR.
212
167
  *
213
168
  * @public
214
169
  */
215
- export interface Codec<S, D> extends ConfigurableSerdeContext {
216
- createSerializer(): ShapeSerializer<S>;
217
- createDeserializer(): ShapeDeserializer<D>;
170
+ export interface $Codec<S, D> extends ConfigurableSerdeContext {
171
+ createSerializer(): $ShapeSerializer<S>;
172
+ createDeserializer(): $ShapeDeserializer<D>;
218
173
  }
219
174
  /**
220
175
  * Configuration for codecs. Different protocols may share codecs, but require different behaviors from them.
@@ -241,25 +196,25 @@ export type CodecSettings = {
241
196
  * Turns a serialization into a data object.
242
197
  * @public
243
198
  */
244
- export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
199
+ export interface $ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
245
200
  /**
246
201
  * Optionally async.
247
202
  */
248
- read(schema: Schema, data: SerializationType): any | Promise<any>;
203
+ read(schema: $Schema, data: SerializationType): any | Promise<any>;
249
204
  }
250
205
  /**
251
206
  * Turns a data object into a serialization.
252
207
  * @public
253
208
  */
254
- export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
255
- write(schema: Schema, value: unknown): void;
209
+ export interface $ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
210
+ write(schema: $Schema, value: unknown): void;
256
211
  flush(): SerializationType;
257
212
  }
258
213
  /**
259
214
  * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.
260
215
  * @public
261
216
  */
262
- export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
217
+ export interface $ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
263
218
  /**
264
219
  * @returns the Smithy qualified shape id.
265
220
  */
@@ -274,10 +229,10 @@ export interface ClientProtocol<Request, Response> extends ConfigurableSerdeCont
274
229
  * @returns the payload codec if the requests/responses have a symmetric format.
275
230
  * It otherwise may return null.
276
231
  */
277
- getPayloadCodec(): Codec<any, any>;
278
- serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>;
232
+ getPayloadCodec(): $Codec<any, any>;
233
+ serializeRequest<Input extends object>(operationSchema: $OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>;
279
234
  updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request;
280
- deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>;
235
+ deserializeResponse<Output extends MetadataBearer>(operationSchema: $OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>;
281
236
  }
282
237
  /**
283
238
  * Allows a protocol, codec, or serde utility to accept the serdeContext
@@ -1,4 +1,4 @@
1
- import { SchemaRef, SchemaTraits } from "../schema/schema";
1
+ import { $SchemaRef, SchemaTraits } from "../schema/schema";
2
2
  /**
3
3
  * @alpha
4
4
  */
@@ -43,7 +43,7 @@ export type StaticSimpleSchema = [
43
43
  ShapeNamespace,
44
44
  ShapeName,
45
45
  SchemaTraits,
46
- SchemaRef
46
+ $SchemaRef
47
47
  ];
48
48
  /**
49
49
  * @alpha
@@ -53,7 +53,7 @@ export type StaticListSchema = [
53
53
  ShapeNamespace,
54
54
  ShapeName,
55
55
  SchemaTraits,
56
- SchemaRef
56
+ $SchemaRef
57
57
  ];
58
58
  /**
59
59
  * @alpha
@@ -63,8 +63,8 @@ export type StaticMapSchema = [
63
63
  ShapeNamespace,
64
64
  ShapeName,
65
65
  SchemaTraits,
66
- SchemaRef,
67
- SchemaRef
66
+ $SchemaRef,
67
+ $SchemaRef
68
68
  ];
69
69
  /**
70
70
  * @alpha
@@ -75,7 +75,7 @@ export type StaticStructureSchema = [
75
75
  ShapeName,
76
76
  SchemaTraits,
77
77
  string[],
78
- SchemaRef[]
78
+ $SchemaRef[]
79
79
  ];
80
80
  /**
81
81
  * @alpha
@@ -86,7 +86,7 @@ export type StaticErrorSchema = [
86
86
  ShapeName,
87
87
  SchemaTraits,
88
88
  string[],
89
- SchemaRef[]
89
+ $SchemaRef[]
90
90
  ];
91
91
  /**
92
92
  * @alpha
@@ -96,6 +96,6 @@ export type StaticOperationSchema = [
96
96
  ShapeNamespace,
97
97
  ShapeName,
98
98
  SchemaTraits,
99
- SchemaRef,
100
- SchemaRef
99
+ $SchemaRef,
100
+ $SchemaRef
101
101
  ];
@@ -1,5 +1,5 @@
1
1
  import { Endpoint } from "./http";
2
- import { ClientProtocol } from "./schema/schema";
2
+ import { $ClientProtocol } from "./schema/schema";
3
3
  import { RequestHandler } from "./transfer";
4
4
  import { Decoder, Encoder, Provider } from "./util";
5
5
  /**
@@ -29,7 +29,7 @@ export interface StreamCollector {
29
29
  export interface SerdeContext extends SerdeFunctions, EndpointBearer {
30
30
  requestHandler: RequestHandler<any, any>;
31
31
  disableHostPrefix: boolean;
32
- protocol?: ClientProtocol<any, any>;
32
+ protocol?: $ClientProtocol<any, any>;
33
33
  }
34
34
  /**
35
35
  * @public
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "4.7.1",
3
+ "version": "4.8.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline types",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/url-parser",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline url-parser",
@@ -24,8 +24,8 @@
24
24
  "license": "Apache-2.0",
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
- "@smithy/querystring-parser": "^4.2.2",
28
- "@smithy/types": "^4.7.1",
27
+ "@smithy/querystring-parser": "^4.2.3",
28
+ "@smithy/types": "^4.8.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "typesVersions": {