impact-chatbot 2.3.74 → 2.3.75

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.
package/dist/index.cjs.js CHANGED
@@ -234,10 +234,10 @@ const triggerRefresh = async (baseUrl) => {
234
234
  return null;
235
235
  }
236
236
  };
237
- const fetchChatbotFilterConfig = async (dimension = "product") => {
237
+ const fetchChatbotFilterConfig = async () => {
238
238
  try {
239
239
  return axiosInstance({
240
- url: `core/filter/generic-schema-mapping?dimension=${dimension}&screen_name=Chatbot`,
240
+ url: `core/filter/generic-schema-mapping?screen_name=Chatbot`,
241
241
  method: "GET",
242
242
  });
243
243
  }
@@ -14867,14 +14867,11 @@ const SmartBot = (props) => {
14867
14867
  },
14868
14868
  ]);
14869
14869
  }
14870
- const [response, responseStore] = await Promise.all([
14871
- fetchChatbotFilterConfig("product"),
14872
- fetchChatbotFilterConfig("store"),
14873
- ]);
14870
+ const response = await fetchChatbotFilterConfig();
14871
+ const responseData = response?.data?.data || {};
14874
14872
  const combinedOptions = [
14875
- ...(response?.data?.data || []),
14876
- ...(responseStore?.data?.data || []),
14877
- ...(chatbotFilterCustomConfig?.data || []), // Add custom filter config for testing
14873
+ ...Object.values(responseData).flat(),
14874
+ ...(chatbotFilterCustomConfig?.data || []) // Add custom filter config for testing
14878
14875
  ];
14879
14876
  // Create hierarchy key-value pairs object
14880
14877
  const hierarchyKeyValuePairs = {};