@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 2.93.0 to 2.94.0
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "2.93.0", | ||
"version": "2.94.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -858,2 +858,17 @@ import { Actions, Classes, Rels } from '../hypermedia-constants.js'; | ||
} | ||
_canDeleteInstance() { | ||
return this._entity.hasActionByName(Actions.activities.deleteInstance); | ||
} | ||
async deleteInstance() { | ||
const action = this._canDeleteInstance() && this._entity.getActionByName(Actions.activities.deleteInstance); | ||
if (!action) { | ||
return; | ||
} | ||
await performSirenAction(this._token, action).then(() => { | ||
this.dispose(); | ||
}); | ||
} | ||
} |
@@ -661,3 +661,4 @@ export const Rels = { | ||
save: 'save', | ||
filterWorkToDo: 'filter-work-to-do' | ||
filterWorkToDo: 'filter-work-to-do', | ||
deleteInstance: 'delete-activity-instance' | ||
}, | ||
@@ -664,0 +665,0 @@ assignments: { |
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
393120
10823