@webitel/ui-sdk 26.8.67 → 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 (125) hide show
  1. package/dist/clients-D5pO5FKV.js +39334 -0
  2. package/dist/{components-CXPq3d81.js → components-BH_gLkO3.js} +7 -7
  3. package/dist/{genClient-DMVlC4Uy.js → genClient-DtYJ9KWy.js} +1 -1
  4. package/dist/ui-sdk.js +3 -3
  5. package/dist/ui-sdk.umd.cjs +659 -735
  6. package/dist/{wt-button-l_CCN7zG.js → wt-button-TVtG0saz.js} +1 -1
  7. package/dist/{wt-chat-emoji-BwCLLExE.js → wt-chat-emoji-B-FoXVDr.js} +3 -3
  8. package/dist/{wt-display-chip-items-DgDn6xoK.js → wt-display-chip-items-CZzcHtcb.js} +1 -1
  9. package/dist/{wt-icon-btn-BbPNcD-O.js → wt-icon-btn-B_hS2f_v.js} +1 -1
  10. package/dist/{wt-icon-CjNYdMOP.js → wt-icon-md5nPR1T.js} +2 -2
  11. package/dist/{wt-notifications-bar-BTt1vqwz.js → wt-notifications-bar-k3Osz6gY.js} +1 -1
  12. package/dist/{wt-player-CoB2InY0.js → wt-player-R3rAiIxl.js} +2 -2
  13. package/dist/{wt-send-message-popup-TJdbzgRF.js → wt-send-message-popup-Cc92sY9q.js} +2 -2
  14. package/dist/{wt-toast-DHV4UvFz.js → wt-toast-DsIX8ZW_.js} +1 -1
  15. package/dist/wt-tree-CfvNlw7N.js +2042 -0
  16. package/dist/{wt-tree-table-9vnEJcX0.js → wt-tree-table-R02DpJ7M.js} +1 -1
  17. package/dist/{wt-type-extension-value-input-D5Y-ds9V.js → wt-type-extension-value-input-DfbrgPNa.js} +2 -2
  18. package/dist/{wt-vidstack-player-DKf1aSC7.js → wt-vidstack-player-DtbNeGgs.js} +3 -3
  19. package/package.json +1 -1
  20. package/src/api/clients/index.js +5 -66
  21. package/src/assets/icons/sprite/call--filled.svg +2 -2
  22. package/src/assets/icons/sprite/call-end--filled.svg +2 -3
  23. package/src/modules/AgentStatusSelect/api/agent-status.ts +44 -0
  24. package/src/modules/AgentStatusSelect/api/pause-cause.ts +54 -0
  25. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -10
  26. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +2 -6
  27. package/types/.tsbuildinfo +1 -1
  28. package/types/api/clients/index.d.ts +1 -33
  29. package/types/modules/AgentStatusSelect/api/agent-status.d.ts +4 -12
  30. package/types/modules/AgentStatusSelect/api/pause-cause.d.ts +7 -9
  31. package/dist/clients-DpqA006B.js +0 -40042
  32. package/dist/side-channel-M3LABDql.js +0 -833
  33. package/dist/wt-tree-DKSphRxr.js +0 -1216
  34. package/src/api/clients/agents/agentChats.js +0 -79
  35. package/src/api/clients/agents/agents.js +0 -300
  36. package/src/api/clients/buckets/buckets.js +0 -134
  37. package/src/api/clients/calendars/calendars.js +0 -239
  38. package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.js +0 -161
  39. package/src/api/clients/caseCloseReasons/caseCloseReasons.js +0 -165
  40. package/src/api/clients/casePriorities/casePriorities.js +0 -166
  41. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.js +0 -231
  42. package/src/api/clients/caseServices/services.js +0 -221
  43. package/src/api/clients/caseSources/caseSources.ts +0 -2
  44. package/src/api/clients/caseStatusConditions/caseStatusConditions.js +0 -207
  45. package/src/api/clients/caseStatuses/caseStatuses.js +0 -152
  46. package/src/api/clients/catalog/catalog.js +0 -63
  47. package/src/api/clients/chatGateways/chatGateways.js +0 -338
  48. package/src/api/clients/chatGateways/defaults/defaultChatGateway.js +0 -18
  49. package/src/api/clients/chatGateways/defaults/webChatGateway.js +0 -72
  50. package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +0 -14
  51. package/src/api/clients/chatGateways/scripts/generateUri.js +0 -9
  52. package/src/api/clients/communications/communications.js +0 -172
  53. package/src/api/clients/configurations/configurations.js +0 -168
  54. package/src/api/clients/contactGroups/contactGroups.js +0 -221
  55. package/src/api/clients/flows/flow.js +0 -252
  56. package/src/api/clients/gateways/defaults/defaultGateway.js +0 -9
  57. package/src/api/clients/gateways/defaults/registerGateway.js +0 -12
  58. package/src/api/clients/gateways/defaults/trunkingGateway.js +0 -16
  59. package/src/api/clients/gateways/gateways.js +0 -221
  60. package/src/api/clients/labels/labels.js +0 -69
  61. package/src/api/clients/lists/blacklists.js +0 -142
  62. package/src/api/clients/media/media.js +0 -136
  63. package/src/api/clients/object/object.js +0 -138
  64. package/src/api/clients/queues/queues.js +0 -263
  65. package/src/api/clients/quickReplies/quickReplies.ts +0 -2
  66. package/src/api/clients/skills/skills.js +0 -134
  67. package/src/api/clients/slaConditions/slaConditions.js +0 -190
  68. package/src/api/clients/slas/slas.js +0 -148
  69. package/src/api/clients/teams/teams.js +0 -161
  70. package/src/api/clients/users/__tests__/users.spec.js +0 -282
  71. package/src/api/clients/users/users.js +0 -334
  72. package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +0 -38
  73. package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +0 -92
  74. package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +0 -156
  75. package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +0 -119
  76. package/src/api/clients//321/201ontacts/contacts.js +0 -449
  77. package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.js +0 -9
  78. package/src/api/clients//321/201ontacts/index.js +0 -5
  79. package/src/modules/AgentStatusSelect/api/agent-status.js +0 -30
  80. package/src/modules/AgentStatusSelect/api/pause-cause.js +0 -49
  81. package/types/api/clients/agents/agentChats.d.ts +0 -10
  82. package/types/api/clients/agents/agents.d.ts +0 -55
  83. package/types/api/clients/buckets/buckets.d.ts +0 -30
  84. package/types/api/clients/calendars/calendars.d.ts +0 -35
  85. package/types/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.d.ts +0 -30
  86. package/types/api/clients/caseCloseReasons/caseCloseReasons.d.ts +0 -36
  87. package/types/api/clients/casePriorities/casePriorities.d.ts +0 -30
  88. package/types/api/clients/caseServiceCatalogs/serviceCatalogs.d.ts +0 -30
  89. package/types/api/clients/caseServices/services.d.ts +0 -42
  90. package/types/api/clients/caseSources/caseSources.d.ts +0 -1
  91. package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +0 -43
  92. package/types/api/clients/caseStatuses/caseStatuses.d.ts +0 -30
  93. package/types/api/clients/catalog/catalog.d.ts +0 -13
  94. package/types/api/clients/chatGateways/chatGateways.d.ts +0 -35
  95. package/types/api/clients/chatGateways/defaults/defaultChatGateway.d.ts +0 -15
  96. package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +0 -64
  97. package/types/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.d.ts +0 -8
  98. package/types/api/clients/chatGateways/scripts/generateUri.d.ts +0 -2
  99. package/types/api/clients/communications/communications.d.ts +0 -35
  100. package/types/api/clients/configurations/configurations.d.ts +0 -35
  101. package/types/api/clients/contactGroups/contactGroups.d.ts +0 -47
  102. package/types/api/clients/flows/flow.d.ts +0 -35
  103. package/types/api/clients/gateways/defaults/defaultGateway.d.ts +0 -8
  104. package/types/api/clients/gateways/defaults/registerGateway.d.ts +0 -13
  105. package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +0 -11
  106. package/types/api/clients/gateways/gateways.d.ts +0 -35
  107. package/types/api/clients/labels/labels.d.ts +0 -13
  108. package/types/api/clients/lists/blacklists.d.ts +0 -30
  109. package/types/api/clients/media/media.d.ts +0 -24
  110. package/types/api/clients/object/object.d.ts +0 -13
  111. package/types/api/clients/queues/queues.d.ts +0 -40
  112. package/types/api/clients/quickReplies/quickReplies.d.ts +0 -1
  113. package/types/api/clients/skills/skills.d.ts +0 -30
  114. package/types/api/clients/slaConditions/slaConditions.d.ts +0 -36
  115. package/types/api/clients/slas/slas.d.ts +0 -30
  116. package/types/api/clients/teams/teams.d.ts +0 -30
  117. package/types/api/clients/users/__tests__/users.spec.d.ts +0 -1
  118. package/types/api/clients/users/users.d.ts +0 -46
  119. package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +0 -2
  120. package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +0 -29
  121. package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +0 -33
  122. package/types/api/clients//321/201ontacts/contactChatMessagesHistory.d.ts +0 -16
  123. package/types/api/clients//321/201ontacts/contacts.d.ts +0 -29
  124. package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +0 -8
  125. package/types/api/clients//321/201ontacts/index.d.ts +0 -4
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
2
  import { n as t } from "./sortQueryAdapters-CyYXvnDN.js";
