The NodeData class is responsible for managing nodes, relations, metadata, and structures in a TypeScript project.

Implements

Constructors

Properties

lists: Map<string, _list> = ...
meta: Map<string, _metaContainer<NodeType>> = ...
nodes: Map<string, _node<NodeType>> = ...

contains the nodes of the project

relations: Map<`${string}-${string}`, _relation> = ...

contains the Node relations

structures: Map<string, _structure> = ...

Accessors

  • get addList(): (
        list: IListInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        {
            create_dt?: number;
            id?: string;
            meta?: {
                children?: any[];
                default?: boolean;
                description?: string
                | string[];
                external?: any;
                path?: any;
                ref_extern?: string | string[];
                type?: string;
                views?: {
                    bubble?: any;
                    forceDirectedTree?: any;
                    listView?: { views?: any };
                };
            };
            name?: string;
            token?: string;
            type?: "list";
            update_dt?: number;
            userGroup?: string[];
        },
    ]
  • Returns (
        list: IListInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        {
            create_dt?: number;
            id?: string;
            meta?: {
                children?: any[];
                default?: boolean;
                description?: string
                | string[];
                external?: any;
                path?: any;
                ref_extern?: string | string[];
                type?: string;
                views?: {
                    bubble?: any;
                    forceDirectedTree?: any;
                    listView?: { views?: any };
                };
            };
            name?: string;
            token?: string;
            type?: "list";
            update_dt?: number;
            userGroup?: string[];
        },
    ]

  • get addMetadata(): (
        meta: IMetaContainer<NodeType>,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        IMetaContainer<NodeType>,
    ]
  • Returns (
        meta: IMetaContainer<NodeType>,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        IMetaContainer<NodeType>,
    ]

  • get addStructure(): (
        structure: IStructureInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        _structure,
    ]
  • Returns (
        structure: IStructureInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        _structure,
    ]

  • get getListByToken(): (
        token: string,
    ) => {
        create_dt?: number;
        id?: string;
        meta?: {
            children?: any[];
            default?: boolean;
            description?: string | string[];
            external?: any;
            path?: any;
            ref_extern?: string | string[];
            type?: string;
            views?: {
                bubble?: any;
                forceDirectedTree?: any;
                listView?: { views?: any };
            };
        };
        name?: string;
        token?: string;
        type?: "list";
        update_dt?: number;
        userGroup?: string[];
    }
  • Returns (
        token: string,
    ) => {
        create_dt?: number;
        id?: string;
        meta?: {
            children?: any[];
            default?: boolean;
            description?: string | string[];
            external?: any;
            path?: any;
            ref_extern?: string | string[];
            type?: string;
            views?: {
                bubble?: any;
                forceDirectedTree?: any;
                listView?: { views?: any };
            };
        };
        name?: string;
        token?: string;
        type?: "list";
        update_dt?: number;
        userGroup?: string[];
    }

  • get jsonReady(): IDataManagerInitOptions
  • The function returns a JSON-ready object containing nodes, relations, meta, and structures.

    Returns IDataManagerInitOptions

    an object with four properties: "nodes", "relations", "meta", and "structures". Each property contains an array of values.

  • get queryListAll(): (
        query: Partial<
            {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string
                    | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "list";
                update_dt?: number;
                userGroup?: string[];
            },
        >,
    ) => {
        create_dt?: number;
        id?: string;
        meta?: {
            children?: any[];
            default?: boolean;
            description?: string
            | string[];
            external?: any;
            path?: any;
            ref_extern?: string | string[];
            type?: string;
            views?: {
                bubble?: any;
                forceDirectedTree?: any;
                listView?: { views?: any };
            };
        };
        name?: string;
        token?: string;
        type?: "list";
        update_dt?: number;
        userGroup?: string[];
    }[]
  • Returns (
        query: Partial<
            {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string
                    | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "list";
                update_dt?: number;
                userGroup?: string[];
            },
        >,
    ) => {
        create_dt?: number;
        id?: string;
        meta?: {
            children?: any[];
            default?: boolean;
            description?: string
            | string[];
            external?: any;
            path?: any;
            ref_extern?: string | string[];
            type?: string;
            views?: {
                bubble?: any;
                forceDirectedTree?: any;
                listView?: { views?: any };
            };
        };
        name?: string;
        token?: string;
        type?: "list";
        update_dt?: number;
        userGroup?: string[];
    }[]

  • get queryRelationAll(): (
        query: Partial<
            {
                create_dt?: number;
                f_id?: string;
                f_token?: string;
                r_type?: string;
                t_id?: string;
                t_token?: string;
                update_dt?: number;
            },
        >,
    ) => {
        create_dt?: number;
        f_id?: string;
        f_token?: string;
        r_type?: string;
        t_id?: string;
        t_token?: string;
        update_dt?: number;
    }[]
  • Returns (
        query: Partial<
            {
                create_dt?: number;
                f_id?: string;
                f_token?: string;
                r_type?: string;
                t_id?: string;
                t_token?: string;
                update_dt?: number;
            },
        >,
    ) => {
        create_dt?: number;
        f_id?: string;
        f_token?: string;
        r_type?: string;
        t_id?: string;
        t_token?: string;
        update_dt?: number;
    }[]

  • get queryStructureAll(): (
        query: Partial<
            {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string
                    | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "structure";
                update_dt?: number;
                userGroup?: string[];
            },
        >,
    ) => _structure[]
  • Returns (
        query: Partial<
            {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string
                    | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "structure";
                update_dt?: number;
                userGroup?: string[];
            },
        >,
    ) => _structure[]

  • get setList(): (
        list: IListInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        {
            create_dt?: number;
            id?: string;
            meta?: {
                children?: any[];
                default?: boolean;
                description?: string
                | string[];
                external?: any;
                path?: any;
                ref_extern?: string | string[];
                type?: string;
                views?: {
                    bubble?: any;
                    forceDirectedTree?: any;
                    listView?: { views?: any };
                };
            };
            name?: string;
            token?: string;
            type?: "list";
            update_dt?: number;
            userGroup?: string[];
        },
    ]
  • Returns (
        list: IListInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        {
            create_dt?: number;
            id?: string;
            meta?: {
                children?: any[];
                default?: boolean;
                description?: string
                | string[];
                external?: any;
                path?: any;
                ref_extern?: string | string[];
                type?: string;
                views?: {
                    bubble?: any;
                    forceDirectedTree?: any;
                    listView?: { views?: any };
                };
            };
            name?: string;
            token?: string;
            type?: "list";
            update_dt?: number;
            userGroup?: string[];
        },
    ]

  • get setMetadata(): (
        meta: IMetaContainer<NodeType>,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        IMetaContainer<NodeType>,
    ]
  • Returns (
        meta: IMetaContainer<NodeType>,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        IMetaContainer<NodeType>,
    ]

  • get setNode(): (
        node: {
            create_dt?: number;
            id?: string;
            name?: string;
            token?: string;
            type?: string;
            update_dt?: number;
            userGroup?: string[];
        },
    ) => NodeCreationResult
  • Returns (
        node: {
            create_dt?: number;
            id?: string;
            name?: string;
            token?: string;
            type?: string;
            update_dt?: number;
            userGroup?: string[];
        },
    ) => NodeCreationResult

  • get setStructure(): (
        structure: IStructureInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        _structure,
    ]
  • Returns (
        structure: IStructureInitOptions,
    ) => [
        {
            _id?: string;
            data?: Record<string, any>;
            delta?: Record<string, any>;
            eventTime?: number;
            method?: "POST" | "UPDATE" | "DELETE";
            operationId?: string;
            operationType?:
                | "node"
                | "structure"
                | "structure-child"
                | "relation"
                | "metadata"
                | "list"
                | "list-child";
            ref?: any;
        },
        _structure,
    ]

