@webitel/ui-sdk 25.4.39 → 25.4.41
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 +13 -0
- package/package.json +1 -1
- package/src/api/clients/index.js +24 -22
- package/src/api/clients/object/object.js +114 -0
- package/src/locale/en/en.js +3 -2
- package/src/locale/ru/ru.js +3 -2
- package/src/locale/ua/ua.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [v25.4.40] - 2025-03-21
|
|
2
|
+
### :bug: Bug Fixes
|
|
3
|
+
- [`3436353`](https://github.com/webitel/webitel-ui-sdk/commit/3436353d2b81e1b9d0cb6e023efaeb04ec158ab1) - rewrite cases group locale key [WTEL-6461](https://webitel.atlassian.net/browse/WTEL-6461) *(commit by [@plnnsimon](https://github.com/plnnsimon))*
|
|
4
|
+
- [`0de4c2f`](https://github.com/webitel/webitel-ui-sdk/commit/0de4c2f36f16a140296f52682d015e713906436e) - rewrite cases group locale key [WTEL-6461](https://webitel.atlassian.net/browse/WTEL-6461) *(commit by [@plnnsimon](https://github.com/plnnsimon))*
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## [v25.4.39] - 2025-03-19
|
|
8
|
+
### :sparkles: New Features
|
|
9
|
+
- [`c96c7b1`](https://github.com/webitel/webitel-ui-sdk/commit/c96c7b1c599f7e8ce9ab0db2e2d9b889d4432c21) - added timestamp to buildVersion info [WTEL-6537](https://webitel.atlassian.net/browse/WTEL-6537) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
## [v25.4.38] - 2025-03-18
|
|
2
13
|
### :sparkles: New Features
|
|
3
14
|
- [`d7e3989`](https://github.com/webitel/webitel-ui-sdk/commit/d7e39894bbc86f358148fc8b7c629d7ce85cb6ad) - added husky to project, added pre-commit linting hook [WTEL-6537](https://webitel.atlassian.net/browse/WTEL-6537) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
@@ -1699,3 +1710,5 @@
|
|
|
1699
1710
|
[v25.4.36]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.35...v25.4.36
|
|
1700
1711
|
[v25.4.37]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.36...v25.4.37
|
|
1701
1712
|
[v25.4.38]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.37...v25.4.38
|
|
1713
|
+
[v25.4.39]: https://github.com/webitel/webitel-ui-sdk/compare/v25.4.38...v25.4.39
|
|
1714
|
+
[v25.4.40]: https://github.com/webitel/webitel-ui-sdk/compare/v24.12.174...v25.4.40
|
package/package.json
CHANGED
package/src/api/clients/index.js
CHANGED
|
@@ -2,55 +2,57 @@ import agentChats from './agents/agentChats.js';
|
|
|
2
2
|
import agents from './agents/agents.js';
|
|
3
3
|
import buckets from './buckets/buckets.js';
|
|
4
4
|
import calendars from './calendars/calendars.js';
|
|
5
|
+
import caseCloseReasonGroups from './caseCloseReasonGroups/caseCloseReasonGroups.js';
|
|
6
|
+
import caseCloseReasons from './caseCloseReasons/caseCloseReasons.js';
|
|
7
|
+
import casePriorities from './casePriorities/casePriorities.js';
|
|
8
|
+
import caseSources from './caseSources/caseSources.js';
|
|
9
|
+
import caseStatusConditions from './caseStatusConditions/caseStatusConditions.js';
|
|
10
|
+
import caseStatuses from './caseStatuses/caseStatuses.js';
|
|
5
11
|
import catalog from './catalog/catalog.js';
|
|
6
12
|
import chatGateways from './chatGateways/chatGateways.js';
|
|
7
13
|
import communications from './communications/communications.js';
|
|
8
14
|
import configurations from './configurations/configurations.js';
|
|
15
|
+
import contactGroups from './contactGroups/contactGroups.js';
|
|
9
16
|
import flows from './flows/flow.js';
|
|
10
17
|
import gateways from './gateways/gateways.js';
|
|
11
18
|
import lists from './lists/blacklists.js';
|
|
12
19
|
import media from './media/media.js';
|
|
20
|
+
import object from './object/object.js';
|
|
13
21
|
import queues from './queues/queues.js';
|
|
14
22
|
import roles from './roles/roles.js';
|
|
15
23
|
import skills from './skills/skills.js';
|
|
24
|
+
import slas from './slas/slas.js';
|
|
16
25
|
import teams from './teams/teams.js';
|
|
17
26
|
import users from './users/users.js';
|
|
18
|
-
import caseSources from './caseSources/caseSources.js';
|
|
19
|
-
import casePriorities from './casePriorities/casePriorities.js';
|
|
20
27
|
import { contactChatMessagesHistory, contacts } from './сontacts/index.js';
|
|
21
|
-
import slas from './slas/slas.js';
|
|
22
|
-
import caseCloseReasonGroups from './caseCloseReasonGroups/caseCloseReasonGroups.js';
|
|
23
|
-
import caseCloseReasons from './caseCloseReasons/caseCloseReasons.js';
|
|
24
|
-
import caseStatuses from './caseStatuses/caseStatuses.js';
|
|
25
|
-
import caseStatusConditions from './caseStatusConditions/caseStatusConditions.js';
|
|
26
|
-
import contactGroups from './contactGroups/contactGroups.js';
|
|
27
28
|
|
|
28
29
|
export {
|
|
29
|
-
agents,
|
|
30
30
|
agentChats,
|
|
31
|
+
agents,
|
|
31
32
|
buckets,
|
|
32
33
|
calendars,
|
|
34
|
+
caseCloseReasonGroups,
|
|
35
|
+
caseCloseReasons,
|
|
36
|
+
casePriorities,
|
|
37
|
+
caseSources,
|
|
38
|
+
caseStatusConditions,
|
|
39
|
+
caseStatuses,
|
|
33
40
|
catalog,
|
|
34
41
|
chatGateways,
|
|
35
42
|
communications,
|
|
43
|
+
configurations,
|
|
44
|
+
contactChatMessagesHistory,
|
|
45
|
+
contactGroups,
|
|
46
|
+
contacts,
|
|
36
47
|
flows,
|
|
37
48
|
gateways,
|
|
38
|
-
teams,
|
|
39
|
-
skills,
|
|
40
49
|
lists,
|
|
41
50
|
media,
|
|
51
|
+
object,
|
|
42
52
|
queues,
|
|
43
53
|
roles,
|
|
44
|
-
|
|
45
|
-
configurations,
|
|
46
|
-
contacts,
|
|
47
|
-
contactChatMessagesHistory,
|
|
48
|
-
caseSources,
|
|
49
|
-
casePriorities,
|
|
54
|
+
skills,
|
|
50
55
|
slas,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
caseStatuses,
|
|
54
|
-
caseStatusConditions,
|
|
55
|
-
contactGroups,
|
|
56
|
+
teams,
|
|
57
|
+
users,
|
|
56
58
|
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { TypesApiFactory } from 'webitel-sdk';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
getDefaultGetListResponse,
|
|
5
|
+
getDefaultGetParams,
|
|
6
|
+
getDefaultInstance,
|
|
7
|
+
getDefaultOpenAPIConfig,
|
|
8
|
+
} from '../../defaults/index';
|
|
9
|
+
import applyTransform, {
|
|
10
|
+
camelToSnake,
|
|
11
|
+
generateUrl,
|
|
12
|
+
merge,
|
|
13
|
+
notify,
|
|
14
|
+
sanitize,
|
|
15
|
+
snakeToCamel,
|
|
16
|
+
starToSearch,
|
|
17
|
+
} from '../../transformers/index';
|
|
18
|
+
|
|
19
|
+
const instance = getDefaultInstance();
|
|
20
|
+
const configuration = getDefaultOpenAPIConfig();
|
|
21
|
+
|
|
22
|
+
const typeService = new TypesApiFactory(configuration, '', instance);
|
|
23
|
+
|
|
24
|
+
const getObjectList = async (params) => {
|
|
25
|
+
const fieldsToSend = ['page', 'size', 'q', 'sort', 'fields', 'id'];
|
|
26
|
+
|
|
27
|
+
const { page, size, fields, sort, id, q } = applyTransform(params, [
|
|
28
|
+
merge(getDefaultGetParams()),
|
|
29
|
+
starToSearch('search'),
|
|
30
|
+
(params) => ({ ...params, q: params.search }),
|
|
31
|
+
sanitize(fieldsToSend),
|
|
32
|
+
camelToSnake(),
|
|
33
|
+
]);
|
|
34
|
+
try {
|
|
35
|
+
const response = await typeService.search(
|
|
36
|
+
q,
|
|
37
|
+
id,
|
|
38
|
+
undefined,
|
|
39
|
+
undefined,
|
|
40
|
+
undefined,
|
|
41
|
+
undefined,
|
|
42
|
+
undefined,
|
|
43
|
+
undefined,
|
|
44
|
+
undefined,
|
|
45
|
+
size,
|
|
46
|
+
page,
|
|
47
|
+
sort,
|
|
48
|
+
fields,
|
|
49
|
+
);
|
|
50
|
+
const { data, next } = applyTransform(response.data, [
|
|
51
|
+
merge(getDefaultGetListResponse()),
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
const itemResponseHandler = (items) =>
|
|
55
|
+
(items || []).map((item) => ({
|
|
56
|
+
...item,
|
|
57
|
+
id: item.repo,
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
items: applyTransform(data, [snakeToCamel(), itemResponseHandler]),
|
|
62
|
+
next,
|
|
63
|
+
};
|
|
64
|
+
} catch (err) {
|
|
65
|
+
throw applyTransform(err, [notify]);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const getObjectLookupList = async ({ ...params }) => {
|
|
70
|
+
const fieldsToSend = [
|
|
71
|
+
'page',
|
|
72
|
+
'size',
|
|
73
|
+
'q',
|
|
74
|
+
'sort',
|
|
75
|
+
'extensions',
|
|
76
|
+
'fields',
|
|
77
|
+
'id',
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const url = applyTransform(params, [
|
|
81
|
+
merge(getDefaultGetParams()),
|
|
82
|
+
(params) => ({ ...params, q: params.search, extensions: false }),
|
|
83
|
+
sanitize(fieldsToSend),
|
|
84
|
+
camelToSnake(),
|
|
85
|
+
generateUrl('types'),
|
|
86
|
+
]);
|
|
87
|
+
try {
|
|
88
|
+
const response = await instance.get(url);
|
|
89
|
+
const { data, next } = applyTransform(response.data, [
|
|
90
|
+
snakeToCamel(),
|
|
91
|
+
merge(getDefaultGetListResponse()),
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
items: data ?? [],
|
|
96
|
+
next,
|
|
97
|
+
};
|
|
98
|
+
} catch (err) {
|
|
99
|
+
throw applyTransform(err, [notify]);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const getObjectLookup = async (params) =>
|
|
104
|
+
getObjectLookupList({
|
|
105
|
+
...params,
|
|
106
|
+
fields: params.fields || ['id', 'name'],
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const ObjectsApi = {
|
|
110
|
+
getList: getObjectList,
|
|
111
|
+
getLookup: getObjectLookup,
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default ObjectsApi;
|
package/src/locale/en/en.js
CHANGED
|
@@ -83,6 +83,7 @@ export default {
|
|
|
83
83
|
draggable: 'Draggable',
|
|
84
84
|
unassigned: 'Unassigned',
|
|
85
85
|
showUnassigned: 'Show unassigned',
|
|
86
|
+
group: 'Group',
|
|
86
87
|
},
|
|
87
88
|
// yak zhe ya zaebalsya povtoriaty odni i ti sami slova!!!!
|
|
88
89
|
vocabulary: {
|
|
@@ -237,7 +238,7 @@ export default {
|
|
|
237
238
|
reporter: 'Reporter',
|
|
238
239
|
impacted: 'Impacted',
|
|
239
240
|
assignee: 'Assignee',
|
|
240
|
-
|
|
241
|
+
groupPerformers: 'Group',
|
|
241
242
|
reason: 'Reason | Reasons',
|
|
242
243
|
rating: 'Rating',
|
|
243
244
|
service: 'Service | Services',
|
|
@@ -546,7 +547,7 @@ export default {
|
|
|
546
547
|
return linked('vocabulary.contact');
|
|
547
548
|
},
|
|
548
549
|
contactGroup: ({ linked }) => {
|
|
549
|
-
return linked('cases.
|
|
550
|
+
return linked('cases.groupPerformers');
|
|
550
551
|
},
|
|
551
552
|
createdAtFrom: ({ linked }) => {
|
|
552
553
|
return linked('reusable.from');
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -83,6 +83,7 @@ export default {
|
|
|
83
83
|
draggable: 'Перетащить',
|
|
84
84
|
unassigned: 'Неназначенные',
|
|
85
85
|
showUnassigned: 'Показать неназначенные',
|
|
86
|
+
group: 'Группа',
|
|
86
87
|
},
|
|
87
88
|
vocabulary: {
|
|
88
89
|
apply: 'Применить',
|
|
@@ -230,7 +231,7 @@ export default {
|
|
|
230
231
|
reporter: 'Инициатор',
|
|
231
232
|
impacted: 'Влияет на',
|
|
232
233
|
assignee: 'Исполнитель',
|
|
233
|
-
|
|
234
|
+
groupPerformers: 'Группа исполнителей',
|
|
234
235
|
reason: 'Причина | Причины',
|
|
235
236
|
rating: 'Оценка',
|
|
236
237
|
service: 'Сервисы | Сервисы',
|
|
@@ -544,7 +545,7 @@ export default {
|
|
|
544
545
|
return linked('vocabulary.contact');
|
|
545
546
|
},
|
|
546
547
|
contactGroup: ({ linked }) => {
|
|
547
|
-
return linked('cases.
|
|
548
|
+
return linked('cases.groupPerformers');
|
|
548
549
|
},
|
|
549
550
|
createdAtFrom: ({ linked }) => {
|
|
550
551
|
return linked('reusable.from');
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
draggable: 'Перетягнути',
|
|
85
85
|
unassigned: 'Непризначені',
|
|
86
86
|
showUnassigned: 'Показати непризначені',
|
|
87
|
+
group: 'Група',
|
|
87
88
|
},
|
|
88
89
|
vocabulary: {
|
|
89
90
|
apply: 'Застосувати',
|
|
@@ -236,7 +237,7 @@ export default {
|
|
|
236
237
|
reporter: 'Ініціатор',
|
|
237
238
|
impacted: 'Впливає на',
|
|
238
239
|
assignee: 'Виконавець',
|
|
239
|
-
|
|
240
|
+
groupPerformers: 'Група виконавців',
|
|
240
241
|
reason: 'Причина | Причини',
|
|
241
242
|
rating: 'Оцінка',
|
|
242
243
|
service: 'Cервіси | Cервіси',
|
|
@@ -544,7 +545,7 @@ export default {
|
|
|
544
545
|
return linked('vocabulary.contact');
|
|
545
546
|
},
|
|
546
547
|
contactGroup: ({ linked }) => {
|
|
547
|
-
return linked('cases.
|
|
548
|
+
return linked('cases.groupPerformers');
|
|
548
549
|
},
|
|
549
550
|
createdAtFrom: ({ linked }) => {
|
|
550
551
|
return linked('reusable.from');
|