import { IResource, IModelsRegistry } from '../../context'; export interface IResourcesResponse { items: IResource[]; count?: number; selector_doc?: any; total_count?: number; } /** * Resources response */ export declare class ResourcesResponse implements IResourcesResponse { static make(response: IResourcesResponse, mr?: IModelsRegistry): ResourcesResponse | null; static getMarshalMiddleware
(): (data: DT, mr?: IModelsRegistry | undefined) => ResourcesResponse; /** array of resources */ readonly items: IResource[]; /** count of resources returned */ readonly count?: number; /** queiried selector_doc */ readonly selector_doc?: any; /** total count of matched resources */ readonly total_count?: number; } /** post resources response. array of updated resources */ export interface IResourcesPostResponse { [index: number]: IResource; } /** resources delete response */ export interface IResourcesDeleteResponse { /** all dleteted ids, including deleted referres in entire referrer hierarchy, if any */ all_deleted_ids: string[]; /** delete success status for individual, exolicitly mentioned resources */ delete_status: { [id: string]: boolean; }; } /** @deprecated */ export interface IResourcesDeleteResponseOld { [index: number]: { deleted: boolean; deleted_resource_ids: string[]; }; } export interface IGraph { [_id: string]: IResource; } /** graph query response */ export interface IGraphResponse { /** id: doc map of all traversed&included resources. they normally have _reached_ids preserving traversal information */ graph: IGraph; /** id: doc map off ool data referred in resources of graph */ ool_data_graph?: IGraph; acls_graph?: { [id: string]: any; }; /** start node ids */ start_nodes_ids: string[]; /** order of resources inclusion */ graph_order?: string[]; } export declare class GraphResponse implements IGraphResponse { static make(response: IGraphResponse, mr?: IModelsRegistry): GraphResponse | null; static getMarshalMiddleware(): (data: IGraphResponse, mr?: IModelsRegistry | undefined) => GraphResponse; graph: IGraph; ool_data_graph?: IGraph; acls_graph?: { [id: string]: any; }; start_nodes_ids: string[]; graph_order: string[]; /** get resources reached from given resource in this graph traversal */ getReachedResources(resOrId: IResource | string, field: string): IResource[]; } export interface IGraphPostResponse { graph: { [id: string]: IResource | string; }; ool_data_graph: { [id: string]: IResource | string; }; } declare const _default: { ResourcesResponse: typeof ResourcesResponse; GraphResponse: typeof GraphResponse; }; export default _default;