diff --git a/package-lock.json b/package-lock.json index 293eb0e..2c08a56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "7.9.8", + "version": "7.9.9-dev.0-ULMS-3209", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "7.9.8", + "version": "7.9.9-dev.0-ULMS-3209", "license": "MIT", "dependencies": { "axios": "1.6.2", diff --git a/package.json b/package.json index 1834694..f8b9989 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "7.9.8", + "version": "7.9.9-dev.0-ULMS-3209", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", diff --git a/src/ulms.js b/src/ulms.js index 743488d..8d0f7d1 100644 --- a/src/ulms.js +++ b/src/ulms.js @@ -70,6 +70,12 @@ const eventEndpoints = { */ class ULMS extends BasicClient { + agentLabel + + setAgentLabel(label) { + this.agentLabel = label + } + /** * Scope kind enum * @returns {{CHAT: string, MINIGROUP: string, P2P: string, WEBINAR: string}} @@ -237,7 +243,9 @@ class ULMS extends BasicClient { * @returns {Promise} */ createRtc(roomId) { - return this.post(this.url(`/conference_rooms/${roomId}/rtcs`)) + return this.post(this.url(`/conference_rooms/${roomId}/rtcs`), { + agent_label: this.agentLabel, + }) } /** @@ -255,6 +263,7 @@ class ULMS extends BasicClient { label, ) { const payload = { + agent_label: this.agentLabel, intent, jsep, label, @@ -415,7 +424,11 @@ class ULMS extends BasicClient { * @returns {Promise} */ readAgentReaderConfig(roomId) { - return this.get(this.url(`/conference_rooms/${roomId}/configs/reader`)) + return this.get( + this.url(`/conference_rooms/${roomId}/configs/reader`, { + agent_label: this.agentLabel, + }), + ) } /** @@ -424,7 +437,11 @@ class ULMS extends BasicClient { * @returns {Promise} */ readAgentWriterConfig(roomId) { - return this.get(this.url(`/conference_rooms/${roomId}/configs/writer`)) + return this.get( + this.url(`/conference_rooms/${roomId}/configs/writer`, { + agent_label: this.agentLabel, + }), + ) } /** @@ -574,9 +591,12 @@ class ULMS extends BasicClient { * @returns {Promise} */ readGroups(roomId, filterParameters) { - return this.get( - this.url(`/conference_rooms/${roomId}/groups`, filterParameters), - ) + const parameters = { + agent_label: this.agentLabel, + ...filterParameters, + } + + return this.get(this.url(`/conference_rooms/${roomId}/groups`, parameters)) } /** @@ -592,11 +612,16 @@ class ULMS extends BasicClient { /** * Update Groups * @param roomId - * @param {GroupConfig[]} payload + * @param {GroupConfig[]} groups * @returns {Promise} */ - updateGroups(roomId, payload) { - return this.post(this.url(`/conference_rooms/${roomId}/groups`), payload) + updateGroups(roomId, groups) { + const parameters = { + agent_label: this.agentLabel, + groups, + } + + return this.post(this.url(`/conference_rooms/${roomId}/groups`), parameters) } /**