@smithy/types
Advanced tools
| export {}; |
| import type { EndpointV2 } from "../endpoint"; | ||
| import type { HandlerExecutionContext } from "../middleware"; | ||
| import type { MetadataBearer } from "../response"; | ||
| import type { EndpointBearer, SerdeFunctions } from "../serde"; | ||
| import type { ConfigurableSerdeContext, NormalizedSchema, SchemaTraits, SimpleSchema, UnitSchema } from "./schema"; | ||
| import type { StaticSchema } from "./static-schemas"; | ||
| /** | ||
| * A schema is an object or value that describes how to serialize/deserialize data. | ||
| * @public | ||
| * @deprecated use $Schema | ||
| */ | ||
| export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema; | ||
| /** | ||
| * A schema "reference" is either a schema or a function that | ||
| * provides a schema. This is useful for lazy loading, and to allow | ||
| * code generation to define schema out of dependency order. | ||
| * @public | ||
| * @deprecated use $SchemaRef | ||
| */ | ||
| export type SchemaRef = Schema | (() => Schema); | ||
| /** | ||
| * A schema that has traits. | ||
| * | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface TraitsSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| } | ||
| /** | ||
| * Indicates the schema is a member of a parent Structure schema. | ||
| * It may also have a set of member traits distinct from its target shape's traits. | ||
| * @public | ||
| * @deprecated use $MemberSchema | ||
| */ | ||
| export type MemberSchema = [SchemaRef, SchemaTraits]; | ||
| /** | ||
| * Schema for the structure aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface StructureSchema extends TraitsSchema { | ||
| memberNames: string[]; | ||
| memberList: SchemaRef[]; | ||
| /** | ||
| * @deprecated structure member iteration will be linear on the memberNames and memberList arrays. | ||
| * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such. | ||
| */ | ||
| members?: Record<string, [SchemaRef, SchemaTraits]> | undefined; | ||
| } | ||
| /** | ||
| * Schema for the list aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface ListSchema extends TraitsSchema { | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for the map aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface MapSchema extends TraitsSchema { | ||
| keySchema: SchemaRef; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for an operation. | ||
| * @public | ||
| * @deprecated use StaticOperationSchema or $OperationSchema | ||
| */ | ||
| export interface OperationSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| input: SchemaRef; | ||
| output: SchemaRef; | ||
| } | ||
| /** | ||
| * Turns a serialization into a data object. | ||
| * @public | ||
| * @deprecated use $ShapeDeserializer | ||
| */ | ||
| export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| /** | ||
| * Optionally async. | ||
| */ | ||
| read(schema: Schema, data: SerializationType): any | Promise<any>; | ||
| } | ||
| /** | ||
| * Turns a data object into a serialization. | ||
| * @public | ||
| * @deprecated use $ShapeSerializer | ||
| */ | ||
| export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: Schema, value: unknown): void; | ||
| flush(): SerializationType; | ||
| } | ||
| /** | ||
| * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. | ||
| * | ||
| * @public | ||
| * @deprecated use $Codec | ||
| */ | ||
| export interface Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): ShapeSerializer<S>; | ||
| createDeserializer(): ShapeDeserializer<D>; | ||
| } | ||
| /** | ||
| * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object. | ||
| * @public | ||
| * @deprecated use $ClientProtocol | ||
| */ | ||
| export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| /** | ||
| * @returns the Smithy qualified shape id. | ||
| */ | ||
| getShapeId(): string; | ||
| getRequestType(): { | ||
| new (...args: any[]): Request; | ||
| }; | ||
| getResponseType(): { | ||
| new (...args: any[]): Response; | ||
| }; | ||
| /** | ||
| * @returns the payload codec if the requests/responses have a symmetric format. | ||
| * It otherwise may return null. | ||
| */ | ||
| getPayloadCodec(): Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| } |
| import { EndpointV2 } from "../endpoint"; | ||
| import { HandlerExecutionContext } from "../middleware"; | ||
| import { MetadataBearer } from "../response"; | ||
| import { EndpointBearer, SerdeFunctions } from "../serde"; | ||
| import { ConfigurableSerdeContext, NormalizedSchema, SchemaTraits, SimpleSchema, UnitSchema } from "./schema"; | ||
| import { StaticSchema } from "./static-schemas"; | ||
| /** | ||
| * A schema is an object or value that describes how to serialize/deserialize data. | ||
| * @public | ||
| * @deprecated use $Schema | ||
| */ | ||
| export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema; | ||
| /** | ||
| * A schema "reference" is either a schema or a function that | ||
| * provides a schema. This is useful for lazy loading, and to allow | ||
| * code generation to define schema out of dependency order. | ||
| * @public | ||
| * @deprecated use $SchemaRef | ||
| */ | ||
| export type SchemaRef = Schema | (() => Schema); | ||
| /** | ||
| * A schema that has traits. | ||
| * | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface TraitsSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| } | ||
| /** | ||
| * Indicates the schema is a member of a parent Structure schema. | ||
| * It may also have a set of member traits distinct from its target shape's traits. | ||
| * @public | ||
| * @deprecated use $MemberSchema | ||
| */ | ||
| export type MemberSchema = [ | ||
| SchemaRef, | ||
| SchemaTraits | ||
| ]; | ||
| /** | ||
| * Schema for the structure aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface StructureSchema extends TraitsSchema { | ||
| memberNames: string[]; | ||
| memberList: SchemaRef[]; | ||
| /** | ||
| * @deprecated structure member iteration will be linear on the memberNames and memberList arrays. | ||
| * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such. | ||
| */ | ||
| members?: Record<string, [ | ||
| SchemaRef, | ||
| SchemaTraits | ||
| ]> | undefined; | ||
| } | ||
| /** | ||
| * Schema for the list aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface ListSchema extends TraitsSchema { | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for the map aggregate type. | ||
| * @public | ||
| * @deprecated use static schema. | ||
| */ | ||
| export interface MapSchema extends TraitsSchema { | ||
| keySchema: SchemaRef; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for an operation. | ||
| * @public | ||
| * @deprecated use StaticOperationSchema or $OperationSchema | ||
| */ | ||
| export interface OperationSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| input: SchemaRef; | ||
| output: SchemaRef; | ||
| } | ||
| /** | ||
| * Turns a serialization into a data object. | ||
| * @public | ||
| * @deprecated use $ShapeDeserializer | ||
| */ | ||
| export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| /** | ||
| * Optionally async. | ||
| */ | ||
| read(schema: Schema, data: SerializationType): any | Promise<any>; | ||
| } | ||
| /** | ||
| * Turns a data object into a serialization. | ||
| * @public | ||
| * @deprecated use $ShapeSerializer | ||
| */ | ||
| export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: Schema, value: unknown): void; | ||
| flush(): SerializationType; | ||
| } | ||
| /** | ||
| * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. | ||
| * | ||
| * @public | ||
| * @deprecated use $Codec | ||
| */ | ||
| export interface Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): ShapeSerializer<S>; | ||
| createDeserializer(): ShapeDeserializer<D>; | ||
| } | ||
| /** | ||
| * A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object. | ||
| * @public | ||
| * @deprecated use $ClientProtocol | ||
| */ | ||
| export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| /** | ||
| * @returns the Smithy qualified shape id. | ||
| */ | ||
| getShapeId(): string; | ||
| getRequestType(): { | ||
| new (...args: any[]): Request; | ||
| }; | ||
| getResponseType(): { | ||
| new (...args: any[]): Response; | ||
| }; | ||
| /** | ||
| * @returns the payload codec if the requests/responses have a symmetric format. | ||
| * It otherwise may return null. | ||
| */ | ||
| getPayloadCodec(): Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| } |
+1
-0
@@ -25,2 +25,3 @@ export * from "./abort"; | ||
| export * from "./schema/schema"; | ||
| export * from "./schema/schema-deprecated"; | ||
| export * from "./schema/sentinels"; | ||
@@ -27,0 +28,0 @@ export * from "./schema/static-schemas"; |
@@ -25,2 +25,3 @@ export * from "./abort"; | ||
| export * from "./schema/schema"; | ||
| export * from "./schema/schema-deprecated"; | ||
| export * from "./schema/sentinels"; | ||
@@ -27,0 +28,0 @@ export * from "./schema/static-schemas"; |
@@ -10,5 +10,5 @@ import type { EndpointV2 } from "../endpoint"; | ||
| * A schema is an object or value that describes how to serialize/deserialize data. | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema; | ||
| export type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema; | ||
| /** | ||
@@ -25,12 +25,2 @@ * Traits attached to schema objects. | ||
| /** | ||
| * A schema that has traits. | ||
| * | ||
| * @public | ||
| */ | ||
| export interface TraitsSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| } | ||
| /** | ||
| * Simple schemas are those corresponding to simple Smithy types. | ||
@@ -57,3 +47,3 @@ * @see https://smithy.io/2.0/spec/simple-types.html | ||
| * | ||
| * @internal | ||
| * @alpha | ||
| */ | ||
@@ -108,49 +98,17 @@ export type UnitSchema = "unit"; | ||
| /** | ||
| * Schema for the structure aggregate type. | ||
| * @public | ||
| * Indicates the schema is a member of a parent Structure schema. | ||
| * It may also have a set of member traits distinct from its target shape's traits. | ||
| * @alpha | ||
| */ | ||
| export interface StructureSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| memberNames: string[]; | ||
| memberList: SchemaRef[]; | ||
| /** | ||
| * @deprecated structure member iteration will be linear on the memberNames and memberList arrays. | ||
| * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such. | ||
| */ | ||
| members?: Record<string, [SchemaRef, SchemaTraits]> | undefined; | ||
| } | ||
| export type $MemberSchema = [$SchemaRef, SchemaTraits]; | ||
| /** | ||
| * Schema for the list aggregate type. | ||
| * @public | ||
| */ | ||
| export interface ListSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for the map aggregate type. | ||
| * @public | ||
| */ | ||
| export interface MapSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| keySchema: SchemaRef; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * @public | ||
| */ | ||
| export type MemberSchema = [SchemaRef, SchemaTraits]; | ||
| /** | ||
| * Schema for an operation. | ||
| * | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export interface OperationSchema extends TraitsSchema { | ||
| export interface $OperationSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| input: SchemaRef; | ||
| output: SchemaRef; | ||
| input: $SchemaRef; | ||
| output: $SchemaRef; | ||
| } | ||
@@ -162,3 +120,3 @@ /** | ||
| export interface NormalizedSchema { | ||
| getSchema(): Schema; | ||
| getSchema(): $Schema; | ||
| getName(): string | undefined; | ||
@@ -194,5 +152,5 @@ isMemberSchema(): boolean; | ||
| * code generation to define schema out of dependency order. | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export type SchemaRef = Schema | (() => Schema); | ||
| export type $SchemaRef = $Schema | (() => $Schema); | ||
| /** | ||
@@ -203,5 +161,5 @@ * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. | ||
| */ | ||
| export interface Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): ShapeSerializer<S>; | ||
| createDeserializer(): ShapeDeserializer<D>; | ||
| export interface $Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): $ShapeSerializer<S>; | ||
| createDeserializer(): $ShapeDeserializer<D>; | ||
| } | ||
@@ -233,7 +191,7 @@ /** | ||
| */ | ||
| export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| export interface $ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| /** | ||
| * Optionally async. | ||
| */ | ||
| read(schema: Schema, data: SerializationType): any | Promise<any>; | ||
| read(schema: $Schema, data: SerializationType): any | Promise<any>; | ||
| } | ||
@@ -244,4 +202,4 @@ /** | ||
| */ | ||
| export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: Schema, value: unknown): void; | ||
| export interface $ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: $Schema, value: unknown): void; | ||
| flush(): SerializationType; | ||
@@ -253,3 +211,3 @@ } | ||
| */ | ||
| export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| export interface $ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| /** | ||
@@ -269,6 +227,6 @@ * @returns the Smithy qualified shape id. | ||
| */ | ||
| getPayloadCodec(): Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| getPayloadCodec(): $Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: $OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: $OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| } | ||
@@ -275,0 +233,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
| import type { SchemaRef, SchemaTraits } from "../schema/schema"; | ||
| import type { $SchemaRef, SchemaTraits } from "../schema/schema"; | ||
| /** | ||
@@ -41,11 +41,11 @@ * @alpha | ||
| */ | ||
| export type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef]; | ||
| export type StaticSimpleSchema = [StaticSchemaIdSimple, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef]; | ||
| /** | ||
| * @alpha | ||
| */ | ||
| export type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef]; | ||
| export type StaticListSchema = [StaticSchemaIdList, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef]; | ||
| /** | ||
| * @alpha | ||
| */ | ||
| export type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, SchemaRef, SchemaRef]; | ||
| export type StaticMapSchema = [StaticSchemaIdMap, ShapeNamespace, ShapeName, SchemaTraits, $SchemaRef, $SchemaRef]; | ||
| /** | ||
@@ -60,3 +60,3 @@ * @alpha | ||
| string[], | ||
| SchemaRef[] | ||
| $SchemaRef[] | ||
| ]; | ||
@@ -72,3 +72,3 @@ /** | ||
| string[], | ||
| SchemaRef[] | ||
| $SchemaRef[] | ||
| ]; | ||
@@ -83,4 +83,4 @@ /** | ||
| SchemaTraits, | ||
| SchemaRef, | ||
| SchemaRef | ||
| $SchemaRef, | ||
| $SchemaRef | ||
| ]; |
| import type { Endpoint } from "./http"; | ||
| import type { ClientProtocol } from "./schema/schema"; | ||
| import type { $ClientProtocol } from "./schema/schema"; | ||
| import type { RequestHandler } from "./transfer"; | ||
@@ -32,3 +32,3 @@ import type { Decoder, Encoder, Provider } from "./util"; | ||
| disableHostPrefix: boolean; | ||
| protocol?: ClientProtocol<any, any>; | ||
| protocol?: $ClientProtocol<any, any>; | ||
| } | ||
@@ -35,0 +35,0 @@ /** |
@@ -25,2 +25,3 @@ export * from "./abort"; | ||
| export * from "./schema/schema"; | ||
| export * from "./schema/schema-deprecated"; | ||
| export * from "./schema/sentinels"; | ||
@@ -27,0 +28,0 @@ export * from "./schema/static-schemas"; |
@@ -10,5 +10,5 @@ import { EndpointV2 } from "../endpoint"; | ||
| * A schema is an object or value that describes how to serialize/deserialize data. | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export type Schema = UnitSchema | TraitsSchema | SimpleSchema | ListSchema | MapSchema | StructureSchema | MemberSchema | OperationSchema | StaticSchema | NormalizedSchema; | ||
| export type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema; | ||
| /** | ||
@@ -25,12 +25,2 @@ * Traits attached to schema objects. | ||
| /** | ||
| * A schema that has traits. | ||
| * | ||
| * @public | ||
| */ | ||
| export interface TraitsSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| } | ||
| /** | ||
| * Simple schemas are those corresponding to simple Smithy types. | ||
@@ -57,3 +47,3 @@ * @see https://smithy.io/2.0/spec/simple-types.html | ||
| * | ||
| * @internal | ||
| * @alpha | ||
| */ | ||
@@ -117,43 +107,8 @@ export type UnitSchema = "unit"; | ||
| /** | ||
| * Schema for the structure aggregate type. | ||
| * @public | ||
| * Indicates the schema is a member of a parent Structure schema. | ||
| * It may also have a set of member traits distinct from its target shape's traits. | ||
| * @alpha | ||
| */ | ||
| export interface StructureSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| memberNames: string[]; | ||
| memberList: SchemaRef[]; | ||
| /** | ||
| * @deprecated structure member iteration will be linear on the memberNames and memberList arrays. | ||
| * It can be collected into a hashmap form on an ad-hoc basis, but will not initialize as such. | ||
| */ | ||
| members?: Record<string, [ | ||
| SchemaRef, | ||
| SchemaTraits | ||
| ]> | undefined; | ||
| } | ||
| /** | ||
| * Schema for the list aggregate type. | ||
| * @public | ||
| */ | ||
| export interface ListSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * Schema for the map aggregate type. | ||
| * @public | ||
| */ | ||
| export interface MapSchema extends TraitsSchema { | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| keySchema: SchemaRef; | ||
| valueSchema: SchemaRef; | ||
| } | ||
| /** | ||
| * @public | ||
| */ | ||
| export type MemberSchema = [ | ||
| SchemaRef, | ||
| export type $MemberSchema = [ | ||
| $SchemaRef, | ||
| SchemaTraits | ||
@@ -163,10 +118,10 @@ ]; | ||
| * Schema for an operation. | ||
| * | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export interface OperationSchema extends TraitsSchema { | ||
| export interface $OperationSchema { | ||
| namespace: string; | ||
| name: string; | ||
| traits: SchemaTraits; | ||
| input: SchemaRef; | ||
| output: SchemaRef; | ||
| input: $SchemaRef; | ||
| output: $SchemaRef; | ||
| } | ||
@@ -178,3 +133,3 @@ /** | ||
| export interface NormalizedSchema { | ||
| getSchema(): Schema; | ||
| getSchema(): $Schema; | ||
| getName(): string | undefined; | ||
@@ -213,5 +168,5 @@ isMemberSchema(): boolean; | ||
| * code generation to define schema out of dependency order. | ||
| * @public | ||
| * @alpha | ||
| */ | ||
| export type SchemaRef = Schema | (() => Schema); | ||
| export type $SchemaRef = $Schema | (() => $Schema); | ||
| /** | ||
@@ -222,5 +177,5 @@ * A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR. | ||
| */ | ||
| export interface Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): ShapeSerializer<S>; | ||
| createDeserializer(): ShapeDeserializer<D>; | ||
| export interface $Codec<S, D> extends ConfigurableSerdeContext { | ||
| createSerializer(): $ShapeSerializer<S>; | ||
| createDeserializer(): $ShapeDeserializer<D>; | ||
| } | ||
@@ -252,7 +207,7 @@ /** | ||
| */ | ||
| export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| export interface $ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| /** | ||
| * Optionally async. | ||
| */ | ||
| read(schema: Schema, data: SerializationType): any | Promise<any>; | ||
| read(schema: $Schema, data: SerializationType): any | Promise<any>; | ||
| } | ||
@@ -263,4 +218,4 @@ /** | ||
| */ | ||
| export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: Schema, value: unknown): void; | ||
| export interface $ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext { | ||
| write(schema: $Schema, value: unknown): void; | ||
| flush(): SerializationType; | ||
@@ -272,3 +227,3 @@ } | ||
| */ | ||
| export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| export interface $ClientProtocol<Request, Response> extends ConfigurableSerdeContext { | ||
| /** | ||
@@ -288,6 +243,6 @@ * @returns the Smithy qualified shape id. | ||
| */ | ||
| getPayloadCodec(): Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| getPayloadCodec(): $Codec<any, any>; | ||
| serializeRequest<Input extends object>(operationSchema: $OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<Request>; | ||
| updateServiceEndpoint(request: Request, endpoint: EndpointV2): Request; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| deserializeResponse<Output extends MetadataBearer>(operationSchema: $OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: Response): Promise<Output>; | ||
| } | ||
@@ -294,0 +249,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
| import { SchemaRef, SchemaTraits } from "../schema/schema"; | ||
| import { $SchemaRef, SchemaTraits } from "../schema/schema"; | ||
| /** | ||
@@ -46,3 +46,3 @@ * @alpha | ||
| SchemaTraits, | ||
| SchemaRef | ||
| $SchemaRef | ||
| ]; | ||
@@ -57,3 +57,3 @@ /** | ||
| SchemaTraits, | ||
| SchemaRef | ||
| $SchemaRef | ||
| ]; | ||
@@ -68,4 +68,4 @@ /** | ||
| SchemaTraits, | ||
| SchemaRef, | ||
| SchemaRef | ||
| $SchemaRef, | ||
| $SchemaRef | ||
| ]; | ||
@@ -81,3 +81,3 @@ /** | ||
| string[], | ||
| SchemaRef[] | ||
| $SchemaRef[] | ||
| ]; | ||
@@ -93,3 +93,3 @@ /** | ||
| string[], | ||
| SchemaRef[] | ||
| $SchemaRef[] | ||
| ]; | ||
@@ -104,4 +104,4 @@ /** | ||
| SchemaTraits, | ||
| SchemaRef, | ||
| SchemaRef | ||
| $SchemaRef, | ||
| $SchemaRef | ||
| ]; |
| import { Endpoint } from "./http"; | ||
| import { ClientProtocol } from "./schema/schema"; | ||
| import { $ClientProtocol } from "./schema/schema"; | ||
| import { RequestHandler } from "./transfer"; | ||
@@ -32,3 +32,3 @@ import { Decoder, Encoder, Provider } from "./util"; | ||
| disableHostPrefix: boolean; | ||
| protocol?: ClientProtocol<any, any>; | ||
| protocol?: $ClientProtocol<any, any>; | ||
| } | ||
@@ -35,0 +35,0 @@ /** |
+1
-1
| { | ||
| "name": "@smithy/types", | ||
| "version": "4.7.1", | ||
| "version": "4.8.0", | ||
| "scripts": { | ||
@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'", |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
276560
2.75%217
1.4%8125
2.46%