@webitel/ui-sdk 26.8.68 → 26.8.69

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 (116) hide show
  1. package/dist/clients-D5pO5FKV.js +39334 -0
  2. package/dist/{components-BoODKBgN.js → components-BH_gLkO3.js} +3 -3
  3. package/dist/{genClient-C_5VsLM9.js → genClient-DtYJ9KWy.js} +1 -1
  4. package/dist/ui-sdk.js +2 -2
  5. package/dist/ui-sdk.umd.cjs +657 -732
  6. package/dist/{wt-chat-emoji-DMSSNCSp.js → wt-chat-emoji-B-FoXVDr.js} +1 -1
  7. package/dist/{wt-display-chip-items-BaL81KbX.js → wt-display-chip-items-CZzcHtcb.js} +1 -1
  8. package/dist/{wt-send-message-popup-Cz3tLMAW.js → wt-send-message-popup-Cc92sY9q.js} +2 -2
  9. package/dist/wt-tree-CfvNlw7N.js +2042 -0
  10. package/dist/{wt-type-extension-value-input-D7eK5MwZ.js → wt-type-extension-value-input-DfbrgPNa.js} +2 -2
  11. package/dist/{wt-vidstack-player-CPk5Y-1M.js → wt-vidstack-player-DtbNeGgs.js} +1 -1
  12. package/package.json +1 -1
  13. package/src/api/clients/index.js +5 -66
  14. package/src/modules/AgentStatusSelect/api/agent-status.ts +44 -0
  15. package/src/modules/AgentStatusSelect/api/pause-cause.ts +54 -0
  16. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -10
  17. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +2 -6
  18. package/types/.tsbuildinfo +1 -1
  19. package/types/api/clients/index.d.ts +1 -33
  20. package/types/modules/AgentStatusSelect/api/agent-status.d.ts +4 -12
  21. package/types/modules/AgentStatusSelect/api/pause-cause.d.ts +7 -9
  22. package/dist/clients-CjmnMcur.js +0 -40042
  23. package/dist/side-channel-M3LABDql.js +0 -833
  24. package/dist/wt-tree-DKSphRxr.js +0 -1216
  25. package/src/api/clients/agents/agentChats.js +0 -79
  26. package/src/api/clients/agents/agents.js +0 -300
  27. package/src/api/clients/buckets/buckets.js +0 -134
  28. package/src/api/clients/calendars/calendars.js +0 -239
  29. package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.js +0 -161
  30. package/src/api/clients/caseCloseReasons/caseCloseReasons.js +0 -165
  31. package/src/api/clients/casePriorities/casePriorities.js +0 -166
  32. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.js +0 -231
  33. package/src/api/clients/caseServices/services.js +0 -221
  34. package/src/api/clients/caseSources/caseSources.ts +0 -2
  35. package/src/api/clients/caseStatusConditions/caseStatusConditions.js +0 -207
  36. package/src/api/clients/caseStatuses/caseStatuses.js +0 -152
  37. package/src/api/clients/catalog/catalog.js +0 -63
  38. package/src/api/clients/chatGateways/chatGateways.js +0 -338
  39. package/src/api/clients/chatGateways/defaults/defaultChatGateway.js +0 -18
  40. package/src/api/clients/chatGateways/defaults/webChatGateway.js +0 -72
  41. package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +0 -14
  42. package/src/api/clients/chatGateways/scripts/generateUri.js +0 -9
  43. package/src/api/clients/communications/communications.js +0 -172
  44. package/src/api/clients/configurations/configurations.js +0 -168
  45. package/src/api/clients/contactGroups/contactGroups.js +0 -221
  46. package/src/api/clients/flows/flow.js +0 -252
  47. package/src/api/clients/gateways/defaults/defaultGateway.js +0 -9
  48. package/src/api/clients/gateways/defaults/registerGateway.js +0 -12
  49. package/src/api/clients/gateways/defaults/trunkingGateway.js +0 -16
  50. package/src/api/clients/gateways/gateways.js +0 -221
  51. package/src/api/clients/labels/labels.js +0 -69
  52. package/src/api/clients/lists/blacklists.js +0 -142
  53. package/src/api/clients/media/media.js +0 -136
  54. package/src/api/clients/object/object.js +0 -138
  55. package/src/api/clients/queues/queues.js +0 -263
  56. package/src/api/clients/quickReplies/quickReplies.ts +0 -2
  57. package/src/api/clients/skills/skills.js +0 -134
  58. package/src/api/clients/slaConditions/slaConditions.js +0 -190
  59. package/src/api/clients/slas/slas.js +0 -148
  60. package/src/api/clients/teams/teams.js +0 -161
  61. package/src/api/clients/users/__tests__/users.spec.js +0 -282
  62. package/src/api/clients/users/users.js +0 -334
  63. package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +0 -38
  64. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +0 -92
  65. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +0 -156
  66. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +0 -119
  67. package/src/api/clients//321/201ontacts/contacts.js +0 -449
  68. package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.js +0 -9
  69. package/src/api/clients//321/201ontacts/index.js +0 -5
  70. package/src/modules/AgentStatusSelect/api/agent-status.js +0 -30
  71. package/src/modules/AgentStatusSelect/api/pause-cause.js +0 -49
  72. package/types/api/clients/agents/agentChats.d.ts +0 -10
  73. package/types/api/clients/agents/agents.d.ts +0 -55
  74. package/types/api/clients/buckets/buckets.d.ts +0 -30
  75. package/types/api/clients/calendars/calendars.d.ts +0 -35
  76. package/types/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.d.ts +0 -30
  77. package/types/api/clients/caseCloseReasons/caseCloseReasons.d.ts +0 -36
  78. package/types/api/clients/casePriorities/casePriorities.d.ts +0 -30
  79. package/types/api/clients/caseServiceCatalogs/serviceCatalogs.d.ts +0 -30
  80. package/types/api/clients/caseServices/services.d.ts +0 -42
  81. package/types/api/clients/caseSources/caseSources.d.ts +0 -1
  82. package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +0 -43
  83. package/types/api/clients/caseStatuses/caseStatuses.d.ts +0 -30
  84. package/types/api/clients/catalog/catalog.d.ts +0 -13
  85. package/types/api/clients/chatGateways/chatGateways.d.ts +0 -35
  86. package/types/api/clients/chatGateways/defaults/defaultChatGateway.d.ts +0 -15
  87. package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +0 -64
  88. package/types/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.d.ts +0 -8
  89. package/types/api/clients/chatGateways/scripts/generateUri.d.ts +0 -2
  90. package/types/api/clients/communications/communications.d.ts +0 -35
  91. package/types/api/clients/configurations/configurations.d.ts +0 -35
  92. package/types/api/clients/contactGroups/contactGroups.d.ts +0 -47
  93. package/types/api/clients/flows/flow.d.ts +0 -35
  94. package/types/api/clients/gateways/defaults/defaultGateway.d.ts +0 -8
  95. package/types/api/clients/gateways/defaults/registerGateway.d.ts +0 -13
  96. package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +0 -11
  97. package/types/api/clients/gateways/gateways.d.ts +0 -35
  98. package/types/api/clients/labels/labels.d.ts +0 -13
  99. package/types/api/clients/lists/blacklists.d.ts +0 -30
  100. package/types/api/clients/media/media.d.ts +0 -24
  101. package/types/api/clients/object/object.d.ts +0 -13
  102. package/types/api/clients/queues/queues.d.ts +0 -40
  103. package/types/api/clients/quickReplies/quickReplies.d.ts +0 -1
  104. package/types/api/clients/skills/skills.d.ts +0 -30
  105. package/types/api/clients/slaConditions/slaConditions.d.ts +0 -36
  106. package/types/api/clients/slas/slas.d.ts +0 -30
  107. package/types/api/clients/teams/teams.d.ts +0 -30
  108. package/types/api/clients/users/__tests__/users.spec.d.ts +0 -1
  109. package/types/api/clients/users/users.d.ts +0 -46
  110. package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +0 -2
  111. package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +0 -29
  112. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +0 -33
  113. package/types/api/clients//321/201ontacts/contactChatMessagesHistory.d.ts +0 -16
  114. package/types/api/clients//321/201ontacts/contacts.d.ts +0 -29
  115. package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +0 -8
  116. 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-BH_gLkO3.js";
2
+ import { t as i } from "./clients-D5pO5FKV.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-BH_gLkO3.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.69",
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 };
@@ -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);