Methods

  • Parameters

    • event: DataManagerEvents
    • item:
          | {
              create_dt?: number;
              id?: string;
              name?: string;
              token?: string;
              type?: string;
              update_dt?: number;
              userGroup?: string[];
          }
          | {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: null;
              name?: string;
              token?: string;
              type?: "structure_child";
              update_dt?: number;
              userGroup?: string[];
          }
          | {
              create_dt?: number;
              id?: string;
              meta?: {
                  alias?: string;
                  assignee?: string;
                  author?: string;
                  buisnessPhones?: string;
                  category?: string;
                  children?: any[];
                  completeness?: number;
                  consistant?: number;
                  consistency?: string;
                  content?: string;
                  correctness?: number;
                  dataQuality?: string;
                  dateModified?: string;
                  dateModifiedValue?: number;
                  dbStatus?: string;
                  default?: boolean;
                  description?: string
                  | string[];
                  email?: string;
                  endDate?: string;
                  estimateCost?: string;
                  estimateTime?: string;
                  extension?: string;
                  external?: any;
                  fileSize?: number;
                  fileSizeRaw?: number;
                  fileType?: string;
                  first_name?: string;
                  groups?: string;
                  itemPath?: string;
                  jobTitle?: string;
                  key?: string;
                  last_name?: string;
                  linkItem?: string;
                  liveview?: string;
                  metatag?: string[];
                  mimeType?: string;
                  modifiedBy?: string;
                  modile?: string;
                  officeLocaltion?: string;
                  path?: any;
                  preferredLanguage?: string;
                  project_id?: string;
                  projectStatus?: string;
                  rat?: {
                      numericQuality?: string;
                      qualityDate?: string;
                      qualityLevel?: string;
                      qualitySummary?: string;
                  };
                  ref_extern?: string
                  | string[];
                  register_dt?: number;
                  remark?: string;
                  resolve_dt?: number;
                  site?: { id?: string; url?: string };
                  startDate?: string;
                  status?: string;
                  tags?: string[];
                  type?: string;
                  url?: string;
                  userPrincipalName?: string;
                  validationType?: string;
                  value?: string;
                  views?: {
                      bubble?: any;
                      forceDirectedTree?: any;
                      listView?: { views?: any };
                  };
              };
              token?: string;
              update_dt?: number;
          }
          | {
              create_dt?: number;
              f_id?: string;
              f_token?: string;
              r_type?: string;
              t_id?: string;
              t_token?: string;
              update_dt?: number;
          }

    Returns void

  • Parameters

    • ressource: "node" | "structure" | "relation" | "list" | "meta"

    Returns
        | NodeController
        | {
            addList?: undefined;
            addMeta?: undefined;
            addRelation: (relation: IRelation) => RelationCreationResult;
            addStructure?: undefined;
            deleteMeta?: undefined;
            deleteRelation: (token: string) => DeleteResult;
            getListByToken?: undefined;
            getStructureByToken?: undefined;
            hasMeta?: undefined;
            hasRelation: (token: string) => boolean;
            query: (
                query: Partial<
                    {
                        create_dt?: number;
                        f_id?: string;
                        f_token?: string;
                        r_type?: string;
                        t_id?: string;
                        t_token?: string;
                        update_dt?: number;
                    },
                >,
            ) => {
                create_dt?: number;
                f_id?: string;
                f_token?: string;
                r_type?: string;
                t_id?: string;
                t_token?: string;
                update_dt?: number;
            }[];
            queryChild?: undefined;
            setList?: undefined;
            setMeta?: undefined;
            setRelation: (relation: IRelation) => RelationCreationResult;
            setStructure?: undefined;
        }
        | {
            addList?: undefined;
            addMeta: (
                meta: IMetaContainer<NodeType>,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                IMetaContainer<NodeType>,
            ];
            addRelation?: undefined;
            addStructure?: undefined;
            deleteMeta: (token: string) => DeleteResult;
            deleteRelation?: undefined;
            getListByToken?: undefined;
            getStructureByToken?: undefined;
            hasMeta: (token: string) => boolean;
            hasRelation?: undefined;
            query: (query: Partial<IMeta>) => IMetaContainer<NodeType>[];
            queryChild?: undefined;
            setList?: undefined;
            setMeta: (
                meta: IMetaContainer<NodeType>,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                IMetaContainer<NodeType>,
            ];
            setRelation?: undefined;
            setStructure?: undefined;
        }
        | {
            addList?: undefined;
            addMeta?: undefined;
            addRelation?: undefined;
            addStructure: (
                structure: IStructureInitOptions,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                _structure,
            ];
            deleteMeta?: undefined;
            deleteRelation?: undefined;
            getListByToken?: undefined;
            getStructureByToken: (token: string) => _structure;
            hasMeta?: undefined;
            hasRelation?: undefined;
            query: (
                query: Partial<
                    {
                        create_dt?: number;
                        id?: string;
                        meta?: {
                            children?: any[];
                            default?: boolean;
                            description?: string
                            | string[];
                            external?: any;
                            path?: any;
                            ref_extern?: string | string[];
                            type?: string;
                            views?: {
                                bubble?: any;
                                forceDirectedTree?: any;
                                listView?: { views?: any };
                            };
                        };
                        name?: string;
                        token?: string;
                        type?: "structure";
                        update_dt?: number;
                        userGroup?: string[];
                    },
                >,
            ) => _structure[];
            queryChild: (node: any, nodeType?: string) => any;
            setList?: undefined;
            setMeta?: undefined;
            setRelation?: undefined;
            setStructure: (
                structure: IStructureInitOptions,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                _structure,
            ];
        }
        | {
            addList: (
                list: IListInitOptions,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                {
                    create_dt?: number;
                    id?: string;
                    meta?: {
                        children?: any[];
                        default?: boolean;
                        description?: string
                        | string[];
                        external?: any;
                        path?: any;
                        ref_extern?: string | string[];
                        type?: string;
                        views?: {
                            bubble?: any;
                            forceDirectedTree?: any;
                            listView?: { views?: any };
                        };
                    };
                    name?: string;
                    token?: string;
                    type?: "list";
                    update_dt?: number;
                    userGroup?: string[];
                },
            ];
            addMeta?: undefined;
            addRelation?: undefined;
            addStructure?: undefined;
            deleteMeta?: undefined;
            deleteRelation?: undefined;
            getListByToken: (
                token: string,
            ) => {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "list";
                update_dt?: number;
                userGroup?: string[];
            };
            getStructureByToken?: undefined;
            hasMeta?: undefined;
            hasRelation?: undefined;
            query: (
                query: Partial<
                    {
                        create_dt?: number;
                        id?: string;
                        meta?: {
                            children?: any[];
                            default?: boolean;
                            description?: string
                            | string[];
                            external?: any;
                            path?: any;
                            ref_extern?: string | string[];
                            type?: string;
                            views?: {
                                bubble?: any;
                                forceDirectedTree?: any;
                                listView?: { views?: any };
                            };
                        };
                        name?: string;
                        token?: string;
                        type?: "list";
                        update_dt?: number;
                        userGroup?: string[];
                    },
                >,
            ) => {
                create_dt?: number;
                id?: string;
                meta?: {
                    children?: any[];
                    default?: boolean;
                    description?: string
                    | string[];
                    external?: any;
                    path?: any;
                    ref_extern?: string | string[];
                    type?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: "list";
                update_dt?: number;
                userGroup?: string[];
            }[];
            queryChild: () => void;
            setList: (
                list: IListInitOptions,
            ) => [
                {
                    _id?: string;
                    data?: Record<string, any>;
                    delta?: Record<string, any>;
                    eventTime?: number;
                    method?: "POST" | "UPDATE" | "DELETE";
                    operationId?: string;
                    operationType?:
                        | "node"
                        | "structure"
                        | "structure-child"
                        | "relation"
                        | "metadata"
                        | "list"
                        | "list-child";
                    ref?: any;
                },
                {
                    create_dt?: number;
                    id?: string;
                    meta?: {
                        children?: any[];
                        default?: boolean;
                        description?: string
                        | string[];
                        external?: any;
                        path?: any;
                        ref_extern?: string | string[];
                        type?: string;
                        views?: {
                            bubble?: any;
                            forceDirectedTree?: any;
                            listView?: { views?: any };
                        };
                    };
                    name?: string;
                    token?: string;
                    type?: "list";
                    update_dt?: number;
                    userGroup?: string[];
                },
            ];
            setMeta?: undefined;
            setRelation?: undefined;
            setStructure?: undefined;
        }

    • NodeController
    • {
          addList?: undefined;
          addMeta?: undefined;
          addRelation: (relation: IRelation) => RelationCreationResult;
          addStructure?: undefined;
          deleteMeta?: undefined;
          deleteRelation: (token: string) => DeleteResult;
          getListByToken?: undefined;
          getStructureByToken?: undefined;
          hasMeta?: undefined;
          hasRelation: (token: string) => boolean;
          query: (
              query: Partial<
                  {
                      create_dt?: number;
                      f_id?: string;
                      f_token?: string;
                      r_type?: string;
                      t_id?: string;
                      t_token?: string;
                      update_dt?: number;
                  },
              >,
          ) => {
              create_dt?: number;
              f_id?: string;
              f_token?: string;
              r_type?: string;
              t_id?: string;
              t_token?: string;
              update_dt?: number;
          }[];
          queryChild?: undefined;
          setList?: undefined;
          setMeta?: undefined;
          setRelation: (relation: IRelation) => RelationCreationResult;
          setStructure?: undefined;
      }
    • {
          addList?: undefined;
          addMeta: (
              meta: IMetaContainer<NodeType>,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              IMetaContainer<NodeType>,
          ];
          addRelation?: undefined;
          addStructure?: undefined;
          deleteMeta: (token: string) => DeleteResult;
          deleteRelation?: undefined;
          getListByToken?: undefined;
          getStructureByToken?: undefined;
          hasMeta: (token: string) => boolean;
          hasRelation?: undefined;
          query: (query: Partial<IMeta>) => IMetaContainer<NodeType>[];
          queryChild?: undefined;
          setList?: undefined;
          setMeta: (
              meta: IMetaContainer<NodeType>,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              IMetaContainer<NodeType>,
          ];
          setRelation?: undefined;
          setStructure?: undefined;
      }
    • {
          addList?: undefined;
          addMeta?: undefined;
          addRelation?: undefined;
          addStructure: (
              structure: IStructureInitOptions,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              _structure,
          ];
          deleteMeta?: undefined;
          deleteRelation?: undefined;
          getListByToken?: undefined;
          getStructureByToken: (token: string) => _structure;
          hasMeta?: undefined;
          hasRelation?: undefined;
          query: (
              query: Partial<
                  {
                      create_dt?: number;
                      id?: string;
                      meta?: {
                          children?: any[];
                          default?: boolean;
                          description?: string
                          | string[];
                          external?: any;
                          path?: any;
                          ref_extern?: string | string[];
                          type?: string;
                          views?: {
                              bubble?: any;
                              forceDirectedTree?: any;
                              listView?: { views?: any };
                          };
                      };
                      name?: string;
                      token?: string;
                      type?: "structure";
                      update_dt?: number;
                      userGroup?: string[];
                  },
              >,
          ) => _structure[];
          queryChild: (node: any, nodeType?: string) => any;
          setList?: undefined;
          setMeta?: undefined;
          setRelation?: undefined;
          setStructure: (
              structure: IStructureInitOptions,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              _structure,
          ];
      }
      • OptionaladdList?: undefined
      • OptionaladdMeta?: undefined
      • OptionaladdRelation?: undefined
      • addStructure: (
            structure: IStructureInitOptions,
        ) => [
            {
                _id?: string;
                data?: Record<string, any>;
                delta?: Record<string, any>;
                eventTime?: number;
                method?: "POST" | "UPDATE" | "DELETE";
                operationId?: string;
                operationType?:
                    | "node"
                    | "structure"
                    | "structure-child"
                    | "relation"
                    | "metadata"
                    | "list"
                    | "list-child";
                ref?: any;
            },
            _structure,
        ]
      • OptionaldeleteMeta?: undefined
      • OptionaldeleteRelation?: undefined
      • OptionalgetListByToken?: undefined
      • getStructureByToken: (token: string) => _structure
      • OptionalhasMeta?: undefined
      • OptionalhasRelation?: undefined
      • query: (
            query: Partial<
                {
                    create_dt?: number;
                    id?: string;
                    meta?: {
                        children?: any[];
                        default?: boolean;
                        description?: string
                        | string[];
                        external?: any;
                        path?: any;
                        ref_extern?: string | string[];
                        type?: string;
                        views?: {
                            bubble?: any;
                            forceDirectedTree?: any;
                            listView?: { views?: any };
                        };
                    };
                    name?: string;
                    token?: string;
                    type?: "structure";
                    update_dt?: number;
                    userGroup?: string[];
                },
            >,
        ) => _structure[]
      • queryChild: (node: any, nodeType?: string) => any
      • OptionalsetList?: undefined
      • OptionalsetMeta?: undefined
      • OptionalsetRelation?: undefined
      • setStructure: (
            structure: IStructureInitOptions,
        ) => [
            {
                _id?: string;
                data?: Record<string, any>;
                delta?: Record<string, any>;
                eventTime?: number;
                method?: "POST" | "UPDATE" | "DELETE";
                operationId?: string;
                operationType?:
                    | "node"
                    | "structure"
                    | "structure-child"
                    | "relation"
                    | "metadata"
                    | "list"
                    | "list-child";
                ref?: any;
            },
            _structure,
        ]
    • {
          addList: (
              list: IListInitOptions,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              {
                  create_dt?: number;
                  id?: string;
                  meta?: {
                      children?: any[];
                      default?: boolean;
                      description?: string
                      | string[];
                      external?: any;
                      path?: any;
                      ref_extern?: string | string[];
                      type?: string;
                      views?: {
                          bubble?: any;
                          forceDirectedTree?: any;
                          listView?: { views?: any };
                      };
                  };
                  name?: string;
                  token?: string;
                  type?: "list";
                  update_dt?: number;
                  userGroup?: string[];
              },
          ];
          addMeta?: undefined;
          addRelation?: undefined;
          addStructure?: undefined;
          deleteMeta?: undefined;
          deleteRelation?: undefined;
          getListByToken: (
              token: string,
          ) => {
              create_dt?: number;
              id?: string;
              meta?: {
                  children?: any[];
                  default?: boolean;
                  description?: string | string[];
                  external?: any;
                  path?: any;
                  ref_extern?: string | string[];
                  type?: string;
                  views?: {
                      bubble?: any;
                      forceDirectedTree?: any;
                      listView?: { views?: any };
                  };
              };
              name?: string;
              token?: string;
              type?: "list";
              update_dt?: number;
              userGroup?: string[];
          };
          getStructureByToken?: undefined;
          hasMeta?: undefined;
          hasRelation?: undefined;
          query: (
              query: Partial<
                  {
                      create_dt?: number;
                      id?: string;
                      meta?: {
                          children?: any[];
                          default?: boolean;
                          description?: string
                          | string[];
                          external?: any;
                          path?: any;
                          ref_extern?: string | string[];
                          type?: string;
                          views?: {
                              bubble?: any;
                              forceDirectedTree?: any;
                              listView?: { views?: any };
                          };
                      };
                      name?: string;
                      token?: string;
                      type?: "list";
                      update_dt?: number;
                      userGroup?: string[];
                  },
              >,
          ) => {
              create_dt?: number;
              id?: string;
              meta?: {
                  children?: any[];
                  default?: boolean;
                  description?: string
                  | string[];
                  external?: any;
                  path?: any;
                  ref_extern?: string | string[];
                  type?: string;
                  views?: {
                      bubble?: any;
                      forceDirectedTree?: any;
                      listView?: { views?: any };
                  };
              };
              name?: string;
              token?: string;
              type?: "list";
              update_dt?: number;
              userGroup?: string[];
          }[];
          queryChild: () => void;
          setList: (
              list: IListInitOptions,
          ) => [
              {
                  _id?: string;
                  data?: Record<string, any>;
                  delta?: Record<string, any>;
                  eventTime?: number;
                  method?: "POST" | "UPDATE" | "DELETE";
                  operationId?: string;
                  operationType?:
                      | "node"
                      | "structure"
                      | "structure-child"
                      | "relation"
                      | "metadata"
                      | "list"
                      | "list-child";
                  ref?: any;
              },
              {
                  create_dt?: number;
                  id?: string;
                  meta?: {
                      children?: any[];
                      default?: boolean;
                      description?: string
                      | string[];
                      external?: any;
                      path?: any;
                      ref_extern?: string | string[];
                      type?: string;
                      views?: {
                          bubble?: any;
                          forceDirectedTree?: any;
                          listView?: { views?: any };
                      };
                  };
                  name?: string;
                  token?: string;
                  type?: "list";
                  update_dt?: number;
                  userGroup?: string[];
              },
          ];
          setMeta?: undefined;
          setRelation?: undefined;
          setStructure?: undefined;
      }
  • F1.2.2 Returns an array of nodes corresponding to the nodeType

    Parameters

    Returns {
        create_dt?: number;
        id?: string;
        name?: string;
        token?: string;
        type?: string;
        update_dt?: number;
        userGroup?: string[];
    }[]

  • Parameters

    • token: string

    Returns {
        create_dt?: number;
        f_id?: string;
        f_token?: string;
        r_type?: string;
        t_id?: string;
        t_token?: string;
        update_dt?: number;
    }[]

  • Parameters

    • token: string

    Returns {
        create_dt?: number;
        f_id?: string;
        f_token?: string;
        r_type?: string;
        t_id?: string;
        t_token?: string;
        update_dt?: number;
    }[]

  • The above code is a TypeScript function called queryNodeStructure. It takes in a node object and an optional nodeType string as parameters.

    Parameters

    • node: any
    • OptionalnodeType: string

    Returns any

  • The above code is a TypeScript function called queryNodeToStructure. It takes in a starting node and an optional node type as parameters.

    Parameters

    • startingNode: {
          create_dt?: number;
          id?: string;
          name?: string;
          token?: string;
          type?: string;
          update_dt?: number;
          userGroup?: string[];
      }
    • OptionalnodeType: string

    Returns ((string | number | string[])[] | _relation[])[]