@nerdware/ddb-single-table
Version:
A schema-based DynamoDB modeling tool, high-level API, and type-generator built to supercharge single-table designs!⚡
31 lines • 1.04 kB
TypeScript
/**
* A base timestamp attribute config for a Model-schema's "createdAt" and/or "updatedAt" attributes.
*/
export declare const BASE_TIMESTAMP_ATTRIBUTE_CONFIG: {
readonly type: "Date";
readonly required: true;
readonly default: () => Date;
readonly validate: (value: any) => value is string | Date;
};
/**
* Timestamp attributes for a ModelSchema.
*/
export declare const TIMESTAMP_ATTRIBUTES: {
readonly createdAt: {
readonly type: "Date";
readonly required: true;
readonly default: () => Date;
readonly validate: (value: any) => value is string | Date;
};
readonly updatedAt: {
readonly transformValue: {
/** This toDB ensures `updatedAt` is updated on every write operation. */
readonly toDB: () => Date;
};
readonly type: "Date";
readonly required: true;
readonly default: () => Date;
readonly validate: (value: any) => value is string | Date;
};
};
//# sourceMappingURL=timestampAttributes.d.ts.map