@wxcc-desktop/sdk 1.2.6 → 1.2.10
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/README.md +18 -391
- package/dist/index.js +1 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/jsapi/actions-jsapi.d.ts +33 -0
- package/dist/types/jsapi/agent-contact-jsapi.d.ts +430 -0
- package/dist/types/jsapi/agent-state-info-jsapi.d.ts +88 -0
- package/dist/types/jsapi/common/_logger.d.ts +4 -0
- package/dist/types/jsapi/common/_service-checker.d.ts +12 -0
- package/dist/types/jsapi/common/_service-events.d.ts +31 -0
- package/dist/types/jsapi/config-jsapi.d.ts +26 -0
- package/dist/types/jsapi/dialer-jsapi.d.ts +73 -0
- package/dist/types/jsapi/i18n-jsapi.d.ts +23 -0
- package/dist/types/jsapi/logger-jsapi.d.ts +19 -0
- package/dist/types/jsapi/screenpop-jsapi.d.ts +29 -0
- package/dist/types/jsapi/shortcut-key-jsapi.d.ts +67 -0
- package/dist/types/sdk.d.ts +1 -0
- package/package.json +5 -60
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -22
- package/.prettierignore +0 -5
- package/.prettierrc +0 -5
- package/README_PUBLISH.md +0 -36
- package/jenkins-automation/MergePipeline.groovy +0 -143
- package/jest.config.js +0 -15
- package/sonar-project.properties +0 -17
- package/src/[sandbox]/README.md +0 -55
- package/src/[sandbox]/assets/i18n/de/app.json +0 -6
- package/src/[sandbox]/assets/i18n/en/app.json +0 -6
- package/src/[sandbox]/assets/i18n/widget-using-js-api/de/widget-using-js-api.json +0 -5
- package/src/[sandbox]/assets/i18n/widget-using-js-api/en/widget-using-js-api.json +0 -5
- package/src/[sandbox]/favicon.ico +0 -0
- package/src/[sandbox]/index.html +0 -9
- package/src/[sandbox]/sandbox-config.ts +0 -23
- package/src/[sandbox]/sandbox-mock.ts +0 -218
- package/src/[sandbox]/sandbox.ts +0 -164
- package/src/[sandbox]/widget-using-js-api.ts +0 -658
- package/src/global.d.ts +0 -5
- package/src/index.ts +0 -101
- package/src/jsapi/actions-jsapi.test.ts +0 -155
- package/src/jsapi/actions-jsapi.ts +0 -410
- package/src/jsapi/agent-contact-jsapi.test.ts +0 -217
- package/src/jsapi/agent-contact-jsapi.ts +0 -275
- package/src/jsapi/agent-state-info-jsapi.test.ts +0 -176
- package/src/jsapi/agent-state-info-jsapi.ts +0 -288
- package/src/jsapi/common/_logger.test.ts +0 -16
- package/src/jsapi/common/_logger.ts +0 -9
- package/src/jsapi/common/_service-checker.test.ts +0 -44
- package/src/jsapi/common/_service-checker.ts +0 -28
- package/src/jsapi/common/_service-events.test.ts +0 -122
- package/src/jsapi/common/_service-events.ts +0 -156
- package/src/jsapi/config-jsapi.test.ts +0 -78
- package/src/jsapi/config-jsapi.ts +0 -106
- package/src/jsapi/dialer-jsapi.test.ts +0 -101
- package/src/jsapi/dialer-jsapi.ts +0 -116
- package/src/jsapi/i18n-jsapi.test.ts +0 -62
- package/src/jsapi/i18n-jsapi.ts +0 -77
- package/src/jsapi/logger-jsapi.test.ts +0 -45
- package/src/jsapi/logger-jsapi.ts +0 -62
- package/src/jsapi/screenpop-jsapi.test.ts +0 -80
- package/src/jsapi/screenpop-jsapi.ts +0 -100
- package/src/jsapi/shortcut-key-jsapi.test.ts +0 -88
- package/src/jsapi/shortcut-key-jsapi.ts +0 -112
- package/src/sdk.ts +0 -3
- package/src/tsconfig.json +0 -18
- package/tsconfig.json +0 -13
- package/webpack.config.dev.server.ts +0 -12
- package/webpack.config.ts +0 -134
@@ -0,0 +1,21 @@
|
|
1
|
+
import { createActionsJsApi } from "./jsapi/actions-jsapi";
|
2
|
+
import { createAgentContactJsApi } from "./jsapi/agent-contact-jsapi";
|
3
|
+
import { createAgentStateInfoJsApi } from "./jsapi/agent-state-info-jsapi";
|
4
|
+
import { createConfigJsApi } from "./jsapi/config-jsapi";
|
5
|
+
import { createDialerJsApi } from "./jsapi/dialer-jsapi";
|
6
|
+
import { createI18NJsApi } from "./jsapi/i18n-jsapi";
|
7
|
+
import { createLoggerJsApi } from "./jsapi/logger-jsapi";
|
8
|
+
import { createScreenPopJsApi } from "./jsapi/screenpop-jsapi";
|
9
|
+
import { createShortcutKeyJsApi } from "./jsapi/shortcut-key-jsapi";
|
10
|
+
export declare type AgentXJsApi = {
|
11
|
+
config: ReturnType<typeof createConfigJsApi>;
|
12
|
+
logger: ReturnType<typeof createLoggerJsApi>;
|
13
|
+
shortcutKey: ReturnType<typeof createShortcutKeyJsApi>;
|
14
|
+
agentContact: ReturnType<typeof createAgentContactJsApi>;
|
15
|
+
agentStateInfo: ReturnType<typeof createAgentStateInfoJsApi>;
|
16
|
+
dialer: ReturnType<typeof createDialerJsApi>;
|
17
|
+
screenpop: ReturnType<typeof createScreenPopJsApi>;
|
18
|
+
i18n: ReturnType<typeof createI18NJsApi>;
|
19
|
+
actions: ReturnType<typeof createActionsJsApi>;
|
20
|
+
};
|
21
|
+
export declare const Desktop: AgentXJsApi;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { AgentContactSharedActions, GeneralNotificationsSharedActions } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { AgentxService } from "@wxcc-desktop/sdk-types";
|
3
|
+
import { createJsApiLogger } from "./common/_logger";
|
4
|
+
import { createServiceChecker } from './common/_service-checker';
|
5
|
+
declare type Config = {
|
6
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
7
|
+
serviceChecker: ReturnType<typeof createServiceChecker>;
|
8
|
+
};
|
9
|
+
export declare class ActionsJsApi {
|
10
|
+
private readonly logger;
|
11
|
+
private readonly serviceChecker;
|
12
|
+
private SERVICE?;
|
13
|
+
private sourceActionsChannels;
|
14
|
+
private destinationActionsChannels;
|
15
|
+
private checkService;
|
16
|
+
private lastReqTs;
|
17
|
+
private lastReqN;
|
18
|
+
private getNextReqId;
|
19
|
+
constructor(config: Config);
|
20
|
+
init(SERVICE?: AgentxService): void;
|
21
|
+
cleanup(): void;
|
22
|
+
fireGeneralSilentNotification(...args: GeneralNotificationsSharedActions.FireSilent.ReqPayloadParameters): void;
|
23
|
+
fireGeneralAutoDismissNotification(...args: GeneralNotificationsSharedActions.FireAutoDismiss.ReqPayloadParameters): Promise<GeneralNotificationsSharedActions.FireAutoDismiss.ResPayloadParameters | undefined>;
|
24
|
+
fireGeneralAcknowledgeNotification(...args: GeneralNotificationsSharedActions.FireAcknowledge.ReqPayloadParameters): Promise<GeneralNotificationsSharedActions.FireAcknowledge.ResPayloadParameters | undefined>;
|
25
|
+
addCustomTask(...args: AgentContactSharedActions.AddCustomContact.ReqPayloadParameters): void;
|
26
|
+
getTaskMap(): Promise<import("@wxcc-desktop/sdk-types/agentx/store/store-agent-contact").TaskMap | undefined>;
|
27
|
+
getMediaTypeQueue(mediaType: string): Promise<import("@wxcc-desktop/sdk-types/agentx/store/store-agent-contact").TaskMap | undefined>;
|
28
|
+
getToken(): Promise<string | undefined>;
|
29
|
+
getIdleCodes(): Promise<import("@agentx/agentx-services").Service.Aqm.Configs.Entity[] | undefined>;
|
30
|
+
getWrapUpCodes(): Promise<import("@agentx/agentx-services").Service.Aqm.Configs.WrapUpReason[] | undefined>;
|
31
|
+
}
|
32
|
+
export declare const createActionsJsApi: () => ActionsJsApi;
|
33
|
+
export {};
|
@@ -0,0 +1,430 @@
|
|
1
|
+
import { AgentxService, Service } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { createJsApiLogger } from "./common/_logger";
|
3
|
+
import { createServiceChecker } from "./common/_service-checker";
|
4
|
+
import { AqmServiceEntityEvents } from "./common/_service-events";
|
5
|
+
declare type Listeners = {
|
6
|
+
eAgentContact: Parameters<AgentxService["aqm"]["contact"]["eAgentContact"]["listen"]>[0];
|
7
|
+
eAgentContactAssigned: Parameters<AgentxService["aqm"]["contact"]["eAgentContactAssigned"]["listen"]>[0];
|
8
|
+
eAgentContactEnded: Parameters<AgentxService["aqm"]["contact"]["eAgentContactEnded"]["listen"]>[0];
|
9
|
+
eAgentContactWrappedUp: Parameters<AgentxService["aqm"]["contact"]["eAgentContactWrappedUp"]["listen"]>[0];
|
10
|
+
eAgentOfferContact: Parameters<AgentxService["aqm"]["contact"]["eAgentOfferContact"]["listen"]>[0];
|
11
|
+
eAgentOfferContactRona: Parameters<AgentxService["aqm"]["contact"]["eAgentOfferContactRona"]["listen"]>[0];
|
12
|
+
eAgentOfferConsult: Parameters<AgentxService["aqm"]["contact"]["eAgentOfferConsult"]["listen"]>[0];
|
13
|
+
eAgentWrapup: Parameters<AgentxService["aqm"]["contact"]["eAgentWrapup"]["listen"]>[0];
|
14
|
+
eAgentContactHeld: Parameters<AgentxService["aqm"]["contact"]["eAgentContactHeld"]["listen"]>[0];
|
15
|
+
eAgentContactUnHeld: Parameters<AgentxService["aqm"]["contact"]["eAgentContactUnHeld"]["listen"]>[0];
|
16
|
+
eCallRecordingStarted: Parameters<AgentxService["aqm"]["contact"]["eCallRecordingStarted"]["listen"]>[0];
|
17
|
+
eAgentConsultCreated: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultCreated"]["listen"]>[0];
|
18
|
+
eAgentConsultConferenced: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultConferenced"]["listen"]>[0];
|
19
|
+
eAgentConsultEnded: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultEnded"]["listen"]>[0];
|
20
|
+
eAgentCtqCancelled: Parameters<AgentxService["aqm"]["contact"]["eAgentCtqCancelled"]["listen"]>[0];
|
21
|
+
eAgentConsulting: Parameters<AgentxService["aqm"]["contact"]["eAgentConsulting"]["listen"]>[0];
|
22
|
+
eAgentConsultFailed: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultFailed"]["listen"]>[0];
|
23
|
+
eAgentConsultEndFailed: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultEndFailed"]["listen"]>[0];
|
24
|
+
eAgentCtqFailed: Parameters<AgentxService["aqm"]["contact"]["eAgentCtqFailed"]["listen"]>[0];
|
25
|
+
eAgentCtqCancelFailed: Parameters<AgentxService["aqm"]["contact"]["eAgentCtqCancelFailed"]["listen"]>[0];
|
26
|
+
eAgentConsultConferenceEndFailed: Parameters<AgentxService["aqm"]["contact"]["eAgentConsultConferenceEndFailed"]["listen"]>[0];
|
27
|
+
};
|
28
|
+
declare type AqmContactEvents = AqmServiceEntityEvents<Listeners>;
|
29
|
+
declare type Config = {
|
30
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
31
|
+
serviceChecker: ReturnType<typeof createServiceChecker>;
|
32
|
+
aqmEvents: AqmContactEvents;
|
33
|
+
};
|
34
|
+
export declare class AgentContactJsApi {
|
35
|
+
private readonly logger;
|
36
|
+
private readonly serviceChecker;
|
37
|
+
private readonly aqmEvents;
|
38
|
+
private SERVICE?;
|
39
|
+
private checkService;
|
40
|
+
constructor(config: Config);
|
41
|
+
init(SERVICE?: AgentxService): void;
|
42
|
+
cleanup(): void;
|
43
|
+
accept(p: {
|
44
|
+
interactionId: string;
|
45
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
46
|
+
mediaResourceId: string;
|
47
|
+
eventType: string;
|
48
|
+
agentId: string;
|
49
|
+
destAgentId: string;
|
50
|
+
trackingId: string;
|
51
|
+
consultMediaResourceId: string;
|
52
|
+
interaction: Service.Aqm.Contact.Interaction;
|
53
|
+
interactionId: string;
|
54
|
+
orgId: string;
|
55
|
+
owner: string;
|
56
|
+
queueMgr: string;
|
57
|
+
type: string;
|
58
|
+
ronaTimeout?: number | undefined;
|
59
|
+
isConsulted?: boolean | undefined;
|
60
|
+
isConferencing: boolean;
|
61
|
+
updatedBy?: string | undefined;
|
62
|
+
destinationType?: string | undefined;
|
63
|
+
}> | undefined>;
|
64
|
+
consultAccept(p: {
|
65
|
+
interactionId: string;
|
66
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
67
|
+
mediaResourceId: string;
|
68
|
+
eventType: string;
|
69
|
+
agentId: string;
|
70
|
+
destAgentId: string;
|
71
|
+
trackingId: string;
|
72
|
+
consultMediaResourceId: string;
|
73
|
+
interaction: Service.Aqm.Contact.Interaction;
|
74
|
+
interactionId: string;
|
75
|
+
orgId: string;
|
76
|
+
owner: string;
|
77
|
+
queueMgr: string;
|
78
|
+
type: string;
|
79
|
+
ronaTimeout?: number | undefined;
|
80
|
+
isConsulted?: boolean | undefined;
|
81
|
+
isConferencing: boolean;
|
82
|
+
updatedBy?: string | undefined;
|
83
|
+
destinationType?: string | undefined;
|
84
|
+
}> | undefined>;
|
85
|
+
buddyAgents(p: {
|
86
|
+
data: Service.Aqm.Contact.BuddyAgents;
|
87
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
88
|
+
eventType: string;
|
89
|
+
agentId: string;
|
90
|
+
trackingId: string;
|
91
|
+
agentSessionId: string;
|
92
|
+
orgId: string;
|
93
|
+
type: string;
|
94
|
+
agentList: Service.Aqm.Contact.BuddyDetails[];
|
95
|
+
}> | undefined>;
|
96
|
+
end(p: {
|
97
|
+
interactionId: string;
|
98
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
99
|
+
mediaResourceId: string;
|
100
|
+
eventType: string;
|
101
|
+
agentId: string;
|
102
|
+
destAgentId: string;
|
103
|
+
trackingId: string;
|
104
|
+
consultMediaResourceId: string;
|
105
|
+
interaction: Service.Aqm.Contact.Interaction;
|
106
|
+
interactionId: string;
|
107
|
+
orgId: string;
|
108
|
+
owner: string;
|
109
|
+
queueMgr: string;
|
110
|
+
type: string;
|
111
|
+
ronaTimeout?: number | undefined;
|
112
|
+
isConsulted?: boolean | undefined;
|
113
|
+
isConferencing: boolean;
|
114
|
+
updatedBy?: string | undefined;
|
115
|
+
destinationType?: string | undefined;
|
116
|
+
}> | undefined>;
|
117
|
+
consultEnd(p: {
|
118
|
+
interactionId: string;
|
119
|
+
isConsult: boolean;
|
120
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
121
|
+
mediaResourceId: string;
|
122
|
+
eventType: string;
|
123
|
+
agentId: string;
|
124
|
+
destAgentId: string;
|
125
|
+
trackingId: string;
|
126
|
+
consultMediaResourceId: string;
|
127
|
+
interaction: Service.Aqm.Contact.Interaction;
|
128
|
+
interactionId: string;
|
129
|
+
orgId: string;
|
130
|
+
owner: string;
|
131
|
+
queueMgr: string;
|
132
|
+
type: string;
|
133
|
+
ronaTimeout?: number | undefined;
|
134
|
+
isConsulted?: boolean | undefined;
|
135
|
+
isConferencing: boolean;
|
136
|
+
updatedBy?: string | undefined;
|
137
|
+
destinationType?: string | undefined;
|
138
|
+
}> | undefined>;
|
139
|
+
cancelCtq(p: {
|
140
|
+
interactionId: string;
|
141
|
+
data: Service.Aqm.Contact.cancelCtq;
|
142
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
143
|
+
mediaResourceId: string;
|
144
|
+
eventType: string;
|
145
|
+
agentId: string;
|
146
|
+
destAgentId: string;
|
147
|
+
trackingId: string;
|
148
|
+
consultMediaResourceId: string;
|
149
|
+
interaction: Service.Aqm.Contact.Interaction;
|
150
|
+
interactionId: string;
|
151
|
+
orgId: string;
|
152
|
+
owner: string;
|
153
|
+
queueMgr: string;
|
154
|
+
type: string;
|
155
|
+
ronaTimeout?: number | undefined;
|
156
|
+
isConsulted?: boolean | undefined;
|
157
|
+
isConferencing: boolean;
|
158
|
+
updatedBy?: string | undefined;
|
159
|
+
destinationType?: string | undefined;
|
160
|
+
}> | undefined>;
|
161
|
+
wrapup(p: {
|
162
|
+
interactionId: string;
|
163
|
+
data: Service.Aqm.Contact.WrapupPayLoad;
|
164
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
165
|
+
mediaResourceId: string;
|
166
|
+
eventType: string;
|
167
|
+
agentId: string;
|
168
|
+
destAgentId: string;
|
169
|
+
trackingId: string;
|
170
|
+
consultMediaResourceId: string;
|
171
|
+
interaction: Service.Aqm.Contact.Interaction;
|
172
|
+
interactionId: string;
|
173
|
+
orgId: string;
|
174
|
+
owner: string;
|
175
|
+
queueMgr: string;
|
176
|
+
type: string;
|
177
|
+
ronaTimeout?: number | undefined;
|
178
|
+
isConsulted?: boolean | undefined;
|
179
|
+
isConferencing: boolean;
|
180
|
+
updatedBy?: string | undefined;
|
181
|
+
destinationType?: string | undefined;
|
182
|
+
}> | undefined>;
|
183
|
+
vteamTransfer(p: {
|
184
|
+
interactionId: string;
|
185
|
+
data: Service.Aqm.Contact.vteamTransferPayLoad;
|
186
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
187
|
+
mediaResourceId: string;
|
188
|
+
eventType: string;
|
189
|
+
agentId: string;
|
190
|
+
destAgentId: string;
|
191
|
+
trackingId: string;
|
192
|
+
consultMediaResourceId: string;
|
193
|
+
interaction: Service.Aqm.Contact.Interaction;
|
194
|
+
interactionId: string;
|
195
|
+
orgId: string;
|
196
|
+
owner: string;
|
197
|
+
queueMgr: string;
|
198
|
+
type: string;
|
199
|
+
ronaTimeout?: number | undefined;
|
200
|
+
isConsulted?: boolean | undefined;
|
201
|
+
isConferencing: boolean;
|
202
|
+
updatedBy?: string | undefined;
|
203
|
+
destinationType?: string | undefined;
|
204
|
+
}> | undefined>;
|
205
|
+
blindTransfer(p: {
|
206
|
+
interactionId: string;
|
207
|
+
data: Service.Aqm.Contact.blindTransferPayLoad;
|
208
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
209
|
+
mediaResourceId: string;
|
210
|
+
eventType: string;
|
211
|
+
agentId: string;
|
212
|
+
destAgentId: string;
|
213
|
+
trackingId: string;
|
214
|
+
consultMediaResourceId: string;
|
215
|
+
interaction: Service.Aqm.Contact.Interaction;
|
216
|
+
interactionId: string;
|
217
|
+
orgId: string;
|
218
|
+
owner: string;
|
219
|
+
queueMgr: string;
|
220
|
+
type: string;
|
221
|
+
ronaTimeout?: number | undefined;
|
222
|
+
isConsulted?: boolean | undefined;
|
223
|
+
isConferencing: boolean;
|
224
|
+
updatedBy?: string | undefined;
|
225
|
+
destinationType?: string | undefined;
|
226
|
+
}> | undefined>;
|
227
|
+
hold(p: {
|
228
|
+
interactionId: string;
|
229
|
+
data: {
|
230
|
+
mediaResourceId: string;
|
231
|
+
};
|
232
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
233
|
+
mediaResourceId: string;
|
234
|
+
eventType: string;
|
235
|
+
agentId: string;
|
236
|
+
destAgentId: string;
|
237
|
+
trackingId: string;
|
238
|
+
consultMediaResourceId: string;
|
239
|
+
interaction: Service.Aqm.Contact.Interaction;
|
240
|
+
interactionId: string;
|
241
|
+
orgId: string;
|
242
|
+
owner: string;
|
243
|
+
queueMgr: string;
|
244
|
+
type: string;
|
245
|
+
ronaTimeout?: number | undefined;
|
246
|
+
isConsulted?: boolean | undefined;
|
247
|
+
isConferencing: boolean;
|
248
|
+
updatedBy?: string | undefined;
|
249
|
+
destinationType?: string | undefined;
|
250
|
+
}> | undefined>;
|
251
|
+
unHold(p: {
|
252
|
+
interactionId: string;
|
253
|
+
data: {
|
254
|
+
mediaResourceId: string;
|
255
|
+
};
|
256
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
257
|
+
mediaResourceId: string;
|
258
|
+
eventType: string;
|
259
|
+
agentId: string;
|
260
|
+
destAgentId: string;
|
261
|
+
trackingId: string;
|
262
|
+
consultMediaResourceId: string;
|
263
|
+
interaction: Service.Aqm.Contact.Interaction;
|
264
|
+
interactionId: string;
|
265
|
+
orgId: string;
|
266
|
+
owner: string;
|
267
|
+
queueMgr: string;
|
268
|
+
type: string;
|
269
|
+
ronaTimeout?: number | undefined;
|
270
|
+
isConsulted?: boolean | undefined;
|
271
|
+
isConferencing: boolean;
|
272
|
+
updatedBy?: string | undefined;
|
273
|
+
destinationType?: string | undefined;
|
274
|
+
}> | undefined>;
|
275
|
+
consult(p: {
|
276
|
+
interactionId: string;
|
277
|
+
data: Service.Aqm.Contact.ConsultPayload | Service.Aqm.Contact.ConsultDN | Service.Aqm.Contact.ConsultAgent | Service.Aqm.Contact.ConsultQueue;
|
278
|
+
url: string;
|
279
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
280
|
+
mediaResourceId: string;
|
281
|
+
eventType: string;
|
282
|
+
agentId: string;
|
283
|
+
destAgentId: string;
|
284
|
+
trackingId: string;
|
285
|
+
consultMediaResourceId: string;
|
286
|
+
interaction: Service.Aqm.Contact.Interaction;
|
287
|
+
interactionId: string;
|
288
|
+
orgId: string;
|
289
|
+
owner: string;
|
290
|
+
queueMgr: string;
|
291
|
+
type: string;
|
292
|
+
ronaTimeout?: number | undefined;
|
293
|
+
isConsulted?: boolean | undefined;
|
294
|
+
isConferencing: boolean;
|
295
|
+
updatedBy?: string | undefined;
|
296
|
+
destinationType?: string | undefined;
|
297
|
+
}> | undefined>;
|
298
|
+
consultConference(p: {
|
299
|
+
interactionId: string;
|
300
|
+
data: Service.Aqm.Contact.ConsultPayload;
|
301
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
302
|
+
mediaResourceId: string;
|
303
|
+
eventType: string;
|
304
|
+
agentId: string;
|
305
|
+
destAgentId: string;
|
306
|
+
trackingId: string;
|
307
|
+
consultMediaResourceId: string;
|
308
|
+
interaction: Service.Aqm.Contact.Interaction;
|
309
|
+
interactionId: string;
|
310
|
+
orgId: string;
|
311
|
+
owner: string;
|
312
|
+
queueMgr: string;
|
313
|
+
type: string;
|
314
|
+
ronaTimeout?: number | undefined;
|
315
|
+
isConsulted?: boolean | undefined;
|
316
|
+
isConferencing: boolean;
|
317
|
+
updatedBy?: string | undefined;
|
318
|
+
destinationType?: string | undefined;
|
319
|
+
}> | undefined>;
|
320
|
+
decline(p: {
|
321
|
+
interactionId: string;
|
322
|
+
data: {
|
323
|
+
mediaResourceId: string;
|
324
|
+
};
|
325
|
+
isConsult: boolean;
|
326
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
327
|
+
mediaResourceId: string;
|
328
|
+
eventType: string;
|
329
|
+
agentId: string;
|
330
|
+
destAgentId: string;
|
331
|
+
trackingId: string;
|
332
|
+
consultMediaResourceId: string;
|
333
|
+
interaction: Service.Aqm.Contact.Interaction;
|
334
|
+
interactionId: string;
|
335
|
+
orgId: string;
|
336
|
+
owner: string;
|
337
|
+
queueMgr: string;
|
338
|
+
type: string;
|
339
|
+
ronaTimeout?: number | undefined;
|
340
|
+
isConsulted?: boolean | undefined;
|
341
|
+
isConferencing: boolean;
|
342
|
+
updatedBy?: string | undefined;
|
343
|
+
destinationType?: string | undefined;
|
344
|
+
}> | undefined>;
|
345
|
+
consultTransfer(p: {
|
346
|
+
interactionId: string;
|
347
|
+
data: Service.Aqm.Contact.consultTransferPayLoad;
|
348
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
349
|
+
mediaResourceId: string;
|
350
|
+
eventType: string;
|
351
|
+
agentId: string;
|
352
|
+
destAgentId: string;
|
353
|
+
trackingId: string;
|
354
|
+
consultMediaResourceId: string;
|
355
|
+
interaction: Service.Aqm.Contact.Interaction;
|
356
|
+
interactionId: string;
|
357
|
+
orgId: string;
|
358
|
+
owner: string;
|
359
|
+
queueMgr: string;
|
360
|
+
type: string;
|
361
|
+
ronaTimeout?: number | undefined;
|
362
|
+
isConsulted?: boolean | undefined;
|
363
|
+
isConferencing: boolean;
|
364
|
+
updatedBy?: string | undefined;
|
365
|
+
destinationType?: string | undefined;
|
366
|
+
}> | undefined>;
|
367
|
+
vteamList(p: {
|
368
|
+
data: Service.Aqm.Contact.VTeam;
|
369
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
370
|
+
data: {
|
371
|
+
vteamList: Service.Aqm.Contact.VteamDetails[];
|
372
|
+
allowConsultToQueue: boolean;
|
373
|
+
};
|
374
|
+
jsMethod: string;
|
375
|
+
callData: string;
|
376
|
+
agentSessionId: string;
|
377
|
+
}> | undefined>;
|
378
|
+
pauseRecording(p: {
|
379
|
+
interactionId: string;
|
380
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
381
|
+
mediaResourceId: string;
|
382
|
+
eventType: string;
|
383
|
+
agentId: string;
|
384
|
+
destAgentId: string;
|
385
|
+
trackingId: string;
|
386
|
+
consultMediaResourceId: string;
|
387
|
+
interaction: Service.Aqm.Contact.Interaction;
|
388
|
+
interactionId: string;
|
389
|
+
orgId: string;
|
390
|
+
owner: string;
|
391
|
+
queueMgr: string;
|
392
|
+
type: string;
|
393
|
+
ronaTimeout?: number | undefined;
|
394
|
+
isConsulted?: boolean | undefined;
|
395
|
+
isConferencing: boolean;
|
396
|
+
updatedBy?: string | undefined;
|
397
|
+
destinationType?: string | undefined;
|
398
|
+
}> | undefined>;
|
399
|
+
resumeRecording(p: {
|
400
|
+
interactionId: string;
|
401
|
+
data: {
|
402
|
+
autoResumed: boolean;
|
403
|
+
};
|
404
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
405
|
+
mediaResourceId: string;
|
406
|
+
eventType: string;
|
407
|
+
agentId: string;
|
408
|
+
destAgentId: string;
|
409
|
+
trackingId: string;
|
410
|
+
consultMediaResourceId: string;
|
411
|
+
interaction: Service.Aqm.Contact.Interaction;
|
412
|
+
interactionId: string;
|
413
|
+
orgId: string;
|
414
|
+
owner: string;
|
415
|
+
queueMgr: string;
|
416
|
+
type: string;
|
417
|
+
ronaTimeout?: number | undefined;
|
418
|
+
isConsulted?: boolean | undefined;
|
419
|
+
isConferencing: boolean;
|
420
|
+
updatedBy?: string | undefined;
|
421
|
+
destinationType?: string | undefined;
|
422
|
+
}> | undefined>;
|
423
|
+
addEventListener<T extends keyof Listeners>(eventName: T, listener: Listeners[T]): void;
|
424
|
+
addOnceEventListener<T extends keyof Listeners>(eventName: T, listener: Listeners[T]): void;
|
425
|
+
removeEventListener<T extends keyof Listeners>(eventName: T, listener: Listeners[T]): void;
|
426
|
+
removeOnceEventListener<T extends keyof Listeners>(eventName: T, listener: Listeners[T]): void;
|
427
|
+
removeAllEventListeners(): void;
|
428
|
+
}
|
429
|
+
export declare const createAgentContactJsApi: () => AgentContactJsApi;
|
430
|
+
export {};
|
@@ -0,0 +1,88 @@
|
|
1
|
+
import { AgentxService, Service } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { createJsApiLogger } from "./common/_logger";
|
3
|
+
import { createServiceChecker } from "./common/_service-checker";
|
4
|
+
declare type IdleCodeData = {
|
5
|
+
id: number;
|
6
|
+
name: string;
|
7
|
+
};
|
8
|
+
declare type LatestInfoData = {
|
9
|
+
agentName?: string;
|
10
|
+
agentProfileID?: string;
|
11
|
+
agentSessionId?: string;
|
12
|
+
teamId?: string;
|
13
|
+
teamName?: string;
|
14
|
+
dn?: string;
|
15
|
+
status?: string;
|
16
|
+
subStatus?: string;
|
17
|
+
idleCode?: IdleCodeData;
|
18
|
+
idleCodes?: Service.Aqm.Configs.Entity[];
|
19
|
+
wrapupCodes?: Service.Aqm.Configs.Entity[];
|
20
|
+
outDialRegex?: string;
|
21
|
+
isOutboundEnabledForTenant?: boolean;
|
22
|
+
isOutboundEnabledForAgent?: boolean;
|
23
|
+
isAdhocDialingEnabled?: boolean;
|
24
|
+
isEndCallEnabled?: boolean;
|
25
|
+
isEndConsultEnabled?: boolean;
|
26
|
+
allowConsultToQueue?: boolean;
|
27
|
+
isAgentAvailableAfterOutdial?: boolean;
|
28
|
+
isCampaignManagementEnabled?: boolean;
|
29
|
+
agentPersonalStatsEnabled?: boolean;
|
30
|
+
};
|
31
|
+
declare type Listeners = {
|
32
|
+
updated: (p: {
|
33
|
+
name: keyof LatestInfoData;
|
34
|
+
value?: string;
|
35
|
+
oldValue?: string;
|
36
|
+
}[]) => void;
|
37
|
+
};
|
38
|
+
declare type Events = keyof Listeners;
|
39
|
+
declare type Config = {
|
40
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
41
|
+
serviceChecker: ReturnType<typeof createServiceChecker>;
|
42
|
+
};
|
43
|
+
export declare class AgentStateInfoJsapi {
|
44
|
+
private readonly emitter;
|
45
|
+
private readonly logger;
|
46
|
+
private readonly serviceChecker;
|
47
|
+
private SERVICE?;
|
48
|
+
private checkService;
|
49
|
+
private listeners;
|
50
|
+
private emit;
|
51
|
+
private update;
|
52
|
+
private static getOutdialRegex;
|
53
|
+
constructor(config: Config);
|
54
|
+
private static findTeamName;
|
55
|
+
private teams;
|
56
|
+
private idleCodes;
|
57
|
+
latestData: LatestInfoData;
|
58
|
+
init(SERVICE?: AgentxService): Promise<void>;
|
59
|
+
cleanup(): void;
|
60
|
+
private fetchLatestData;
|
61
|
+
private subscribeSelfDataEvents;
|
62
|
+
private unsubscribeSelfDataEvents;
|
63
|
+
stateChange(stateData: {
|
64
|
+
state: "Available" | "Idle";
|
65
|
+
auxCodeIdArray: string;
|
66
|
+
}): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
67
|
+
eventType: "AgentDesktopMessage";
|
68
|
+
agentId: string;
|
69
|
+
trackingId: string;
|
70
|
+
auxCodeId: string;
|
71
|
+
agentSessionId: string;
|
72
|
+
orgId: string;
|
73
|
+
status: string;
|
74
|
+
subStatus: "Available" | "Idle";
|
75
|
+
lastIdleCodeChangeTimestamp: number;
|
76
|
+
lastStateChangeTimestamp: number;
|
77
|
+
type: "AgentStateChangeSuccess";
|
78
|
+
}> | undefined>;
|
79
|
+
mockOutdialAniList(): Promise<import("@wxcc-desktop/sdk-types/agentx-services/core/aqm-reqs").Msg<{
|
80
|
+
data: Record<string, any>;
|
81
|
+
}> | undefined>;
|
82
|
+
fetchAddressBooks(): Promise<Service.Aqm.Agent.AddressBooks | undefined>;
|
83
|
+
addEventListener<T extends Events>(eventName: T, listener: Listeners[T]): void;
|
84
|
+
removeEventListener<T extends Events>(eventName: T, listener: Listeners[T]): void;
|
85
|
+
removeAllEventListeners(): void;
|
86
|
+
}
|
87
|
+
export declare const createAgentStateInfoJsApi: () => AgentStateInfoJsapi;
|
88
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AgentxService } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { createJsApiLogger } from "./_logger";
|
3
|
+
declare type Config = {
|
4
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
5
|
+
};
|
6
|
+
export declare class ServiceChecker {
|
7
|
+
private readonly logger;
|
8
|
+
constructor(config: Config);
|
9
|
+
check(SERVICE?: AgentxService): boolean;
|
10
|
+
}
|
11
|
+
export declare const createServiceChecker: (config: Config) => ServiceChecker;
|
12
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { AgentxService } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { createJsApiLogger } from "./_logger";
|
3
|
+
declare type AqmServiceEntities = AgentxService["aqm"]["agent"] | AgentxService["aqm"]["configs"] | AgentxService["aqm"]["contact"] | AgentxService["aqm"]["dialer"] | AgentxService["aqm"]["screenpop"];
|
4
|
+
declare type Events<Listeners> = keyof Listeners;
|
5
|
+
declare type Config = {
|
6
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
7
|
+
};
|
8
|
+
declare type InitConfig = {
|
9
|
+
aqmServiceEntity: AqmServiceEntities;
|
10
|
+
aqmServiceEntityString: string;
|
11
|
+
};
|
12
|
+
export declare class AqmServiceEntityEvents<Listeners> {
|
13
|
+
private readonly logger;
|
14
|
+
private aqmServiceEntity?;
|
15
|
+
private aqmServiceEntityString?;
|
16
|
+
isInited: boolean;
|
17
|
+
constructor(config: Config);
|
18
|
+
init(config: InitConfig): void;
|
19
|
+
cleanup(): void;
|
20
|
+
private listeners;
|
21
|
+
private listenersOnce;
|
22
|
+
private _addEventListener;
|
23
|
+
private _removeEventListener;
|
24
|
+
addEventListener<T extends Events<Listeners>>(eventName: T, listener: Listeners[T]): void;
|
25
|
+
addOnceEventListener<T extends Events<Listeners>>(eventName: T, listener: Listeners[T]): void;
|
26
|
+
removeEventListener<T extends Events<Listeners>>(eventName: T, listener: Listeners[T]): void;
|
27
|
+
removeOnceEventListener<T extends Events<Listeners>>(eventName: T, listener: Listeners[T]): void;
|
28
|
+
removeAllEventListeners(): void;
|
29
|
+
}
|
30
|
+
export declare const createServiceEvents: <Listeners>(config: Config) => AqmServiceEntityEvents<Listeners>;
|
31
|
+
export {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { AgentxService } from "@wxcc-desktop/sdk-types";
|
2
|
+
import { createJsApiLogger } from "./common/_logger";
|
3
|
+
declare type Listeners = {
|
4
|
+
inited: () => void;
|
5
|
+
cleaned: () => void;
|
6
|
+
};
|
7
|
+
declare type Events = keyof Listeners;
|
8
|
+
export declare class ConfigJsApi {
|
9
|
+
private readonly emitter;
|
10
|
+
private readonly logger;
|
11
|
+
private agentxSERVICE?;
|
12
|
+
private waitUntil;
|
13
|
+
constructor(config: {
|
14
|
+
logger: ReturnType<typeof createJsApiLogger>;
|
15
|
+
SERVICE: AgentxService;
|
16
|
+
});
|
17
|
+
private checkService;
|
18
|
+
private emit;
|
19
|
+
init(): Promise<void>;
|
20
|
+
cleanup(): void;
|
21
|
+
get clientLocale(): string;
|
22
|
+
addEventListener<T extends Events>(eventName: T, listener: Listeners[T]): void;
|
23
|
+
removeEventListener<T extends Events>(eventName: T, listener: Listeners[T]): void;
|
24
|
+
}
|
25
|
+
export declare const createConfigJsApi: (SERVICE: AgentxService) => ConfigJsApi;
|
26
|
+
export {};
|