package nat; import kiss.Prelude; import kiss.List; import kiss.Operand; import haxe.Constraints; import uuid.Uuid; enum CommandArgType { SelectedEntry; SelectedEntries(min:Null, max:Null); Text(maxLength:Null); // max length is a float so Math.POSITIVE_INFINITY can be used VarText(maxLength:Null); Number(min:Null, max:Null, inStepsOf:Null); OneEntry; // This constructor must be disambiguated from the typedef "Entry" Entries(min:Null, max:Null); } typedef CommandArg = { name:String, type:CommandArgType }; typedef Command = { args:Array, handler:Function // Command handlers need to return a ChangeSet }; typedef ChangeSet = Array; @:build(kiss.Kiss.build()) class ArchiveController {}