@webitel/ui-sdk 26.8.68 → 26.8.70

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.
Files changed (120) hide show
  1. package/dist/clients-BLoUCVC8.js +39334 -0
  2. package/dist/{components-BoODKBgN.js → components-DBVFjVK_.js} +3 -3
  3. package/dist/{genClient-C_5VsLM9.js → genClient-BqTmfnDx.js} +1 -1
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.js +2 -2
  6. package/dist/ui-sdk.umd.cjs +657 -732
  7. package/dist/{wt-chat-emoji-DMSSNCSp.js → wt-chat-emoji-CveWfqBS.js} +1 -1
  8. package/dist/{wt-display-chip-items-BaL81KbX.js → wt-display-chip-items-BmRyOpv7.js} +1 -1
  9. package/dist/{wt-send-message-popup-Cz3tLMAW.js → wt-send-message-popup-Ci3b-7uX.js} +2 -2
  10. package/dist/wt-table-actions-D7harVHK.js +63 -0
  11. package/dist/wt-tree-CfvNlw7N.js +2042 -0
  12. package/dist/{wt-type-extension-value-input-D7eK5MwZ.js → wt-type-extension-value-input-BGb_JCgp.js} +2 -2
  13. package/dist/{wt-vidstack-player-CPk5Y-1M.js → wt-vidstack-player-luoZqZ5-.js} +1 -1
  14. package/package.json +1 -1
  15. package/src/api/clients/index.js +5 -66
  16. package/src/components/wt-table-actions/wt-table-actions.vue +1 -1
  17. package/src/modules/AgentStatusSelect/api/agent-status.ts +44 -0
  18. package/src/modules/AgentStatusSelect/api/pause-cause.ts +54 -0
  19. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -10
  20. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +2 -6
  21. package/types/.tsbuildinfo +1 -1
  22. package/types/api/clients/index.d.ts +1 -33
  23. package/types/modules/AgentStatusSelect/api/agent-status.d.ts +4 -12
  24. package/types/modules/AgentStatusSelect/api/pause-cause.d.ts +7 -9
  25. package/dist/clients-CjmnMcur.js +0 -40042
  26. package/dist/side-channel-M3LABDql.js +0 -833
  27. package/dist/wt-table-actions-4-peSVkc.js +0 -63
  28. package/dist/wt-tree-DKSphRxr.js +0 -1216
  29. package/src/api/clients/agents/agentChats.js +0 -79
  30. package/src/api/clients/agents/agents.js +0 -300
  31. package/src/api/clients/buckets/buckets.js +0 -134
  32. package/src/api/clients/calendars/calendars.js +0 -239
  33. package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.js +0 -161
  34. package/src/api/clients/caseCloseReasons/caseCloseReasons.js +0 -165
  35. package/src/api/clients/casePriorities/casePriorities.js +0 -166
  36. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.js +0 -231
  37. package/src/api/clients/caseServices/services.js +0 -221
  38. package/src/api/clients/caseSources/caseSources.ts +0 -2
  39. package/src/api/clients/caseStatusConditions/caseStatusConditions.js +0 -207
  40. package/src/api/clients/caseStatuses/caseStatuses.js +0 -152
  41. package/src/api/clients/catalog/catalog.js +0 -63
  42. package/src/api/clients/chatGateways/chatGateways.js +0 -338
  43. package/src/api/clients/chatGateways/defaults/defaultChatGateway.js +0 -18
  44. package/src/api/clients/chatGateways/defaults/webChatGateway.js +0 -72
  45. package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +0 -14
  46. package/src/api/clients/chatGateways/scripts/generateUri.js +0 -9
  47. package/src/api/clients/communications/communications.js +0 -172
  48. package/src/api/clients/configurations/configurations.js +0 -168
  49. package/src/api/clients/contactGroups/contactGroups.js +0 -221
  50. package/src/api/clients/flows/flow.js +0 -252
  51. package/src/api/clients/gateways/defaults/defaultGateway.js +0 -9
  52. package/src/api/clients/gateways/defaults/registerGateway.js +0 -12
  53. package/src/api/clients/gateways/defaults/trunkingGateway.js +0 -16
  54. package/src/api/clients/gateways/gateways.js +0 -221
  55. package/src/api/clients/labels/labels.js +0 -69
  56. package/src/api/clients/lists/blacklists.js +0 -142
  57. package/src/api/clients/media/media.js +0 -136
  58. package/src/api/clients/object/object.js +0 -138
  59. package/src/api/clients/queues/queues.js +0 -263
  60. package/src/api/clients/quickReplies/quickReplies.ts +0 -2
  61. package/src/api/clients/skills/skills.js +0 -134
  62. package/src/api/clients/slaConditions/slaConditions.js +0 -190
  63. package/src/api/clients/slas/slas.js +0 -148
  64. package/src/api/clients/teams/teams.js +0 -161
  65. package/src/api/clients/users/__tests__/users.spec.js +0 -282
  66. package/src/api/clients/users/users.js +0 -334
  67. package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +0 -38
  68. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +0 -92
  69. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +0 -156
  70. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +0 -119
  71. package/src/api/clients//321/201ontacts/contacts.js +0 -449
  72. package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.js +0 -9
  73. package/src/api/clients//321/201ontacts/index.js +0 -5
  74. package/src/modules/AgentStatusSelect/api/agent-status.js +0 -30
  75. package/src/modules/AgentStatusSelect/api/pause-cause.js +0 -49
  76. package/types/api/clients/agents/agentChats.d.ts +0 -10
  77. package/types/api/clients/agents/agents.d.ts +0 -55
  78. package/types/api/clients/buckets/buckets.d.ts +0 -30
  79. package/types/api/clients/calendars/calendars.d.ts +0 -35
  80. package/types/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.d.ts +0 -30
  81. package/types/api/clients/caseCloseReasons/caseCloseReasons.d.ts +0 -36
  82. package/types/api/clients/casePriorities/casePriorities.d.ts +0 -30
  83. package/types/api/clients/caseServiceCatalogs/serviceCatalogs.d.ts +0 -30
  84. package/types/api/clients/caseServices/services.d.ts +0 -42
  85. package/types/api/clients/caseSources/caseSources.d.ts +0 -1
  86. package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +0 -43
  87. package/types/api/clients/caseStatuses/caseStatuses.d.ts +0 -30
  88. package/types/api/clients/catalog/catalog.d.ts +0 -13
  89. package/types/api/clients/chatGateways/chatGateways.d.ts +0 -35
  90. package/types/api/clients/chatGateways/defaults/defaultChatGateway.d.ts +0 -15
  91. package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +0 -64
  92. package/types/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.d.ts +0 -8
  93. package/types/api/clients/chatGateways/scripts/generateUri.d.ts +0 -2
  94. package/types/api/clients/communications/communications.d.ts +0 -35
  95. package/types/api/clients/configurations/configurations.d.ts +0 -35
  96. package/types/api/clients/contactGroups/contactGroups.d.ts +0 -47
  97. package/types/api/clients/flows/flow.d.ts +0 -35
  98. package/types/api/clients/gateways/defaults/defaultGateway.d.ts +0 -8
  99. package/types/api/clients/gateways/defaults/registerGateway.d.ts +0 -13
  100. package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +0 -11
  101. package/types/api/clients/gateways/gateways.d.ts +0 -35
  102. package/types/api/clients/labels/labels.d.ts +0 -13
  103. package/types/api/clients/lists/blacklists.d.ts +0 -30
  104. package/types/api/clients/media/media.d.ts +0 -24
  105. package/types/api/clients/object/object.d.ts +0 -13
  106. package/types/api/clients/queues/queues.d.ts +0 -40
  107. package/types/api/clients/quickReplies/quickReplies.d.ts +0 -1
  108. package/types/api/clients/skills/skills.d.ts +0 -30
  109. package/types/api/clients/slaConditions/slaConditions.d.ts +0 -36
  110. package/types/api/clients/slas/slas.d.ts +0 -30
  111. package/types/api/clients/teams/teams.d.ts +0 -30
  112. package/types/api/clients/users/__tests__/users.spec.d.ts +0 -1
  113. package/types/api/clients/users/users.d.ts +0 -46
  114. package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +0 -2
  115. package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +0 -29
  116. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +0 -33
  117. package/types/api/clients//321/201ontacts/contactChatMessagesHistory.d.ts +0 -16
  118. package/types/api/clients//321/201ontacts/contacts.d.ts +0 -29
  119. package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +0 -8
  120. package/types/api/clients//321/201ontacts/index.d.ts +0 -4
