From d9e3db950b7e96b6750e1b5c37c04d8fa2a0e126 Mon Sep 17 00:00:00 2001 From: Aleksey Konstantinov Date: Fri, 2 Aug 2024 19:39:28 +0300 Subject: [PATCH] ULMS-3205 Updated FVS client methods --- package-lock.json | 4 ++-- package.json | 2 +- src/fvs.js | 25 +++++++++++++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9fe7dca..2bbefd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "7.10.0", + "version": "7.11.0-dev.0-ULMS-3205", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "7.10.0", + "version": "7.11.0-dev.0-ULMS-3205", "license": "MIT", "dependencies": { "axios": "1.6.2", diff --git a/package.json b/package.json index 06bee0f..8a0ca71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "7.10.0", + "version": "7.11.0-dev.0-ULMS-3205", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", diff --git a/src/fvs.js b/src/fvs.js index f5616e9..80d911b 100644 --- a/src/fvs.js +++ b/src/fvs.js @@ -32,44 +32,49 @@ class FVS extends BasicClient { } /** - * Get issue types in Minigroup + * Get issue categories for Minigroup * @returns {Promise} */ - getIssueTypes() { - return this.get(`${this.baseUrl}/ulms-issues/types`) + getMinigroupIssueCategories() { + return this.get( + `${this.baseUrl}/api/livestreaming/ulms/miniGroup/issueCategories`, + ) } /** * Create issue in Minigroup - * @param {string} scope + * @param {string} externalId * @param {number} typeId * @param {string} description * @returns {Promise} */ - createIssue(scope, typeId, description) { + createMinigroupIssue(externalId, typeId, description) { const payload = { description, - scope, + external_id: externalId, typeId, } - return this.post(`${this.baseUrl}/ulms-issues/issues`, payload) + return this.post( + `${this.baseUrl}/api/livestreaming/ulms/miniGroup/issues`, + payload, + ) } /** - * Get issue categories in Webinar + * Get issue categories for Webinar * @returns {Promise} */ - getIssueCategories() { + getWebinarIssueCategories() { return this.get(`${this.baseUrl}/api/livestreaming/ulms/issueCategories`) } /** * @typedef {Object} WebinarIssue * @property {string} description + * @property {string} external_id * @property {boolean} isCutVideo * @property {boolean} isNeedHelp - * @property {string} scope * @property {number} subcategoryId * /