@jjrawlins/cdk-iam-policy-builder-helper 0.0.56 → 0.0.58
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/cdk-iam-policy-builder-helper/go.mod +1 -1
- package/cdk-iam-policy-builder-helper/jsii/jsii.go +2 -2
- package/cdk-iam-policy-builder-helper/version +1 -1
- package/node_modules/@aws-sdk/client-iam/package.json +34 -34
- package/node_modules/@aws-sdk/client-sso/package.json +32 -32
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +5 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ProtocolLib.d.ts +4 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +7 -7
- package/node_modules/@aws-sdk/core/package.json +11 -11
- 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 +7 -7
- package/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +35 -63
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +44 -75
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +19 -48
- 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/dist-cjs/index.js +59 -95
- 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/dist-cjs/index.js +18 -290
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +395 -469
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- 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/@aws-sdk/xml-builder/dist-cjs/index.js +106 -160
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- 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 +3 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -14
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +226 -190
- package/node_modules/@smithy/core/dist-es/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -15
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +3 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +3 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +18 -11
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +5 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +5 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +24 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +6 -0
- package/node_modules/@smithy/core/dist-types/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +5 -10
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/SerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +3 -4
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts +3 -4
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +5 -6
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +22 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts +5 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +5 -10
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/SerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +3 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +5 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +3 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +5 -6
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +22 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +5 -0
- package/node_modules/@smithy/core/package.json +7 -7
- 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/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/dist-cjs/index.js +30 -6
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +7 -3
- package/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +2 -3
- package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- 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 +5 -4
- package/node_modules/@smithy/smithy-client/dist-es/command.js +5 -4
- package/node_modules/@smithy/smithy-client/dist-types/command.d.ts +3 -3
- package/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts +3 -3
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-es/index.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
- package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +17 -10
- package/node_modules/@smithy/types/dist-types/index.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +2 -1
- package/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +82 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +17 -10
- package/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +2 -1
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +101 -0
- 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
- /package/node_modules/@smithy/core/dist-es/{protocols → request-builder}/requestBuilder.js +0 -0
- /package/node_modules/@smithy/core/dist-types/{protocols → request-builder}/requestBuilder.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/{protocols → request-builder}/requestBuilder.d.ts +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import { getSmithyContext } from "@smithy/util-middleware";
|
|
3
|
+
import { hydrate, isStaticSchema } from "../schemas/NormalizedSchema";
|
|
3
4
|
export const schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
|
|
4
5
|
const { response } = await next(args);
|
|
5
|
-
|
|
6
|
+
let { operationSchema } = getSmithyContext(context);
|
|
7
|
+
if (isStaticSchema(operationSchema)) {
|
|
8
|
+
operationSchema = hydrate(operationSchema);
|
|
9
|
+
}
|
|
6
10
|
try {
|
|
7
11
|
const parsed = await config.protocol.deserializeResponse(operationSchema, {
|
|
8
12
|
...config,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { getSmithyContext } from "@smithy/util-middleware";
|
|
2
|
+
import { hydrate, isStaticSchema } from "../schemas/NormalizedSchema";
|
|
2
3
|
export const schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
|
|
3
|
-
|
|
4
|
+
let { operationSchema } = getSmithyContext(context);
|
|
5
|
+
if (isStaticSchema(operationSchema)) {
|
|
6
|
+
operationSchema = hydrate(operationSchema);
|
|
7
|
+
}
|
|
4
8
|
const endpoint = context.endpointV2?.url && config.urlParser
|
|
5
9
|
? async () => config.urlParser(context.endpointV2.url)
|
|
6
10
|
: config.endpoint;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { deref } from "../deref";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { error } from "./ErrorSchema";
|
|
3
|
+
import { list, ListSchema } from "./ListSchema";
|
|
4
|
+
import { map, MapSchema } from "./MapSchema";
|
|
5
|
+
import { op } from "./OperationSchema";
|
|
4
6
|
import { Schema } from "./Schema";
|
|
5
|
-
import {
|
|
7
|
+
import { simAdapter } from "./SimpleSchema";
|
|
8
|
+
import { struct, StructureSchema } from "./StructureSchema";
|
|
6
9
|
import { translateTraits } from "./translateTraits";
|
|
7
10
|
export class NormalizedSchema {
|
|
8
11
|
ref;
|
|
@@ -22,12 +25,14 @@ export class NormalizedSchema {
|
|
|
22
25
|
let _ref = ref;
|
|
23
26
|
let schema = ref;
|
|
24
27
|
this._isMemberSchema = false;
|
|
25
|
-
while (
|
|
28
|
+
while (isMemberSchema(_ref)) {
|
|
26
29
|
traitStack.push(_ref[1]);
|
|
27
30
|
_ref = _ref[0];
|
|
28
31
|
schema = deref(_ref);
|
|
29
32
|
this._isMemberSchema = true;
|
|
30
33
|
}
|
|
34
|
+
if (isStaticSchema(schema))
|
|
35
|
+
schema = hydrate(schema);
|
|
31
36
|
if (traitStack.length > 0) {
|
|
32
37
|
this.memberTraits = {};
|
|
33
38
|
for (let i = traitStack.length - 1; i >= 0; --i) {
|
|
@@ -66,7 +71,7 @@ export class NormalizedSchema {
|
|
|
66
71
|
if (sc instanceof NormalizedSchema) {
|
|
67
72
|
return sc;
|
|
68
73
|
}
|
|
69
|
-
if (
|
|
74
|
+
if (isMemberSchema(sc)) {
|
|
70
75
|
const [ns, traits] = sc;
|
|
71
76
|
if (ns instanceof NormalizedSchema) {
|
|
72
77
|
Object.assign(ns.getMergedTraits(), translateTraits(traits));
|
|
@@ -191,7 +196,7 @@ export class NormalizedSchema {
|
|
|
191
196
|
if (this.isStructSchema() && struct.memberNames.includes(memberName)) {
|
|
192
197
|
const i = struct.memberNames.indexOf(memberName);
|
|
193
198
|
const memberSchema = struct.memberList[i];
|
|
194
|
-
return member(
|
|
199
|
+
return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
|
|
195
200
|
}
|
|
196
201
|
if (this.isDocumentSchema()) {
|
|
197
202
|
return member([15, 0], memberName);
|
|
@@ -241,3 +246,16 @@ function member(memberSchema, memberName) {
|
|
|
241
246
|
const internalCtorAccess = NormalizedSchema;
|
|
242
247
|
return new internalCtorAccess(memberSchema, memberName);
|
|
243
248
|
}
|
|
249
|
+
export function hydrate(ss) {
|
|
250
|
+
const [id, ...rest] = ss;
|
|
251
|
+
return {
|
|
252
|
+
[0]: simAdapter,
|
|
253
|
+
[1]: list,
|
|
254
|
+
[2]: map,
|
|
255
|
+
[3]: struct,
|
|
256
|
+
[-3]: error,
|
|
257
|
+
[9]: op,
|
|
258
|
+
}[id].call(null, ...rest);
|
|
259
|
+
}
|
|
260
|
+
const isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
|
|
261
|
+
export const isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { TypeRegistry } from "../TypeRegistry";
|
|
2
1
|
export class Schema {
|
|
3
2
|
name;
|
|
4
3
|
namespace;
|
|
5
4
|
traits;
|
|
6
5
|
static assign(instance, values) {
|
|
7
6
|
const schema = Object.assign(instance, values);
|
|
8
|
-
TypeRegistry.for(schema.namespace).register(schema.name, schema);
|
|
9
7
|
return schema;
|
|
10
8
|
}
|
|
11
9
|
static [Symbol.hasInstance](lhs) {
|
|
@@ -12,3 +12,9 @@ export const sim = (namespace, name, schemaRef, traits) => Schema.assign(new Sim
|
|
|
12
12
|
traits,
|
|
13
13
|
schemaRef,
|
|
14
14
|
});
|
|
15
|
+
export const simAdapter = (namespace, name, traits, schemaRef) => Schema.assign(new SimpleSchema(), {
|
|
16
|
+
name,
|
|
17
|
+
namespace,
|
|
18
|
+
traits,
|
|
19
|
+
schemaRef,
|
|
20
|
+
});
|
|
@@ -3,6 +3,6 @@ export * from "./middleware-http-auth-scheme";
|
|
|
3
3
|
export * from "./middleware-http-signing";
|
|
4
4
|
export * from "./normalizeProvider";
|
|
5
5
|
export { createPaginator } from "./pagination/createPaginator";
|
|
6
|
-
export * from "./
|
|
6
|
+
export * from "./request-builder/requestBuilder";
|
|
7
7
|
export * from "./setFeature";
|
|
8
8
|
export * from "./util-identity-and-auth";
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
|
+
import type { Codec, Schema, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
2
3
|
/**
|
|
3
4
|
* @alpha
|
|
4
5
|
*/
|
|
5
|
-
export declare class CborCodec implements Codec<Uint8Array, Uint8Array> {
|
|
6
|
-
private serdeContext?;
|
|
6
|
+
export declare class CborCodec extends SerdeContext implements Codec<Uint8Array, Uint8Array> {
|
|
7
7
|
createSerializer(): CborShapeSerializer;
|
|
8
8
|
createDeserializer(): CborShapeDeserializer;
|
|
9
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* @alpha
|
|
13
12
|
*/
|
|
14
|
-
export declare class CborShapeSerializer implements ShapeSerializer {
|
|
15
|
-
private serdeContext?;
|
|
13
|
+
export declare class CborShapeSerializer extends SerdeContext implements ShapeSerializer {
|
|
16
14
|
private value;
|
|
17
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
18
15
|
write(schema: Schema, value: unknown): void;
|
|
19
16
|
/**
|
|
20
17
|
* Recursive serializer transform that copies and prepares the user input object
|
|
@@ -26,9 +23,7 @@ export declare class CborShapeSerializer implements ShapeSerializer {
|
|
|
26
23
|
/**
|
|
27
24
|
* @alpha
|
|
28
25
|
*/
|
|
29
|
-
export declare class CborShapeDeserializer implements ShapeDeserializer {
|
|
30
|
-
private serdeContext?;
|
|
31
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
26
|
+
export declare class CborShapeDeserializer extends SerdeContext implements ShapeDeserializer {
|
|
32
27
|
read(schema: Schema, bytes: Uint8Array): any;
|
|
33
28
|
/**
|
|
34
29
|
* Public because it's called by the protocol implementation to deserialize errors.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import type { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
|
+
import { SerdeContext } from "./SerdeContext";
|
|
4
5
|
/**
|
|
5
6
|
* Abstract base for HTTP-based client protocols.
|
|
6
7
|
*
|
|
7
8
|
* @alpha
|
|
8
9
|
*/
|
|
9
|
-
export declare abstract class HttpProtocol implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
10
|
+
export declare abstract class HttpProtocol extends SerdeContext implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
10
11
|
readonly options: {
|
|
11
12
|
defaultNamespace: string;
|
|
12
13
|
};
|
|
13
14
|
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
|
|
14
15
|
protected abstract deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
15
|
-
protected serdeContext?: SerdeFunctions;
|
|
16
16
|
protected constructor(options: {
|
|
17
17
|
defaultNamespace: string;
|
|
18
18
|
});
|
|
@@ -20,6 +20,9 @@ export declare abstract class HttpProtocol implements ClientProtocol<IHttpReques
|
|
|
20
20
|
abstract getPayloadCodec(): Codec<any, any>;
|
|
21
21
|
getRequestType(): new (...args: any[]) => IHttpRequest;
|
|
22
22
|
getResponseType(): new (...args: any[]) => IHttpResponse;
|
|
23
|
+
/**
|
|
24
|
+
* @override
|
|
25
|
+
*/
|
|
23
26
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
24
27
|
abstract serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
25
28
|
updateServiceEndpoint(request: IHttpRequest, endpoint: EndpointV2 | Endpoint): IHttpRequest;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ConfigurableSerdeContext, SerdeFunctions } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class SerdeContext implements ConfigurableSerdeContext {
|
|
6
|
+
protected serdeContext?: SerdeFunctions;
|
|
7
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
8
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { CodecSettings, Schema,
|
|
1
|
+
import type { CodecSettings, Schema, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* This deserializer reads strings.
|
|
4
5
|
*
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
7
|
-
export declare class FromStringShapeDeserializer implements ShapeDeserializer<string> {
|
|
8
|
+
export declare class FromStringShapeDeserializer extends SerdeContext implements ShapeDeserializer<string> {
|
|
8
9
|
private settings;
|
|
9
|
-
private serdeContext;
|
|
10
10
|
constructor(settings: CodecSettings);
|
|
11
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
12
11
|
read(_schema: Schema, data: string): any;
|
|
13
12
|
private base64ToUtf8;
|
|
14
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* This deserializer is a dispatcher that decides whether to use a string deserializer
|
|
4
5
|
* or a codec deserializer based on HTTP traits.
|
|
@@ -8,11 +9,13 @@ import type { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@
|
|
|
8
9
|
*
|
|
9
10
|
* @alpha
|
|
10
11
|
*/
|
|
11
|
-
export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>> implements ShapeDeserializer<string | Uint8Array> {
|
|
12
|
+
export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>> extends SerdeContext implements ShapeDeserializer<string | Uint8Array> {
|
|
12
13
|
private codecDeserializer;
|
|
13
14
|
private stringDeserializer;
|
|
14
|
-
private serdeContext;
|
|
15
15
|
constructor(codecDeserializer: CodecShapeDeserializer, codecSettings: CodecSettings);
|
|
16
|
+
/**
|
|
17
|
+
* @override
|
|
18
|
+
*/
|
|
16
19
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
17
20
|
read(schema: Schema, data: string | Uint8Array): any | Promise<any>;
|
|
18
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodecSettings, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
|
1
|
+
import type { CodecSettings, ConfigurableSerdeContext, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
|
2
2
|
import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
|
3
3
|
/**
|
|
4
4
|
* This serializer decides whether to dispatch to a string serializer or a codec serializer
|
|
@@ -9,11 +9,14 @@ import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
|
|
9
9
|
*
|
|
10
10
|
* @alpha
|
|
11
11
|
*/
|
|
12
|
-
export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>> implements ShapeSerializer<string | Uint8Array
|
|
12
|
+
export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>> implements ShapeSerializer<string | Uint8Array>, ConfigurableSerdeContext {
|
|
13
13
|
private codecSerializer;
|
|
14
14
|
private stringSerializer;
|
|
15
15
|
private buffer;
|
|
16
16
|
constructor(codecSerializer: CodecShapeSerializer, codecSettings: CodecSettings, stringSerializer?: ToStringShapeSerializer);
|
|
17
|
+
/**
|
|
18
|
+
* @override
|
|
19
|
+
*/
|
|
17
20
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
18
21
|
write(schema: ISchema, value: unknown): void;
|
|
19
22
|
flush(): string | Uint8Array;
|
package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import type { CodecSettings, Schema,
|
|
1
|
+
import type { CodecSettings, Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* Serializes a shape to string.
|
|
4
5
|
*
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
7
|
-
export declare class ToStringShapeSerializer implements ShapeSerializer<string> {
|
|
8
|
+
export declare class ToStringShapeSerializer extends SerdeContext implements ShapeSerializer<string> {
|
|
8
9
|
private settings;
|
|
9
10
|
private stringBuffer;
|
|
10
|
-
private serdeContext;
|
|
11
11
|
constructor(settings: CodecSettings);
|
|
12
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
13
12
|
write(schema: Schema, value: unknown): void;
|
|
14
13
|
flush(): string;
|
|
15
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Schema as ISchema } from "@smithy/types";
|
|
1
|
+
import type { Schema as ISchema, StaticErrorSchema } from "@smithy/types";
|
|
2
2
|
import type { ErrorSchema } from "./schemas/ErrorSchema";
|
|
3
3
|
/**
|
|
4
4
|
* A way to look up schema by their ShapeId values.
|
|
@@ -31,12 +31,12 @@ export declare class TypeRegistry {
|
|
|
31
31
|
/**
|
|
32
32
|
* Associates an error schema with its constructor.
|
|
33
33
|
*/
|
|
34
|
-
registerError(
|
|
34
|
+
registerError(es: ErrorSchema | StaticErrorSchema, ctor: any): void;
|
|
35
35
|
/**
|
|
36
|
-
* @param
|
|
36
|
+
* @param es - query.
|
|
37
37
|
* @returns Error constructor that extends the service's base exception.
|
|
38
38
|
*/
|
|
39
|
-
getErrorCtor(
|
|
39
|
+
getErrorCtor(es: ErrorSchema | StaticErrorSchema): any;
|
|
40
40
|
/**
|
|
41
41
|
* The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,
|
|
42
42
|
* because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which
|
|
@@ -50,7 +50,7 @@ export declare class TypeRegistry {
|
|
|
50
50
|
*
|
|
51
51
|
* @returns the synthetic base exception of the service namespace associated with this registry instance.
|
|
52
52
|
*/
|
|
53
|
-
getBaseException():
|
|
53
|
+
getBaseException(): StaticErrorSchema | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* @param predicate - criterion.
|
|
56
56
|
* @returns a schema in this registry matching the predicate.
|
|
@@ -61,5 +61,4 @@ export declare class TypeRegistry {
|
|
|
61
61
|
*/
|
|
62
62
|
clear(): void;
|
|
63
63
|
private normalizeShapeId;
|
|
64
|
-
private getNamespace;
|
|
65
64
|
}
|
package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject } from "@smithy/types";
|
|
1
|
+
import type { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject, StaticErrorSchema, StaticListSchema, StaticMapSchema, StaticOperationSchema, StaticSchema, StaticSimpleSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
import type { ErrorSchema } from "./ErrorSchema";
|
|
3
|
+
import { ListSchema } from "./ListSchema";
|
|
4
|
+
import { MapSchema } from "./MapSchema";
|
|
5
|
+
import type { OperationSchema } from "./OperationSchema";
|
|
6
|
+
import type { SimpleSchema } from "./SimpleSchema";
|
|
7
|
+
import { StructureSchema } from "./StructureSchema";
|
|
2
8
|
/**
|
|
3
9
|
* Wraps both class instances, numeric sentinel values, and member schema pairs.
|
|
4
10
|
* Presents a consistent interface for interacting with polymorphic schema representations.
|
|
@@ -121,3 +127,18 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
121
127
|
*/
|
|
122
128
|
structIterator(): Generator<[string, NormalizedSchema], undefined, undefined>;
|
|
123
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
* @returns a class instance version of a static schema.
|
|
133
|
+
*/
|
|
134
|
+
export declare function hydrate(ss: StaticSimpleSchema): SimpleSchema;
|
|
135
|
+
export declare function hydrate(ss: StaticListSchema): ListSchema;
|
|
136
|
+
export declare function hydrate(ss: StaticMapSchema): MapSchema;
|
|
137
|
+
export declare function hydrate(ss: StaticStructureSchema): StructureSchema;
|
|
138
|
+
export declare function hydrate(ss: StaticErrorSchema): ErrorSchema;
|
|
139
|
+
export declare function hydrate(ss: StaticOperationSchema): OperationSchema;
|
|
140
|
+
export declare function hydrate(ss: StaticSchema): SimpleSchema | ListSchema | MapSchema | StructureSchema | ErrorSchema | OperationSchema;
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
export declare const isStaticSchema: (sc: SchemaRef) => sc is StaticSchema;
|
|
@@ -19,3 +19,8 @@ export declare class SimpleSchema extends Schema implements TraitsSchema {
|
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
21
|
export declare const sim: (namespace: string, name: string, schemaRef: SchemaRef, traits: SchemaTraits) => SimpleSchema;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
26
|
+
export declare const simAdapter: (namespace: string, name: string, traits: SchemaTraits, schemaRef: SchemaRef) => SimpleSchema;
|
|
@@ -3,6 +3,6 @@ export * from "./middleware-http-auth-scheme";
|
|
|
3
3
|
export * from "./middleware-http-signing";
|
|
4
4
|
export * from "./normalizeProvider";
|
|
5
5
|
export { createPaginator } from "./pagination/createPaginator";
|
|
6
|
-
export * from "./
|
|
6
|
+
export * from "./request-builder/requestBuilder";
|
|
7
7
|
export * from "./setFeature";
|
|
8
8
|
export * from "./util-identity-and-auth";
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
|
+
import { Codec, Schema, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
2
3
|
/**
|
|
3
4
|
* @alpha
|
|
4
5
|
*/
|
|
5
|
-
export declare class CborCodec implements Codec<Uint8Array, Uint8Array> {
|
|
6
|
-
private serdeContext?;
|
|
6
|
+
export declare class CborCodec extends SerdeContext implements Codec<Uint8Array, Uint8Array> {
|
|
7
7
|
createSerializer(): CborShapeSerializer;
|
|
8
8
|
createDeserializer(): CborShapeDeserializer;
|
|
9
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* @alpha
|
|
13
12
|
*/
|
|
14
|
-
export declare class CborShapeSerializer implements ShapeSerializer {
|
|
15
|
-
private serdeContext?;
|
|
13
|
+
export declare class CborShapeSerializer extends SerdeContext implements ShapeSerializer {
|
|
16
14
|
private value;
|
|
17
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
18
15
|
write(schema: Schema, value: unknown): void;
|
|
19
16
|
/**
|
|
20
17
|
* Recursive serializer transform that copies and prepares the user input object
|
|
@@ -26,9 +23,7 @@ export declare class CborShapeSerializer implements ShapeSerializer {
|
|
|
26
23
|
/**
|
|
27
24
|
* @alpha
|
|
28
25
|
*/
|
|
29
|
-
export declare class CborShapeDeserializer implements ShapeDeserializer {
|
|
30
|
-
private serdeContext?;
|
|
31
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
26
|
+
export declare class CborShapeDeserializer extends SerdeContext implements ShapeDeserializer {
|
|
32
27
|
read(schema: Schema, bytes: Uint8Array): any;
|
|
33
28
|
/**
|
|
34
29
|
* Public because it's called by the protocol implementation to deserialize errors.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { EventStreamSerde } from "@smithy/core/event-streams";
|
|
2
2
|
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
3
|
import { ClientProtocol, Codec, Endpoint, EndpointBearer, EndpointV2, EventStreamMarshaller, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, Schema, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
|
|
4
|
+
import { SerdeContext } from "./SerdeContext";
|
|
4
5
|
/**
|
|
5
6
|
* Abstract base for HTTP-based client protocols.
|
|
6
7
|
*
|
|
7
8
|
* @alpha
|
|
8
9
|
*/
|
|
9
|
-
export declare abstract class HttpProtocol implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
10
|
+
export declare abstract class HttpProtocol extends SerdeContext implements ClientProtocol<IHttpRequest, IHttpResponse> {
|
|
10
11
|
readonly options: {
|
|
11
12
|
defaultNamespace: string;
|
|
12
13
|
};
|
|
13
14
|
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
|
|
14
15
|
protected abstract deserializer: ShapeDeserializer<string | Uint8Array>;
|
|
15
|
-
protected serdeContext?: SerdeFunctions;
|
|
16
16
|
protected constructor(options: {
|
|
17
17
|
defaultNamespace: string;
|
|
18
18
|
});
|
|
@@ -20,6 +20,9 @@ export declare abstract class HttpProtocol implements ClientProtocol<IHttpReques
|
|
|
20
20
|
abstract getPayloadCodec(): Codec<any, any>;
|
|
21
21
|
getRequestType(): new (...args: any[]) => IHttpRequest;
|
|
22
22
|
getResponseType(): new (...args: any[]) => IHttpResponse;
|
|
23
|
+
/**
|
|
24
|
+
* @override
|
|
25
|
+
*/
|
|
23
26
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
24
27
|
abstract serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
|
|
25
28
|
updateServiceEndpoint(request: IHttpRequest, endpoint: EndpointV2 | Endpoint): IHttpRequest;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfigurableSerdeContext, SerdeFunctions } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class SerdeContext implements ConfigurableSerdeContext {
|
|
6
|
+
protected serdeContext?: SerdeFunctions;
|
|
7
|
+
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
8
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { CodecSettings, Schema,
|
|
1
|
+
import { CodecSettings, Schema, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* This deserializer reads strings.
|
|
4
5
|
*
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
7
|
-
export declare class FromStringShapeDeserializer implements ShapeDeserializer<string> {
|
|
8
|
+
export declare class FromStringShapeDeserializer extends SerdeContext implements ShapeDeserializer<string> {
|
|
8
9
|
private settings;
|
|
9
|
-
private serdeContext;
|
|
10
10
|
constructor(settings: CodecSettings);
|
|
11
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
12
11
|
read(_schema: Schema, data: string): any;
|
|
13
12
|
private base64ToUtf8;
|
|
14
13
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* This deserializer is a dispatcher that decides whether to use a string deserializer
|
|
4
5
|
* or a codec deserializer based on HTTP traits.
|
|
@@ -8,11 +9,13 @@ import { CodecSettings, Schema, SerdeFunctions, ShapeDeserializer } from "@smith
|
|
|
8
9
|
*
|
|
9
10
|
* @alpha
|
|
10
11
|
*/
|
|
11
|
-
export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>> implements ShapeDeserializer<string | Uint8Array> {
|
|
12
|
+
export declare class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>> extends SerdeContext implements ShapeDeserializer<string | Uint8Array> {
|
|
12
13
|
private codecDeserializer;
|
|
13
14
|
private stringDeserializer;
|
|
14
|
-
private serdeContext;
|
|
15
15
|
constructor(codecDeserializer: CodecShapeDeserializer, codecSettings: CodecSettings);
|
|
16
|
+
/**
|
|
17
|
+
* @override
|
|
18
|
+
*/
|
|
16
19
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
17
20
|
read(schema: Schema, data: string | Uint8Array): any | Promise<any>;
|
|
18
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodecSettings, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
|
1
|
+
import { CodecSettings, ConfigurableSerdeContext, Schema as ISchema, SerdeFunctions, ShapeSerializer } from "@smithy/types";
|
|
2
2
|
import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
|
3
3
|
/**
|
|
4
4
|
* This serializer decides whether to dispatch to a string serializer or a codec serializer
|
|
@@ -9,11 +9,14 @@ import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
|
|
|
9
9
|
*
|
|
10
10
|
* @alpha
|
|
11
11
|
*/
|
|
12
|
-
export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>> implements ShapeSerializer<string | Uint8Array
|
|
12
|
+
export declare class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>> implements ShapeSerializer<string | Uint8Array>, ConfigurableSerdeContext {
|
|
13
13
|
private codecSerializer;
|
|
14
14
|
private stringSerializer;
|
|
15
15
|
private buffer;
|
|
16
16
|
constructor(codecSerializer: CodecShapeSerializer, codecSettings: CodecSettings, stringSerializer?: ToStringShapeSerializer);
|
|
17
|
+
/**
|
|
18
|
+
* @override
|
|
19
|
+
*/
|
|
17
20
|
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
18
21
|
write(schema: ISchema, value: unknown): void;
|
|
19
22
|
flush(): string | Uint8Array;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { CodecSettings, Schema,
|
|
1
|
+
import { CodecSettings, Schema, ShapeSerializer } from "@smithy/types";
|
|
2
|
+
import { SerdeContext } from "../SerdeContext";
|
|
2
3
|
/**
|
|
3
4
|
* Serializes a shape to string.
|
|
4
5
|
*
|
|
5
6
|
* @alpha
|
|
6
7
|
*/
|
|
7
|
-
export declare class ToStringShapeSerializer implements ShapeSerializer<string> {
|
|
8
|
+
export declare class ToStringShapeSerializer extends SerdeContext implements ShapeSerializer<string> {
|
|
8
9
|
private settings;
|
|
9
10
|
private stringBuffer;
|
|
10
|
-
private serdeContext;
|
|
11
11
|
constructor(settings: CodecSettings);
|
|
12
|
-
setSerdeContext(serdeContext: SerdeFunctions): void;
|
|
13
12
|
write(schema: Schema, value: unknown): void;
|
|
14
13
|
flush(): string;
|
|
15
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema as ISchema } from "@smithy/types";
|
|
1
|
+
import { Schema as ISchema, StaticErrorSchema } from "@smithy/types";
|
|
2
2
|
import { ErrorSchema } from "./schemas/ErrorSchema";
|
|
3
3
|
/**
|
|
4
4
|
* A way to look up schema by their ShapeId values.
|
|
@@ -31,12 +31,12 @@ export declare class TypeRegistry {
|
|
|
31
31
|
/**
|
|
32
32
|
* Associates an error schema with its constructor.
|
|
33
33
|
*/
|
|
34
|
-
registerError(
|
|
34
|
+
registerError(es: ErrorSchema | StaticErrorSchema, ctor: any): void;
|
|
35
35
|
/**
|
|
36
|
-
* @param
|
|
36
|
+
* @param es - query.
|
|
37
37
|
* @returns Error constructor that extends the service's base exception.
|
|
38
38
|
*/
|
|
39
|
-
getErrorCtor(
|
|
39
|
+
getErrorCtor(es: ErrorSchema | StaticErrorSchema): any;
|
|
40
40
|
/**
|
|
41
41
|
* The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,
|
|
42
42
|
* because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which
|
|
@@ -50,7 +50,7 @@ export declare class TypeRegistry {
|
|
|
50
50
|
*
|
|
51
51
|
* @returns the synthetic base exception of the service namespace associated with this registry instance.
|
|
52
52
|
*/
|
|
53
|
-
getBaseException():
|
|
53
|
+
getBaseException(): StaticErrorSchema | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* @param predicate - criterion.
|
|
56
56
|
* @returns a schema in this registry matching the predicate.
|
|
@@ -61,5 +61,4 @@ export declare class TypeRegistry {
|
|
|
61
61
|
*/
|
|
62
62
|
clear(): void;
|
|
63
63
|
private normalizeShapeId;
|
|
64
|
-
private getNamespace;
|
|
65
64
|
}
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject } from "@smithy/types";
|
|
1
|
+
import { MemberSchema, NormalizedSchema as INormalizedSchema, Schema as ISchema, SchemaRef, SchemaTraitsObject, StaticErrorSchema, StaticListSchema, StaticMapSchema, StaticOperationSchema, StaticSchema, StaticSimpleSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
import { ErrorSchema } from "./ErrorSchema";
|
|
3
|
+
import { ListSchema } from "./ListSchema";
|
|
4
|
+
import { MapSchema } from "./MapSchema";
|
|
5
|
+
import { OperationSchema } from "./OperationSchema";
|
|
6
|
+
import { SimpleSchema } from "./SimpleSchema";
|
|
7
|
+
import { StructureSchema } from "./StructureSchema";
|
|
2
8
|
/**
|
|
3
9
|
* Wraps both class instances, numeric sentinel values, and member schema pairs.
|
|
4
10
|
* Presents a consistent interface for interacting with polymorphic schema representations.
|
|
@@ -124,3 +130,18 @@ export declare class NormalizedSchema implements INormalizedSchema {
|
|
|
124
130
|
NormalizedSchema
|
|
125
131
|
], undefined, undefined>;
|
|
126
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @returns a class instance version of a static schema.
|
|
136
|
+
*/
|
|
137
|
+
export declare function hydrate(ss: StaticSimpleSchema): SimpleSchema;
|
|
138
|
+
export declare function hydrate(ss: StaticListSchema): ListSchema;
|
|
139
|
+
export declare function hydrate(ss: StaticMapSchema): MapSchema;
|
|
140
|
+
export declare function hydrate(ss: StaticStructureSchema): StructureSchema;
|
|
141
|
+
export declare function hydrate(ss: StaticErrorSchema): ErrorSchema;
|
|
142
|
+
export declare function hydrate(ss: StaticOperationSchema): OperationSchema;
|
|
143
|
+
export declare function hydrate(ss: StaticSchema): SimpleSchema | ListSchema | MapSchema | StructureSchema | ErrorSchema | OperationSchema;
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
export declare const isStaticSchema: (sc: SchemaRef) => sc is StaticSchema;
|
package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts
CHANGED
|
@@ -19,3 +19,8 @@ export declare class SimpleSchema extends Schema implements TraitsSchema {
|
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
21
|
export declare const sim: (namespace: string, name: string, schemaRef: SchemaRef, traits: SchemaTraits) => SimpleSchema;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
26
|
+
export declare const simAdapter: (namespace: string, name: string, traits: SchemaTraits, schemaRef: SchemaRef) => SimpleSchema;
|