declare enum FieldType { Boolean = 1, Byte = 2, Short = 3, Integer = 4, Long = 5, Float = 6, Double = 7, ByteArray = 8, String = 9, Date = 10, Text = 11, IntAutoIncrement = 12, LongAutoIncrement = 13, Unknown = 14 } declare namespace FieldTypeNamespace { function getFieldType(type: string): FieldType; function valueOf(type: FieldType): number; function toString(type: number): string; } declare enum UserRole { World = "World", Authenticated = "Authenticated", Creator = "Creator", Administrator = "Administrator" } declare namespace UserRoleNamespace { function getUserRole(role: string): any; } declare enum UserRight { None = 0, Read = 1, Upsert = 2, Delete = 4 } declare namespace UserRightNamespace { function getUserRight(right: string): UserRight; function getAllUserRight(rights: string[]): number; function checkUserRight(expect: UserRight | number, right: UserRight): boolean; function composeUserRight(rights: number[]): number; } export { UserRight, UserRole, FieldType, UserRightNamespace, UserRoleNamespace, FieldTypeNamespace };