Infohub JS API
Loading...
Searching...
No Matches
LicenceServices Class Reference

Description

COLNEO infohub Licence Services.

Public Member Functions

async assignLicenceToUser (licenceids, userid)
 constructor (ctx=({}))
async createLicence (licence_data)
async deleteLicence (licenceid)
async getLicenceById (licenceid)
async getLicences (filters=({}))
async getLicencesOfUser (userid)
async unassignLicenceFromUser (licenceid, userid)
async updateLicence (licenceid, licence_data)

Function Documentation

◆ assignLicenceToUser()

async assignLicenceToUser ( licenceids,
userid )

Assign a licence to a user.

Parameters
{string[]}licenceids - The licence IDs
{string}userid - The user ID
Returns
{Promise<ApiResponse>} message
Since
09.2025, aab

◆ constructor()

constructor ( ctx = ({}))
Parameters
{Context}ctx - The context

◆ createLicence()

async createLicence ( licence_data)

Create a licence.

Parameters
{object}licence_data - The licence data
{string}[licence_data.contract] - The contract
{string}[licence_data.licencee] - The licencee
{string}[licence_data.scope] - The scope
{string}[licence_data.module] - The module
{string}[licence_data.maxpermissions] - The max permissions
{string}[licence_data.maxseats] - The max seats
{string}[licence_data.startdate] - The start date
{string}[licence_data.expirated] - The expirated date
Returns
{Promise<ApiResponse>} Licence
Since
09.2025, aab

◆ deleteLicence()

async deleteLicence ( licenceid)

Delete a licence.

Parameters
{string}licenceid - The licence ID
Returns
{Promise<ApiResponse>} message
Since
09.2025, aab

◆ getLicenceById()

async getLicenceById ( licenceid)

Get a licence by ID.

Parameters
{string}licenceid - The licence ID
Returns
{Promise<ApiResponse>} Licence
Since
09.2025, aab

◆ getLicences()

async getLicences ( filters = ({}))

List licences with optional filters (all can be combined).

like

const licences = await LicenceServices.getLicences({ scope: 'cn_dv', module: 'objecttypes', contract: 'contract_1', licencee: 'licencee_1', licence: 'licence_1' });
COLNEO infohub Licence Services.
Definition Licence.js:79
async getLicences(filters=({}))
List licences with optional filters (all can be combined).
Definition Licence.js:97
Parameters
{Record<string,string>}filters - The filters
Returns
{Promise<ApiResponse>} Licence
Since
09.2025, aab

◆ getLicencesOfUser()

async getLicencesOfUser ( userid)

Get licences of a user.

Parameters
{string}userid - The user ID
Returns
{Promise<ApiResponse>} Licence
Since
09.2025, aab

◆ unassignLicenceFromUser()

async unassignLicenceFromUser ( licenceid,
userid )

Unassign a licence from a user.

Parameters
{string}licenceid - The licence ID
{string}userid - The user ID
Returns
{Promise<ApiResponse>} message
Since
09.2025, aab

◆ updateLicence()

async updateLicence ( licenceid,
licence_data )

Update a licence.

Parameters
{string}licenceid - The licence ID
{object}licence_data - The licence data
{string}[licence_data.contract] - The contract
{string}[licence_data.licencee] - The licencee
{string}[licence_data.scope] - The scope
{string}[licence_data.module] - The module
{string}[licence_data.maxpermissions] - The max permissions
{string}[licence_data.maxseats] - The max seats
{string}[licence_data.startdate] - The start date
{string}[licence_data.expirated] - The expirated date
Returns
{Promise<ApiResponse>} Licence
Since
09.2025, aab