19 lines
793 B
TypeScript
19 lines
793 B
TypeScript
import { String, Price } from 'oak-domain/lib/types/DataType';
|
|
import { AbleAction, AbleState } from 'oak-domain/lib/actions/action';
|
|
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
|
import { ActionDef } from 'oak-domain/lib/types/Action';
|
|
export interface Schema extends EntityShape {
|
|
total: Price;
|
|
avail: Price;
|
|
entity?: String<32>;
|
|
entityId?: String<64>;
|
|
}
|
|
export type PayAction = 'charge' | 'withdraw' | 'cost' | 'refund' | 'loan' | 'repay';
|
|
export type Action = AbleAction | PayAction;
|
|
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
|
export type Relation = 'owner' | 'audit';
|
|
export declare const entityDesc: EntityDesc<Schema, Action, Relation, {
|
|
ableState: AbleState;
|
|
}>;
|