@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.
- package/dist/clients-D5pO5FKV.js +39334 -0
- package/dist/{components-BoODKBgN.js → components-BH_gLkO3.js} +3 -3
- package/dist/{genClient-C_5VsLM9.js → genClient-DtYJ9KWy.js} +1 -1
- package/dist/ui-sdk.js +2 -2
- package/dist/ui-sdk.umd.cjs +657 -732
- package/dist/{wt-chat-emoji-DMSSNCSp.js → wt-chat-emoji-B-FoXVDr.js} +1 -1
- package/dist/{wt-display-chip-items-BaL81KbX.js → wt-display-chip-items-CZzcHtcb.js} +1 -1
- package/dist/{wt-send-message-popup-Cz3tLMAW.js → wt-send-message-popup-Cc92sY9q.js} +2 -2
- package/dist/wt-tree-CfvNlw7N.js +2042 -0
- package/dist/{wt-type-extension-value-input-D7eK5MwZ.js → wt-type-extension-value-input-DfbrgPNa.js} +2 -2
- package/dist/{wt-vidstack-player-CPk5Y-1M.js → wt-vidstack-player-DtbNeGgs.js} +1 -1
- package/package.json +1 -1
- package/src/api/clients/index.js +5 -66
- package/src/modules/AgentStatusSelect/api/agent-status.ts +44 -0
- package/src/modules/AgentStatusSelect/api/pause-cause.ts +54 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -10
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +2 -6
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/index.d.ts +1 -33
- package/types/modules/AgentStatusSelect/api/agent-status.d.ts +4 -12
- package/types/modules/AgentStatusSelect/api/pause-cause.d.ts +7 -9
- package/dist/clients-CjmnMcur.js +0 -40042
- package/dist/side-channel-M3LABDql.js +0 -833
- package/dist/wt-tree-DKSphRxr.js +0 -1216
- package/src/api/clients/agents/agentChats.js +0 -79
- package/src/api/clients/agents/agents.js +0 -300
- package/src/api/clients/buckets/buckets.js +0 -134
- package/src/api/clients/calendars/calendars.js +0 -239
- package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.js +0 -161
- package/src/api/clients/caseCloseReasons/caseCloseReasons.js +0 -165
- package/src/api/clients/casePriorities/casePriorities.js +0 -166
- package/src/api/clients/caseServiceCatalogs/serviceCatalogs.js +0 -231
- package/src/api/clients/caseServices/services.js +0 -221
- package/src/api/clients/caseSources/caseSources.ts +0 -2
- package/src/api/clients/caseStatusConditions/caseStatusConditions.js +0 -207
- package/src/api/clients/caseStatuses/caseStatuses.js +0 -152
- package/src/api/clients/catalog/catalog.js +0 -63
- package/src/api/clients/chatGateways/chatGateways.js +0 -338
- package/src/api/clients/chatGateways/defaults/defaultChatGateway.js +0 -18
- package/src/api/clients/chatGateways/defaults/webChatGateway.js +0 -72
- package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +0 -14
- package/src/api/clients/chatGateways/scripts/generateUri.js +0 -9
- package/src/api/clients/communications/communications.js +0 -172
- package/src/api/clients/configurations/configurations.js +0 -168
- package/src/api/clients/contactGroups/contactGroups.js +0 -221
- package/src/api/clients/flows/flow.js +0 -252
- package/src/api/clients/gateways/defaults/defaultGateway.js +0 -9
- package/src/api/clients/gateways/defaults/registerGateway.js +0 -12
- package/src/api/clients/gateways/defaults/trunkingGateway.js +0 -16
- package/src/api/clients/gateways/gateways.js +0 -221
- package/src/api/clients/labels/labels.js +0 -69
- package/src/api/clients/lists/blacklists.js +0 -142
- package/src/api/clients/media/media.js +0 -136
- package/src/api/clients/object/object.js +0 -138
- package/src/api/clients/queues/queues.js +0 -263
- package/src/api/clients/quickReplies/quickReplies.ts +0 -2
- package/src/api/clients/skills/skills.js +0 -134
- package/src/api/clients/slaConditions/slaConditions.js +0 -190
- package/src/api/clients/slas/slas.js +0 -148
- package/src/api/clients/teams/teams.js +0 -161
- package/src/api/clients/users/__tests__/users.spec.js +0 -282
- package/src/api/clients/users/users.js +0 -334
- package/src/api/clients/wtTypes/_shared/utils/sortDynamicFields.ts +0 -38
- package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +0 -92
- package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +0 -156
- package/src/api/clients//321/201ontacts/contactChatMessagesHistory.js +0 -119
- package/src/api/clients//321/201ontacts/contacts.js +0 -449
- package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.js +0 -9
- package/src/api/clients//321/201ontacts/index.js +0 -5
- package/src/modules/AgentStatusSelect/api/agent-status.js +0 -30
- package/src/modules/AgentStatusSelect/api/pause-cause.js +0 -49
- package/types/api/clients/agents/agentChats.d.ts +0 -10
- package/types/api/clients/agents/agents.d.ts +0 -55
- package/types/api/clients/buckets/buckets.d.ts +0 -30
- package/types/api/clients/calendars/calendars.d.ts +0 -35
- package/types/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.d.ts +0 -30
- package/types/api/clients/caseCloseReasons/caseCloseReasons.d.ts +0 -36
- package/types/api/clients/casePriorities/casePriorities.d.ts +0 -30
- package/types/api/clients/caseServiceCatalogs/serviceCatalogs.d.ts +0 -30
- package/types/api/clients/caseServices/services.d.ts +0 -42
- package/types/api/clients/caseSources/caseSources.d.ts +0 -1
- package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +0 -43
- package/types/api/clients/caseStatuses/caseStatuses.d.ts +0 -30
- package/types/api/clients/catalog/catalog.d.ts +0 -13
- package/types/api/clients/chatGateways/chatGateways.d.ts +0 -35
- package/types/api/clients/chatGateways/defaults/defaultChatGateway.d.ts +0 -15
- package/types/api/clients/chatGateways/defaults/webChatGateway.d.ts +0 -64
- package/types/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.d.ts +0 -8
- package/types/api/clients/chatGateways/scripts/generateUri.d.ts +0 -2
- package/types/api/clients/communications/communications.d.ts +0 -35
- package/types/api/clients/configurations/configurations.d.ts +0 -35
- package/types/api/clients/contactGroups/contactGroups.d.ts +0 -47
- package/types/api/clients/flows/flow.d.ts +0 -35
- package/types/api/clients/gateways/defaults/defaultGateway.d.ts +0 -8
- package/types/api/clients/gateways/defaults/registerGateway.d.ts +0 -13
- package/types/api/clients/gateways/defaults/trunkingGateway.d.ts +0 -11
- package/types/api/clients/gateways/gateways.d.ts +0 -35
- package/types/api/clients/labels/labels.d.ts +0 -13
- package/types/api/clients/lists/blacklists.d.ts +0 -30
- package/types/api/clients/media/media.d.ts +0 -24
- package/types/api/clients/object/object.d.ts +0 -13
- package/types/api/clients/queues/queues.d.ts +0 -40
- package/types/api/clients/quickReplies/quickReplies.d.ts +0 -1
- package/types/api/clients/skills/skills.d.ts +0 -30
- package/types/api/clients/slaConditions/slaConditions.d.ts +0 -36
- package/types/api/clients/slas/slas.d.ts +0 -30
- package/types/api/clients/teams/teams.d.ts +0 -30
- package/types/api/clients/users/__tests__/users.spec.d.ts +0 -1
- package/types/api/clients/users/users.d.ts +0 -46
- package/types/api/clients/wtTypes/_shared/utils/sortDynamicFields.d.ts +0 -2
- package/types/api/clients/wtTypes/sysTypes/sysTypes.d.ts +0 -29
- package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +0 -33
- package/types/api/clients//321/201ontacts/contactChatMessagesHistory.d.ts +0 -16
- package/types/api/clients//321/201ontacts/contacts.d.ts +0 -29
- package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +0 -8
- package/types/api/clients//321/201ontacts/index.d.ts +0 -4
package/dist/{wt-type-extension-value-input-D7eK5MwZ.js → wt-type-extension-value-input-DfbrgPNa.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, s as r } from "./components-
|
|
2
|
-
import { t as i } from "./clients-
|
|
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";
|
package/package.json
CHANGED
package/src/api/clients/index.js
CHANGED
|
@@ -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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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;
|
package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js
CHANGED
|
@@ -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
|
|
6
|
-
import
|
|
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
|
-
|
|
21
|
-
vi.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({
|
|
22
|
-
getList: getAgentPauseCausesMock,
|
|
23
|
-
}));
|
|
20
|
+
PauseCauseAPI.getList = getAgentPauseCausesMock;
|
|
24
21
|
|
|
25
22
|
const agentStatusMock = vi.fn(() => {});
|
|
26
|
-
|
|
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
|
|
48
|
-
import
|
|
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);
|