oak-domain/lib/entities/Oper.d.ts

22 lines
673 B
TypeScript

import { String, Datetime } from '../types/DataType';
import { EntityShape } from '../types/Entity';
import { Schema as User } from './User';
import { Schema as Log } from './Log';
import { ActionDef } from '../types/Action';
export interface Schema extends EntityShape {
action: String<24>;
data: Object;
filter?: Object;
extra?: Object;
operator?: User;
targetEntity: String<32>;
bornAt?: Datetime;
log?: Log;
undoData?: Object;
}
export type IState = 'normal' | 'rollbacked';
export type State = IState;
export type IAction = 'undo' | 'redo';
export type Action = IAction;
export declare const IActionDef: ActionDef<IAction, IState>;