From ce8c6d776456279210a52abfe731662a0d309d68 Mon Sep 17 00:00:00 2001 From: Alexander J Sheehan Date: Mon, 18 Sep 2023 20:37:33 +0000 Subject: [PATCH] feat: enterprise sso orchestrator record api client --- .env.development | 1 + src/data/services/LmsApiService.js | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.env.development b/.env.development index 03858d1ff4..9e9f84cf22 100644 --- a/.env.development +++ b/.env.development @@ -51,3 +51,4 @@ MAINTENANCE_ALERT_START_TIMESTAMP='' USE_API_CACHE='true' SUBSCRIPTION_LPR='true' PLOTLY_SERVER_URL='http://localhost:8050' +AUTH0_SELF_SERVICE_INTEGRATION='true' diff --git a/src/data/services/LmsApiService.js b/src/data/services/LmsApiService.js index 4cff4834d1..2ed35e8274 100644 --- a/src/data/services/LmsApiService.js +++ b/src/data/services/LmsApiService.js @@ -39,6 +39,35 @@ class LmsApiService { static apiCredentialsUrl = `${LmsApiService.baseUrl}/enterprise/api/v1/enterprise-customer-api-credentials/`; + static enterpriseSsoOrchestrationUrl = `${LmsApiService.baseUrl}/enterprise/api/v1/enterprise_customer_sso_configuration/`; + + static fetchEnterpriseSsoOrchestrationRecord(configurationUuid) { + const enterpriseSsoOrchestrationFetchUrl = `${LmsApiService.enterpriseSsoOrchestrationUrl}${configurationUuid}`; + return LmsApiService.apiClient().get(enterpriseSsoOrchestrationFetchUrl); + } + + static listEnterpriseSsoOrchestration(enterpriseCustomerUuid) { + const enterpriseSsoOrchestrationListUrl = `${LmsApiService.enterpriseSsoOrchestrationUrl}`; + if (enterpriseCustomerUuid) { + return LmsApiService.apiClient().get(`${enterpriseSsoOrchestrationListUrl}?enterprise_customer=${enterpriseCustomerUuid}`); + } + return LmsApiService.apiClient().get(enterpriseSsoOrchestrationListUrl); + } + + static createEnterpriseSsoOrchestrationRecord(formData) { + return LmsApiService.apiClient().post(LmsApiService.enterpriseSsoOrchestrationUrl, formData); + } + + static updateEnterpriseSsoOrchestrationRecord(formData, configurationUuid) { + const enterpriseSsoOrchestrationUpdateUrl = `${LmsApiService.enterpriseSsoOrchestrationUrl}${configurationUuid}`; + return LmsApiService.apiClient().put(enterpriseSsoOrchestrationUpdateUrl, formData); + } + + static deleteEnterpriseSsoOrchestrationRecord(configurationUuid) { + const enterpriseSsoOrchestrationDeleteUrl = `${LmsApiService.enterpriseSsoOrchestrationUrl}${configurationUuid}`; + return LmsApiService.apiClient().delete(enterpriseSsoOrchestrationDeleteUrl); + } + static fetchEnterpriseList(options) { const queryParams = new URLSearchParams({ page: 1,