@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 2.25.1 to 2.26.0
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "2.25.1", | ||
"version": "2.26.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -10,2 +10,12 @@ import { Actions, Rels } from '../../hypermedia-constants.js'; | ||
/** | ||
* @returns {string} the href of the discussion topic's discussion forum entity | ||
*/ | ||
forumHref() { | ||
if (!this._entity || !this._entity.hasLinkByRel(Rels.Discussions.forum)) { | ||
return; | ||
} | ||
return this._entity.getLinkByRel(Rels.Discussions.forum).href; | ||
} | ||
/** | ||
* @returns {string} Name of the discussion topic | ||
@@ -12,0 +22,0 @@ */ |
@@ -139,3 +139,4 @@ export const Rels = { | ||
mySubscriptions: 'https://discussions.api.brightspace.com/rels/my-subscriptions', | ||
topic: 'https://discussions.api.brightspace.com/rels/topic' | ||
forum: 'https://discussions.api.brightspace.com/rels/forum', | ||
topic: 'https://discussions.api.brightspace.com/rels/topic', | ||
}, | ||
@@ -374,2 +375,3 @@ // Files API sub-domain rels | ||
discussion: 'discussion', | ||
forum: 'forum', | ||
topic: 'topic', | ||
@@ -686,2 +688,5 @@ description: 'description', | ||
discussions: { | ||
forum: { | ||
updateName: 'update-name', | ||
}, | ||
topic: { | ||
@@ -688,0 +693,0 @@ syncDraftWithForum: 'sync-draft-with-forum', |
340194
98
9368