import { Clazz } from './ff-const'; import { IFFUser } from './user-role-organization/user.interface'; export interface ICRUMSObject { guid?: string; clazz?: Clazz; _permissions?: IObjPermissions; createdBy?: string | IFFUser; updatedBy?: string | IFFUser; createdAt?: number; updatedAt?: number; } /** * The basic CRUMS object */ export declare class CRUMSObject implements ICRUMSObject { guid?: string; clazz?: Clazz; _permissions?: IObjPermissions; createdBy?: string | IFFUser; updatedBy?: string | IFFUser; createdAt?: number; updatedAt?: number; constructor(obj?: ICRUMSObject); } /** * Options to customize the result of GET operations */ export interface GetOptions { /** * @property if true, a summarized version of the object will be retrieved (useful to display objects in lists) */ onlyMetadata: boolean; /** * @property if true, children objects will also be retrieved */ getChildren: boolean; depth?: number; /** * @property if true, results retrieved will have a _permissions field describing the operations the current user and profile can perform on the object */ getPermissions: boolean; } /** * A set of filters for GET operations */ export interface SearchFilters { /** * @property the number of elements to get. count and start must be used together */ count?: number; /** * @property the first element to get. count and start must be used together * @example to get the first 10 elements count:10 start:0 * @example to get the next 10 elements count:10 start:10 */ start?: number; /** * @property properties to order the result set by. By default ascending order is used. * @example 'metadata.name desc' * @example 'metadata.type asc, metadata.name desc' */ orderBy?: string; /** * @property a filter using FF query operators - see http://fatfractal.com/v2/documentation/#document-noserver-queries-filters * @example "data.text contains_any 'kamikaze'" * */ customFilter?: string; } export interface IObjPermissions { create?: any; read?: any; update?: any; delete?: any; } export declare class ObjPermissions { create?: any; read?: any; update?: any; delete?: any; constructor(obj?: IObjPermissions); } export interface IQueryFilter { field: string; relation: string; value: string; } export declare class QueryFilter { field: string; relation: string; value: string; get qfield(): string; get qrelation(): string; get qvalue(): string; set qfield(newField: string); set qrelation(newRelation: string); set qvalue(newValue: string); constructor(obj?: IQueryFilter); }