@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 2.87.0 to 2.88.0
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "2.87.0", | ||
"version": "2.88.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -125,2 +125,20 @@ import { Actions, Rels } from '../../hypermedia-constants.js'; | ||
/** | ||
* Updates the file to have the given completion criteria | ||
* @param {string} completionCriteria completion criteria to set for the file | ||
*/ | ||
async setFileCompletionCriteria(completionCriteria) { | ||
if (!this._entity) { | ||
return; | ||
} | ||
const action = this._entity.getActionByName(Actions.content.updateCompletionCriteria); | ||
if (!action) { | ||
return; | ||
} | ||
const fields = [{ name: 'criteria', value: completionCriteria }]; | ||
return await performSirenAction(this._token, action, fields); | ||
} | ||
/** | ||
* Deletes the file | ||
@@ -127,0 +145,0 @@ */ |
@@ -161,2 +161,20 @@ import { Actions, Classes, Rels } from '../../hypermedia-constants.js'; | ||
/** | ||
* Updates the web link to have the given completion criteria | ||
* @param {string} completionCriteria completion criteria to set for the web link | ||
*/ | ||
async setWebLinkCompletionCriteria(completionCriteria) { | ||
if (!this._entity) { | ||
return; | ||
} | ||
const action = this._entity.getActionByName(Actions.webLink.updateCompletionCriteria); | ||
if (!action) { | ||
return; | ||
} | ||
const fields = [{ name: 'criteria', value: completionCriteria }]; | ||
return await performSirenAction(this._token, action, fields); | ||
} | ||
/** | ||
* Deletes the web link | ||
@@ -163,0 +181,0 @@ */ |
@@ -692,2 +692,3 @@ export const Rels = { | ||
updateUrl: 'update-url', | ||
updateCompletionCriteria: 'update-completion-criteria', | ||
updateExternalResource: 'update-external-resource', | ||
@@ -694,0 +695,0 @@ deleteWeblink: 'delete-webLink', |
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
390224
10743