Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/modern-paws-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@smithy/types": minor
"@smithy/core": minor
---

set release level for schemas
6 changes: 3 additions & 3 deletions packages/core/src/submodules/cbor/CborCodec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { cbor } from "./cbor";
import { dateToTag } from "./parseCborBody";

/**
* @alpha
* @public
*/
export class CborCodec extends SerdeContext implements Codec<Uint8Array, Uint8Array> {
public createSerializer(): CborShapeSerializer {
Expand All @@ -25,7 +25,7 @@ export class CborCodec extends SerdeContext implements Codec<Uint8Array, Uint8Ar
}

/**
* @alpha
* @public
*/
export class CborShapeSerializer extends SerdeContext implements ShapeSerializer {
private value: unknown;
Expand Down Expand Up @@ -115,7 +115,7 @@ export class CborShapeSerializer extends SerdeContext implements ShapeSerializer
}

/**
* @alpha
* @public
*/
export class CborShapeDeserializer extends SerdeContext implements ShapeDeserializer {
public read(schema: Schema, bytes: Uint8Array): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { loadSmithyRpcV2CborErrorCode } from "./parseCborBody";
/**
* Client protocol for Smithy RPCv2 CBOR.
*
* @alpha
* @public
*/
export class SmithyRpcV2CborProtocol extends RpcProtocol {
private codec = new CborCodec();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { fromUtf8 } from "@smithy/util-utf8";
* Separated module for async mixin of EventStream serde capability.
* This is used by the HttpProtocol base class from \@smithy/core/protocols.
*
* @alpha
* @public
*/
export class EventStreamSerde {
private readonly marshaller: EventStreamMarshaller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { HttpProtocol } from "./HttpProtocol";
* Base for HTTP-binding protocols. Downstream examples
* include AWS REST JSON and AWS REST XML.
*
* @alpha
* @public
*/
export abstract class HttpBindingProtocol extends HttpProtocol {
public async serializeRequest<Input extends object>(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/protocols/HttpProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SerdeContext } from "./SerdeContext";
/**
* Abstract base for HTTP-based client protocols.
*
* @alpha
* @public
*/
export abstract class HttpProtocol extends SerdeContext implements ClientProtocol<IHttpRequest, IHttpResponse> {
protected abstract serializer: ShapeSerializer<string | Uint8Array>;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/protocols/RpcProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { HttpProtocol } from "./HttpProtocol";
/**
* Abstract base for RPC-over-HTTP protocols.
*
* @alpha
* @public
*/
export abstract class RpcProtocol extends HttpProtocol {
public async serializeRequest<Input extends object>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { determineTimestampFormat } from "./determineTimestampFormat";
/**
* This deserializer reads strings.
*
* @alpha
* @public
*/
export class FromStringShapeDeserializer extends SerdeContext implements ShapeDeserializer<string> {
public constructor(private settings: CodecSettings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { FromStringShapeDeserializer } from "./FromStringShapeDeserializer";
* For example, in a JSON HTTP message, the deserialization of a field will differ depending on whether
* it is bound to the HTTP header (string) or body (JSON).
*
* @alpha
* @public
*/
export class HttpInterceptingShapeDeserializer<CodecShapeDeserializer extends ShapeDeserializer<any>>
extends SerdeContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ToStringShapeSerializer } from "./ToStringShapeSerializer";
* For example, a JavaScript array is serialized differently when being written
* to a REST JSON HTTP header (comma-delimited string) and a REST JSON HTTP body (JSON array).
*
* @alpha
* @public
*/
export class HttpInterceptingShapeSerializer<CodecShapeSerializer extends ShapeSerializer<string | Uint8Array>>
implements ShapeSerializer<string | Uint8Array>, ConfigurableSerdeContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { determineTimestampFormat } from "./determineTimestampFormat";
/**
* Serializes a shape to string.
*
* @alpha
* @public
*/
export class ToStringShapeSerializer extends SerdeContext implements ShapeSerializer<string> {
private stringBuffer = "";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/schema/TypeRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ErrorSchema } from "./schemas/ErrorSchema";
/**
* A way to look up schema by their ShapeId values.
*
* @alpha
* @public
*/
export class TypeRegistry {
public static readonly registries = new Map<string, TypeRegistry>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StructureSchema } from "./StructureSchema";
* and have an existing notion of a XYZServiceBaseException, the ErrorSchema differs from a StructureSchema
* by additionally holding the class reference for the corresponding ServiceException class.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class ErrorSchema extends StructureSchema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Schema } from "./Schema";
* A schema with a single member schema.
* The deprecated Set type may be represented as a list.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class ListSchema extends Schema implements IListSchema {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/schema/schemas/MapSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Schema } from "./Schema";

/**
* A schema with a key schema and value schema.
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class MapSchema extends Schema implements IMapSchema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { translateTraits } from "./translateTraits";
* Wraps both class instances, numeric sentinel values, and member schema pairs.
* Presents a consistent interface for interacting with polymorphic schema representations.
*
* @alpha
* @public
*/
export class NormalizedSchema implements INormalizedSchema {
// ========================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Schema } from "./Schema";
* This is used as a reference container for the input/output pair of schema, and for trait
* detection on the operation that may affect client protocol logic.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class OperationSchema extends Schema implements IOperationSchema {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/schema/schemas/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TypeRegistry } from "../TypeRegistry";
/**
* Abstract base for class-based Schema except NormalizedSchema.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export abstract class Schema implements TraitsSchema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Schema } from "./Schema";
* Although numeric values exist for most simple schema, this class is used for cases where traits are
* attached to those schema, since a single number cannot easily represent both a schema and its traits.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class SimpleSchema extends Schema implements TraitsSchema {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Schema } from "./Schema";
/**
* A structure schema has a known list of members. This is also used for unions.
*
* @alpha
* @internal
* @deprecated use StaticSchema
*/
export class StructureSchema extends Schema implements IStructureSchema {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/schema/schemas/sentinels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {

/**
* Schema sentinel runtime values.
* @alpha
* @internal
*
* @deprecated use inline numbers with type annotation to save space.
*/
Expand Down
24 changes: 12 additions & 12 deletions packages/types/src/schema/schema-deprecated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { StaticSchema } from "./static-schemas";

/**
* A schema is an object or value that describes how to serialize/deserialize data.
* @public
* @internal
* @deprecated use $Schema
*/
export type Schema =
Expand All @@ -26,15 +26,15 @@ export type Schema =
* 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
* @internal
* @deprecated use $SchemaRef
*/
export type SchemaRef = Schema | (() => Schema);

/**
* A schema that has traits.
*
* @public
* @internal
* @deprecated use static schema.
*/
export interface TraitsSchema {
Expand All @@ -46,14 +46,14 @@ export interface TraitsSchema {
/**
* 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
* @internal
* @deprecated use $MemberSchema
*/
export type MemberSchema = [SchemaRef, SchemaTraits];

/**
* Schema for the structure aggregate type.
* @public
* @internal
* @deprecated use static schema.
*/
export interface StructureSchema extends TraitsSchema {
Expand All @@ -69,7 +69,7 @@ export interface StructureSchema extends TraitsSchema {

/**
* Schema for the list aggregate type.
* @public
* @internal
* @deprecated use static schema.
*/
export interface ListSchema extends TraitsSchema {
Expand All @@ -78,7 +78,7 @@ export interface ListSchema extends TraitsSchema {

/**
* Schema for the map aggregate type.
* @public
* @internal
* @deprecated use static schema.
*/
export interface MapSchema extends TraitsSchema {
Expand All @@ -88,7 +88,7 @@ export interface MapSchema extends TraitsSchema {

/**
* Schema for an operation.
* @public
* @internal
* @deprecated use StaticOperationSchema or $OperationSchema
*/
export interface OperationSchema {
Expand All @@ -101,7 +101,7 @@ export interface OperationSchema {

/**
* Turns a serialization into a data object.
* @public
* @internal
* @deprecated use $ShapeDeserializer
*/
export interface ShapeDeserializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
Expand All @@ -113,7 +113,7 @@ export interface ShapeDeserializer<SerializationType = Uint8Array> extends Confi

/**
* Turns a data object into a serialization.
* @public
* @internal
* @deprecated use $ShapeSerializer
*/
export interface ShapeSerializer<SerializationType = Uint8Array> extends ConfigurableSerdeContext {
Expand All @@ -125,7 +125,7 @@ export interface ShapeSerializer<SerializationType = Uint8Array> extends Configu
/**
* A codec creates serializers and deserializers for some format such as JSON, XML, or CBOR.
*
* @public
* @internal
* @deprecated use $Codec
*/
export interface Codec<S, D> extends ConfigurableSerdeContext {
Expand All @@ -135,7 +135,7 @@ export interface Codec<S, D> extends ConfigurableSerdeContext {

/**
* A client protocol defines how to convert a message (e.g. HTTP request/response) to and from a data object.
* @public
* @internal
* @deprecated use $ClientProtocol
*/
export interface ClientProtocol<Request, Response> extends ConfigurableSerdeContext {
Expand Down
10 changes: 5 additions & 5 deletions packages/types/src/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { TraitBitVector } from "./traits";

/**
* A schema is an object or value that describes how to serialize/deserialize data.
* @alpha
* @public
*/
export type $Schema = UnitSchema | SimpleSchema | $MemberSchema | StaticSchema | NormalizedSchema;

Expand Down Expand Up @@ -74,7 +74,7 @@ export type BlobSchemas = BlobSchema | StreamingBlobSchema;
* Signal value for the Smithy void value. Typically used for
* operation input and outputs.
*
* @alpha
* @public
*/
export type UnitSchema = "unit";

Expand Down Expand Up @@ -133,13 +133,13 @@ export type SchemaTraitsObject = {
/**
* 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
* @public
*/
export type $MemberSchema = [$SchemaRef, SchemaTraits];

/**
* Schema for an operation.
* @alpha
* @public
*/
export interface $OperationSchema {
namespace: string;
Expand Down Expand Up @@ -186,7 +186,7 @@ export interface 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.
* @alpha
* @public
*/
export type $SchemaRef = $Schema | (() => $Schema);

Expand Down
Loading