New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@brightspace-hmc/siren-sdk

Package Overview
Dependencies
Maintainers
2
Versions
192
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 2.38.0 to 2.39.0

2

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

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

@@ -223,3 +223,36 @@ import { Actions, Classes, Rels } from '../../hypermedia-constants.js';

const fields = [{ name: 'ratingType', value: postRatingSelection }];
return { action, fields };
}
/**
* @returns {string} name of the parent forum associated with the discussion topic
*/
forumName() {
return this._entity && this._entity.properties && this._entity.properties.forumName;
}
/**
* @returns {bool} Whether or not the create and associate with forum action is present on the discussion topic entity
*/
canCreateAndAssociateWithForum() {
return this._entity && this._entity.hasActionByName(Actions.discussions.topic.createAndAssociateWithForum);
}
/**
* @summary Formats action and fields if topic name has changed and user has edit permission
* @param {object} topic the topic that's being modified
* @returns {object} the appropriate action/fields to update
*/
_formatCreateAndAssociateWithForumAction(topic) {
const { forumName } = topic || {};
if (!forumName) return;
if (!this._hasFieldValueChanged(forumName, this.forumName())) return;
if (!this.canCreateAndAssociateWithForum()) return;
const action = this._entity.getActionByName(Actions.discussions.topic.createAndAssociateWithForum);
const fields = [
{ name: 'forumName', value: forumName },
];
return { action, fields };

@@ -261,2 +294,3 @@ }

const updateRatePostType = this._formatUpdateRatePostAction(topic);
const createAndAssociateWithForumAction = this._formatCreateAndAssociateWithForumAction(topic);

@@ -267,3 +301,4 @@ const sirenActions = [

syncDraftWithForum,
updateRatePostType
updateRatePostType,
createAndAssociateWithForumAction,
];

@@ -270,0 +305,0 @@

@@ -703,2 +703,3 @@ export const Rels = {

updateRatingType: 'update-ratingtype',
createAndAssociateWithForum: 'create-and-associate-with-forum',
},

@@ -705,0 +706,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