@infrasoftbe/vnv-sdk
    Preparing search index...

    Class _dataManager

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

    Implements

    Index

    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" | "DELETE" | "UPDATE";
              operationId?: string;
              operationType?:
                  | "structure"
                  | "list"
                  | "node"
                  | "structure-child"
                  | "relation"
                  | "metadata"
                  | "list-child";
              ref?: any;
          },
          _list,
      ]

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

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

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

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

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

    • 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 queryRelationAll(): (
          query: Partial,
      ) => {
          create_dt?: number;
          f_id?: string;
          f_token?: string;
          r_id?: 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_id?: string;
          r_type?: string;
          t_id?: string;
          t_token?: string;
          update_dt?: number;
      }[]

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

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

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

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

    • get setNode(): (
          node: {
              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;
                  email?: string;
                  endDate?: string;
                  estimateCost?: string;
                  estimateTime?: string;
                  extension?: string;
                  external?: {
                      excel?: { token?: string };
                      graph365?: { id?: string; url?: string };
                      jira?: { id?: string; url?: string };
                      relatics?: { id?: string; url?: string };
                      sharepoint?: { id?: string; url?: string };
                      testlink?: { id?: string; url?: string };
                  };
                  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?: string[];
                  preferredLanguage?: string;
                  project_id?: string;
                  projectStatus?: string;
                  rat?: {
                      numericQuality?: string;
                      qualityDate?: string;
                      qualityLevel?: string;
                      qualitySummary?: string;
                  };
                  ref_extern?: string;
                  register_dt?: number;
                  remark?: string;
                  resolve_dt?: number;
                  site?: { id?: string; url?: string };
                  startDate?: string;
                  status?: string;
                  tags?: string[];
                  type?: string;
                  url?: string;
                  userGroup?: string[];
                  userPrincipalName?: string;
                  validationType?: string;
                  value?: string;
                  views?: {
                      bubble?: any;
                      forceDirectedTree?: any;
                      listView?: { views?: any };
                  };
              };
              name?: string;
              token?: string;
              type?: | "object"
              | "attachement"
              | "order"
              | "deliverable"
              | "contact"
              | "work"
              | "worklog"
              | "entity"
              | "material"
              | "requirement"
              | "register"
              | "test"
              | "file"
              | "functional"
              | "structure"
              | "product"
              | "process"
              | "role"
              | "right"
              | "group"
              | "invoice"
              | "user"
              | "risk"
              | "descision"
              | "action"
              | "list"
              | "project"
              | "system"
              | "application_component"
              | "test_project"
              | "test_build"
              | "test_plan"
              | "test_suite"
              | "test_case"
              | "test_case_execution"
              | "structure_child"
              | "list_child";
              update_dt?: number;
          },
      ) => NodeCreationResult

      Returns (
          node: {
              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;
                  email?: string;
                  endDate?: string;
                  estimateCost?: string;
                  estimateTime?: string;
                  extension?: string;
                  external?: {
                      excel?: { token?: string };
                      graph365?: { id?: string; url?: string };
                      jira?: { id?: string; url?: string };
                      relatics?: { id?: string; url?: string };
                      sharepoint?: { id?: string; url?: string };
                      testlink?: { id?: string; url?: string };
                  };
                  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?: string[];
                  preferredLanguage?: string;
                  project_id?: string;
                  projectStatus?: string;
                  rat?: {
                      numericQuality?: string;
                      qualityDate?: string;
                      qualityLevel?: string;
                      qualitySummary?: string;
                  };
                  ref_extern?: string;
                  register_dt?: number;
                  remark?: string;
                  resolve_dt?: number;
                  site?: { id?: string; url?: string };
                  startDate?: string;
                  status?: string;
                  tags?: string[];
                  type?: string;
                  url?: string;
                  userGroup?: string[];
                  userPrincipalName?: string;
                  validationType?: string;
                  value?: string;
                  views?: {
                      bubble?: any;
                      forceDirectedTree?: any;
                      listView?: { views?: any };
                  };
              };
              name?: string;
              token?: string;
              type?: | "object"
              | "attachement"
              | "order"
              | "deliverable"
              | "contact"
              | "work"
              | "worklog"
              | "entity"
              | "material"
              | "requirement"
              | "register"
              | "test"
              | "file"
              | "functional"
              | "structure"
              | "product"
              | "process"
              | "role"
              | "right"
              | "group"
              | "invoice"
              | "user"
              | "risk"
              | "descision"
              | "action"
              | "list"
              | "project"
              | "system"
              | "application_component"
              | "test_project"
              | "test_build"
              | "test_plan"
              | "test_suite"
              | "test_case"
              | "test_case_execution"
              | "structure_child"
              | "list_child";
              update_dt?: number;
          },
      ) => NodeCreationResult

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

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

    Methods

    • Parameters

      • event: DataManagerEvents
      • item:
            | {
                create_dt?: number;
                f_id?: string;
                f_token?: string;
                r_id?: string;
                r_type?: string;
                t_id?: string;
                t_token?: string;
                update_dt?: number;
            }
            | {
                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;
                    email?: string;
                    endDate?: string;
                    estimateCost?: string;
                    estimateTime?: string;
                    extension?: string;
                    external?: {
                        excel?: { token?: string };
                        graph365?: { id?: string; url?: string };
                        jira?: { id?: string; url?: string };
                        relatics?: { id?: string; url?: string };
                        sharepoint?: { id?: string; url?: string };
                        testlink?: { id?: string; url?: string };
                    };
                    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?: string[];
                    preferredLanguage?: string;
                    project_id?: string;
                    projectStatus?: string;
                    rat?: {
                        numericQuality?: string;
                        qualityDate?: string;
                        qualityLevel?: string;
                        qualitySummary?: string;
                    };
                    ref_extern?: string;
                    register_dt?: number;
                    remark?: string;
                    resolve_dt?: number;
                    site?: { id?: string; url?: string };
                    startDate?: string;
                    status?: string;
                    tags?: string[];
                    type?: string;
                    url?: string;
                    userGroup?: string[];
                    userPrincipalName?: string;
                    validationType?: string;
                    value?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                name?: string;
                token?: string;
                type?: | "object"
                | "attachement"
                | "order"
                | "deliverable"
                | "contact"
                | "work"
                | "worklog"
                | "entity"
                | "material"
                | "requirement"
                | "register"
                | "test"
                | "file"
                | "functional"
                | "structure"
                | "product"
                | "process"
                | "role"
                | "right"
                | "group"
                | "invoice"
                | "user"
                | "risk"
                | "descision"
                | "action"
                | "list"
                | "project"
                | "system"
                | "application_component"
                | "test_project"
                | "test_build"
                | "test_plan"
                | "test_suite"
                | "test_case"
                | "test_case_execution"
                | "structure_child"
                | "list_child";
                update_dt?: number;
            }
            | {
                child?: string;
                create_dt?: number;
                id?: string;
                meta?: any;
                name?: string;
                token?: string;
                type?: "structure_child";
                update_dt?: number;
            }
            | {
                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;
                    userGroup?: any;
                    userPrincipalName?: string;
                    validationType?: string;
                    value?: string;
                    views?: {
                        bubble?: any;
                        forceDirectedTree?: any;
                        listView?: { views?: any };
                    };
                };
                token?: string;
                update_dt?: number;
            }

      Returns void

    • F1.2.2 Returns an array of nodes corresponding to the nodeType

      Parameters

      Returns {
          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;
              email?: string;
              endDate?: string;
              estimateCost?: string;
              estimateTime?: string;
              extension?: string;
              external?: {
                  excel?: { token?: string };
                  graph365?: { id?: string; url?: string };
                  jira?: { id?: string; url?: string };
                  relatics?: { id?: string; url?: string };
                  sharepoint?: { id?: string; url?: string };
                  testlink?: { id?: string; url?: string };
              };
              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?: string[];
              preferredLanguage?: string;
              project_id?: string;
              projectStatus?: string;
              rat?: {
                  numericQuality?: string;
                  qualityDate?: string;
                  qualityLevel?: string;
                  qualitySummary?: string;
              };
              ref_extern?: string;
              register_dt?: number;
              remark?: string;
              resolve_dt?: number;
              site?: { id?: string; url?: string };
              startDate?: string;
              status?: string;
              tags?: string[];
              type?: string;
              url?: string;
              userGroup?: string[];
              userPrincipalName?: string;
              validationType?: string;
              value?: string;
              views?: {
                  bubble?: any;
                  forceDirectedTree?: any;
                  listView?: { views?: any };
              };
          };
          name?: string;
          token?: string;
          type?: | "object"
          | "attachement"
          | "order"
          | "deliverable"
          | "contact"
          | "work"
          | "worklog"
          | "entity"
          | "material"
          | "requirement"
          | "register"
          | "test"
          | "file"
          | "functional"
          | "structure"
          | "product"
          | "process"
          | "role"
          | "right"
          | "group"
          | "invoice"
          | "user"
          | "risk"
          | "descision"
          | "action"
          | "list"
          | "project"
          | "system"
          | "application_component"
          | "test_project"
          | "test_build"
          | "test_plan"
          | "test_suite"
          | "test_case"
          | "test_case_execution"
          | "structure_child"
          | "list_child";
          update_dt?: number;
      }[]

    • Parameters

      • token: string

      Returns {
          create_dt?: number;
          f_id?: string;
          f_token?: string;
          r_id?: 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_id?: string;
          r_type?: string;
          t_id?: string;
          t_token?: string;
          update_dt?: number;
      }[]

    • Subscribes a callback function to a specific data manager event.

      Parameters

      • event: DataManagerEvents

        The data manager event to subscribe to.

      • callback: any

        The callback function to be executed when the event occurs.

      Returns void

      void

      Events include:

      • add-node: Triggered when a node is added
      • set-node: Triggered when a node is updated
      • delete-node: Triggered when a node is deleted
      • add-meta: Triggered when metadata is added
      • set-meta: Triggered when metadata is updated
      • delete-meta: Triggered when metadata is deleted
      • add-relation: Triggered when a relation is added
      • set-relation: Triggered when a relation is updated
      • delete-relation: Triggered when a relation is deleted
      dataManager.on('add-node', (newData) => {
      console.log('Data was updated:', newData);
      });
    • 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;
            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;
                email?: string;
                endDate?: string;
                estimateCost?: string;
                estimateTime?: string;
                extension?: string;
                external?: {
                    excel?: { token?: string };
                    graph365?: { id?: string; url?: string };
                    jira?: { id?: string; url?: string };
                    relatics?: { id?: string; url?: string };
                    sharepoint?: { id?: string; url?: string };
                    testlink?: { id?: string; url?: string };
                };
                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?: string[];
                preferredLanguage?: string;
                project_id?: string;
                projectStatus?: string;
                rat?: {
                    numericQuality?: string;
                    qualityDate?: string;
                    qualityLevel?: string;
                    qualitySummary?: string;
                };
                ref_extern?: string;
                register_dt?: number;
                remark?: string;
                resolve_dt?: number;
                site?: { id?: string; url?: string };
                startDate?: string;
                status?: string;
                tags?: string[];
                type?: string;
                url?: string;
                userGroup?: string[];
                userPrincipalName?: string;
                validationType?: string;
                value?: string;
                views?: {
                    bubble?: any;
                    forceDirectedTree?: any;
                    listView?: { views?: any };
                };
            };
            name?: string;
            token?: string;
            type?: | "object"
            | "attachement"
            | "order"
            | "deliverable"
            | "contact"
            | "work"
            | "worklog"
            | "entity"
            | "material"
            | "requirement"
            | "register"
            | "test"
            | "file"
            | "functional"
            | "structure"
            | "product"
            | "process"
            | "role"
            | "right"
            | "group"
            | "invoice"
            | "user"
            | "risk"
            | "descision"
            | "action"
            | "list"
            | "project"
            | "system"
            | "application_component"
            | "test_project"
            | "test_build"
            | "test_plan"
            | "test_suite"
            | "test_case"
            | "test_case_execution"
            | "structure_child"
            | "list_child";
            update_dt?: number;
        }
      • OptionalnodeType: string

      Returns any[][]