corporateacademy-course-catalog

Methods

(static) countCourseListByUser(past, future, isForLearningUp, filterByDateRange, description, argumentsTag, courseType, startDate, endDate, userId, token) → {number}

Retrieve the counter of the courses' list associated to a given userId

Parameters:
Name Type Description
past boolean

Optional by the action: If true collect past courses, if false collect only future courses, if both false collect any courses

future boolean

Optional by the action: If true collect future courses, if false collect only past courses, if both false collect any courses

isForLearningUp boolean

Optional by the action: If true it will change the auth and it will retrieve the course of logged user

filterByDateRange boolean

Optional by the action: If true collect future courses, if false collect only past courses, if both false collect any courses

description string

Optional by the action: Filter the list of courses by description parameter

argumentsTag string

Optional by the action: Filter the list of courses by tag

courseType string

Optional by the action: Filter the list of courses by course type

startDate Date

Optional by the action: If filterByDateRange is true specify the startDate to filter

endDate Date

Optional by the action: If filterByDateRange is true specify the endDate to filter

userId string

Optional by the action: The userId to retrieve the data

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-course-list-by-user
Returns:

The counter of courses' list

Type
number

(static) getAdminCalendarSummary(startDate, endDate, token) → {Array.<CourseAndDate>}

Retrieve the summary for the gai/admin's calendar

Parameters:
Name Type Description
startDate Date

Required: The date range - start

endDate Date

Required: The date range - end

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-admin-calendar-summary
Returns:

An array of CourseAndDate objects with the course dates to show in the gai/admin's calendar

Type
Array.<CourseAndDate>

(static) getAdminCalendarSummaryCounters(startDate, endDate, token) → {Array.<GaiAdminCalendarSummaryCounters>}

Retrieve the summary of the counters for the gai/admin's calendar

Parameters:
Name Type Description
startDate Date

Required: The date range - start

endDate Date

Required: The date range - end

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-admin-calendar-summary-counters
Returns:

An array of objects with the summary of the counters to show in the gai/admin's calendar

Type
Array.<GaiAdminCalendarSummaryCounters>

(static) getCatalogCourseByCourseid(courseId, courseDateId, stageItemId, token, withBookmarkStatus, skipActions, token) → {Course}

Function that return the list of the courses available in catalog taken by CM database via REST api call services

Parameters:
Name Type Description
courseId string

Required by the action: The course id

courseDateId string

Optional by the action: The id of the specific edition to retrive

stageItemId string

Optional by the action: The id of the initiative for filtering the course editions

token string

Optional by the action:

withBookmarkStatus boolean

Optional for the action: If true, a property "bookmarked" will be added to every course, telling if the course is in the user's bookmarks

skipActions boolean

Optional for the action: If true, skip all action calculation

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-catalog-course-by-courseId/:courseId
Returns:

The course

Type
Course

(static) getCatalogCourses(searchedText, categories, clusters, functionalAreas, levels, types, softSkils, techSkils, objectTypes, techCompetences, softCompetences, streamTags, withCountLibraryItems, techSkillsOnly, softSkillsOnly, matchWithUserFunctionalArea, wishlistableOnly, mineOnly, voluntaryTrainingOnly, institutionalTrainingOnly, withBookmarkStatus, courseIds, fromRecord, numRecords, allData, onlyCourseCounter, token, token) → {Map.<string, Array.<Course>>}

Function that return the list of the courses available in catalog taken by CM database via REST api call services

Parameters:
Name Type Description
searchedText string

Optional for the action: The text to search within course title and descriptions

categories string | Array.<string>

Optional for the action: The list of categories to filter

clusters string | Array.<string>

Optional for the action: The list of clusters to filter

functionalAreas string | Array.<string>

Optional for the action: The list of functionalAreas to filter

levels string | Array.<string>

Optional for the action: The list of levels to filter

types string | Array.<string>

Optional for the action: The list of types to filter

softSkils string | Array.<string>

Optional for the action: The list of softSkils to filter

techSkils string | Array.<string>

Optional for the action: The list of techSkils to filter

objectTypes string | Array.<string>

Optional for the action: Type of objects that user set as filters

techCompetences string | Array.<string>

Optional for the action: Tags ids that user set as filters

softCompetences string | Array.<string>

Optional for the action: Tags ids that user set as filters

streamTags string | Array.<string>

Optional for the action: The list of streamTags to filter

withCountLibraryItems string | boolean

