Class

ProjectServices

ProjectServices(ctx)

Constructor

# new ProjectServices(ctx)

Parameters:
Name Type Description
ctx Context

Context instance

Since:
  • 1.0, 09.2025, jh

View Source infohub/Project.js, line 35

Classes

ProjectServices

Methods

# async getProjectById(project_id, cb, query)

Parameters:
Name Type Default Description
project_id *
cb *
query * null

View Source infohub/Project.js, line 51

# getProjectByShortId(project_sid, cb, query)

Parameters:
Name Type Description
project_sid *
cb *
query *

View Source infohub/Project.js, line 92

# async getProjectList(cb, query)

Get list of projects.

Parameters:
Name Type Default Description
cb *

callback

query * null

optional query filter

View Source infohub/Project.js, line 132

# async getUsersOfProject(project_sid, membersOnly) → {Promise.<ApiResponse>}

Get users in all groups of a given project. Returns a list of users with their email and the groups they belong to.

Parameters:
Name Type Default Description
project_sid string

The project short ID.

membersOnly boolean false

Whether to include only the members the project or all contacts, notice: members of the projet are temporarly the users of the project admin group.

Since:
  • 1.0

View Source infohub/Project.js, line 243

ApiResponse with:

  • status 200 and data as an array of user objects, each containing:
    • user {string} - The user's email address.
    • usergroups {Array} - Array of group info objects, each with:
      • info {Object} - Group info object, with:
      • id {string} - Group UUID
      • name {string} - Group name
      • description {string} - Group description
      • projcatid {string} - Project catalog ID
      • created {string} - Creation timestamp
      • createdby {string} - Creator email
      • updated {string} - Update timestamp
      • updatedby {string} - Updater email
      • permissions {Object} - Group permissions object:
        • groups {string} - Group permissions, e.g.: { "groups": "delete" }
      Promise.<ApiResponse>
      Example
      [
        {
          user: "amr.abdou@colneo.email",
          usergroups: [{
            info: { id: "...", name: "Projektleitung", description: "..." },
            permissions: { ... },
          },
          {
            info: { id: "...", name: "ddd", description: "..." }
            permissions: { ... },
          }
      ]