@@ -1,5 +1,5 @@
1
- import { a as e, o as t, r as n, s as r } from "./components-BoODKBgN.js";
2
- import { t as i } from "./clients-CjmnMcur.js";
1
+ import { a as e, o as t, r as n, s as r } from "./components-DBVFjVK_.js";
2
+ import { t as i } from "./clients-BLoUCVC8.js";
3
3
  import { t as a } from "./enums-CM8hOd_m.js";
4
4
  import { t as o } from "./vue-i18n-DNulhn2J.js";
5
5
  import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
@@ -1,4 +1,4 @@
1
- import { k as e } from "./components-BoODKBgN.js";
1
+ import { k as e } from "./components-DBVFjVK_.js";
2
2
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { l as n } from "./enums-CM8hOd_m.js";
4
4
  import "./wt-button-TVtG0saz.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.68",
3
+ "version": "26.8.70",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -1,68 +1,7 @@
1
- import agentChats from './agents/agentChats';
2
- import agents from './agents/agents';
3
- import buckets from './buckets/buckets';
4
- import calendars from './calendars/calendars';
5
- import caseCloseReasonGroups from './caseCloseReasonGroups/caseCloseReasonGroups';
6
- import caseCloseReasons from './caseCloseReasons/caseCloseReasons';
7
- import casePriorities from './casePriorities/casePriorities';
8
- import caseServiceCatalogs from './caseServiceCatalogs/serviceCatalogs';
9
- import caseSources from './caseSources/caseSources';
10
- import caseStatusConditions from './caseStatusConditions/caseStatusConditions';
11
- import caseStatuses from './caseStatuses/caseStatuses';
12
- import catalog from './catalog/catalog';
13
- import chatGateways from './chatGateways/chatGateways';
14
- import communications from './communications/communications';
15
- import configurations from './configurations/configurations';
16
- import contactGroups from './contactGroups/contactGroups';
17
- import flows from './flows/flow';
18
- import gateways from './gateways/gateways';
19
- import labels from './labels/labels';
20
- import lists from './lists/blacklists';
21
- import media from './media/media';
22
- import object from './object/object';
23
- import queues from './queues/queues';
24
- import quickReplies from './quickReplies/quickReplies';
25
1
  import roles from './roles/roles';
