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

    Class _list

    The List class is a subclass of the Structure class and represents a list data structure.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    create_dt: number = ...

    Node creation date time

    id: string

    Node Id

    name: string

    Node name

    token: string

    Node token

    type: any = ...

    Node type

    update_dt: number = ...

    Node update date time

    Accessors

    • get addNode(): (
          node: {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ) => [
          _operation<any, OperationReference>,
          {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ]

      Returns (
          node: {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ) => [
          _operation<any, OperationReference>,
          {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ]

    • get forRelationships(): {
          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 {
          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 fromRelationships(): {
          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 {
          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 getChildByToken(): (
          nodeId: string,
      ) => {
          child?: string;
          create_dt?: number;
          id?: string;
          meta?: any;
          name?: string;
          token?: string;
          type?: "structure_child";
          update_dt?: number;
      }

      Returns (
          nodeId: string,
      ) => {
          child?: string;
          create_dt?: number;
          id?: string;
          meta?: any;
          name?: string;
          token?: string;
          type?: "structure_child";
          update_dt?: number;
      }

    • get inRelationships(): {
          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 {
          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 nestedv2(): <
          T extends
              {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              } = {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "structure_child";
              update_dt?: number;
          },
      >(
          start_token?: string,
          binder?: (
              node: {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              },
          ) => T,
      ) => NestedStructureResult<T>[]

      Returns <
          T extends
              {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              } = {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "structure_child";
              update_dt?: number;
          },
      >(
          start_token?: string,
          binder?: (
              node: {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              },
          ) => T,
      ) => NestedStructureResult<T>[]

    • get outRelationships(): {
          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 {
          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 queryNodeAll(): (
          query:
              | {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              }
              | {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "list_child";
                  update_dt?: number;
              },
      ) => {
          child?: string;
          create_dt?: number;
          id?: string;
          meta?: any;
          name?: string;
          token?: string;
          type?: "structure_child";
          update_dt?: number;
      }[]

      Returns (
          query:
              | {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "structure_child";
                  update_dt?: number;
              }
              | {
                  child?: string;
                  create_dt?: number;
                  id?: string;
                  meta?: any;
                  name?: string;
                  token?: string;
                  type?: "list_child";
                  update_dt?: number;
              },
      ) => {
          child?: string;
          create_dt?: number;
          id?: string;
          meta?: any;
          name?: string;
          token?: string;
          type?: "structure_child";
          update_dt?: number;
      }[]

    • get setNode(): (
          node: {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ) => [
          _operation<any, OperationReference>,
          {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ]

      Returns (
          node: {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ) => [
          _operation<any, OperationReference>,
          {
              child?: string;
              create_dt?: number;
              id?: string;
              meta?: any;
              name?: string;
              token?: string;
              type?: "list_child";
              update_dt?: number;
          },
      ]

    • get update(): (
          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

    Methods

    • Checks if the node structure is complete by verifying that all child nodes have at least one relationship.

      A structure is considered complete when:

      • The node has valid metadata and project references
      • All children defined in the metadata have at least one 'HAS_LINK' relationship

      Parameters

      • collect: boolean

      Returns boolean | ZodError<any>

      • true if all children have at least one relationship
      • false if any child is missing relationships
      • null if metadata or project references are missing
    • Validates the structure of the node by checking its relationships and linked nodes.

      This method performs two main validations:

      1. Verifies that all links point to existing nodes in the project
      2. Ensures that all linked nodes are of the expected type as defined in metadata

      The validation is performed using Zod schema validation with custom refinements.

      Parameters

      • collect: boolean

      Returns boolean | ZodError<any>

      Returns:

      • true if the structure is valid
      • false if any validation fails
      • null if metadata or project is not available
      const node = new StructureNode();
      const isValid = node.isCorrect();
      if (isValid === true) {
      // Structure is valid
      }