@webitel/ui-sdk 24.12.10 → 24.12.12
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/CHANGELOG.md +12 -0
- package/dist/ui-sdk.js +2 -2
- package/dist/ui-sdk.umd.cjs +8 -8
- package/package.json +1 -1
- package/src/api/clients/agents/agentChats.js +17 -6
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +4 -0
package/package.json
CHANGED
|
@@ -2,10 +2,12 @@ import { AgentChatServiceApiFactory } from 'webitel-sdk';
|
|
|
2
2
|
import {
|
|
3
3
|
getDefaultInstance,
|
|
4
4
|
getDefaultOpenAPIConfig,
|
|
5
|
+
getDefaultGetParams,
|
|
5
6
|
} from '../../defaults/index.js';
|
|
6
7
|
import applyTransform, {
|
|
8
|
+
merge,
|
|
7
9
|
notify,
|
|
8
|
-
snakeToCamel,
|
|
10
|
+
snakeToCamel, starToSearch,
|
|
9
11
|
} from '../../transformers/index.js';
|
|
10
12
|
import i18n from '../../../locale/i18n.js';
|
|
11
13
|
|
|
@@ -17,21 +19,30 @@ const configuration = getDefaultOpenAPIConfig();
|
|
|
17
19
|
const agentChatsService = new AgentChatServiceApiFactory(configuration, '', instance);
|
|
18
20
|
|
|
19
21
|
const getChatsList = async (params) => {
|
|
20
|
-
const {
|
|
22
|
+
const {
|
|
23
|
+
size,
|
|
24
|
+
page,
|
|
25
|
+
onlyClosed
|
|
26
|
+
} = applyTransform(params, [
|
|
27
|
+
merge(getDefaultGetParams()),
|
|
28
|
+
]);
|
|
21
29
|
|
|
22
30
|
try {
|
|
23
31
|
const response = await agentChatsService.getAgentChats(
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
size,
|
|
33
|
+
page,
|
|
26
34
|
undefined,
|
|
27
35
|
undefined,
|
|
28
36
|
undefined,
|
|
29
37
|
onlyClosed,
|
|
30
38
|
);
|
|
31
|
-
const { items } = applyTransform(response.data, [
|
|
39
|
+
const { items, next } = applyTransform(response.data, [
|
|
32
40
|
snakeToCamel(),
|
|
33
41
|
]);
|
|
34
|
-
return
|
|
42
|
+
return {
|
|
43
|
+
items,
|
|
44
|
+
next,
|
|
45
|
+
};
|
|
35
46
|
} catch (err) {
|
|
36
47
|
throw applyTransform(err, [notify]);
|
|
37
48
|
}
|
package/src/locale/en/en.js
CHANGED
|
@@ -223,6 +223,7 @@ export default {
|
|
|
223
223
|
[CrmSections.CONTACTS]: 'Contacts',
|
|
224
224
|
[CrmSections.SLAS]: 'SLAS',
|
|
225
225
|
[CrmSections.SOURCES]: 'Case sources',
|
|
226
|
+
[CrmSections.CONTACT_GROUPS]: 'Contact groups',
|
|
226
227
|
},
|
|
227
228
|
},
|
|
228
229
|
[WebitelApplications.HISTORY]: { name: 'Call History' },
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -222,6 +222,7 @@ export default {
|
|
|
222
222
|
[CrmSections.CONTACTS]: 'Контакты',
|
|
223
223
|
[CrmSections.SLAS]: 'SLAS',
|
|
224
224
|
[CrmSections.SOURCES]: 'Источники обращений',
|
|
225
|
+
[CrmSections.CONTACT_GROUPS]: 'Группы контактов',
|
|
225
226
|
},
|
|
226
227
|
},
|
|
227
228
|
[WebitelApplications.HISTORY]: { name: 'Call History' },
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -222,6 +222,7 @@ export default {
|
|
|
222
222
|
[CrmSections.CONTACTS]: 'Контакти',
|
|
223
223
|
[CrmSections.SLAS]: 'SLAS',
|
|
224
224
|
[CrmSections.SOURCES]: 'Джерела звернень',
|
|
225
|
+
[CrmSections.CONTACT_GROUPS]: 'Групи контактів',
|
|
225
226
|
},
|
|
226
227
|
},
|
|
227
228
|
[WebitelApplications.HISTORY]: { name: 'Call History' },
|
|
@@ -202,6 +202,10 @@ const applicationsAccess = (value = true) => ({
|
|
|
202
202
|
_enabled: value,
|
|
203
203
|
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.SOURCES}`,
|
|
204
204
|
},
|
|
205
|
+
[CrmSections.CONTACT_GROUPS]: {
|
|
206
|
+
_enabled: value,
|
|
207
|
+
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.CONTACT_GROUPS}`,
|
|
208
|
+
},
|
|
205
209
|
},
|
|
206
210
|
});
|
|
207
211
|
|