@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 3.4.0 to 3.5.0
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -1,2 +0,2 @@ | ||
import { Actions } from '../../hypermedia-constants.js'; | ||
import { Actions, Rels } from '../../hypermedia-constants.js'; | ||
import ContentHelperFunctions from './ContentHelperFunctions.js'; | ||
@@ -66,2 +66,28 @@ import { Entity } from '../../es6/Entity.js'; | ||
/** | ||
* @returns {string} The orgUnitId of the content-module (read-only) | ||
*/ | ||
orgUnitId() { | ||
return this._entity && this._entity.properties && this._entity.properties.orgUnitId; | ||
} | ||
/** | ||
* @returns {string} The moduleId of the content-module (read-only) | ||
*/ | ||
moduleId() { | ||
return this._entity && this._entity.properties && this._entity.properties.moduleId; | ||
} | ||
/** | ||
* @returns {string} Returns the endpoint for generating a summary for the module | ||
*/ | ||
generateSummaryEndpoint() { | ||
if (!this._entity || !this._entity.hasLinkByRel(Rels.Content.Modules.generateSummary)) { | ||
return; | ||
} | ||
return this._entity.getLinkByRel(Rels.Content.Modules.generateSummary).href; | ||
} | ||
/** | ||
* Updates the module to have the given description | ||
@@ -68,0 +94,0 @@ * @param {string} richText description to set on the module |
@@ -145,3 +145,6 @@ export const Rels = { | ||
moduleFilesUrl: 'https://content.api.brightspace.com/rels/module-files', | ||
convertedModuleFilesUrl: 'https://content.api.brightspace.com/rels/converted-module-files' | ||
convertedModuleFilesUrl: 'https://content.api.brightspace.com/rels/converted-module-files', | ||
Modules: { | ||
generateSummary: 'https://modules.api.brightspace.com/rels/generate-summary' | ||
} | ||
}, | ||
@@ -148,0 +151,0 @@ // Parents API sub-domain rels |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
410315
11356
8