import { Model } from "@decaf-ts/decorator-validation";
import { OperationKeys } from "../operations/constants";
import { IRepository } from "../interfaces/IRepository";
import { Context } from "../repository/Context";
/**
 * Marks the property as readonly.
 *
 * @param {string} [message] the error message. Defaults to {@link DEFAULT_ERROR_MESSAGES.READONLY.INVALID}
 *
 * @decorator readonly
 *
 * @category Decorators
 */
export declare function readonly(message?: string): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
export declare function timestampHandler<M extends Model, V extends IRepository<M>, Y = any>(this: V, context: Context<M>, data: Y, key: string, model: M): Promise<void>;
/**
 * Marks the property as timestamp.
 * Makes it {@link required}
 * Makes it a {@link date}
 *
 * Date Format:
 *
 * <pre>
 *      Using similar formatting as Moment.js, Class DateTimeFormatter (Java), and Class SimpleDateFormat (Java),
 *      I implemented a comprehensive solution formatDate(date, patternStr) where the code is easy to read and modify.
 *      You can display date, time, AM/PM, etc.
 *
 *      Date and Time Patterns
 *      yy = 2-digit year; yyyy = full year
 *      M = digit month; MM = 2-digit month; MMM = short month name; MMMM = full month name
 *      EEEE = full weekday name; EEE = short weekday name
 *      d = digit day; dd = 2-digit day
 *      h = hours am/pm; hh = 2-digit hours am/pm; H = hours; HH = 2-digit hours
 *      m = minutes; mm = 2-digit minutes; aaa = AM/PM
 *      s = seconds; ss = 2-digit seconds
 *      S = miliseconds
 * </pre>
 *
 * @param {string[]} operation The {@link DBOperations} to act on. Defaults to {@link DBOperations.CREATE_UPDATE}
 * @param {string} [format] The TimeStamp format. defaults to {@link DEFAULT_TIMESTAMP_FORMAT}
 * @param {{new: UpdateValidator}} [validator] defaults to {@link TimestampValidator}
 *
 * @decorator timestamp
 *
 * @category Decorators
 */
export declare function timestamp(operation?: OperationKeys[], format?: string): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
export declare function serializeOnCreateUpdate<T extends Model, V extends IRepository<T>, Y = any>(this: V, data: Y, key: string, model: T, oldModel: T): Promise<void>;
export declare function serializeAfterAll<T extends Model, V extends IRepository<T>, Y = any>(this: V, data: Y, key: string, model: T): Promise<void>;
/**
 * @summary Serialize Decorator
 * @description properties decorated will the serialized before stored in the db
 *
 * @function serialize
 *
 * @memberOf module:wallet-db.Decorators
 */
export declare function serialize(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