Optional by the action: If true, it will retrieved the count of the Library Items that matches with the cluster

techSkillsOnly string | boolean

Optional for the action: If set retrieve only specific type of items

softSkillsOnly string | boolean

Optional for the action: If set retrieve only specific type of items

matchWithUserFunctionalArea string | boolean

Optional for the action: If set, retrieves only the courses with a tag equal to the user.chief field

wishlistableOnly string | boolean

Optional for the action: If set, retrieves only the courses that can be added to a wishlist

mineOnly boolean

Optional for the action: If set, retrieves only the courses where the logged user is involved as invited/preregistered/confirmed (with overbooking too)

voluntaryTrainingOnly boolean

Optional for the action: If set, retrieves only the courses with a voluntary type of course flow (taken from configuration file)

institutionalTrainingOnly boolean

Optional for the action: If set, retrieves only the courses with a institutional type of course flow (taken from configuration file)

withBookmarkStatus boolean

Optional for the action: If true, a property "bookmarked" will be added to every course, telling if the course is in the user's bookmarks

courseIds Array.<string>

Optional for the action: An array of courseIds used as additional filter on the result set. Only courses present in this list will be retrieved.

fromRecord number

Required by the action: The number of the first record to load (exclusive - 0 to start from the first)

numRecords number

Required by the action: The number of records to load

allData boolean

Optional for the action: Retrives all the data, ignoring the pagination

onlyCourseCounter boolean

Optional for the action: se true, restituirĂ  solo i conteggi dei syllabus, ma non i syllabus

token string

Optional by the action:

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-catalog-courses/:fromRecord/:numRecords
Returns:

A map with clusterId as key and a wrapper with the total count and the limited list of the courses as value

Type
Map.<string, Array.<Course>>

(static) getCoursesListByUserid(courseType, fromDate, toDate, courseUserStatuses, fromRecord, numRecords, allData, withEditionSingleDays, withAvgLikingScore, withUserCatalogActions, description, token) → {Array.<CourseAndDate>}

Retrieve a list of notifications associated to a given userId

Parameters:
Name Type Description
courseType string

Optional by the action: Filter the list of courses by course type

fromDate Date

Required by the action: The number of the first record to load (exclusive - 0 to start from the first)

toDate Date

Required by the action: The number of records to load

courseUserStatuses Array.<string>

Optional for the action: search specified user statuses

fromRecord number

Optional by the action: fromRecord

numRecords number

Optional by the action: numRecords

allData boolean

Optional for the action: If passed with true value, all data will be returned (fromRecord and numRecords are not required)

withEditionSingleDays boolean

Optional for the action: If passed with true value, all days info of a single edition are retrieved

withAvgLikingScore boolean

Optional: If true, the average liking score will be retrieved for each course too

withUserCatalogActions boolean

Optional: If true, the actions that the user can perform on each edition will be calculated by the CourseManager

description string

Optional: the filter by course title

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-courses-list-by-userId
Returns:

The list of completed activities

Type
Array.<CourseAndDate>

(static) getManagerCalendarSummary(startDate, endDate, groupByMonth, managerDataOnly, hrbpDataOnly, token) → {Array.<ManagerCalendarSummary>}

Retrieve the summary for the manager's calendar

Parameters:
Name Type Description
startDate Date

Required: The date range - start

endDate Date

Required: The date range - end

groupByMonth boolean

Optional: groups the results by month (used for the calendar's year-view)

managerDataOnly boolean

Optional: retrieves only manager subordinates

hrbpDataOnly boolean

Optional: retrieves only hrbp subordinates

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-manager-calendar-summary
Returns:

An array of objects with the summary to show in the manager's calendar

Type
Array.<ManagerCalendarSummary>

(static) getSuggestedCatalogCourses(courseId, fromRecord, numRecords, asConsumableItem, token) → {Array.<Course>|MapById.<Array.<ConsumableItem>>}

Function that return the list of related courses to the one with the courseId passed

Parameters:
Name Type Description
courseId string

Required by the action: course courseId to search for related courses

fromRecord number

Required by the action: The number of the first record to load (exclusive - 0 to start from the first)

numRecords number

Required by the action: The number of records to load

asConsumableItem boolean

Optional by the action: flag to get the results as a map of consumableItems by syllabus id

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-suggested-catalog-courses/:courseId/:fromRecord/:numRecords
Returns:

list of related courses or a map of consumableItems by syllabus id

Type
Array.<Course> | MapById.<Array.<ConsumableItem>>