26
- import skills from './skills/skills';
27
- import slas from './slas/slas';
28
- import teams from './teams/teams';
29
- import users from './users/users';
30
- import sysTypes from './wtTypes/sysTypes/sysTypes';
31
- import typeExtensions from './wtTypes/typeExtensions/typeExtensions';
32
- import { contactChatMessagesHistory, contacts } from './сontacts/index';
33
2
 
34
- export {
35
- agentChats,
36
- agents,
37
- buckets,
38
- calendars,
39
- caseCloseReasonGroups,
40
- caseCloseReasons,
41
- casePriorities,
42
- caseServiceCatalogs,
43
- caseSources,
44
- caseStatusConditions,
45
- caseStatuses,
46
- catalog,
47
- chatGateways,
48
- communications,
49
- configurations,
50
- contactChatMessagesHistory,
51
- contactGroups,
52
- contacts,
53
- flows,
54
- gateways,
55
- labels,
56
- lists,
57
- media,
58
- object,
59
- queues,
60
- quickReplies,
61
- roles,
62
- skills,
63
- slas,
64
- sysTypes,
65
- teams,
66
- typeExtensions,
67
- users,
68
- };
3
+ /*
4
+ * The rest of this layer moved to `@webitel/api-services`; `roles` is the only
5
+ * client left here, still on the `webitel-sdk` factory.
6
+ */
7
+ export { roles };
@@ -38,7 +38,7 @@
38
38
  />
39
39
 
40
40
  <wt-badge
41
- :hidden="!isSettingsBadge"
41
+ v-if="isSettingsBadge"
42
42
  >
43
43
  <wt-icon-btn
44
44
  v-if="isSettings"
