hgs-twilio-class-lib 1.1.78 → 1.1.80
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 +5 -5
- package/lib/controller/RealTimeDashboardController.d.ts +7 -5
- package/lib/controller/RealTimeDashboardController.js +5 -10
- package/lib/models/impl/{IntervalSummaryModel.d.ts → RealtimeDashboardSummaryModel.d.ts} +1 -1
- package/lib/models/impl/{IntervalSummaryModel.js → RealtimeDashboardSummaryModel.js} +3 -3
- package/lib/models/index.d.ts +1 -2
- package/lib/models/index.js +3 -5
- package/package.json +56 -56
- package/lib/models/impl/DailySummaryModel.d.ts +0 -60
- package/lib/models/impl/DailySummaryModel.js +0 -247
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Flex V2 Backend Code
|
|
2
|
-
|
|
3
|
-
Package to manage Flex V2 Backend.
|
|
4
|
-
|
|
5
|
-
Run "npm install hgs-twilio-class-lib --save"
|
|
1
|
+
# Flex V2 Backend Code
|
|
2
|
+
|
|
3
|
+
Package to manage Flex V2 Backend.
|
|
4
|
+
|
|
5
|
+
Run "npm install hgs-twilio-class-lib --save"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SyncServiceFactory } from "../twilio/impl/sync/SyncServiceFactory";
|
|
2
2
|
import { SearchParameterType } from "../common/type/SearchParameterType";
|
|
3
|
-
import {
|
|
3
|
+
import { RealtimeDashboardSummaryModel } from "../models/impl/RealtimeDashboardSummaryModel";
|
|
4
4
|
export declare class RealTimeDashboardController {
|
|
5
5
|
private _dbFactory;
|
|
6
6
|
constructor(dbFactory: SyncServiceFactory);
|
|
@@ -9,6 +9,8 @@ export declare class RealTimeDashboardController {
|
|
|
9
9
|
private getsyncTransaction;
|
|
10
10
|
addMap(reqBody: {
|
|
11
11
|
syncMapName: string;
|
|
12
|
+
Id: string;
|
|
13
|
+
ttl: number;
|
|
12
14
|
}): Promise<any>;
|
|
13
15
|
getAllMaps(query: SearchParameterType & {
|
|
14
16
|
syncServiceName: string;
|
|
@@ -21,9 +23,9 @@ export declare class RealTimeDashboardController {
|
|
|
21
23
|
}): Promise<any>;
|
|
22
24
|
addItem(reqBody: {
|
|
23
25
|
syncMapName: string;
|
|
24
|
-
data:
|
|
26
|
+
data: RealtimeDashboardSummaryModel;
|
|
25
27
|
}): Promise<any>;
|
|
26
|
-
getItem(query: Pick<
|
|
28
|
+
getItem(query: Pick<RealtimeDashboardSummaryModel, "id"> & {
|
|
27
29
|
syncMapName: string;
|
|
28
30
|
}): Promise<any>;
|
|
29
31
|
getAllItems(query: SearchParameterType & {
|
|
@@ -31,9 +33,9 @@ export declare class RealTimeDashboardController {
|
|
|
31
33
|
}): Promise<any>;
|
|
32
34
|
editItem(reqBody: {
|
|
33
35
|
syncMapName: string;
|
|
34
|
-
data:
|
|
36
|
+
data: RealtimeDashboardSummaryModel;
|
|
35
37
|
}): Promise<any>;
|
|
36
|
-
deleteItem(query: Pick<
|
|
38
|
+
deleteItem(query: Pick<RealtimeDashboardSummaryModel, "id"> & {
|
|
37
39
|
syncMapName: string;
|
|
38
40
|
}): Promise<any>;
|
|
39
41
|
routeHandler(req: any, res: any): Promise<any>;
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RealTimeDashboardController = void 0;
|
|
13
13
|
const DatabaseConfig_1 = require("../config/DatabaseConfig");
|
|
14
|
-
const
|
|
14
|
+
const RealtimeDashboardSummaryModel_1 = require("../models/impl/RealtimeDashboardSummaryModel");
|
|
15
15
|
class RealTimeDashboardController {
|
|
16
16
|
constructor(dbFactory) {
|
|
17
17
|
this._dbFactory = dbFactory;
|
|
@@ -39,18 +39,13 @@ class RealTimeDashboardController {
|
|
|
39
39
|
addMap(reqBody) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
try {
|
|
42
|
-
const { syncMapName } = reqBody;
|
|
43
|
-
console.log("uniquename::", syncMapName);
|
|
42
|
+
const { syncMapName, Id, ttl } = reqBody;
|
|
44
43
|
if (!syncMapName) {
|
|
45
44
|
throw new Error("uniqueName is required.");
|
|
46
45
|
}
|
|
47
46
|
const dbTransaction = yield this.getsyncTransaction(syncMapName);
|
|
48
|
-
console.log("dbTransaction:::", dbTransaction);
|
|
49
|
-
// Dynamic table name from request
|
|
50
|
-
// const tableName = databaseConfig.tables[syncMapName];
|
|
51
47
|
const table = dbTransaction.objectStore(syncMapName);
|
|
52
|
-
|
|
53
|
-
return table.add(syncMapName, 48 * 60 * 60);
|
|
48
|
+
return table.add(syncMapName, Id, ttl);
|
|
54
49
|
}
|
|
55
50
|
catch (error) {
|
|
56
51
|
console.error("Error adding real-time dashboard Map:", error);
|
|
@@ -127,7 +122,7 @@ class RealTimeDashboardController {
|
|
|
127
122
|
if (!syncMapName) {
|
|
128
123
|
throw new Error("syncMapName is required.");
|
|
129
124
|
}
|
|
130
|
-
const queuedetails = new
|
|
125
|
+
const queuedetails = new RealtimeDashboardSummaryModel_1.RealtimeDashboardSummaryModel(data.id, data.uniqueName, data.periodNumber, data.intOffr, data.intAns, data.intAbn, data.slaTarget, data.totalServiceLevel, data.sumTalkTime, data.sumHoldTime, data.sumWaitTime, data.longestWaitTime, data.longestHoldTime, data.longestTalkTime, data.longestInboundACDIntereaction, data.longestOutboundACDIntereaction, data.createdAt, data.updatedAt, data.eventId);
|
|
131
126
|
if (queuedetails.validationMessages.length > 0) {
|
|
132
127
|
throw queuedetails.validationMessages;
|
|
133
128
|
}
|
|
@@ -192,7 +187,7 @@ class RealTimeDashboardController {
|
|
|
192
187
|
if (!syncMapName) {
|
|
193
188
|
throw new Error("syncMapName is required.");
|
|
194
189
|
}
|
|
195
|
-
const queuedetails = new
|
|
190
|
+
const queuedetails = new RealtimeDashboardSummaryModel_1.RealtimeDashboardSummaryModel(data.id, data.uniqueName, data.periodNumber, data.intOffr, data.intAns, data.intAbn, data.slaTarget, data.totalServiceLevel, data.sumTalkTime, data.sumHoldTime, data.sumWaitTime, data.longestWaitTime, data.longestHoldTime, data.longestTalkTime, data.longestInboundACDIntereaction, data.longestOutboundACDIntereaction, data.createdAt, data.updatedAt, data.eventId);
|
|
196
191
|
if (queuedetails.validationMessages.length > 0) {
|
|
197
192
|
throw queuedetails.validationMessages;
|
|
198
193
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseModel } from "../abstract/BaseModel";
|
|
2
2
|
import { validationMessage } from "../interface/IBaseModel";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class RealtimeDashboardSummaryModel extends BaseModel {
|
|
4
4
|
private _id;
|
|
5
5
|
private _uniqueName;
|
|
6
6
|
private _periodNumber;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RealtimeDashboardSummaryModel = void 0;
|
|
4
4
|
const BaseModel_1 = require("../abstract/BaseModel");
|
|
5
|
-
class
|
|
5
|
+
class RealtimeDashboardSummaryModel extends BaseModel_1.BaseModel {
|
|
6
6
|
constructor(id, uniqueName, periodNumber, intOffr, intAns, intAbn, slaTarget, totalServiceLevel, sumTalkTime, sumHoldTime, sumWaitTime, longestWaitTime, longestHoldTime, longestTalkTime, longestInboundACDIntereaction, longestOutboundACDIntereaction, createdAt, updatedAt, eventId) {
|
|
7
7
|
super();
|
|
8
8
|
this._id = id;
|
|
@@ -258,4 +258,4 @@ class IntervalSummaryModel extends BaseModel_1.BaseModel {
|
|
|
258
258
|
return this.validationMessages;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
exports.
|
|
261
|
+
exports.RealtimeDashboardSummaryModel = RealtimeDashboardSummaryModel;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -23,5 +23,4 @@ export { TaskInfoModel } from "./impl/channelsettings/TaskInfoModel";
|
|
|
23
23
|
export { CxConfigurator } from "./impl/cxconfig/CxConfigNamespace";
|
|
24
24
|
export { AgentActionsModel } from "./impl/AgentActionsModel";
|
|
25
25
|
export { AgentActionsLogsModel } from "./impl/AgentActionsLogsModel";
|
|
26
|
-
export {
|
|
27
|
-
export { DailySummaryModel } from "./impl/DailySummaryModel";
|
|
26
|
+
export { RealtimeDashboardSummaryModel } from "./impl/RealtimeDashboardSummaryModel";
|
package/lib/models/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RealtimeDashboardSummaryModel = exports.AgentActionsLogsModel = exports.AgentActionsModel = exports.CxConfigurator = exports.TaskInfoModel = exports.TaskInfoAttributeModel = exports.ChannelSettingTaskInfoModel = exports.ChannelSettingModel = exports.WorkGroupDetailsModel = exports.TaskModel = exports.TaskAttributesModel = exports.StatisticsTimeDetailsModel = exports.StatisticsNumberDetailsModel = exports.QuickLinkModel = exports.QueueModel = exports.QuestionDetailsModel = exports.QualityFormsModel = exports.ProfileModel = exports.PlaybackScreenrecordingsModel = exports.PerformanceStatisticsModel = exports.NavigationModel = exports.CategoryDetailModel = exports.CallbackVoicemail = exports.CallStatisticsModel = exports.CallLogsModel = exports.AuditLogModel = void 0;
|
|
4
4
|
var AuditLogsModel_1 = require("./impl/AuditLogsModel");
|
|
5
5
|
Object.defineProperty(exports, "AuditLogModel", { enumerable: true, get: function () { return AuditLogsModel_1.AuditLogModel; } });
|
|
6
6
|
var CallLogsModel_1 = require("./impl/CallLogsModel");
|
|
@@ -51,7 +51,5 @@ var AgentActionsModel_1 = require("./impl/AgentActionsModel");
|
|
|
51
51
|
Object.defineProperty(exports, "AgentActionsModel", { enumerable: true, get: function () { return AgentActionsModel_1.AgentActionsModel; } });
|
|
52
52
|
var AgentActionsLogsModel_1 = require("./impl/AgentActionsLogsModel");
|
|
53
53
|
Object.defineProperty(exports, "AgentActionsLogsModel", { enumerable: true, get: function () { return AgentActionsLogsModel_1.AgentActionsLogsModel; } });
|
|
54
|
-
var
|
|
55
|
-
Object.defineProperty(exports, "
|
|
56
|
-
var DailySummaryModel_1 = require("./impl/DailySummaryModel");
|
|
57
|
-
Object.defineProperty(exports, "DailySummaryModel", { enumerable: true, get: function () { return DailySummaryModel_1.DailySummaryModel; } });
|
|
54
|
+
var RealtimeDashboardSummaryModel_1 = require("./impl/RealtimeDashboardSummaryModel");
|
|
55
|
+
Object.defineProperty(exports, "RealtimeDashboardSummaryModel", { enumerable: true, get: function () { return RealtimeDashboardSummaryModel_1.RealtimeDashboardSummaryModel; } });
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hgs-twilio-class-lib",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Flex 2.0 backend to connect with any database ",
|
|
5
|
-
"main": "./lib/index.js",
|
|
6
|
-
"types": "./types/index.d.ts",
|
|
7
|
-
"type": "commonjs",
|
|
8
|
-
"files": [
|
|
9
|
-
"lib",
|
|
10
|
-
"types",
|
|
11
|
-
"package.json"
|
|
12
|
-
],
|
|
13
|
-
"publishConfig": {
|
|
14
|
-
"directory": "lib"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"clean": "rimraf lib types",
|
|
18
|
-
"build": "npm run clean && tsc",
|
|
19
|
-
"start": "node lib/server.js",
|
|
20
|
-
"dev": "nodemon server.ts",
|
|
21
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
22
|
-
"check:unused": "ts-prune"
|
|
23
|
-
},
|
|
24
|
-
"author": "HGS",
|
|
25
|
-
"license": "",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
28
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
29
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
30
|
-
"@types/express": "4.17.21",
|
|
31
|
-
"@types/node": "20.11.17",
|
|
32
|
-
"@types/uuid": "9.0.8",
|
|
33
|
-
"esbuild": "^0.25.4",
|
|
34
|
-
"express": "^4.18.2",
|
|
35
|
-
"fast-glob": "^3.3.3",
|
|
36
|
-
"nodemon": "^3.1.0",
|
|
37
|
-
"rimraf": "^6.0.1",
|
|
38
|
-
"rollup": "^2.79.2",
|
|
39
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
40
|
-
"rollup-plugin-visualizer": "^5.14.0",
|
|
41
|
-
"ts-loader": "9.5.1",
|
|
42
|
-
"ts-node": "^10.9.2",
|
|
43
|
-
"typescript": "5.3.3"
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@aws-sdk/client-connect": "3.723.0",
|
|
47
|
-
"cors": "^2.8.5",
|
|
48
|
-
"moment": "2.30.1",
|
|
49
|
-
"moment-timezone": "^0.5.46",
|
|
50
|
-
"twilio": "4.22.0",
|
|
51
|
-
"uuid": "^9.0.1"
|
|
52
|
-
},
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">=18"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "hgs-twilio-class-lib",
|
|
3
|
+
"version": "1.1.80",
|
|
4
|
+
"description": "Flex 2.0 backend to connect with any database ",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"types": "./types/index.d.ts",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib",
|
|
10
|
+
"types",
|
|
11
|
+
"package.json"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"directory": "lib"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"clean": "rimraf lib types",
|
|
18
|
+
"build": "npm run clean && tsc",
|
|
19
|
+
"start": "node lib/server.js",
|
|
20
|
+
"dev": "nodemon server.ts",
|
|
21
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
22
|
+
"check:unused": "ts-prune"
|
|
23
|
+
},
|
|
24
|
+
"author": "HGS",
|
|
25
|
+
"license": "",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
28
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
29
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
30
|
+
"@types/express": "4.17.21",
|
|
31
|
+
"@types/node": "20.11.17",
|
|
32
|
+
"@types/uuid": "9.0.8",
|
|
33
|
+
"esbuild": "^0.25.4",
|
|
34
|
+
"express": "^4.18.2",
|
|
35
|
+
"fast-glob": "^3.3.3",
|
|
36
|
+
"nodemon": "^3.1.0",
|
|
37
|
+
"rimraf": "^6.0.1",
|
|
38
|
+
"rollup": "^2.79.2",
|
|
39
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
40
|
+
"rollup-plugin-visualizer": "^5.14.0",
|
|
41
|
+
"ts-loader": "9.5.1",
|
|
42
|
+
"ts-node": "^10.9.2",
|
|
43
|
+
"typescript": "5.3.3"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@aws-sdk/client-connect": "3.723.0",
|
|
47
|
+
"cors": "^2.8.5",
|
|
48
|
+
"moment": "2.30.1",
|
|
49
|
+
"moment-timezone": "^0.5.46",
|
|
50
|
+
"twilio": "4.22.0",
|
|
51
|
+
"uuid": "^9.0.1"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=18"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from "../abstract/BaseModel";
|
|
2
|
-
import { validationMessage } from "../interface/IBaseModel";
|
|
3
|
-
export declare class DailySummaryModel extends BaseModel {
|
|
4
|
-
private _id;
|
|
5
|
-
private _uniqueName;
|
|
6
|
-
private _intOffr;
|
|
7
|
-
private _intAns;
|
|
8
|
-
private _intAbn;
|
|
9
|
-
private _slaTarget;
|
|
10
|
-
private _totalServiceLevel;
|
|
11
|
-
private _sumTalkTime;
|
|
12
|
-
private _sumHoldTime;
|
|
13
|
-
private _sumWaitTime;
|
|
14
|
-
private _longestWaitTime;
|
|
15
|
-
private _longestHoldTime;
|
|
16
|
-
private _longestTalkTime;
|
|
17
|
-
private _longestInboundACDIntereaction;
|
|
18
|
-
private _longestOutboundACDIntereaction;
|
|
19
|
-
private _createdAt;
|
|
20
|
-
private _updatedAt;
|
|
21
|
-
private _eventId;
|
|
22
|
-
constructor(id: string, uniqueName: string, intOffr: number, intAns: number, intAbn: number, slaTarget: number, totalServiceLevel: number, sumTalkTime: number, sumHoldTime: number, sumWaitTime: number, longestWaitTime: number, longestHoldTime: number, longestTalkTime: number, longestInboundACDIntereaction: number, longestOutboundACDIntereaction: number, createdAt: Date | undefined | string, updatedAt: Date | undefined | string, eventId: string);
|
|
23
|
-
get id(): string;
|
|
24
|
-
set id(value: string);
|
|
25
|
-
get uniqueName(): string;
|
|
26
|
-
set uniqueName(value: string);
|
|
27
|
-
get intOffr(): number;
|
|
28
|
-
set intOffr(value: number);
|
|
29
|
-
get intAns(): number;
|
|
30
|
-
set intAns(value: number);
|
|
31
|
-
get intAbn(): number;
|
|
32
|
-
set intAbn(value: number);
|
|
33
|
-
get slaTarget(): number;
|
|
34
|
-
set slaTarget(value: number);
|
|
35
|
-
get totalServiceLevel(): number;
|
|
36
|
-
set totalServiceLevel(value: number);
|
|
37
|
-
get sumTalkTime(): number;
|
|
38
|
-
set sumTalkTime(value: number);
|
|
39
|
-
get sumHoldTime(): number;
|
|
40
|
-
set sumHoldTime(value: number);
|
|
41
|
-
get sumWaitTime(): number;
|
|
42
|
-
set sumWaitTime(value: number);
|
|
43
|
-
get longestWaitTime(): number;
|
|
44
|
-
set longestWaitTime(value: number);
|
|
45
|
-
get longestHoldTime(): number;
|
|
46
|
-
set longestHoldTime(value: number);
|
|
47
|
-
get longestTalkTime(): number;
|
|
48
|
-
set longestTalkTime(value: number);
|
|
49
|
-
get longestInboundACDIntereaction(): number;
|
|
50
|
-
set longestInboundACDIntereaction(value: number);
|
|
51
|
-
get longestOutboundACDIntereaction(): number;
|
|
52
|
-
set longestOutboundACDIntereaction(value: number);
|
|
53
|
-
get createdAt(): Date | undefined | string;
|
|
54
|
-
set createdAt(value: Date | undefined | string);
|
|
55
|
-
get updatedAt(): Date | undefined | string;
|
|
56
|
-
set updatedAt(value: Date | undefined | string);
|
|
57
|
-
get eventId(): string;
|
|
58
|
-
set eventId(value: string);
|
|
59
|
-
validateData(): validationMessage[];
|
|
60
|
-
}
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DailySummaryModel = void 0;
|
|
4
|
-
const BaseModel_1 = require("../abstract/BaseModel");
|
|
5
|
-
class DailySummaryModel extends BaseModel_1.BaseModel {
|
|
6
|
-
constructor(id, uniqueName, intOffr, intAns, intAbn, slaTarget, totalServiceLevel, sumTalkTime, sumHoldTime, sumWaitTime, longestWaitTime, longestHoldTime, longestTalkTime, longestInboundACDIntereaction, longestOutboundACDIntereaction, createdAt, updatedAt, eventId) {
|
|
7
|
-
super();
|
|
8
|
-
this._id = id;
|
|
9
|
-
this._uniqueName = uniqueName;
|
|
10
|
-
this._intOffr = intOffr;
|
|
11
|
-
this._intAns = intAns;
|
|
12
|
-
this._intAbn = intAbn;
|
|
13
|
-
this._slaTarget = slaTarget;
|
|
14
|
-
this._totalServiceLevel = totalServiceLevel;
|
|
15
|
-
this._sumTalkTime = sumTalkTime;
|
|
16
|
-
this._sumHoldTime = sumHoldTime;
|
|
17
|
-
this._sumWaitTime = sumWaitTime;
|
|
18
|
-
this._longestWaitTime = longestWaitTime;
|
|
19
|
-
this._longestHoldTime = longestHoldTime;
|
|
20
|
-
this._longestTalkTime = longestTalkTime;
|
|
21
|
-
this._longestInboundACDIntereaction = longestInboundACDIntereaction;
|
|
22
|
-
this._longestOutboundACDIntereaction = longestOutboundACDIntereaction;
|
|
23
|
-
this._createdAt = createdAt;
|
|
24
|
-
this._updatedAt = updatedAt;
|
|
25
|
-
this._eventId = eventId;
|
|
26
|
-
}
|
|
27
|
-
// Getters and Setters
|
|
28
|
-
get id() {
|
|
29
|
-
return this._id;
|
|
30
|
-
}
|
|
31
|
-
set id(value) {
|
|
32
|
-
this._id = value;
|
|
33
|
-
}
|
|
34
|
-
get uniqueName() {
|
|
35
|
-
return this._uniqueName;
|
|
36
|
-
}
|
|
37
|
-
set uniqueName(value) {
|
|
38
|
-
this._uniqueName = value;
|
|
39
|
-
}
|
|
40
|
-
get intOffr() {
|
|
41
|
-
return this.intOffr;
|
|
42
|
-
}
|
|
43
|
-
set intOffr(value) {
|
|
44
|
-
this.intOffr = value;
|
|
45
|
-
}
|
|
46
|
-
get intAns() {
|
|
47
|
-
return this._intAns;
|
|
48
|
-
}
|
|
49
|
-
set intAns(value) {
|
|
50
|
-
this._intAns = value;
|
|
51
|
-
}
|
|
52
|
-
get intAbn() {
|
|
53
|
-
return this._intAbn;
|
|
54
|
-
}
|
|
55
|
-
set intAbn(value) {
|
|
56
|
-
this._intAbn = value;
|
|
57
|
-
}
|
|
58
|
-
get slaTarget() {
|
|
59
|
-
return this._slaTarget;
|
|
60
|
-
}
|
|
61
|
-
set slaTarget(value) {
|
|
62
|
-
this._slaTarget = value;
|
|
63
|
-
}
|
|
64
|
-
get totalServiceLevel() {
|
|
65
|
-
return this._totalServiceLevel;
|
|
66
|
-
}
|
|
67
|
-
set totalServiceLevel(value) {
|
|
68
|
-
this._totalServiceLevel = value;
|
|
69
|
-
}
|
|
70
|
-
get sumTalkTime() {
|
|
71
|
-
return this._sumTalkTime;
|
|
72
|
-
}
|
|
73
|
-
set sumTalkTime(value) {
|
|
74
|
-
this._sumTalkTime = value;
|
|
75
|
-
}
|
|
76
|
-
get sumHoldTime() {
|
|
77
|
-
return this._sumHoldTime;
|
|
78
|
-
}
|
|
79
|
-
set sumHoldTime(value) {
|
|
80
|
-
this._sumHoldTime = value;
|
|
81
|
-
}
|
|
82
|
-
get sumWaitTime() {
|
|
83
|
-
return this._sumWaitTime;
|
|
84
|
-
}
|
|
85
|
-
set sumWaitTime(value) {
|
|
86
|
-
this._sumWaitTime = value;
|
|
87
|
-
}
|
|
88
|
-
get longestWaitTime() {
|
|
89
|
-
return this._longestWaitTime;
|
|
90
|
-
}
|
|
91
|
-
set longestWaitTime(value) {
|
|
92
|
-
this._longestWaitTime = value;
|
|
93
|
-
}
|
|
94
|
-
get longestHoldTime() {
|
|
95
|
-
return this._longestHoldTime;
|
|
96
|
-
}
|
|
97
|
-
set longestHoldTime(value) {
|
|
98
|
-
this._longestHoldTime = value;
|
|
99
|
-
}
|
|
100
|
-
get longestTalkTime() {
|
|
101
|
-
return this._longestTalkTime;
|
|
102
|
-
}
|
|
103
|
-
set longestTalkTime(value) {
|
|
104
|
-
this._longestTalkTime = value;
|
|
105
|
-
}
|
|
106
|
-
get longestInboundACDIntereaction() {
|
|
107
|
-
return this._longestInboundACDIntereaction;
|
|
108
|
-
}
|
|
109
|
-
set longestInboundACDIntereaction(value) {
|
|
110
|
-
this._longestInboundACDIntereaction = value;
|
|
111
|
-
}
|
|
112
|
-
get longestOutboundACDIntereaction() {
|
|
113
|
-
return this._longestOutboundACDIntereaction;
|
|
114
|
-
}
|
|
115
|
-
set longestOutboundACDIntereaction(value) {
|
|
116
|
-
this._longestOutboundACDIntereaction = value;
|
|
117
|
-
}
|
|
118
|
-
get createdAt() {
|
|
119
|
-
return this._createdAt;
|
|
120
|
-
}
|
|
121
|
-
set createdAt(value) {
|
|
122
|
-
this._createdAt = value;
|
|
123
|
-
}
|
|
124
|
-
get updatedAt() {
|
|
125
|
-
return this._updatedAt;
|
|
126
|
-
}
|
|
127
|
-
set updatedAt(value) {
|
|
128
|
-
this._updatedAt = value;
|
|
129
|
-
}
|
|
130
|
-
get eventId() {
|
|
131
|
-
return this._eventId;
|
|
132
|
-
}
|
|
133
|
-
set eventId(value) {
|
|
134
|
-
this._eventId = value;
|
|
135
|
-
}
|
|
136
|
-
// Validation Method
|
|
137
|
-
validateData() {
|
|
138
|
-
this.validationMessages = [];
|
|
139
|
-
if (typeof this._id !== "string" || !this._id.trim()) {
|
|
140
|
-
this.validationMessages.push({
|
|
141
|
-
type: "Error",
|
|
142
|
-
fieldDescription: "id",
|
|
143
|
-
message: "ID must be a non-empty string",
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
if (typeof this._uniqueName !== "string" || !this._uniqueName.trim()) {
|
|
147
|
-
this.validationMessages.push({
|
|
148
|
-
type: "Error",
|
|
149
|
-
fieldDescription: "uniqueName",
|
|
150
|
-
message: "Unique name must be a non-empty string",
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
if (typeof this._intOffr !== "number" || this.intOffr < 0) {
|
|
154
|
-
this.validationMessages.push({
|
|
155
|
-
type: "Error",
|
|
156
|
-
fieldDescription: "intOffr",
|
|
157
|
-
message: "intOffr must be a non-negative number",
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
if (typeof this._intAns !== "number" || this._intAns < 0) {
|
|
161
|
-
this.validationMessages.push({
|
|
162
|
-
type: "Error",
|
|
163
|
-
fieldDescription: "intAns",
|
|
164
|
-
message: "intAns must be a non-negative number",
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
if (typeof this._intAbn !== "number" || this._intAbn < 0) {
|
|
168
|
-
this.validationMessages.push({
|
|
169
|
-
type: "Error",
|
|
170
|
-
fieldDescription: "intAbn",
|
|
171
|
-
message: "intAbn must be a non-negative number",
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
if (typeof this._slaTarget !== "number" || this._slaTarget < 0) {
|
|
175
|
-
this.validationMessages.push({
|
|
176
|
-
type: "Error",
|
|
177
|
-
fieldDescription: "slaTarget",
|
|
178
|
-
message: "slaTarget must be a non-negative number",
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
if (typeof this._totalServiceLevel !== "number" || this._totalServiceLevel < 0) {
|
|
182
|
-
this.validationMessages.push({
|
|
183
|
-
type: "Error",
|
|
184
|
-
fieldDescription: "totalServiceLevel",
|
|
185
|
-
message: "totalServiceLevel must be a non-negative number",
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
if (typeof this._sumTalkTime !== "number" || this._sumTalkTime < 0) {
|
|
189
|
-
this.validationMessages.push({
|
|
190
|
-
type: "Error",
|
|
191
|
-
fieldDescription: "sumTalkTime",
|
|
192
|
-
message: "sumTalkTime must be a non-negative number",
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
if (typeof this._sumHoldTime !== "number" || this._sumHoldTime < 0) {
|
|
196
|
-
this.validationMessages.push({
|
|
197
|
-
type: "Error",
|
|
198
|
-
fieldDescription: "sumHoldTime",
|
|
199
|
-
message: "sumHoldTime must be a non-negative number",
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
if (typeof this._sumWaitTime !== "number" || this._sumWaitTime < 0) {
|
|
203
|
-
this.validationMessages.push({
|
|
204
|
-
type: "Error",
|
|
205
|
-
fieldDescription: "sumWaitTime",
|
|
206
|
-
message: "sumWaitTime must be a non-negative number",
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
if (typeof this._longestWaitTime !== "number" || this._longestWaitTime < 0) {
|
|
210
|
-
this.validationMessages.push({
|
|
211
|
-
type: "Error",
|
|
212
|
-
fieldDescription: "longestWaitTime",
|
|
213
|
-
message: "longestWaitTime must be a non-negative number",
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
if (typeof this._longestHoldTime !== "number" || this._longestHoldTime < 0) {
|
|
217
|
-
this.validationMessages.push({
|
|
218
|
-
type: "Error",
|
|
219
|
-
fieldDescription: "longestHoldTime",
|
|
220
|
-
message: "longestHoldTime must be a non-negative number",
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
if (typeof this._longestTalkTime !== "number" || this._longestTalkTime < 0) {
|
|
224
|
-
this.validationMessages.push({
|
|
225
|
-
type: "Error",
|
|
226
|
-
fieldDescription: "longestTalkTime",
|
|
227
|
-
message: "longestTalkTime must be a non-negative number",
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
if (typeof this._longestInboundACDIntereaction !== "number" || this._longestInboundACDIntereaction < 0) {
|
|
231
|
-
this.validationMessages.push({
|
|
232
|
-
type: "Error",
|
|
233
|
-
fieldDescription: "longestInboundACDIntereaction",
|
|
234
|
-
message: "longestInboundACDIntereaction must be a non-negative number",
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
if (typeof this._longestOutboundACDIntereaction !== "number" || this._longestOutboundACDIntereaction < 0) {
|
|
238
|
-
this.validationMessages.push({
|
|
239
|
-
type: "Error",
|
|
240
|
-
fieldDescription: "longestOutboundACDIntereaction",
|
|
241
|
-
message: "longestOutboundACDIntereaction must be a non-negative number",
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
return this.validationMessages;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
exports.DailySummaryModel = DailySummaryModel;
|