3
- import { n, t as r } from "./wt-icon-btn-BbPNcD-O.js";
3
+ import { n, t as r } from "./wt-icon-btn-B_hS2f_v.js";
4
4
  import { t as i } from "./useWtTable-BbNT2rXz.js";
5
5
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, normalizeStyle as g, onMounted as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toRef as w, unref as T, withCtx as E, withModifiers as D } from "vue";
6
6
  //#region src/components/wt-tree-table-row/wt-tree-table-row.vue?vue&type=script&setup=true&lang.ts
@@ -1,5 +1,5 @@
1
- import { a as e, o as t, r as n, s as r } from "./components-CXPq3d81.js";
2
- import { t as i } from "./clients-DpqA006B.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,8 +1,8 @@
1
- import { k as e } from "./components-CXPq3d81.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
- import "./wt-button-l_CCN7zG.js";
5
- import { t as r } from "./wt-icon-btn-BbPNcD-O.js";
4
+ import "./wt-button-TVtG0saz.js";
5
+ import { t as r } from "./wt-icon-btn-B_hS2f_v.js";
6
6
  import { $ as i, C as a, D as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as ee, P as te, Q as g, R as ne, S as _, U as re, V as v, W as y, X as b, Y as ie, Z as x, _ as S, a as ae, b as oe, c as se, d as ce, et as le, f as ue, g as de, h as fe, i as C, it as pe, j as me, k as he, l as w, m as ge, n as T, nt as E, o as D, ot as _e, p as O, q as k, r as A, rt as ve, t as ye, tt as be, u as xe, v as j, w as Se, y as Ce, z as we } from "./vidstack-D9mvYVIz-DesuYgKV.js";
