import { Constructable } from '../internal/types.mjs'; export type AttributeConfig = { /** Defines the DynamoDB table column name */ name?: string; /** * Defines to which type the property is mapped to. This applies for read and write operations. * * When using primitve types {@link string}, {@link number} or {@link boolean} this can be omitted. * This is needed if you want to use types like f.e. {@link Set}. */ type?: Constructable; /** Use this attribute as partitionKey value; if 'name' was provided it has to match the DynamoDB partitionKey name. */ partitionKey?: true | false; /** Use this attribute as sortKey value; if 'name' was provided it has to match the DynamoDB sortKey name. */ sortKey?: true | false; }; /** * Declare a class member as persistent attribute in the DynamoDB table. Only those will be red/written. * Only exception are members used in key expressions. Those will be automatically set by the repository. * * ### Example * ```ts * Attribute({ * name: 'attribute_1', // column name will be 'attribute_1' * type: Set, // value will be de-/serialized as Set * partitionKey: true, // shortcut for using as partitionKey; DynamoDB partitionKey column will be named 'attribute_1' * sortKey: true // same rule * }) * ``` * @param config optional configuration */ export declare const Attribute: (config?: AttributeConfig) => (prototype: any, property: string) => void;