hgs-twilio-class-lib 1.1.63 → 1.1.65
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/config/DatabaseConfig.d.ts +1 -0
- package/lib/config/DatabaseConfig.js +1 -0
- package/lib/controller/MainController.js +3 -1
- package/lib/controller/twilio/HoopPartialDaysController.js +3 -1
- package/lib/controller/twilio/RealTimeReportsWGDetailsControllerCES.d.ts +11 -0
- package/lib/controller/twilio/RealTimeReportsWGDetailsControllerCES.js +93 -0
- package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.d.ts +4 -2
- package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.js +4 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/lib/models/Hoop.model.d.ts +3 -0
- package/lib/models/Hoop.model.js +5 -1
- package/lib/models/impl/WorkGroupDetailsModelCES.d.ts +21 -0
- package/lib/models/impl/WorkGroupDetailsModelCES.js +71 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ export declare const databaseConfig: {
|
|
|
24
24
|
navigationTable: string;
|
|
25
25
|
realTimeReportWGDetailsTable: string;
|
|
26
26
|
realTimeReportQueueDetailsTable: string;
|
|
27
|
+
realTimeReportWGDetailsCESTable: string;
|
|
27
28
|
playbackscreenrecordingsTable: string;
|
|
28
29
|
taskInfoPanelTable: string;
|
|
29
30
|
channelSettingsTable: string;
|
|
@@ -27,6 +27,7 @@ exports.databaseConfig = {
|
|
|
27
27
|
navigationTable: "navigation",
|
|
28
28
|
realTimeReportWGDetailsTable: "realTimeReportWGDetails",
|
|
29
29
|
realTimeReportQueueDetailsTable: "realTimeReportQueueDetails",
|
|
30
|
+
realTimeReportWGDetailsCESTable: "realTimeReportWGDetailsCES",
|
|
30
31
|
playbackscreenrecordingsTable: "Recordings-QA",
|
|
31
32
|
taskInfoPanelTable: "taskInfoPanel",
|
|
32
33
|
channelSettingsTable: "channelSettings",
|
|
@@ -57,6 +57,7 @@ const ChannelSettingTaskInfoController_1 = require("./twilio/ChannelSettingTaskI
|
|
|
57
57
|
const TaskInfoPanelController_1 = require("./twilio/TaskInfoPanelController");
|
|
58
58
|
const AgentScorecardController_1 = require("./twilio/AgentScorecardController");
|
|
59
59
|
const AgentActionsController_1 = require("./twilio/AgentActionsController");
|
|
60
|
+
const RealTimeReportsWGDetailsControllerCES_1 = require("./twilio/RealTimeReportsWGDetailsControllerCES");
|
|
60
61
|
let twilConfig = new TwilioAuthTokenConfig_1.TwilioAuthTokenConfig(TwilioConfig_1.TwilioConfig.accountSid, TwilioConfig_1.TwilioConfig.authToken);
|
|
61
62
|
let twilioClient = new TwilioClient_1.TwilioClient(twilConfig);
|
|
62
63
|
let AwsConfig = new AWSConnectAPIConfig_1.AWSConnectAPIConfig(AWSConfig_1.AWSConfig.region, AWSConfig_1.AWSConfig.service, AWSConfig_1.AWSConfig.accessKeyId, AWSConfig_1.AWSConfig.secretAccessKey);
|
|
@@ -169,6 +170,7 @@ MainController.controllers = {
|
|
|
169
170
|
agentScorecard: AgentScorecardController_1.AgentScorecardController,
|
|
170
171
|
channelSettings: ChannelSettingsController_1.ChannelSettingsController,
|
|
171
172
|
channelSettingsTaskInfo: ChannelSettingTaskInfoController_1.ChannelSettingTaskInfoController,
|
|
172
|
-
agentActions: AgentActionsController_1.AgentActionsController
|
|
173
|
+
agentActions: AgentActionsController_1.AgentActionsController,
|
|
174
|
+
realtimeReportsMain: RealTimeReportsWGDetailsControllerCES_1.RealTimeReportsWGDetailsCESController
|
|
173
175
|
// Add more controllers here as needed
|
|
174
176
|
};
|
|
@@ -107,7 +107,9 @@ class HoopPartialDaysController {
|
|
|
107
107
|
// Access object store
|
|
108
108
|
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.hoopPartialDays);
|
|
109
109
|
// Retrieve all data from the object store
|
|
110
|
-
const allowedFields = [
|
|
110
|
+
const allowedFields = [
|
|
111
|
+
"profileId"
|
|
112
|
+
];
|
|
111
113
|
if (query.getFilterContent) {
|
|
112
114
|
query.allowedFields = allowedFields;
|
|
113
115
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SyncServiceFactory } from "../../twilio/impl/sync/SyncServiceFactory";
|
|
2
|
+
import { SearchParameterType } from "../../common/type/SearchParameterType";
|
|
3
|
+
import { WorkGroupDetailsModel } from "../../models/impl/WorkGroupDetailsModelCES";
|
|
4
|
+
export declare class RealTimeReportsWGDetailsCESController {
|
|
5
|
+
private _dbFactory;
|
|
6
|
+
constructor(dbFactory: SyncServiceFactory);
|
|
7
|
+
add(data: WorkGroupDetailsModel): Promise<any>;
|
|
8
|
+
edit(data: WorkGroupDetailsModel): Promise<any>;
|
|
9
|
+
getAll(query: SearchParameterType): Promise<any>;
|
|
10
|
+
delete(query: Pick<WorkGroupDetailsModel, "id">): Promise<any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RealTimeReportsWGDetailsCESController = void 0;
|
|
13
|
+
const DatabaseConfig_1 = require("../../config/DatabaseConfig");
|
|
14
|
+
const WorkGroupDetailsModelCES_1 = require("../../models/impl/WorkGroupDetailsModelCES");
|
|
15
|
+
class RealTimeReportsWGDetailsCESController {
|
|
16
|
+
constructor(dbFactory) {
|
|
17
|
+
this._dbFactory = dbFactory;
|
|
18
|
+
}
|
|
19
|
+
add(data) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
try {
|
|
22
|
+
const workgroupDetails = new WorkGroupDetailsModelCES_1.WorkGroupDetailsModel(data.id, data.workgroupname, data.queues, data.createdAt, data.updatedAt);
|
|
23
|
+
const validationErrors = workgroupDetails.validateData();
|
|
24
|
+
if (validationErrors.length > 0) {
|
|
25
|
+
throw validationErrors;
|
|
26
|
+
}
|
|
27
|
+
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
28
|
+
const database = databaseConnection.result;
|
|
29
|
+
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable, "readwrite");
|
|
30
|
+
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable);
|
|
31
|
+
const result = table.add(workgroupDetails, data.id);
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.log("Error occurred:", error);
|
|
36
|
+
return error;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
edit(data) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
try {
|
|
43
|
+
const workgroupDetails = new WorkGroupDetailsModelCES_1.WorkGroupDetailsModel(data.id, data.workgroupname, data.queues, data.createdAt, data.updatedAt);
|
|
44
|
+
const validationErrors = workgroupDetails.validateData();
|
|
45
|
+
if (validationErrors.length > 0) {
|
|
46
|
+
throw validationErrors;
|
|
47
|
+
}
|
|
48
|
+
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
49
|
+
const database = databaseConnection.result;
|
|
50
|
+
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable, "readwrite");
|
|
51
|
+
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable);
|
|
52
|
+
const result = table.put(workgroupDetails, data.id);
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.log("Error occurred:", error);
|
|
57
|
+
return error;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getAll(query) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
try {
|
|
64
|
+
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
65
|
+
const database = databaseConnection.result;
|
|
66
|
+
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable, "readwrite");
|
|
67
|
+
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable);
|
|
68
|
+
const result = yield table.getAll(query);
|
|
69
|
+
return { result, meta: query };
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return error;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
delete(query) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
try {
|
|
79
|
+
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
80
|
+
const database = databaseConnection.result;
|
|
81
|
+
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable, "readwrite");
|
|
82
|
+
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.realTimeReportWGDetailsCESTable);
|
|
83
|
+
const result = table.delete(query.id);
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
console.log("Error occurred:", error);
|
|
88
|
+
return error;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.RealTimeReportsWGDetailsCESController = RealTimeReportsWGDetailsCESController;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MultiFieldFilter, FilterDataObject } from "../../../common/interface/IFilter";
|
|
2
|
-
import { PartialDaysFilterFields } from "../../../models/Hoop.model";
|
|
3
2
|
import { Filter } from "../../../common/abstract/Filter";
|
|
4
3
|
export declare class HoopPartialDaysFilterService extends Filter {
|
|
5
4
|
private data;
|
|
6
|
-
allowedFields:
|
|
5
|
+
allowedFields: {
|
|
6
|
+
date: string;
|
|
7
|
+
profileId: string;
|
|
8
|
+
};
|
|
7
9
|
constructor(data: any[]);
|
|
8
10
|
applyFilter(data: any[]): any[];
|
|
9
11
|
filterApply(filterParams: MultiFieldFilter): any[];
|
|
@@ -9,7 +9,8 @@ class HoopPartialDaysFilterService extends Filter_1.Filter {
|
|
|
9
9
|
super({ fieldName: "", value: null, filterType: FilterTypes_1.FilterTypes.Equality, caseSensitive: false, ignoreNull: true });
|
|
10
10
|
// Define allowed fields for AuditLog filters
|
|
11
11
|
this.allowedFields = {
|
|
12
|
-
date: "dateRange"
|
|
12
|
+
date: "dateRange",
|
|
13
|
+
profileId: "string"
|
|
13
14
|
};
|
|
14
15
|
this.data = data;
|
|
15
16
|
}
|
|
@@ -34,6 +35,8 @@ class HoopPartialDaysFilterService extends Filter_1.Filter {
|
|
|
34
35
|
typeof filter.value.endDate === "string" &&
|
|
35
36
|
!isNaN(Date.parse(filter.value.startDate)) &&
|
|
36
37
|
!isNaN(Date.parse(filter.value.endDate)));
|
|
38
|
+
case "string":
|
|
39
|
+
return typeof filter.value === "string" || typeof filter.value === "object";
|
|
37
40
|
default:
|
|
38
41
|
return false;
|
|
39
42
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import { ChannelSettingsController } from "./controller/twilio/ChannelSettingsCo
|
|
|
34
34
|
import { TaskInfoPanelController } from "./controller/twilio/TaskInfoPanelController";
|
|
35
35
|
import { AgentScorecardController } from "./controller/twilio/AgentScorecardController";
|
|
36
36
|
import { AgentActionsController } from "./controller/twilio/AgentActionsController";
|
|
37
|
+
import { RealTimeReportsWGDetailsCESController } from "./controller/twilio/RealTimeReportsWGDetailsControllerCES";
|
|
37
38
|
import * as models from "./models";
|
|
38
|
-
export { DatabaseFactory, GPMController, TwilioAuthTokenConfig, SyncServiceFactory, CxConfigAssetController, CxConfigController, CallLogsController, CxConfigOtherController, CxConfigExternalNumbersController, CxConfigQueueMenuController, TwilioClient, AuditLogController, QuickLinksController, NavigationController, QualityFormsController, RealTimeReportsWGDetailsController, RealTimeReportsQueueDetailsController, PlaybackScreenrecordingsController, CxConfigUIConfigController, HoopProfilesListController, HoopOverrideBranchesController, HoopOperationsController, HoopHolidaysController, HoopPartialDaysController, HoopBusinessHoursController, CallbackAndVoicemailController, HoopMainController, HoopNotesController, HoopBusinessHoursControllerAConnect, AWSConnectAPIConfig, AWSClient, HoopServiceFactory, ChannelSettingsController, TaskInfoPanelController, AgentScorecardController, AgentActionsController };
|
|
39
|
+
export { DatabaseFactory, GPMController, TwilioAuthTokenConfig, SyncServiceFactory, CxConfigAssetController, CxConfigController, CallLogsController, CxConfigOtherController, CxConfigExternalNumbersController, CxConfigQueueMenuController, TwilioClient, AuditLogController, QuickLinksController, NavigationController, QualityFormsController, RealTimeReportsWGDetailsController, RealTimeReportsQueueDetailsController, PlaybackScreenrecordingsController, CxConfigUIConfigController, HoopProfilesListController, HoopOverrideBranchesController, HoopOperationsController, HoopHolidaysController, HoopPartialDaysController, HoopBusinessHoursController, CallbackAndVoicemailController, HoopMainController, HoopNotesController, HoopBusinessHoursControllerAConnect, AWSConnectAPIConfig, AWSClient, HoopServiceFactory, ChannelSettingsController, TaskInfoPanelController, AgentScorecardController, AgentActionsController, RealTimeReportsWGDetailsCESController };
|
|
39
40
|
export { models };
|
package/lib/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.models = exports.AgentActionsController = exports.AgentScorecardController = exports.TaskInfoPanelController = exports.ChannelSettingsController = exports.HoopServiceFactory = exports.AWSClient = exports.AWSConnectAPIConfig = exports.HoopBusinessHoursControllerAConnect = exports.HoopNotesController = exports.HoopMainController = exports.CallbackAndVoicemailController = exports.HoopBusinessHoursController = exports.HoopPartialDaysController = exports.HoopHolidaysController = exports.HoopOperationsController = exports.HoopOverrideBranchesController = exports.HoopProfilesListController = exports.CxConfigUIConfigController = exports.PlaybackScreenrecordingsController = exports.RealTimeReportsQueueDetailsController = exports.RealTimeReportsWGDetailsController = exports.QualityFormsController = exports.NavigationController = exports.QuickLinksController = exports.AuditLogController = exports.TwilioClient = exports.CxConfigQueueMenuController = exports.CxConfigExternalNumbersController = exports.CxConfigOtherController = exports.CallLogsController = exports.CxConfigController = exports.CxConfigAssetController = exports.SyncServiceFactory = exports.TwilioAuthTokenConfig = exports.GPMController = exports.DatabaseFactory = void 0;
|
|
26
|
+
exports.models = exports.RealTimeReportsWGDetailsCESController = exports.AgentActionsController = exports.AgentScorecardController = exports.TaskInfoPanelController = exports.ChannelSettingsController = exports.HoopServiceFactory = exports.AWSClient = exports.AWSConnectAPIConfig = exports.HoopBusinessHoursControllerAConnect = exports.HoopNotesController = exports.HoopMainController = exports.CallbackAndVoicemailController = exports.HoopBusinessHoursController = exports.HoopPartialDaysController = exports.HoopHolidaysController = exports.HoopOperationsController = exports.HoopOverrideBranchesController = exports.HoopProfilesListController = exports.CxConfigUIConfigController = exports.PlaybackScreenrecordingsController = exports.RealTimeReportsQueueDetailsController = exports.RealTimeReportsWGDetailsController = exports.QualityFormsController = exports.NavigationController = exports.QuickLinksController = exports.AuditLogController = exports.TwilioClient = exports.CxConfigQueueMenuController = exports.CxConfigExternalNumbersController = exports.CxConfigOtherController = exports.CallLogsController = exports.CxConfigController = exports.CxConfigAssetController = exports.SyncServiceFactory = exports.TwilioAuthTokenConfig = exports.GPMController = exports.DatabaseFactory = void 0;
|
|
27
27
|
const DatabaseFactory_1 = require("./common/abstract/DatabaseFactory");
|
|
28
28
|
Object.defineProperty(exports, "DatabaseFactory", { enumerable: true, get: function () { return DatabaseFactory_1.DatabaseFactory; } });
|
|
29
29
|
const GPMController_1 = require("./controller/twilio/GPMController");
|
|
@@ -96,5 +96,7 @@ const AgentScorecardController_1 = require("./controller/twilio/AgentScorecardCo
|
|
|
96
96
|
Object.defineProperty(exports, "AgentScorecardController", { enumerable: true, get: function () { return AgentScorecardController_1.AgentScorecardController; } });
|
|
97
97
|
const AgentActionsController_1 = require("./controller/twilio/AgentActionsController");
|
|
98
98
|
Object.defineProperty(exports, "AgentActionsController", { enumerable: true, get: function () { return AgentActionsController_1.AgentActionsController; } });
|
|
99
|
+
const RealTimeReportsWGDetailsControllerCES_1 = require("./controller/twilio/RealTimeReportsWGDetailsControllerCES");
|
|
100
|
+
Object.defineProperty(exports, "RealTimeReportsWGDetailsCESController", { enumerable: true, get: function () { return RealTimeReportsWGDetailsControllerCES_1.RealTimeReportsWGDetailsCESController; } });
|
|
99
101
|
const models = __importStar(require("./models"));
|
|
100
102
|
exports.models = models;
|
package/lib/models/Hoop.model.js
CHANGED
|
@@ -7,8 +7,12 @@
|
|
|
7
7
|
// updatedAt: Date | undefined;
|
|
8
8
|
// };
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.HolidaysFilterAllowedFields = void 0;
|
|
10
|
+
exports.PartialDaysFilterAllowedFields = exports.HolidaysFilterAllowedFields = void 0;
|
|
11
11
|
var HolidaysFilterAllowedFields;
|
|
12
12
|
(function (HolidaysFilterAllowedFields) {
|
|
13
13
|
HolidaysFilterAllowedFields[HolidaysFilterAllowedFields["profileId"] = 0] = "profileId";
|
|
14
14
|
})(HolidaysFilterAllowedFields || (exports.HolidaysFilterAllowedFields = HolidaysFilterAllowedFields = {}));
|
|
15
|
+
var PartialDaysFilterAllowedFields;
|
|
16
|
+
(function (PartialDaysFilterAllowedFields) {
|
|
17
|
+
PartialDaysFilterAllowedFields[PartialDaysFilterAllowedFields["profileId"] = 0] = "profileId";
|
|
18
|
+
})(PartialDaysFilterAllowedFields || (exports.PartialDaysFilterAllowedFields = PartialDaysFilterAllowedFields = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseModel } from "../abstract/BaseModel";
|
|
2
|
+
import { validationMessage } from "../interface/IBaseModel";
|
|
3
|
+
export declare class WorkGroupDetailsModel extends BaseModel {
|
|
4
|
+
private _id;
|
|
5
|
+
private _workgroupname;
|
|
6
|
+
private _queues;
|
|
7
|
+
private _createdAt;
|
|
8
|
+
private _updatedAt;
|
|
9
|
+
constructor(id: string, workgroupname: string, queues: string[], createdAt?: Date, updatedAt?: Date);
|
|
10
|
+
validateData(): validationMessage[];
|
|
11
|
+
get id(): string;
|
|
12
|
+
set id(value: string);
|
|
13
|
+
get workgroupname(): string;
|
|
14
|
+
set workgroupname(value: string);
|
|
15
|
+
get queues(): string[];
|
|
16
|
+
set queues(value: string[]);
|
|
17
|
+
get createdAt(): Date | undefined;
|
|
18
|
+
set createdAt(value: Date | undefined);
|
|
19
|
+
get updatedAt(): Date | undefined;
|
|
20
|
+
set updatedAt(value: Date | undefined);
|
|
21
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkGroupDetailsModel = void 0;
|
|
4
|
+
const BaseModel_1 = require("../abstract/BaseModel");
|
|
5
|
+
class WorkGroupDetailsModel extends BaseModel_1.BaseModel {
|
|
6
|
+
constructor(id, workgroupname, queues, createdAt, updatedAt) {
|
|
7
|
+
super();
|
|
8
|
+
this._id = id;
|
|
9
|
+
this._workgroupname = workgroupname;
|
|
10
|
+
this._queues = queues;
|
|
11
|
+
this._createdAt = createdAt;
|
|
12
|
+
this._updatedAt = updatedAt;
|
|
13
|
+
}
|
|
14
|
+
validateData() {
|
|
15
|
+
this.validationMessages = [];
|
|
16
|
+
if (typeof this._id !== "string" || !this._id.trim()) {
|
|
17
|
+
this.validationMessages.push({
|
|
18
|
+
type: "Error",
|
|
19
|
+
fieldDescription: "id",
|
|
20
|
+
message: "ID must be a non-empty string",
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
if (typeof this._workgroupname !== "string" || !this._workgroupname.trim()) {
|
|
24
|
+
this.validationMessages.push({
|
|
25
|
+
type: "Error",
|
|
26
|
+
fieldDescription: "workgroupname",
|
|
27
|
+
message: "Workgroup name must be a non-empty string",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (!Array.isArray(this._queues) || this._queues.length === 0) {
|
|
31
|
+
this.validationMessages.push({
|
|
32
|
+
type: "Error",
|
|
33
|
+
fieldDescription: "queues",
|
|
34
|
+
message: "At least one queue must be selected",
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return this.validationMessages;
|
|
38
|
+
}
|
|
39
|
+
// Getters and setters
|
|
40
|
+
get id() {
|
|
41
|
+
return this._id;
|
|
42
|
+
}
|
|
43
|
+
set id(value) {
|
|
44
|
+
this._id = value;
|
|
45
|
+
}
|
|
46
|
+
get workgroupname() {
|
|
47
|
+
return this._workgroupname;
|
|
48
|
+
}
|
|
49
|
+
set workgroupname(value) {
|
|
50
|
+
this._workgroupname = value;
|
|
51
|
+
}
|
|
52
|
+
get queues() {
|
|
53
|
+
return this._queues;
|
|
54
|
+
}
|
|
55
|
+
set queues(value) {
|
|
56
|
+
this._queues = value;
|
|
57
|
+
}
|
|
58
|
+
get createdAt() {
|
|
59
|
+
return this._createdAt;
|
|
60
|
+
}
|
|
61
|
+
set createdAt(value) {
|
|
62
|
+
this._createdAt = value;
|
|
63
|
+
}
|
|
64
|
+
get updatedAt() {
|
|
65
|
+
return this._updatedAt;
|
|
66
|
+
}
|
|
67
|
+
set updatedAt(value) {
|
|
68
|
+
this._updatedAt = value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.WorkGroupDetailsModel = WorkGroupDetailsModel;
|