7
7
  import { _ as M, a as Te, c as Ee, d as De, f as Oe, g as ke, h as Ae, i as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as N, u as ze } from "./vidstack-CgfrU1hS-CNTJkyzm.js";
8
8
  import { _ as Be, a as Ve, c as He, f as Ue, g as We, h as Ge, i as Ke, l as qe, n as Je, r as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./useVidstackSrc-aQcqC_v0.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.67",
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 };
@@ -1,3 +1,3 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M21.9908 18.4655C21.916 17.6769 21.3984 16.8998 20.4083 16.0895C19.2434 15.136 18.344 14.6741 17.5779 14.636C16.6212 14.5883 16.0452 15.1809 15.4354 15.8084C15.3732 15.8725 15.3099 15.9374 15.2451 16.0032C15.2076 16.0411 15.1467 16.0838 15.0072 16.0769C14.6014 16.0567 13.5347 15.638 10.9498 13.062C9.82891 11.9442 9.00313 10.9991 8.49538 10.253C7.99078 9.51145 7.80141 8.95575 7.98903 8.76611C8.05344 8.70092 8.11741 8.63718 8.18036 8.57454C8.73424 8.02282 9.25737 7.50173 9.32609 6.70701C9.39903 5.86306 8.94686 4.89871 7.8603 3.58045C7.02003 2.55901 6.21778 2.04284 5.4076 2.00248C4.3082 1.94772 3.50362 2.8101 2.85722 3.50299C2.74336 3.62517 2.63577 3.74046 2.53085 3.84688C1.74844 4.63808 1.83519 6.42358 2.7628 8.62304C3.76758 11.0056 5.6388 13.6318 8.03171 16.0179C12.2903 20.2636 16.226 21.8909 18.3023 21.9943C19.1414 22.0361 19.7923 21.848 20.1849 21.4503C20.2908 21.3429 20.4053 21.2331 20.5264 21.1169C21.2271 20.4449 22.0992 19.6086 21.9908 18.4655Z"/>
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.39964 3.10133C7.91438 1.63289 5.60827 1.63289 4.12302 3.10133L3.42124 3.79517C2.35115 4.85314 1.69091 6.54212 2.14584 8.298C2.73098 11.2318 4.41754 14.3941 7.14329 16.9861C9.7479 19.5567 12.9525 21.3385 15.9567 21.9097L15.9741 21.9128C17.6267 22.2099 19.2103 21.7455 20.4276 20.5419L21.1294 19.8481C21.2235 19.7551 21.3067 19.6516 21.3775 19.5396C21.8437 18.8023 22.0353 17.9188 21.9954 17.0906C21.9552 16.2553 21.6712 15.333 21.0089 14.5846C20.9832 14.5555 20.9565 14.5273 20.9289 14.5001L19.7258 13.3106C18.4411 12.0404 16.4357 12.0404 15.151 13.3106L14.7373 13.7196C13.7961 13.2183 12.8562 12.5651 12.1065 11.8238C11.2447 10.9718 10.5972 10.1021 10.1724 9.27129L10.5024 8.94495C11.1223 8.33214 11.5284 7.52905 11.5575 6.63726C11.5869 5.73865 11.2259 4.9069 10.6027 4.29076L9.39964 3.10133Z"/>
3
3
  </svg>
