Methods
(static) addGroupsToRoles(userRoleIds, groupIds, isExclusion, token) → {void}
Adds the groups to the mandatory training's roles to let them be managed by the platform. A visibility will be added to each training set (rent list) associated to the role (tags), only if it isn't a duplicate.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Required: Mandatory training role's tagId(s) |
groupIds |
string | Array.<string> | Required: Id(s) of the group(s) to add |
isExclusion |
boolean | Optional: If true, the service will work on the exclusions type of visibilities, so the groups will be excluded from the role assignment |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/add-groups-to-roles
Returns:
Nothing
- Type
- void
(static) addRoleVisibilityToGroup(groupId, token) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/add-role-visibility-to-group
Returns:
True if no errors were thrown
- Type
- boolean
(static) addSocietyVisibilityToGroup(groupId, token) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/add-society-visibility-to-group
Returns:
True if no errors were thrown
- Type
- boolean
(static) addUsersToRoles(userRoleIds, userIds, isExclusion, token) → {void}
Adds the users to the mandatory training's roles to let them be managed by the platform. A visibility will be added to each training set (rent list) associated to the role (tags), only if it isn't a duplicate.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Required: Mandatory training role's tagId(s) |
userIds |
string | Array.<string> | Required: Id(s) of the user(s) to add |
isExclusion |
boolean | Optional: If true, the service will work on the exclusions type of visibilities, so the users will be excluded from the role assignment |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/add-users-to-roles
Returns:
Nothing
- Type
- void
(static) applyMandatoryTrainingAdequacyRules(userIds, groupIds, userRoleIds, allUsers, chunkSize) → {void}
This service is used to apply the adequacy rules of the mandatory training's user roles, generating the required rents (which represent the training status of the users) and updating the status of the already existing ones. The adequacy rules are defined in the tags (user roles) and in the rent lists (training sets) which are related to the mandatory training roles. The available types of rules are:
- anag: they are defined in the tag attributes using a key-value pair which contains the user field to check and the required value of this field.
- visibility: they are defined in the rent lists visibilities, and they specify to which user/group the user role (linked to the rent list as reference) can be assigned. there are 2 types of visibilities: VISIBILITY (which works as inclusion rule) and EXCLUSION (which works as exclusion rule, overriding every other inclusione rule). When a new valid user is found, a new rent will be created and it will be put into a "to process" status. Viceversa when a previously valid user isn't valid anymore, it will be put into a "to ignore" status. If a rent is expired and a role still can be assigned to the user, it will be put into a "to renew" status. NB: This service alone won't be sufficient to generate and assing the mandatory's training roles to the users, as it only checks the adequacy and prepares the data for the next step, where the roles will be effectively assigned matching the completed courses and their validity too (auto-assign-mandatory-training-roles microservice).
Parameters:
| Name | Type | Description |
|---|---|---|
userIds |
string | Array.<string> | Optional (if allUsers is true or groupIds is defined): Id(s) of the users that will be processed by the service |
groupIds |
string | Array.<string> | Optional (if allUsers is true or userIds is defined): Id(s) of the groups from where the userIds to process will be retrived |
userRoleIds |
string | Array.<string> | Optional: Id(s) of the user roles to process. By default, all the active roles will be managed. |
allUsers |
boolean | Optional (if userIds is null): If true, this service will retrieve and process all the users of the database (without filtering by tenant or company) |
chunkSize |
number | Optional: Size of the records that will be processed simultaneously |
Returns:
Returns nothing
- Type
- void
(static) autoAssignMandatoryTrainingRoles(userIds, groupIds, userRoleIds, allUsers, chunkSize) → {void}
This service is used to automatically assign the mandatory training's roles to the users rents. To receive a role, a user has to complete all the required courses for the type of training that he needs (first/renew, they can have different training sets). If not already present, the entire history of users trainings will be calculated and the corresponding rent statuses will be persisted. To assign a role, a user needs to complete all the courses of a training set AFTER its previous assignment's start date (this data is saved in the statuses of its rent). NB: This service alone won't be sufficient to generate and assing the mandatory's training roles to the users, it's required to run the "apply-mandatory-training-adequacy-rules" service before this one (otherwise the new rents won't be created and the statuses won't be correctly generated)
Parameters:
| Name | Type | Description |
|---|---|---|
userIds |
string | Array.<string> | Optional (if allUsers is true or groupIds is defined): Id(s) of the users that will be processed by the service |
groupIds |
string | Array.<string> | Optional (if allUsers is true or userIds is defined): Id(s) of the groups from where the userIds to process will be retrived |
userRoleIds |
string | Array.<string> | Optional: Id(s) of the user roles to process. By default, all the active roles will be managed. |
allUsers |
boolean | Optional (if userIds is null): If true, this service will retrieve and process all the users of the database (without filtering by tenant or company) |
chunkSize |
number | Optional: Size of the records that will be processed simultaneously |
Returns:
Returns nothing
- Type
- void
(static) countGroupRoles(groupId, token) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-group-roles
Returns:
The counter of the roles
- Type
- number
(static) countGroupSocieties(groupId, token) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-group-societies
Returns:
The coutner of the societies
- Type
- number
(static) countGroupVisibleRoles(groupId, token) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-group-visible-roles
Returns:
The counter of the visible values
- Type
- number
(static) countGroupVisibleSocieties(groupId, token) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-group-visible-societies
Returns:
The counter of the visible values
- Type
- number
(static) countMandatoryTrainingRoles(token) → {number}
Retrieves the mandatory training's user roles tags mapping the significant data into a new object
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-mandatory-training-roles
Returns:
Counter
- Type
- number
(static) countMandatoryTrainingSocieties(token) → {number}
Retrieves the mandatory training's user roles tags mapping the significant data into a new object
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-mandatory-training-societies
Returns:
Counter
- Type
- number
(static) countMandatoryTrainingUsersHistoricalData(token) → {number}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/count-mandatory-training-users-historical-data
Returns:
Counter of the total rows
- Type
- number
(static) exportMandatoryTrainingSocietiesRolesRecap(token) → {boolean|string}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/export-mandatory-training-societies-roles-recap
Returns:
- Type
- boolean | string
(static) exportMandatoryTrainingSocietiesRolesRecapByHrbp(token) → {boolean|string}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/export-mandatory-training-societies-roles-recap-by-hrbp
Returns:
- Type
- boolean | string
(static) exportMandatoryTrainingUsersHistoricalData(token) → {boolean|string}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/export-mandatory-training-users-historical-data
Returns:
- Type
- boolean | string
(static) getGroupRoles(groupId, token) → {Array.<ResultRow>}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-group-roles
Returns:
The array of the roles. If null or empty, it means that the user can see every role.
- Type
- Array.<ResultRow>
(static) getGroupSocieties(groupId, token) → {Array.<ResultRow>}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-group-societies
Returns:
The array of the visible societies. If null or empty, it means that the user can see every role.
- Type
- Array.<ResultRow>
(static) getGroupUsersTrainingStatusForRole(userRoleId, groupId, searchedText, statusType, perimeterType, fromRecord, numRecords, allData, token) → {PaginationWrapper.<MandatoryTrainingRoleUserDetail>}
Retrieves the training data for the users of the specified group, associated to a mandatory training's user role.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Rents reference id(s), that corresponds to the role's tagId |
groupId |
string | Required: Id of the group from where the userIds will be retrieved |
searchedText |
string | Optional: Text used to filter on the users forename/surname/email/cid |
statusType |
string | Array.<string> | Optional: Status(es) type(s) used to filter on the rents |
perimeterType |
string | Array.<string> | Optional: Perimeter(s) for which the data will be retrieved (@see {MandatoryTrainingPerimeterTypes} for available values). If not defined, all the perimeters will be used. |
fromRecord |
number | Optional (if allData is true): Offset of the first record to retrieve |
numRecords |
number | Optional (if allData is true): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-group-users-training-status-for-role
Returns:
Array of objects with the user training details, wrapped in another object for the pagination
- Type
- PaginationWrapper.<MandatoryTrainingRoleUserDetail>
(static) getGroupVisibleRoles(groupId, token) → {Array.<ResultRow>}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-group-visible-roles
Returns:
The array of the roles. If null or empty, it means that the user can see every role.
- Type
- Array.<ResultRow>
(static) getGroupVisibleSocieties(groupId, token) → {Array.<string>}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-group-visible-societies
Returns:
The array of the visible societies. If null or empty, it means that the user can see every role.
- Type
- Array.<string>
(static) getMandatoryTrainingHistoricalDataByYearMonth(token) → {Array.<TrainingAnalyticsByYearMonth>}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-historical-data-by-year-month
Returns:
The array with the training statistics
- Type
- Array.<TrainingAnalyticsByYearMonth>
(static) getMandatoryTrainingRoleGroupsAnalytics(userRoleId, perimeterType, fromRecord, numRecords, allData, token) → {PaginationWrapper.<MandatoryTrainingRoleGroupAnalysis>}
Retrieves the analytics data for the groups associated to a mandatory training's user role. All the cherry-picked users will be put in a "fake" group toghether.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Rents reference id(s), that corresponds to the role's tagId |
perimeterType |
string | Array.<string> | Optional: Perimeter(s) for which the data will be retrieved (@see {MandatoryTrainingPerimeterTypes} for available values). If not defined, all the perimeters will be used. |
fromRecord |
number | Optional (if allData is true): Offset of the first record to retrieve |
numRecords |
number | Optional (if allData is true): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-role-groups-analytics
Returns:
Array of objects with the groups data, wrapped in another object for the pagination
- Type
- PaginationWrapper.<MandatoryTrainingRoleGroupAnalysis>
(static) getMandatoryTrainingRolesAnalytics(userRoleIds, roleCode, groupId, perimeterType, fullAnalytics, skipCounters, token) → {Array.<MandatoryTrainingRoleAnalysis>}
Retrieves the analytics data of the mandatory training's user roles. By default, all roles will be analyzed.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Optional: Rents reference id(s), that corresponds to the role's tagId |
roleCode |
string | Array.<string> | Optional: Role code(s) used to retrieve the role tag(s) |
groupId |
string | Array.<string> | Optional: Id of the group(s) from where the userIds (that will be used to filter on the rents) will be retrieved |
perimeterType |
string | Array.<string> | Optional: Perimeter(s) for which the data will be retrieved (@see {MandatoryTrainingPerimeterTypes} for available values). If not defined, all the perimeters will be used. |
fullAnalytics |
boolean | Optional: If true, all the available analytics data will be calculated. By default, the allowed groups/users data won't be retrieved. |
skipCounters |
boolean | Optional: If true, the persons counters won't be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-roles-analytics
Returns:
Array with the retrieved mandatory training's roles
- Type
- Array.<MandatoryTrainingRoleAnalysis>
(static) getMandatoryTrainingRolesWithCourseCompletionForUser(token) → {Array.<MandatoryTrainingRole>}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-roles-with-course-completion-for-user
Returns:
The array with the training statistics
- Type
- Array.<MandatoryTrainingRole>
(static) getMandatoryTrainingRolesWithTotalCounters(userRoleIds, roleCode, perimeterType, token) → {Array.<MandatoryTrainingRoleWithCounters>}
Retrieves the data of the mandatory training's user roles with the their total counters (on all the users of their perimeters). By default, all roles will be analyzed.
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Optional: Rents reference id(s), that corresponds to the role's tagId |
roleCode |
string | Array.<string> | Optional: Role code(s) used to retrieve the role tag(s) |
perimeterType |
string | Array.<string> | Optional: Perimeter(s) for which the data will be retrieved (@see {MandatoryTrainingPerimeterTypes} for available values). If not defined, all the perimeters will be used. |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-roles-with-total-counters
Returns:
Array with the retrieved mandatory training's roles and their counters
- Type
- Array.<MandatoryTrainingRoleWithCounters>
(static) getMandatoryTrainingSocietiesAnalytics(token) → {Array.<MandatoryTrainingSocietyAnalysis>}
Retrieves the analytics data of the mandatory training's societies. By default, all roles will be analyzed.
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-societies-analytics
Returns:
Array with the retrieved mandatory training's societies analytics
- Type
- Array.<MandatoryTrainingSocietyAnalysis>
(static) getMandatoryTrainingSocietiesRolesAnalytics(token) → {PaginationWrapper.<SocietyRolePersonsCounters>}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-societies-roles-analytics
Returns:
- Type
- PaginationWrapper.<SocietyRolePersonsCounters>
(static) getMandatoryTrainingUserCompletionHistoryForRole(token) → {CompletionHistory}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-user-completion-history-for-role
Returns:
The array with the training statistics
- Type
- CompletionHistory
(static) getMandatoryTrainingUsersHistoricalData(token) → {PaginationWrapper.<UserTrainingAnalytics>}
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-mandatory-training-users-historical-data
Returns:
The array with the training statistics
- Type
- PaginationWrapper.<UserTrainingAnalytics>
(static) getRoleUsersTrainingStatusForSociety(token) → {PaginationWrapper.<MandatoryTrainingSocietyRoleUserDetail>}
Retrieves the training data for the users of the specified group, associated to a mandatory training's user role.
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-role-users-training-status-for-society
Returns:
Array of objects with the user training details, wrapped in another object for the pagination
- Type
- PaginationWrapper.<MandatoryTrainingSocietyRoleUserDetail>
(static) getSocietiesAndGroups(userRoleId, token) → {Array.<TreeItem>}
Retrieves the groups of the societies that are associated to a role
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Mandatory training role's tagId |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-societies-and-groups
Returns:
Array compliant with the DevExtreme component data structure, grouping the retrieved groups by society name
- Type
- Array.<TreeItem>
(static) getSpecificPersonsExcludedFromRole(userRoleId, fromRecord, numRecords, allData, token) → {PaginationWrapper.<User>}
Retrieves the specific users that have been excluded from a mandatory training's role management
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Mandatory training role's tagId |
fromRecord |
number | Optional (if allData is true): Offset of the first record to retrieve |
numRecords |
number | Optional (if allData is true): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-specific-persons-excluded-from-role
Returns:
Array of users wrapped in another object for the pagination
- Type
- PaginationWrapper.<User>
(static) getSpecificPersonsIncludedInRole(userRoleId, fromRecord, numRecords, allData, token) → {PaginationWrapper.<User>}
Retrieves the specific users that have been included in a mandatory training's role management
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Mandatory training role's tagId |
fromRecord |
number | Optional (if allData is true): Offset of the first record to retrieve |
numRecords |
number | Optional (if allData is true): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-specific-persons-included-in-role
Returns:
Array of users wrapped in another object for the pagination
- Type
- PaginationWrapper.<User>
(static) isMandatoryCourseCompletionValidForNextRoleAssignment(userRoleId, mandatoryCourseCode, token) → {boolean}
Checks if the user is in the role's perimeter and has completed a course with the specified course code which can be used for the next assignement (first/renew) of the role
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleId |
string | Required: Mandatory training role's tagId |
mandatoryCourseCode |
string | Required: Mandatory course's code (aka SAP's IT9054 code) |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/is-mandatory-course-completion-valid-for-next-role-assignment
Returns:
True if the mandatoryCourseCode/userRoleId association is valid and the user has completed a matching course, false otherwise
- Type
- boolean
(static) listMandatoryTrainingRoles(userRoleIds, roleCode, fromRecord, numRecords, allData, token) → {Array.<MandatoryTrainingRole>}
Retrieves the mandatory training's user roles tags mapping the significant data into a new object
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Optional: Rents reference id(s), that corresponds to the role's tagId |
roleCode |
string | Array.<string> | Optional: Role code(s) used to retrieve the role tag(s) |
fromRecord |
number | Optional (if allData is true): Offset of the first record to retrieve |
numRecords |
number | Optional (if allData is true): Number of records to retrieve |
allData |
boolean | Optional (if fromRecord and numRecords are defined): All matching rows will be retrieved |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-mandatory-training-roles
Returns:
Array with the retrieved mandatory training's roles
- Type
- Array.<MandatoryTrainingRole>
(static) listMandatoryTrainingSocieties(token) → {Array.<string>}
Retrieves the mandatory training's user roles tags mapping the significant data into a new object
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-mandatory-training-societies
Returns:
Array of societies
- Type
- Array.<string>
(static) listMandatoryTrainingWorkPlaces(token) → {Array.<string>}
Retrieves the mandatory training's user roles tags mapping the significant data into a new object
Parameters:
| Name | Type | Description |
|---|---|---|
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/list-mandatory-training-work-places
Returns:
Array of work places
- Type
- Array.<string>
(static) removeGroupsFromRoles(userRoleIds, groupIds, isExclusion, token) → {void}
Removes the groups from the mandatory training's roles rules-set. The visibilities will be removed form each training set (rent list) associated to the role (tags).
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Required: Mandatory training role's tagId(s) |
groupIds |
string | Array.<string> | Required: Id(s) of the user(s) to remove |
isExclusion |
boolean | Optional: If true, the service will work on the exclusions type of visibilities, so the groups will be removed from the exclusions |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/remove-groups-from-roles
Returns:
Nothing
- Type
- void
(static) removeRoleVisibilityFromGroup(groupId, token) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/remove-role-visibility-from-group
Returns:
True if no errors were thrown
- Type
- boolean
(static) removeSocietyVisibilityFromGroup(groupId, token) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
groupId |
string | Required: Id of the group to update |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/remove-society-visibility-from-group
Returns:
True if no errors were thrown
- Type
- boolean
(static) removeUsersFromRoles(userRoleIds, userIds, isExclusion, token) → {void}
Removes the users from the mandatory training's roles rules-set. The visibilities will be removed form each training set (rent list) associated to the role (tags).
Parameters:
| Name | Type | Description |
|---|---|---|
userRoleIds |
string | Array.<string> | Required: Mandatory training role's tagId(s) |
userIds |
string | Array.<string> | Required: Id(s) of the user(s) to remove |
isExclusion |
boolean | Optional: If true, the service will work on the exclusions type of visibilities, so the users will be removed from the exclusions |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP POST /rest-api/corporateacademy-mediator/remove-users-from-roles
Returns:
Nothing
- Type
- void
(static) updateMandatoryTrainingRentsAnagData() → {number}
Returns:
- Type
- number