import IServiceResponse from "./IServiceResponse"; import IFilePath from "./IFilePath"; export declare type NodeType = 'node' | 'immutable-text' | 'immutable-grid' | 'mutable-text' | 'image'; export declare const ALL_NODE_TYPES: NodeType[]; export declare const ROOT_ID = "/"; export declare const ROOT_LABEL = "Root"; export default interface INode { nodeId: string; label: string; nodeType: NodeType; filePath: IFilePath; children: INode[]; owner: string; public: boolean; } /** * Determines if a object is a valid Node. * * @param x: any type */ export declare function isNode(x: any): x is INode; export declare function isNodeArray(x: any): x is INode[]; /** * Helper function for dealing with INodes during testing. * * @param nodeId * @param label * @param filePath */ export declare function createNode(nodeId: string, label: string, filePath: IFilePath, userId: string, pub: boolean): INode; export declare function isNodeType(input: any): input is NodeType; /** * Tries to create an INode from any type. * Returns failure service response with error message if not valid INode. * * @param node: any type */ export declare function tryCreateNode(node: any): IServiceResponse;