hgs-twilio-class-lib 1.1.60 → 1.1.62
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.
|
@@ -77,10 +77,7 @@ class GPMController {
|
|
|
77
77
|
if (query.getFilterContent) {
|
|
78
78
|
result.filterContent = CXConfigPromptFilter_1.CXConfigPromptFilterService.getFilterData(result.filterOptions);
|
|
79
79
|
}
|
|
80
|
-
if (query.getPromptForIVR
|
|
81
|
-
result.items = transformArrayToJson(result.items);
|
|
82
|
-
}
|
|
83
|
-
if (query.getPromptForIVR && !query.getPromptForIVRByLanguage) {
|
|
80
|
+
if (query.getPromptForIVR) {
|
|
84
81
|
result.items = transformArrayToJson(result.items);
|
|
85
82
|
}
|
|
86
83
|
if ("filterOptions" in result) {
|
|
@@ -152,13 +149,3 @@ function transformArrayToJson(inputArray) {
|
|
|
152
149
|
return acc;
|
|
153
150
|
}, {});
|
|
154
151
|
}
|
|
155
|
-
function transformArrayByLanguage(inputArray) {
|
|
156
|
-
return inputArray.reduce((acc, item) => {
|
|
157
|
-
const { name, value, voice, language, type, hints } = item;
|
|
158
|
-
if (!acc[language]) {
|
|
159
|
-
acc[language] = {};
|
|
160
|
-
}
|
|
161
|
-
acc[language][name] = { value, voice, type, hints };
|
|
162
|
-
return acc;
|
|
163
|
-
}, {});
|
|
164
|
-
}
|