hgs-twilio-class-lib 1.1.68 → 1.1.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/lib/common/utils/sort.d.ts +1 -1
- package/lib/common/utils/sort.js +18 -2
- package/lib/controller/MainController.js +3 -5
- package/lib/controller/twilio/RealTimeReportsWGDetailsController.js +3 -3
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -3
- package/lib/models/impl/WorkGroupDetailsModel.d.ts +53 -47
- package/lib/models/impl/WorkGroupDetailsModel.js +204 -156
- package/package.json +1 -2
- package/lib/controller/twilio/RTRWGQueueStatisticsCESController.d.ts +0 -58
- package/lib/controller/twilio/RTRWGQueueStatisticsCESController.js +0 -205
- package/lib/controller/twilio/RealTimeReportsWGDetailsControllerCES.d.ts +0 -11
- package/lib/controller/twilio/RealTimeReportsWGDetailsControllerCES.js +0 -93
- package/lib/controller/twilio/filterImpl/WorkGroupDetailsFilter.d.ts +0 -14
- package/lib/controller/twilio/filterImpl/WorkGroupDetailsFilter.js +0 -53
- package/lib/models/impl/QueuePeriodStatisticsModelCES.d.ts +0 -34
- package/lib/models/impl/QueuePeriodStatisticsModelCES.js +0 -93
- package/lib/models/impl/WorkGroupDetailsModelCES.d.ts +0 -21
- package/lib/models/impl/WorkGroupDetailsModelCES.js +0 -71
- package/lib/models/impl/WorkGroupQueueStatisticsModelCES.d.ts +0 -16
- package/lib/models/impl/WorkGroupQueueStatisticsModelCES.js +0 -32
- package/lib/models/types/WorkGroupDetails.type.d.ts +0 -6
- package/lib/models/types/WorkGroupDetails.type.js +0 -7
|
@@ -3,130 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WorkGroupDetailsModel = void 0;
|
|
4
4
|
const BaseModel_1 = require("../abstract/BaseModel");
|
|
5
5
|
class WorkGroupDetailsModel extends BaseModel_1.BaseModel {
|
|
6
|
-
constructor(id,
|
|
6
|
+
constructor(id, totalAgents, loggedOn, agentsAvailable, percentAvailable, agentsAvailableToTakeCalls, nonAcdInteractions, availableForAcdInteractions, notAvailableForAcdInteractions, inboundAcdInteractions, outboundAcdInteractions, inboundAcw, outboundAcw, interactionWaiting, interactionOnhold, longestInteractionWaiting, longestAvailable, createdAt, updatedAt) {
|
|
7
7
|
super();
|
|
8
8
|
this._id = id;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
9
|
+
this._totalAgents = totalAgents;
|
|
10
|
+
this._loggedOn = loggedOn;
|
|
11
|
+
this._agentsAvailable = agentsAvailable;
|
|
12
|
+
this._percentAvailable = percentAvailable;
|
|
13
|
+
this._agentsAvailableToTakeCalls = agentsAvailableToTakeCalls;
|
|
14
|
+
this._nonAcdInteractions = nonAcdInteractions;
|
|
15
|
+
this._availableForAcdInteractions = availableForAcdInteractions;
|
|
16
|
+
this._notAvailableForAcdInteractions = notAvailableForAcdInteractions;
|
|
17
|
+
this._inboundAcdInteractions = inboundAcdInteractions;
|
|
18
|
+
this._outboundAcdInteractions = outboundAcdInteractions;
|
|
19
|
+
this._inboundAcw = inboundAcw;
|
|
20
|
+
this._outboundAcw = outboundAcw;
|
|
21
|
+
this._interactionWaiting = interactionWaiting;
|
|
22
|
+
this._interactionOnhold = interactionOnhold;
|
|
19
23
|
this._longestInteractionWaiting = longestInteractionWaiting;
|
|
20
|
-
this.
|
|
21
|
-
this._averageSpeedAnswer = averageSpeedAnswer;
|
|
24
|
+
this._longestAvailable = longestAvailable;
|
|
22
25
|
this._createdAt = createdAt;
|
|
23
26
|
this._updatedAt = updatedAt;
|
|
24
|
-
this._eventId = eventId;
|
|
25
27
|
}
|
|
26
|
-
// Getters and Setters
|
|
27
|
-
get id() {
|
|
28
|
-
return this._id;
|
|
29
|
-
}
|
|
30
|
-
set id(value) {
|
|
31
|
-
this._id = value;
|
|
32
|
-
}
|
|
33
|
-
get uniqueName() {
|
|
34
|
-
return this._uniqueName;
|
|
35
|
-
}
|
|
36
|
-
set uniqueName(value) {
|
|
37
|
-
this._uniqueName = value;
|
|
38
|
-
}
|
|
39
|
-
get periodNumber() {
|
|
40
|
-
return this._periodNumber;
|
|
41
|
-
}
|
|
42
|
-
set periodNumber(value) {
|
|
43
|
-
this._periodNumber = value;
|
|
44
|
-
}
|
|
45
|
-
get sumWaitTime() {
|
|
46
|
-
return this._sumWaitTime;
|
|
47
|
-
}
|
|
48
|
-
set sumWaitTime(value) {
|
|
49
|
-
this._sumWaitTime = value;
|
|
50
|
-
}
|
|
51
|
-
get intOffr() {
|
|
52
|
-
return this.intOffr;
|
|
53
|
-
}
|
|
54
|
-
set intOffr(value) {
|
|
55
|
-
this.intOffr = value;
|
|
56
|
-
}
|
|
57
|
-
get intAns() {
|
|
58
|
-
return this._intAns;
|
|
59
|
-
}
|
|
60
|
-
set intAns(value) {
|
|
61
|
-
this._intAns = value;
|
|
62
|
-
}
|
|
63
|
-
get intAbn() {
|
|
64
|
-
return this._intAbn;
|
|
65
|
-
}
|
|
66
|
-
set intAbn(value) {
|
|
67
|
-
this._intAbn = value;
|
|
68
|
-
}
|
|
69
|
-
get slaTarget() {
|
|
70
|
-
return this._slaTarget;
|
|
71
|
-
}
|
|
72
|
-
set slaTarget(value) {
|
|
73
|
-
this._slaTarget = value;
|
|
74
|
-
}
|
|
75
|
-
get totalServiceLevel() {
|
|
76
|
-
return this._totalServiceLevel;
|
|
77
|
-
}
|
|
78
|
-
set totalServiceLevel(value) {
|
|
79
|
-
this._totalServiceLevel = value;
|
|
80
|
-
}
|
|
81
|
-
get transferCount() {
|
|
82
|
-
return this._transferCount;
|
|
83
|
-
}
|
|
84
|
-
set transferCount(value) {
|
|
85
|
-
this._transferCount = value;
|
|
86
|
-
}
|
|
87
|
-
get interactionsWaiting() {
|
|
88
|
-
return this._interactionsWaiting;
|
|
89
|
-
}
|
|
90
|
-
set interactionsWaiting(value) {
|
|
91
|
-
this._interactionsWaiting = value;
|
|
92
|
-
}
|
|
93
|
-
get longestInteractionWaiting() {
|
|
94
|
-
return this.longestInteractionWaiting;
|
|
95
|
-
}
|
|
96
|
-
set longestInteractionWaiting(value) {
|
|
97
|
-
this._longestInteractionWaiting = value;
|
|
98
|
-
}
|
|
99
|
-
get totalAbanLevel() {
|
|
100
|
-
return this.totalAbanLevel;
|
|
101
|
-
}
|
|
102
|
-
set totalAbanLevel(value) {
|
|
103
|
-
this._totalAbanLevel = value;
|
|
104
|
-
}
|
|
105
|
-
get averageSpeedAnswer() {
|
|
106
|
-
return this.averageSpeedAnswer;
|
|
107
|
-
}
|
|
108
|
-
set averageSpeedAnswer(value) {
|
|
109
|
-
this._averageSpeedAnswer = value;
|
|
110
|
-
}
|
|
111
|
-
get createdAt() {
|
|
112
|
-
return this._createdAt;
|
|
113
|
-
}
|
|
114
|
-
set createdAt(value) {
|
|
115
|
-
this._createdAt = value;
|
|
116
|
-
}
|
|
117
|
-
get updatedAt() {
|
|
118
|
-
return this._updatedAt;
|
|
119
|
-
}
|
|
120
|
-
set updatedAt(value) {
|
|
121
|
-
this._updatedAt = value;
|
|
122
|
-
}
|
|
123
|
-
get eventId() {
|
|
124
|
-
return this._eventId;
|
|
125
|
-
}
|
|
126
|
-
set eventId(value) {
|
|
127
|
-
this._eventId = value;
|
|
128
|
-
}
|
|
129
|
-
// Validation Method
|
|
130
28
|
validateData() {
|
|
131
29
|
this.validationMessages = [];
|
|
132
30
|
if (typeof this._id !== "string" || !this._id.trim()) {
|
|
@@ -136,98 +34,248 @@ class WorkGroupDetailsModel extends BaseModel_1.BaseModel {
|
|
|
136
34
|
message: "ID must be a non-empty string",
|
|
137
35
|
});
|
|
138
36
|
}
|
|
139
|
-
if (
|
|
37
|
+
if (this._totalAgents < 0) {
|
|
38
|
+
this.validationMessages.push({
|
|
39
|
+
type: "Error",
|
|
40
|
+
fieldDescription: "totalAgents",
|
|
41
|
+
message: "Total agents must be a non-negative number",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (this._loggedOn < 0) {
|
|
45
|
+
this.validationMessages.push({
|
|
46
|
+
type: "Error",
|
|
47
|
+
fieldDescription: "loggedOn",
|
|
48
|
+
message: "Logged on agents must be a non-negative number",
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (this._agentsAvailable < 0) {
|
|
52
|
+
this.validationMessages.push({
|
|
53
|
+
type: "Error",
|
|
54
|
+
fieldDescription: "agentsAvailable",
|
|
55
|
+
message: "Agents available must be a non-negative number",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (this._percentAvailable < 0 || this._percentAvailable > 100) {
|
|
140
59
|
this.validationMessages.push({
|
|
141
60
|
type: "Error",
|
|
142
|
-
fieldDescription: "
|
|
143
|
-
message: "
|
|
61
|
+
fieldDescription: "percentAvailable",
|
|
62
|
+
message: "Percent available must be between 0 and 100",
|
|
144
63
|
});
|
|
145
64
|
}
|
|
146
|
-
if (
|
|
65
|
+
if (this._agentsAvailableToTakeCalls < 0) {
|
|
147
66
|
this.validationMessages.push({
|
|
148
67
|
type: "Error",
|
|
149
|
-
fieldDescription: "
|
|
150
|
-
message: "
|
|
68
|
+
fieldDescription: "agentsAvailableToTakeCalls",
|
|
69
|
+
message: "Agents available to take calls must be a non-negative number",
|
|
151
70
|
});
|
|
152
71
|
}
|
|
153
|
-
if (
|
|
72
|
+
if (this._nonAcdInteractions < 0) {
|
|
154
73
|
this.validationMessages.push({
|
|
155
74
|
type: "Error",
|
|
156
|
-
fieldDescription: "
|
|
157
|
-
message: "
|
|
75
|
+
fieldDescription: "nonAcdInteractions",
|
|
76
|
+
message: "Non-ACD interactions must be a non-negative number",
|
|
158
77
|
});
|
|
159
78
|
}
|
|
160
|
-
if (
|
|
79
|
+
if (this._availableForAcdInteractions < 0) {
|
|
161
80
|
this.validationMessages.push({
|
|
162
81
|
type: "Error",
|
|
163
|
-
fieldDescription: "
|
|
164
|
-
message: "
|
|
82
|
+
fieldDescription: "availableForAcdInteractions",
|
|
83
|
+
message: "Available for ACD interactions must be a non-negative number",
|
|
165
84
|
});
|
|
166
85
|
}
|
|
167
|
-
if (
|
|
86
|
+
if (this._notAvailableForAcdInteractions < 0) {
|
|
168
87
|
this.validationMessages.push({
|
|
169
88
|
type: "Error",
|
|
170
|
-
fieldDescription: "
|
|
171
|
-
message: "
|
|
89
|
+
fieldDescription: "notAvailableForAcdInteractions",
|
|
90
|
+
message: "Not available for ACD interactions must be a non-negative number",
|
|
172
91
|
});
|
|
173
92
|
}
|
|
174
|
-
if (
|
|
93
|
+
if (this._inboundAcdInteractions < 0) {
|
|
175
94
|
this.validationMessages.push({
|
|
176
95
|
type: "Error",
|
|
177
|
-
fieldDescription: "
|
|
178
|
-
message: "
|
|
96
|
+
fieldDescription: "inboundAcdInteractions",
|
|
97
|
+
message: "Inbound ACD interactions must be a non-negative number",
|
|
179
98
|
});
|
|
180
99
|
}
|
|
181
|
-
if (
|
|
100
|
+
if (this._outboundAcdInteractions < 0) {
|
|
182
101
|
this.validationMessages.push({
|
|
183
102
|
type: "Error",
|
|
184
|
-
fieldDescription: "
|
|
185
|
-
message: "
|
|
103
|
+
fieldDescription: "outboundAcdInteractions",
|
|
104
|
+
message: "Outbound ACD interactions must be a non-negative number",
|
|
186
105
|
});
|
|
187
106
|
}
|
|
188
|
-
if (
|
|
107
|
+
if (this._inboundAcw < 0) {
|
|
189
108
|
this.validationMessages.push({
|
|
190
109
|
type: "Error",
|
|
191
|
-
fieldDescription: "
|
|
192
|
-
message: "
|
|
110
|
+
fieldDescription: "inboundAcw",
|
|
111
|
+
message: "Inbound ACW must be a non-negative number",
|
|
193
112
|
});
|
|
194
113
|
}
|
|
195
|
-
if (
|
|
114
|
+
if (this._outboundAcw < 0) {
|
|
196
115
|
this.validationMessages.push({
|
|
197
116
|
type: "Error",
|
|
198
|
-
fieldDescription: "
|
|
199
|
-
message: "
|
|
117
|
+
fieldDescription: "outboundAcw",
|
|
118
|
+
message: "Outbound ACW must be a non-negative number",
|
|
200
119
|
});
|
|
201
120
|
}
|
|
202
|
-
if (
|
|
121
|
+
if (this._interactionWaiting < 0) {
|
|
203
122
|
this.validationMessages.push({
|
|
204
123
|
type: "Error",
|
|
205
|
-
fieldDescription: "
|
|
206
|
-
message: "
|
|
124
|
+
fieldDescription: "interactionWaiting",
|
|
125
|
+
message: "Interaction waiting count must be a non-negative number",
|
|
207
126
|
});
|
|
208
127
|
}
|
|
209
|
-
if (
|
|
128
|
+
if (this._interactionOnhold < 0) {
|
|
129
|
+
this.validationMessages.push({
|
|
130
|
+
type: "Error",
|
|
131
|
+
fieldDescription: "interactionOnhold",
|
|
132
|
+
message: "Interaction on-hold count must be a non-negative number",
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (typeof this._longestInteractionWaiting !== "string" || !this._longestInteractionWaiting.trim()) {
|
|
210
136
|
this.validationMessages.push({
|
|
211
137
|
type: "Error",
|
|
212
138
|
fieldDescription: "longestInteractionWaiting",
|
|
213
|
-
message: "
|
|
139
|
+
message: "Longest interaction waiting must be a non-empty string",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
if (this._longestAvailable < 0) {
|
|
143
|
+
this.validationMessages.push({
|
|
144
|
+
type: "Error",
|
|
145
|
+
fieldDescription: "longestAvailable",
|
|
146
|
+
message: "Longest available time must be a non-negative number",
|
|
214
147
|
});
|
|
215
148
|
}
|
|
216
|
-
if (
|
|
149
|
+
if (this._createdAt && !(this._createdAt instanceof Date)) {
|
|
217
150
|
this.validationMessages.push({
|
|
218
151
|
type: "Error",
|
|
219
|
-
fieldDescription: "
|
|
220
|
-
message: "
|
|
152
|
+
fieldDescription: "createdAt",
|
|
153
|
+
message: "CreatedAt must be a valid Date object or undefined",
|
|
221
154
|
});
|
|
222
155
|
}
|
|
223
|
-
if (
|
|
156
|
+
if (this._updatedAt && !(this._updatedAt instanceof Date)) {
|
|
224
157
|
this.validationMessages.push({
|
|
225
158
|
type: "Error",
|
|
226
|
-
fieldDescription: "
|
|
227
|
-
message: "
|
|
159
|
+
fieldDescription: "updatedAt",
|
|
160
|
+
message: "UpdatedAt must be a valid Date object or undefined",
|
|
228
161
|
});
|
|
229
162
|
}
|
|
230
163
|
return this.validationMessages;
|
|
231
164
|
}
|
|
165
|
+
// Getters and setters for all fields
|
|
166
|
+
get id() {
|
|
167
|
+
return this._id;
|
|
168
|
+
}
|
|
169
|
+
set id(value) {
|
|
170
|
+
this._id = value;
|
|
171
|
+
}
|
|
172
|
+
get totalAgents() {
|
|
173
|
+
return this._totalAgents;
|
|
174
|
+
}
|
|
175
|
+
set totalAgents(value) {
|
|
176
|
+
this._totalAgents = value;
|
|
177
|
+
}
|
|
178
|
+
get loggedOn() {
|
|
179
|
+
return this._loggedOn;
|
|
180
|
+
}
|
|
181
|
+
set loggedOn(value) {
|
|
182
|
+
this._loggedOn = value;
|
|
183
|
+
}
|
|
184
|
+
get agentsAvailable() {
|
|
185
|
+
return this._agentsAvailable;
|
|
186
|
+
}
|
|
187
|
+
set agentsAvailable(value) {
|
|
188
|
+
this._agentsAvailable = value;
|
|
189
|
+
}
|
|
190
|
+
get percentAvailable() {
|
|
191
|
+
return this._percentAvailable;
|
|
192
|
+
}
|
|
193
|
+
set percentAvailable(value) {
|
|
194
|
+
this._percentAvailable = value;
|
|
195
|
+
}
|
|
196
|
+
get agentsAvailableToTakeCalls() {
|
|
197
|
+
return this._agentsAvailableToTakeCalls;
|
|
198
|
+
}
|
|
199
|
+
set agentsAvailableToTakeCalls(value) {
|
|
200
|
+
this._agentsAvailableToTakeCalls = value;
|
|
201
|
+
}
|
|
202
|
+
get nonAcdInteractions() {
|
|
203
|
+
return this._nonAcdInteractions;
|
|
204
|
+
}
|
|
205
|
+
set nonAcdInteractions(value) {
|
|
206
|
+
this._nonAcdInteractions = value;
|
|
207
|
+
}
|
|
208
|
+
get availableForAcdInteractions() {
|
|
209
|
+
return this._availableForAcdInteractions;
|
|
210
|
+
}
|
|
211
|
+
set availableForAcdInteractions(value) {
|
|
212
|
+
this._availableForAcdInteractions = value;
|
|
213
|
+
}
|
|
214
|
+
get notAvailableForAcdInteractions() {
|
|
215
|
+
return this._notAvailableForAcdInteractions;
|
|
216
|
+
}
|
|
217
|
+
set notAvailableForAcdInteractions(value) {
|
|
218
|
+
this._notAvailableForAcdInteractions = value;
|
|
219
|
+
}
|
|
220
|
+
get inboundAcdInteractions() {
|
|
221
|
+
return this._inboundAcdInteractions;
|
|
222
|
+
}
|
|
223
|
+
set inboundAcdInteractions(value) {
|
|
224
|
+
this._inboundAcdInteractions = value;
|
|
225
|
+
}
|
|
226
|
+
get outboundAcdInteractions() {
|
|
227
|
+
return this._outboundAcdInteractions;
|
|
228
|
+
}
|
|
229
|
+
set outboundAcdInteractions(value) {
|
|
230
|
+
this._outboundAcdInteractions = value;
|
|
231
|
+
}
|
|
232
|
+
get inboundAcw() {
|
|
233
|
+
return this._inboundAcw;
|
|
234
|
+
}
|
|
235
|
+
set inboundAcw(value) {
|
|
236
|
+
this._inboundAcw = value;
|
|
237
|
+
}
|
|
238
|
+
get outboundAcw() {
|
|
239
|
+
return this._outboundAcw;
|
|
240
|
+
}
|
|
241
|
+
set outboundAcw(value) {
|
|
242
|
+
this._outboundAcw = value;
|
|
243
|
+
}
|
|
244
|
+
get interactionWaiting() {
|
|
245
|
+
return this._interactionWaiting;
|
|
246
|
+
}
|
|
247
|
+
set interactionWaiting(value) {
|
|
248
|
+
this._interactionWaiting = value;
|
|
249
|
+
}
|
|
250
|
+
get interactionOnhold() {
|
|
251
|
+
return this._interactionOnhold;
|
|
252
|
+
}
|
|
253
|
+
set interactionOnhold(value) {
|
|
254
|
+
this._interactionOnhold = value;
|
|
255
|
+
}
|
|
256
|
+
get longestInteractionWaiting() {
|
|
257
|
+
return this._longestInteractionWaiting;
|
|
258
|
+
}
|
|
259
|
+
set longestInteractionWaiting(value) {
|
|
260
|
+
this._longestInteractionWaiting = value;
|
|
261
|
+
}
|
|
262
|
+
get longestAvailable() {
|
|
263
|
+
return this._longestAvailable;
|
|
264
|
+
}
|
|
265
|
+
set longestAvailable(value) {
|
|
266
|
+
this._longestAvailable = value;
|
|
267
|
+
}
|
|
268
|
+
get createdAt() {
|
|
269
|
+
return this._createdAt;
|
|
270
|
+
}
|
|
271
|
+
set createdAt(value) {
|
|
272
|
+
this._createdAt = value;
|
|
273
|
+
}
|
|
274
|
+
get updatedAt() {
|
|
275
|
+
return this._updatedAt;
|
|
276
|
+
}
|
|
277
|
+
set updatedAt(value) {
|
|
278
|
+
this._updatedAt = value;
|
|
279
|
+
}
|
|
232
280
|
}
|
|
233
281
|
exports.WorkGroupDetailsModel = WorkGroupDetailsModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hgs-twilio-class-lib",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.69",
|
|
4
4
|
"description": "Flex 2.0 backend to connect with any database ",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@types/express": "4.17.21",
|
|
31
31
|
"@types/node": "20.11.17",
|
|
32
32
|
"@types/uuid": "9.0.8",
|
|
33
|
-
"concurrently": "^9.2.0",
|
|
34
33
|
"esbuild": "^0.25.4",
|
|
35
34
|
"express": "^4.18.2",
|
|
36
35
|
"fast-glob": "^3.3.3",
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { SyncServiceFactory } from "../../twilio/impl/sync/SyncServiceFactory";
|
|
2
|
-
import { QueuePeriodStatisticsModel } from "../../models/impl/QueuePeriodStatisticsModelCES";
|
|
3
|
-
import { SearchParameterType } from "../../common/type/SearchParameterType";
|
|
4
|
-
export declare class RTReportsQueueDetailsCESController {
|
|
5
|
-
private _dbFactory;
|
|
6
|
-
private _twilioClient;
|
|
7
|
-
private _syncServiceSid;
|
|
8
|
-
constructor(dbFactory: SyncServiceFactory, twilioClient: any, syncServiceSid: string);
|
|
9
|
-
/**
|
|
10
|
-
* Adds a new workgroup details record to the database.
|
|
11
|
-
*
|
|
12
|
-
* This method validates the provided workgroup details data, opens a connection
|
|
13
|
-
* to the database, starts a transaction, and adds the data to the specified
|
|
14
|
-
* object store. If validation fails or any error occurs during the database
|
|
15
|
-
* operation, it throws an error.
|
|
16
|
-
*
|
|
17
|
-
* @param {WorkGroupDetailsModel} data - The workgroup details data to be added.
|
|
18
|
-
* @returns {Promise<any>} - Returns a promise with the result of the database operation.
|
|
19
|
-
*/
|
|
20
|
-
add(data: QueuePeriodStatisticsModel): Promise<any>;
|
|
21
|
-
/**
|
|
22
|
-
* Edits an existing workgroup details record in the database.
|
|
23
|
-
*
|
|
24
|
-
* This method validates the provided workgroup details data, opens a connection
|
|
25
|
-
* to the database, starts a transaction, and updates the data in the specified
|
|
26
|
-
* object store. If validation fails or any error occurs during the database
|
|
27
|
-
* operation, it throws an error.
|
|
28
|
-
*
|
|
29
|
-
* @param {WorkGroupDetailsModel} data - The workgroup details data to be edited.
|
|
30
|
-
* @returns {Promise<any>} - Returns a promise with the result of the database operation.
|
|
31
|
-
*/
|
|
32
|
-
edit(data: QueuePeriodStatisticsModel): Promise<any>;
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves all workgroup details records from the database.
|
|
35
|
-
*
|
|
36
|
-
* This method opens a connection to the database, starts a transaction,
|
|
37
|
-
* retrieves all records from the specified object store, and returns them.
|
|
38
|
-
* If any error occurs during the database operation, it throws an error.
|
|
39
|
-
*
|
|
40
|
-
* @param {SearchParameterType} query - The search parameters for retrieving data.
|
|
41
|
-
* @returns {Promise<any>} - Returns a promise with the result of the database operation.
|
|
42
|
-
*/
|
|
43
|
-
getAll(query: SearchParameterType): Promise<any>;
|
|
44
|
-
/**
|
|
45
|
-
* Deletes a workgroup details record from the database.
|
|
46
|
-
*
|
|
47
|
-
* This method opens a connection to the database, starts a transaction,
|
|
48
|
-
* and deletes the record with the specified ID from the object store.
|
|
49
|
-
* If any error occurs during the database operation, it throws an error.
|
|
50
|
-
*
|
|
51
|
-
* @param {Pick<WorkGroupDetailsModel, "id">} query - The ID of the record to be deleted.
|
|
52
|
-
* @returns {Promise<any>} - Returns a promise with the result of the database operation.
|
|
53
|
-
*/
|
|
54
|
-
delete(query: {
|
|
55
|
-
period: string;
|
|
56
|
-
tableName: string;
|
|
57
|
-
}): Promise<any>;
|
|
58
|
-
}
|