Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brightspace-hmc/siren-sdk

Package Overview
Dependencies
Maintainers
0
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightspace-hmc/siren-sdk - npm Package Compare versions

Comparing version 3.10.0 to 3.11.0

2

package.json
{
"name": "@brightspace-hmc/siren-sdk",
"version": "3.10.0",
"version": "3.11.0",
"type": "module",

@@ -5,0 +5,0 @@ "description": "",

import { Actions, Classes } from '../../hypermedia-constants.js';
import { ContentEntity } from './ContentEntity.js';
import ContentHelperFunctions from './ContentHelperFunctions.js';
import { performSirenAction } from '../../es6/SirenAction.js';

@@ -25,2 +26,24 @@

/**
* @returns {string|null} HTML description of the SCORM activity
*/
descriptionRichText() {
const descriptionSubEntity = ContentHelperFunctions.getDescriptionSubEntity(this._entity);
if (!descriptionSubEntity) {
return null;
}
return descriptionSubEntity.properties.html || '';
}
/**
* @returns {string|null} Plaintext description of the SCORM activity
*/
descriptionText() {
const descriptionSubEntity = ContentHelperFunctions.getDescriptionSubEntity(this._entity);
if (!descriptionSubEntity) {
return null;
}
return descriptionSubEntity.properties.text || '';
}
/**
* @returns {boolean} external resource value (i.e. open in new tab or not)

@@ -72,2 +95,19 @@ */

/**
* Updates the SCORM activity's description
* @param {string} richText Rich text description to set on the SCORM activity
*/
async setScormActivityDescription(richText) {
if (!this._entity) {
return;
}
const action = this._entity.getActionByName(Actions.content.updateDescription);
if (!action) {
return;
}
const fields = [{ name: 'description', value: richText }];
return await performSirenAction(this._token, action, fields);
}
/**
* Updates the SCORM activity to have the given title

@@ -131,2 +171,3 @@ * @param {string} title Title to set on the SCORM activity

[this.title(), contentscormActivity.title],
[this.descriptionRichText(), contentscormActivity.descriptionRichText],
[this.isExternalResource(), contentscormActivity.isExternalResource]

@@ -133,0 +174,0 @@ ];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc