@transcommerce/cwm-shared 1.1.76 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27698,6 +27698,7 @@ const MockProfile = DEFAULT_PROFILE;
|
|
|
27698
27698
|
|
|
27699
27699
|
const MockCustomer = DEFAULT_CUSTOMER;
|
|
27700
27700
|
|
|
27701
|
+
/**********************************************************************************************************************/
|
|
27701
27702
|
class ConfigService {
|
|
27702
27703
|
authConfig;
|
|
27703
27704
|
logger;
|
|
@@ -27711,6 +27712,7 @@ class ConfigService {
|
|
|
27711
27712
|
set configCache(value) {
|
|
27712
27713
|
ConfigService._configCache = value;
|
|
27713
27714
|
}
|
|
27715
|
+
/**********************************************************************************************************************/
|
|
27714
27716
|
constructor(authConfig, logger) {
|
|
27715
27717
|
this.authConfig = authConfig;
|
|
27716
27718
|
this.logger = logger;
|
|
@@ -27720,6 +27722,7 @@ class ConfigService {
|
|
|
27720
27722
|
this.logger.debug("Config Client", this.configClient);
|
|
27721
27723
|
this.logger.methodName = "";
|
|
27722
27724
|
}
|
|
27725
|
+
/**********************************************************************************************************************/
|
|
27723
27726
|
async getConfigurationSettingAsync(key, label) {
|
|
27724
27727
|
this.logger.methodName = "getConfigurationSettingAsync()";
|
|
27725
27728
|
let setting = {};
|
|
@@ -27756,6 +27759,7 @@ class ConfigService {
|
|
|
27756
27759
|
}
|
|
27757
27760
|
return setting.value;
|
|
27758
27761
|
}
|
|
27762
|
+
/**********************************************************************************************************************/
|
|
27759
27763
|
async setConfigurationSettingAsync(templateName, label, setting, contentType = "application/json") {
|
|
27760
27764
|
this.logger.methodName = "setConfigurationSettingAsync()";
|
|
27761
27765
|
if (this.mockData) {
|
|
@@ -27797,8 +27801,10 @@ class ConfigService {
|
|
|
27797
27801
|
await this.configClient.setConfigurationSetting(configurationSetting);
|
|
27798
27802
|
this.logger.methodName = "";
|
|
27799
27803
|
}
|
|
27800
|
-
|
|
27804
|
+
/**********************************************************************************************************************/
|
|
27805
|
+
async getConfigAsync(company, force = false) {
|
|
27801
27806
|
this.logger.methodName = "getConfigAsync()";
|
|
27807
|
+
55555555555555555555555555;
|
|
27802
27808
|
if (this.mockData) {
|
|
27803
27809
|
this.configCache = DEFAULT_CONFIGURATION;
|
|
27804
27810
|
this.logger.debug("Mock Data Enabled, Using Mock Config", this.configCache);
|
|
@@ -27817,7 +27823,8 @@ class ConfigService {
|
|
|
27817
27823
|
this.logger.methodName = "";
|
|
27818
27824
|
return config;
|
|
27819
27825
|
}
|
|
27820
|
-
|
|
27826
|
+
/**********************************************************************************************************************/
|
|
27827
|
+
async saveConfigAsync(config, company, force = false) {
|
|
27821
27828
|
this.logger.logLevel = config.authConfig.logLevel;
|
|
27822
27829
|
this.logger.methodName = "saveConfigAsync()";
|
|
27823
27830
|
// Update configuration cache
|