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
2
Versions
187
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.126.0 to 2.127.0

2

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

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

@@ -5,2 +5,4 @@ import { Actions, Classes, Rels } from '../../hypermedia-constants.js';

const NONE_RATING_TYPE = 'None';
const HUMAN_GENERATED = 0;
const AI_INSPIRED = 3;

@@ -45,2 +47,6 @@ /**

isAiInspired() {
return this._entity && this._entity.hasClass(Classes.discussions.aiInspired);
}
/**

@@ -165,2 +171,21 @@ * @returns {bool} Whether or not the discussion topic entity has posts.

/**
* @summary Formats action and fields if topic has been ai inspired
* @param {object} topic the topic that's being modified
* @returns {object} the appropriate action/fields to update
*/
_formatUpdateAiInspiredAction(topic) {
const { isAiInspired } = topic || {};
if (typeof isAiInspired === 'undefined') return;
if (!this._hasFieldValueChanged(isAiInspired, this.isAiInspired())) return;
const action = this._entity.getActionByName(Actions.discussions.topic.updateName);
const fields = [
{ name: 'aiHumanOrigin', value: isAiInspired ? AI_INSPIRED : HUMAN_GENERATED },
];
return { action, fields };
}
/**
* @summary Formats action and fields if topic 'requires approval' status has changed and user has edit permission

@@ -423,2 +448,3 @@ * @param {object} topic the topic that's being modified

const updateRequiresApproval = this._formatUpdateRequiresApproval(topic);
const updateIsAiInspired = this._formatUpdateAiInspiredAction(topic);

@@ -431,3 +457,4 @@ const sirenActions = [

updateParticipationOption,
updateRequiresApproval
updateRequiresApproval,
updateIsAiInspired
];

@@ -434,0 +461,0 @@

@@ -438,3 +438,4 @@ export const Rels = {

restrictedTopicDefault: 'restricted-topic-default',
restrictedThreadsDefault: 'restricted-threads-default'
restrictedThreadsDefault: 'restricted-threads-default',
aiInspired: 'ai-inspired'
},

@@ -441,0 +442,0 @@ enrollments: {

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