@@ -1,4 +1,3 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd"
3
- d="M12 4.57523L10.7174 3.29429C10.3246 2.9019 9.68756 2.9019 9.29467 3.29429C8.90178 3.68669 8.90178 4.32288 9.29467 4.71528L10.5818 6.00075L9.29616 7.28472C8.90327 7.67712 8.90327 8.31331 9.29616 8.70571C9.68905 9.0981 10.3261 9.0981 10.7189 8.70571L12 7.42627L13.2811 8.70571C13.674 9.0981 14.311 9.0981 14.7038 8.7057C15.0967 8.31331 15.0967 7.67712 14.7038 7.28473L13.4182 6.00075L14.7053 4.71528C15.0982 4.32288 15.0982 3.68669 14.7053 3.2943C14.3124 2.9019 13.6754 2.9019 13.2826 3.2943L12 4.57523ZM2.67743 20.4508C3.16641 20.9127 3.89976 21.0807 4.91945 20.9644C6.11929 20.8275 6.89027 20.5443 7.34579 20.0732C7.91467 19.4848 7.90526 18.7285 7.89526 17.9276C7.89422 17.8459 7.89321 17.7629 7.8927 17.6783C7.89245 17.6296 7.90274 17.5625 7.98572 17.4767C8.22698 17.2271 9.06834 16.8077 11.9914 16.8019C13.2593 16.8 14.2623 16.8772 14.9725 17.0314C15.6783 17.1848 16.1003 17.4219 16.1014 17.6661C16.1019 17.75 16.1017 17.8326 16.1016 17.9139C16.1003 18.6295 16.0992 19.3054 16.5104 19.8642C16.9471 20.4577 17.7494 20.7892 19.1114 20.9391C20.1659 21.0564 20.9126 20.8712 21.3943 20.373C22.048 19.6968 22.0153 18.6179 21.989 17.7511C21.9842 17.5983 21.9799 17.454 21.979 17.3172C21.9741 16.2987 20.9137 15.1992 19.1425 14.3761C17.224 13.4843 14.6767 12.9956 11.9699 13C7.15325 13.0084 4.00247 14.5025 2.76789 15.7794C2.26897 16.2955 2.00682 16.8385 2.0097 17.35C2.01051 17.4881 2.00788 17.6337 2.00509 17.7873C1.98889 18.6757 1.96874 19.7812 2.67743 20.4508Z"/>
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.7174 2.29429L12 3.57523L13.2826 2.29429C13.6754 1.9019 14.3124 1.9019 14.7053 2.29429C15.0982 2.68669 15.0982 3.32288 14.7053 3.71528L13.4182 5.00075L14.7038 6.28472C15.0967 6.67712 15.0967 7.31331 14.7038 7.70571C14.311 8.0981 13.6739 8.0981 13.2811 7.70571L12 6.42627L10.7189 7.70571C10.3261 8.0981 9.68905 8.0981 9.29616 7.70571C8.90327 7.31331 8.90327 6.67712 9.29616 6.28472L10.5818 5.00075L9.29467 3.71528C8.90178 3.32288 8.90178 2.68669 9.29467 2.29429C9.68756 1.9019 10.3246 1.9019 10.7174 2.29429ZM1.00525 18.3465C1.0162 20.3422 2.51895 21.9004 4.44368 21.9118L6.00271 21.921C6.8103 21.9257 7.58752 21.6077 8.15398 20.9807C8.71614 20.3585 8.97478 19.5414 8.97021 18.7085L8.96777 18.265C9.78599 17.9907 10.7747 17.8406 11.8915 17.8472C12.863 17.8529 13.9011 18.0466 14.8411 18.3438L14.8442 18.8997C14.8537 20.626 16.1604 21.9809 17.8253 21.9908L19.3844 22C19.4201 22.0002 19.4559 21.9992 19.4915 21.9969C20.4109 21.9388 21.197 21.5074 21.7674 20.9703C22.3332 20.4376 22.7839 19.7112 22.9607 18.898C22.9875 18.7745 23.0007 18.6483 23 18.522L22.9948 17.579C22.9858 15.9432 22.2565 14.5594 20.986 13.6435L20.9727 13.6339C18.6428 11.99 15.3935 11.0286 12.0212 11.0057C8.55592 10.9153 5.39624 11.9124 3.10318 13.4993C1.66254 14.3784 0.992174 15.9657 1.00007 17.4035L1.00525 18.3465Z" />
4
3
  </svg>
@@ -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);