From 71b415250130ce38cd02b959d9b53faec928155a Mon Sep 17 00:00:00 2001 From: Aleksey Konstantinov Date: Mon, 19 Feb 2024 17:51:40 +0300 Subject: [PATCH] ULMS-2882 Changed api routes (conference, event) --- package-lock.json | 4 ++-- package.json | 2 +- src/http-conference.js | 42 ++++++++++++++++++++++++++++-------------- src/http-event.js | 28 ++++++++++++++-------------- 4 files changed, 45 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 736e422..10119cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "6.12.0", + "version": "6.12.0-dev.0-ulms-2882", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "6.12.0", + "version": "6.12.0-dev.0-ulms-2882", "license": "MIT", "dependencies": { "axios": "1.6.2", diff --git a/package.json b/package.json index 1bc660e..9e897a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "6.12.0", + "version": "6.12.0-dev.0-ulms-2882", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", diff --git a/src/http-conference.js b/src/http-conference.js index 448a654..e920a4e 100644 --- a/src/http-conference.js +++ b/src/http-conference.js @@ -95,7 +95,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ readRoom(roomId) { - return this.get(this.url(`/rooms/${roomId}`)) + return this.get(this.url(`/conference_rooms/${roomId}`)) } /** @@ -111,7 +111,7 @@ class HTTPConference extends BasicClient { time, } - return this.patch(this.url(`/rooms/${roomId}`), payload) + return this.patch(this.url(`/conference_rooms/${roomId}`), payload) } /** @@ -120,7 +120,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ closeRoom(roomId) { - return this.post(this.url(`/rooms/${roomId}/close`)) + return this.post(this.url(`/conference_rooms/${roomId}/close`)) } /** @@ -129,7 +129,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ enterRoom(roomId) { - return this.post(this.url(`/rooms/${roomId}/enter`)) + return this.post(this.url(`/conference_rooms/${roomId}/enter`)) } /** @@ -139,7 +139,9 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ listAgent(roomId, filterParameters = {}) { - return this.get(this.url(`/rooms/${roomId}/agents`, filterParameters)) + return this.get( + this.url(`/conference_rooms/${roomId}/agents`, filterParameters) + ) } /** @@ -148,7 +150,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ createRtc(roomId) { - return this.post(this.url(`/rooms/${roomId}/rtcs`)) + return this.post(this.url(`/conference_rooms/${roomId}/rtcs`)) } /** @@ -167,7 +169,9 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ listRtc(roomId, filterParameters = {}) { - return this.get(this.url(`/rooms/${roomId}/rtcs`, filterParameters)) + return this.get( + this.url(`/conference_rooms/${roomId}/rtcs`, filterParameters) + ) } /** @@ -193,7 +197,9 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ listRtcStream(roomId, filterParameters = {}) { - return this.get(this.url(`/rooms/${roomId}/streams`, filterParameters)) + return this.get( + this.url(`/conference_rooms/${roomId}/streams`, filterParameters) + ) } /** @@ -257,7 +263,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ readAgentReaderConfig(roomId) { - return this.get(this.url(`/rooms/${roomId}/configs/reader`)) + return this.get(this.url(`/conference_rooms/${roomId}/configs/reader`)) } /** @@ -266,7 +272,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ readAgentWriterConfig(roomId) { - return this.get(this.url(`/rooms/${roomId}/configs/writer`)) + return this.get(this.url(`/conference_rooms/${roomId}/configs/writer`)) } /** @@ -276,7 +282,9 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ readGroups(roomId, filterParameters) { - return this.get(this.url(`/rooms/${roomId}/groups`, filterParameters)) + return this.get( + this.url(`/conference_rooms/${roomId}/groups`, filterParameters) + ) } /** @@ -288,7 +296,10 @@ class HTTPConference extends BasicClient { updateAgentReaderConfig(roomId, configs) { const payload = { configs } - return this.post(this.url(`/rooms/${roomId}/configs/reader`), payload) + return this.post( + this.url(`/conference_rooms/${roomId}/configs/reader`), + payload + ) } /** @@ -300,7 +311,10 @@ class HTTPConference extends BasicClient { updateAgentWriterConfig(roomId, configs) { const payload = { configs } - return this.post(this.url(`/rooms/${roomId}/configs/writer`), payload) + return this.post( + this.url(`/conference_rooms/${roomId}/configs/writer`), + payload + ) } /** @@ -310,7 +324,7 @@ class HTTPConference extends BasicClient { * @returns {Promise} */ updateGroups(roomId, payload) { - return this.post(this.url(`/rooms/${roomId}/groups`), payload) + return this.post(this.url(`/conference_rooms/${roomId}/groups`), payload) } } diff --git a/src/http-event.js b/src/http-event.js index 763984b..b05cce3 100644 --- a/src/http-event.js +++ b/src/http-event.js @@ -1,25 +1,25 @@ import BasicClient from './basic-client' const eventEndpoints = { - agentsList: (id) => `/rooms/${id}/agents`, - agentsUpdate: (id) => `/rooms/${id}/agents`, - banList: (id) => `/rooms/${id}/bans`, + agentsList: (id) => `/event_rooms/${id}/agents`, + agentsUpdate: (id) => `/event_rooms/${id}/agents`, + banList: (id) => `/event_rooms/${id}/bans`, changesCreate: (id) => `/editions/${id}/changes`, changesDelete: (id) => `/changes/${id}`, changesList: (id) => `/editions/${id}/changes`, editionsCommit: (id) => `/editions/${id}/commit`, - editionsCreate: (id) => `/rooms/${id}/editions`, + editionsCreate: (id) => `/event_rooms/${id}/editions`, editionsDelete: (id) => `/editions/${id}`, - editionsList: (id) => `/rooms/${id}/editions`, - eventsCreate: (id) => `/rooms/${id}/events`, - eventsRemove: (id) => `/rooms/${id}/events`, - eventsList: (id) => `/rooms/${id}/events`, - roomEnter: (id) => `/rooms/${id}/enter`, - roomRead: (id) => `/rooms/${id}`, - roomState: (id) => `/rooms/${id}/state`, - roomUpdate: (id) => `/rooms/${id}`, - roomUpdateLockedTypes: (id) => `/rooms/${id}/locked_types`, - roomUpdateWhiteboardAccess: (id) => `/rooms/${id}/whiteboard_access`, + editionsList: (id) => `/event_rooms/${id}/editions`, + eventsCreate: (id) => `/event_rooms/${id}/events`, + eventsRemove: (id) => `/event_rooms/${id}/events`, + eventsList: (id) => `/event_rooms/${id}/events`, + roomEnter: (id) => `/event_rooms/${id}/enter`, + roomRead: (id) => `/event_rooms/${id}`, + roomState: (id) => `/event_rooms/${id}/state`, + roomUpdate: (id) => `/event_rooms/${id}`, + roomUpdateLockedTypes: (id) => `/event_rooms/${id}/locked_types`, + roomUpdateWhiteboardAccess: (id) => `/event_rooms/${id}/whiteboard_access`, } class HTTPEvent extends BasicClient {