From 29fbf30f280ffa07f54c371c59594dc8d0423b84 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 eb4b3b67f2..9d54ac5f40 100644 --- a/src/data/services/LmsApiService.js +++ b/src/data/services/LmsApiService.js @@ -37,6 +37,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,