export function checkConfiguration()

in salesforce/aa-lwc/force-app/main/default/lwc/agentAssistContainerModule/helpers/integration.js [17:46]


export function checkConfiguration(
  endpoint,
  features,
  conversationProfile,
  consumerKey,
  consumerSecret,
  debugMode
) {
  const checks = [
    endpoint,
    features,
    conversationProfile,
    consumerKey,
    consumerSecret
  ];
  let isConfigSet = true;
  checks.forEach((check) => {
    if (check === null) {
      isConfigSet = false;
      console.error(
        `Agent Assist LWC config: "${check}" needs to be set in Lightning App Builder.`
      );
    }
  });
  if (debugMode && isConfigSet) {
    console.log(
      "Agent Assist LWC config: finished check with no missing values."
    );
  }
}