@@ -0,0 +1,44 @@
1
+ import { getAgentService } from '@webitel/api-services/gen-wire';
2
+
3
+ import type { StatusChangePayload } from '../types/StatusChangePayload.types';
4
+
5
+ const patchAgentStatus = async ({
6
+ agentId,
7
+ status,
8
+ pauseCause,
9
+ statusComment,
10
+ onlineSkill,
11
+ }: StatusChangePayload): Promise<{
12
+ success: boolean;
13
+ }> => {
14
+ /*
15
+ * `id` used to ride along in the body. The path already carries it and the
16
+ * endpoint does not declare it, so it was being ignored; dropped rather
17
+ * than cast past the type.
18
+ */
19
+ const res = await getAgentService().updateAgentStatus(String(agentId), {
20
+ status,
21
+ payload: pauseCause,
22
+ status_comment: statusComment,
23
+ /*
24
+ * `LookupOption.id` is typed `string | number`, the endpoint declares a
25
+ * string. The values are already strings — they come straight from
26
+ * `EngineOnlineSkills.id` — so this narrows the type without changing
27
+ * what goes on the wire. Mapped rather than cast: a cast here would hide
28
+ * the day the two shapes genuinely diverge.
29
+ */
30
+ online_skill: onlineSkill && {
31
+ id: String(onlineSkill.id),
32
+ name: onlineSkill.name,
33
+ },
34
+ });
35
+ return {
36
+ success: !!res,
37
+ };
38
+ };
39
+
40
+ const AgentStatusAPI = {
41
+ patch: patchAgentStatus,
42
+ };
43
+
44
+ export default AgentStatusAPI;
@@ -0,0 +1,54 @@
1
+ import { getDefaultGetListResponse } from '@webitel/api-services/api/defaults';
2
+ import {
3
+ applyTransform,
4
+ merge,
5
+ mergeEach,
6
+ notify,
7
+ snakeToCamel,
8
+ } from '@webitel/api-services/api/transformers';
9
+ import type { EngineForAgentPauseCause } from '@webitel/api-services/gen/models';
10
+ import { getAgentService } from '@webitel/api-services/gen-wire';
11
+
12
+ const getList = async ({
13
+ agentId,
14
+ }: {
15
+ agentId: string | number;
16
+ }): Promise<{
17
+ items: EngineForAgentPauseCause[];
18
+ next: boolean;
19
+ }> => {
20
+ const defaultObject = {
21
+ name: '',
22
+ durationMin: 0,
23
+ limitMin: 0,
24
+ };
25
+
26
+ try {
27
+ const response = await getAgentService().searchPauseCauseForAgent(
28
+ String(agentId),
29
+ {
30
+ allow_change: true,
31
+ },
32
+ );
33
+ const { items, next } = applyTransform(response.data, [
34
+ snakeToCamel(),
35
+ merge(getDefaultGetListResponse()),
36
+ ]);
37
+ return {
38
+ items: applyTransform(items, [
39
+ mergeEach(defaultObject),
40
+ ]),
41
+ next,
42
+ };
43
+ } catch (err) {
44
+ throw applyTransform(err, [
45
+ notify,
46
+ ]);
47
+ }
48
+ };
49
+
50
+ const PauseCauseAPI = {
51
+ getList,
52
+ };
53
+
54
+ export default PauseCauseAPI;
@@ -2,8 +2,8 @@ import { flushPromises, mount, shallowMount } from '@vue/test-utils';
2
2
  import { createStore } from 'vuex';
3
3
 
4
4
  import AgentStatus from '../../../../enums/AgentStatus/AgentStatus.enum.js';
5
- import * as AgentStatusAPIFactory from '../../api/agent-status.js';
6
- import * as PauseCauseAPIFactory from '../../api/pause-cause.js';
5
+ import AgentStatusAPI from '../../api/agent-status';
6
+ import PauseCauseAPI from '../../api/pause-cause';
7
7
  import WtCcAgentStatusSelect from '../wt-cc-agent-status-select.vue';
8
8
 
9
9
  const pauseCauses = [
@@ -17,16 +17,10 @@ const pauseCauses = [
17
17
  const getAgentPauseCausesMock = vi.fn(() => ({
18
18
  items: pauseCauses,
19
19
  }));
20
- // https://stackoverflow.com/a/63727813
21
- vi.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({
22
- getList: getAgentPauseCausesMock,
23
- }));
20
+ PauseCauseAPI.getList = getAgentPauseCausesMock;
24
21
 
25
22
  const agentStatusMock = vi.fn(() => {});
26
- // https://stackoverflow.com/a/63727813
27
- vi.spyOn(AgentStatusAPIFactory, 'default').mockImplementation(() => ({
28
- patch: agentStatusMock,
29
- }));
23
+ AgentStatusAPI.patch = agentStatusMock;
30
24
 
31
25
  const onlineSkillsGetListMock = vi.fn(() => ({
32
26
  items: [
@@ -39,13 +39,12 @@
39
39
  import type { EngineForAgentPauseCause } from '@webitel/api-services/gen';
40
40
  import { ref } from 'vue';
41
41
  import { useI18n } from 'vue-i18n';
42
- import { useStore } from 'vuex';
43
42
  import { PauseNotAllowedError } from 'webitel-sdk';
44
43
  import WtSwitcher from '../../../components/wt-switcher/wt-switcher.vue';
45
44
  import { AgentStatus } from '../../../enums';
46
45
  import type { LookupOption } from '../../../types';
47
- import AgentStatusAPIFactory from '../api/agent-status.js';
48
- import PauseCauseAPIFactory from '../api/pause-cause.js';
46
+ import AgentStatusAPI from '../api/agent-status';
47
+ import PauseCauseAPI from '../api/pause-cause';
49
48
  import { useActivityTypesOptions } from '../composables/useActivityTypesOptions';
50
49
  import { useCCenterModeSwitcher } from '../composables/useCCenterModeSwitcher';
51
50
  import type { StatusChangePayload } from '../types/StatusChangePayload.types';
@@ -80,9 +79,6 @@ const emit = defineEmits<{
80
79
  ];
81
80
  }>();
82
81
 
83
- const { api } = useStore().state;
84
- const AgentStatusAPI = AgentStatusAPIFactory(api);
85
- const PauseCauseAPI = PauseCauseAPIFactory(api);
86
82
  const { t } = useI18n();
87
83
 
88
84
  const isPauseCausePopup = ref(false);