![]() |
Infohub JS API
|
Public Member Functions | |
| constructor (ctx) | |
| async | createCoordinationModel (project_sid, reqBody) |
| async | createProject (reqBody, cb) |
| async | deleteCoordinationModelByObjectId (object_id) |
| async | deleteCoordinationModelByShortId (short_id) |
| async | getCoordinationModelByObjectId (object_id, query={ members:['info'] }) |
| async | getCoordinationModelByShortId (short_id, query={ members:['info'] }) |
| async | getCoordinationModels (project_sid, query=null) |
| async | getProjectById (project_id, cb, query=null) |
| getProjectByShortId (project_sid, cb, query={ members:['info'] }) | |
| async | getProjectList (cb, query=null) |
| async | getUsersOfProject (project_sid, membersOnly=false) |
| async | getUsersOfProjectAsArray (project_sid) |
| constructor | ( | ctx | ) |
| {Context} | ctx - Context instance |
| async createCoordinationModel | ( | project_sid, | |
| reqBody ) |
Create a new coordination model in project.
Uses cnObjectServices for object operations (follows OOP principles: DRY, Separation of Concerns)
This method:
| {String} | project_sid |
| {Object} | reqBody - Request body with coordination model data |
| async createProject | ( | reqBody, | |
| cb ) |
Create a new project on CN infohub.
| async deleteCoordinationModelByObjectId | ( | object_id | ) |
Delete a coordination model.
Uses cnObjectServices.deleteObject() (follows OOP principles: DRY, Separation of Concerns)
| {string} | object_id - Coordination model object ID |
| async deleteCoordinationModelByShortId | ( | short_id | ) |
Delete a coordination model by short ID Uses RestServices for direct node deletion by short_id.
| {string} | short_id - Coordination model short ID |
| async getCoordinationModelByObjectId | ( | object_id, | |
| query = { members: ['info'] } ) |
Get coordination model by object ID.
Uses cnObjectServices.getObject() (follows OOP principles: DRY, Separation of Concerns)
| {string} | object_id - Coordination model object ID |
| {*} | query - Optional query parameters |
| async getCoordinationModelByShortId | ( | short_id, | |
| query = { members: ['info'] } ) |
Get coordination model as object from infohub by short ID.
the current project (project shortid) is used as context and must be set.
| {string} | short_id - Coordination model short ID |
| {*} | query - Optional query parameters |
| async getCoordinationModels | ( | project_sid, | |
| query = null ) |
Get all coordination models for a project.
Uses cnObjectServices for object operations
| {string} | project_sid - Project short ID |
| {*} | query - Optional query parameters |
| async getProjectById | ( | project_id, | |
| cb, | |||
| query = null ) |
| {*} | project_id |
| {*} | cb Return an ApiResponse withz object of type Project as data. |
| {*} | query |
| getProjectByShortId | ( | project_sid, | |
| cb, | |||
| query = { members: ['info'] } ) |
Get project as object from infohub by project shortid.
| {*} | project_sid |
| {*} | cb |
| {*} | query |
| async getProjectList | ( | cb, | |
| query = null ) |
Get list of projects.
| {*} | cb callback |
| {*} | query optional query filter { 'members' : 'info,nodes', 'nodes' : "{ "filter" : "$object_type ~in~ [ 'all_project' , 'all_container##CM_FEDERATION' ] "members" : "info" }"" } |
| async getUsersOfProject | ( | project_sid, | |
| membersOnly = false ) |
@description Get users in all groups of a given project.
Returns a list of users with their email and the groups they belong to.
| {string} | project_sid - The project short ID. |
| {boolean} | membersOnly - 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. |
| async getUsersOfProjectAsArray | ( | project_sid | ) |