import { AnyShape, ArrayShape, AssertIsShape, BinaryShape, BoolShape, EnumShape, LiteralShape, MapShape, NothingShape, NumberShape, SetShape, Shape, StringShape, TimestampShape, UnionShape } from '@punchcard/shape'; import { TypeClass, TypeShape } from '@punchcard/shape/lib/type'; export declare namespace AttributeValue { type Tag = typeof Tag; const Tag: unique symbol; interface ShapeOfProps { /** * Will represent all sets as lists. * @default false */ setAsList?: boolean; } type ShapeOf = T extends StringShape | TimestampShape ? typeof AttributeValue.String : T extends EnumShape ? AttributeValue.Enum : T extends NumberShape ? typeof AttributeValue.Number : T extends BoolShape ? typeof AttributeValue.Bool : T extends BinaryShape ? typeof AttributeValue.Binary : T extends NothingShape ? typeof AttributeValue.Nothing : T extends AnyShape ? AnyShape : T extends ArrayShape ? AttributeValue.List> : T extends MapShape ? AttributeValue.Map> : T extends SetShape ? Props['setAsList'] extends true ? AttributeValue.List> : I extends BinaryShape ? typeof AttributeValue.BinarySet : I extends StringShape ? typeof AttributeValue.StringSet : I extends NumberShape ? typeof AttributeValue.NumberSet : AttributeValue.List> : T extends TypeShape ? AttributeValue.Struct<{ [field in keyof Fields]: ShapeOf; }> : T extends UnionShape ? UnionShape<{ [i in keyof I]: ShapeOf, Props>; }> : T extends LiteralShape ? { [i in keyof I]: ShapeOf; }[keyof I] : T extends { [Tag]: infer T2; } ? T2 : AnyShape; /** * Derives a shape representing `T` in DynamoDB JSON. * * @param shape to derive a DynamoDB Shape for. */ function shapeOf(shape: T, props?: Props): ShapeOf; } export declare type AttributeValue = (AnyShape | typeof AttributeValue.Nothing | typeof AttributeValue.Binary | typeof AttributeValue.BinarySet | typeof AttributeValue.Bool | typeof AttributeValue.Number | typeof AttributeValue.NumberSet | typeof AttributeValue.String | typeof AttributeValue.StringSet | AttributeValue.List | AttributeValue.Map | AttributeValue.Struct); export declare namespace AttributeValue { const Nothing_base: TypeClass<{ NULL: LiteralShape; }, undefined>; export class Nothing extends Nothing_base { } const Binary_base: TypeClass<{ B: BinaryShape; }, undefined>; export class Binary extends Binary_base { } const BinarySet_base: TypeClass<{ BS: ArrayShape; }, undefined>; export class BinarySet extends BinarySet_base { } const Bool_base: TypeClass<{ BOOL: BoolShape; }, undefined>; export class Bool extends Bool_base { } const Number_base: TypeClass<{ N: StringShape; }, undefined>; export class Number extends Number_base { } const NumberSet_base: TypeClass<{ NS: ArrayShape; }, undefined>; export class NumberSet extends NumberSet_base { } const String_base: TypeClass<{ S: StringShape; }, undefined>; export class String extends String_base { } export interface Enum { S: E; } export const Enum: >(e: E) => TypeClass<{ S: E; }, undefined>; const StringSet_base: TypeClass<{ SS: ArrayShape; }, undefined>; export class StringSet extends StringSet_base { } export interface List extends TypeShape<{ L: ArrayShape; }> { } export const List: (item: T) => List; export interface Map extends TypeClass<{ M: MapShape; }> { } export const Map: (item: T) => Map; export interface StructFields { [fieldName: string]: AttributeValue; } export interface Struct extends TypeClass<{ M: TypeShape; }> { } export const Struct: (fields: F) => Struct; export {}; } //# sourceMappingURL=attribute.d.ts.map