@getjones/test-infra 4.4.15 → 4.5.0
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/package.json +30 -30
- package/src/common/commonFlows/auth/auth.js +40 -40
- package/src/common/commonFlows/index.js +4 -4
- package/src/common/commonFlows/records/records.js +260 -243
- package/src/common/consts/accountSettings.js +14 -14
- package/src/common/consts/activationStatuses.js +6 -6
- package/src/common/consts/autocomplete.js +10 -10
- package/src/common/consts/constantsForRecordsSortingAndFilters.js +48 -40
- package/src/common/consts/dashboardCharts.js +18 -18
- package/src/common/consts/homepage/AttentionTab.js +5 -0
- package/src/common/consts/homepage/sortOptions.js +14 -0
- package/src/common/consts/ocrStatuses.js +6 -6
- package/src/common/consts/projectSettings.js +21 -21
- package/src/common/consts/recordTypes.js +5 -5
- package/src/common/consts/requirementActions.js +10 -0
- package/src/common/consts/s3FileTypes.js +13 -13
- package/src/common/consts/userRoles.js +18 -6
- package/src/common/consts/userTypes.js +8 -8
- package/src/common/errorCodes.js +3 -3
- package/src/common/httpResponseStatusCodes.json +11 -11
- package/src/common/httpResponseTypes.json +2 -2
- package/src/common/requests/apiKeyAuth/requests.js +44 -44
- package/src/common/requests/cookieAuth/requests.js +40 -40
- package/src/common/requests/internalAuth/requests.js +48 -48
- package/src/common/requests/requestHandlers.js +80 -80
- package/src/common/utils/complianceUtil.js +114 -114
- package/src/common/utils/configsUtil.js +22 -22
- package/src/common/utils/dataTypeUtils.js +41 -41
- package/src/common/utils/numberUtils.js +22 -22
- package/src/common/utils/objectUtils.js +7 -7
- package/src/common/utils/timeUtils.js +177 -177
- package/src/common/validations/errorValidation.js +16 -16
- package/src/common/validations/typeValidations.js +36 -36
- package/src/defaults/configs/auditConfigs.js +125 -125
- package/src/defaults/configs/coverage.js +227 -227
- package/src/defaults/configs/polices.js +75 -75
- package/src/defaults/configs/requirement.js +32 -32
- package/src/defaults/index.js +6 -6
- package/src/env.js +57 -57
- package/src/factory/globalRecord/globalRecord.js +43 -43
- package/src/factory/index.js +8 -8
- package/src/factory/records/records.js +229 -229
- package/src/factory/users/users.js +86 -86
- package/src/index.js +97 -97
- package/src/saas/internal-api/accountDirectory/api/accountDirectory.api.js +50 -50
- package/src/saas/internal-api/accountDirectory/api/accountDirectory.service.js +182 -182
- package/src/saas/internal-api/accountDirectory/index.js +4 -4
- package/src/saas/internal-api/accountDirectory/models/accountDirectory.model.js +40 -40
- package/src/saas/internal-api/accounts/api/core/accounts.core.api.js +35 -35
- package/src/saas/internal-api/accounts/api/core/accounts.core.service.js +93 -93
- package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.api.js +29 -29
- package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.service.js +61 -61
- package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.api.js +48 -48
- package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.service.js +74 -74
- package/src/saas/internal-api/accounts/api/settings/settings.api.js +21 -21
- package/src/saas/internal-api/accounts/api/settings/settings.service.js +41 -41
- package/src/saas/internal-api/accounts/consts/consts.js +8 -8
- package/src/saas/internal-api/accounts/index.js +22 -22
- package/src/saas/internal-api/accounts/models/core/create.account.model.js +16 -16
- package/src/saas/internal-api/accounts/models/settings/update.settings.model.js +51 -42
- package/src/saas/internal-api/accounts/utils/utils.js +60 -60
- package/src/saas/internal-api/agreement/api/agreement.api.js +39 -39
- package/src/saas/internal-api/agreement/api/agreement.service.js +121 -121
- package/src/saas/internal-api/agreement/consts/consts.js +11 -10
- package/src/saas/internal-api/agreement/index.js +12 -12
- package/src/saas/internal-api/agreement/models/create.agreement.model.js +12 -12
- package/src/saas/internal-api/agreement/models/createAgreementByAuditorModel.js +11 -11
- package/src/saas/internal-api/agreement/models/createAgreementByPMModel.js +13 -13
- package/src/saas/internal-api/auditCustomerRules/api/customer.rules.api.js +43 -43
- package/src/saas/internal-api/auditCustomerRules/api/customer.rules.service.js +105 -105
- package/src/saas/internal-api/auditCustomerRules/consts/customer.rule.js +11 -11
- package/src/saas/internal-api/auditCustomerRules/index.js +6 -6
- package/src/saas/internal-api/auditCustomerRules/models/customer.rule.model.js +46 -46
- package/src/saas/internal-api/auditCustomerRules/utils/customer.rule.util.js +19 -19
- package/src/saas/internal-api/auditNotes/api/audit.notes.api.js +40 -40
- package/src/saas/internal-api/auditNotes/api/audit.notes.service.js +115 -115
- package/src/saas/internal-api/auditNotes/index.js +4 -4
- package/src/saas/internal-api/auditNotes/models/audit.note.model.js +30 -30
- package/src/saas/internal-api/auth/api/auth.api.js +27 -27
- package/src/saas/internal-api/auth/api/auth.service.js +90 -90
- package/src/saas/internal-api/auth/index.js +3 -3
- package/src/saas/internal-api/coi/api/coi.api.js +45 -45
- package/src/saas/internal-api/coi/api/coi.service.js +39 -39
- package/src/saas/internal-api/coi/consts/hashes.js +4 -4
- package/src/saas/internal-api/coi/consts/uploaderTypes.js +5 -5
- package/src/saas/internal-api/coi/index.js +14 -14
- package/src/saas/internal-api/coi/models/Combine.last.two.cois.model.js +25 -25
- package/src/saas/internal-api/coi/models/submit.coi.model.js +19 -19
- package/src/saas/internal-api/coi/utils/utils.js +117 -117
- package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.api.js +12 -0
- package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.service.js +14 -0
- package/src/saas/internal-api/compliance/api/audit/audit.api.js +115 -115
- package/src/saas/internal-api/compliance/api/audit/audit.service.js +300 -300
- package/src/saas/internal-api/compliance/api/convert/convert.api.js +17 -17
- package/src/saas/internal-api/compliance/api/convert/convert.service.js +11 -11
- package/src/saas/internal-api/compliance/api/coverage/coverage.api.js +33 -33
- package/src/saas/internal-api/compliance/api/coverage/coverage.service.js +48 -48
- package/src/saas/internal-api/compliance/api/overrideGap/override.gap.api.js +38 -38
- package/src/saas/internal-api/compliance/api/overrideGap/override.gap.service.js +183 -182
- package/src/saas/internal-api/compliance/consts/audit.js +111 -111
- package/src/saas/internal-api/compliance/index.js +36 -33
- package/src/saas/internal-api/compliance/models/audit/audit.model.js +96 -96
- package/src/saas/internal-api/compliance/models/waive/waive.model.js +49 -49
- package/src/saas/internal-api/compliance/utils/auditUtil.js +254 -254
- package/src/saas/internal-api/compliance/utils/coverageUtil.js +40 -40
- package/src/saas/internal-api/contractors/api/contractors.api.js +209 -209
- package/src/saas/internal-api/contractors/api/contractors.service.js +361 -361
- package/src/saas/internal-api/contractors/consts/consts.js +6 -6
- package/src/saas/internal-api/contractors/index.js +8 -8
- package/src/saas/internal-api/contractors/models/assign.requirement.model.js +10 -10
- package/src/saas/internal-api/contractors/models/edit.contractor.model.js +73 -62
- package/src/saas/internal-api/contractors/models/link.request.model.js +10 -10
- package/src/saas/internal-api/contractors/models/subscription.contractor.model.js +13 -13
- package/src/saas/internal-api/contractors/models/verification.contractor.model.js +27 -27
- package/src/saas/internal-api/contractors/utils.js +25 -25
- package/src/saas/internal-api/dashboard/api/recordList.api.js +38 -38
- package/src/saas/internal-api/dashboard/api/recordList.service.js +60 -60
- package/src/saas/internal-api/dashboard/index.js +5 -5
- package/src/saas/internal-api/dashboard/models/dashboard.filter.criteria.model.js +38 -38
- package/src/saas/internal-api/dbEmails/api/db.emails.api.js +25 -25
- package/src/saas/internal-api/dbEmails/api/db.emails.service.js +156 -156
- package/src/saas/internal-api/dbEmails/consts/consts.js +55 -55
- package/src/saas/internal-api/dbEmails/index.js +6 -6
- package/src/saas/internal-api/dbEmails/models/db.emails.model.js +22 -22
- package/src/saas/internal-api/dbEmails/utils/util.js +87 -87
- package/src/saas/internal-api/emailCustomization/api/email.customization.api.js +26 -26
- package/src/saas/internal-api/emailCustomization/api/email.customization.service.js +50 -50
- package/src/saas/internal-api/emailCustomization/index.js +3 -3
- package/src/saas/internal-api/globalRecord/api/global.record.api.js +95 -95
- package/src/saas/internal-api/globalRecord/api/global.record.service.js +112 -112
- package/src/saas/internal-api/globalRecord/consts.js +20 -20
- package/src/saas/internal-api/globalRecord/index.js +6 -6
- package/src/saas/internal-api/globalRecord/models/global.record.model.js +60 -60
- package/src/saas/internal-api/globalRecord/utils/util.js +161 -161
- package/src/saas/internal-api/homepageCharts/api/charts.api.js +12 -12
- package/src/saas/internal-api/homepageCharts/api/charts.service.js +7 -7
- package/src/saas/internal-api/homepageCharts/index.js +3 -3
- package/src/saas/internal-api/policyFile/api/policy.file.api.js +43 -31
- package/src/saas/internal-api/policyFile/api/policy.file.service.js +117 -73
- package/src/saas/internal-api/policyFile/consts.js +21 -21
- package/src/saas/internal-api/policyFile/index.js +11 -11
- package/src/saas/internal-api/policyFile/models/create.policy.file.model.js +11 -11
- package/src/saas/internal-api/policyFile/models/set.publish.flag.to.policy.model.js +13 -0
- package/src/saas/internal-api/projects/api/core/projects.api.js +39 -39
- package/src/saas/internal-api/projects/api/core/projects.service.js +77 -77
- package/src/saas/internal-api/projects/api/settings/project.settings.api.js +18 -18
- package/src/saas/internal-api/projects/api/settings/project.settings.service.js +35 -35
- package/src/saas/internal-api/projects/consts/defaultProject.js +3 -3
- package/src/saas/internal-api/projects/index.js +24 -24
- package/src/saas/internal-api/projects/models/core/create.project.model.js +41 -41
- package/src/saas/internal-api/projects/models/core/update.project.model.js +47 -47
- package/src/saas/internal-api/projects/models/settings/update.project.settings.model.js +40 -40
- package/src/saas/internal-api/projects/utils/utils.js +155 -155
- package/src/saas/internal-api/recordHub/api/record.hub.api.js +14 -14
- package/src/saas/internal-api/recordHub/api/record.hub.service.js +21 -21
- package/src/saas/internal-api/recordHub/index.js +3 -3
- package/src/saas/internal-api/recordNotes/api/record.notes.api.js +38 -38
- package/src/saas/internal-api/recordNotes/api/record.notes.service.js +47 -47
- package/src/saas/internal-api/recordNotes/api/record.notes.utils.js +12 -12
- package/src/saas/internal-api/recordNotes/index.js +3 -3
- package/src/saas/internal-api/reports/api/reports.api.js +62 -62
- package/src/saas/internal-api/reports/api/reports.service.js +79 -79
- package/src/saas/internal-api/reports/consts/consts.js +74 -74
- package/src/saas/internal-api/reports/index.js +15 -15
- package/src/saas/internal-api/reports/models/report.model.js +27 -27
- package/src/saas/internal-api/requests/api/requests.api.js +126 -120
- package/src/saas/internal-api/requests/api/requests.service.js +301 -274
- package/src/saas/internal-api/requests/index.js +21 -21
- package/src/saas/internal-api/requests/models/create.request.model.js +36 -36
- package/src/saas/internal-api/requests/models/draft.request.criteria.model.js +18 -18
- package/src/saas/internal-api/requests/models/draft.request.report.model.js +14 -14
- package/src/saas/internal-api/requests/models/edit.request.model.js +31 -31
- package/src/saas/internal-api/requests/models/homepageRequestCriteriaModel.js +19 -0
- package/src/saas/internal-api/requests/models/requestListCriteriaModel.js +17 -17
- package/src/saas/internal-api/requests/models/tenant.request.model.js +9 -9
- package/src/saas/internal-api/requests/utils.js +16 -16
- package/src/saas/internal-api/requestsTable/api/requests.table.api.js +20 -20
- package/src/saas/internal-api/requestsTable/api/requests.table.service.js +14 -14
- package/src/saas/internal-api/requestsTable/index.js +3 -3
- package/src/saas/internal-api/requirements/api/requirements.api.js +57 -57
- package/src/saas/internal-api/requirements/api/requirements.service.js +177 -177
- package/src/saas/internal-api/requirements/consts/attributeTypes.json +8 -8
- package/src/saas/internal-api/requirements/consts/consts.js +6 -6
- package/src/saas/internal-api/requirements/index.js +10 -10
- package/src/saas/internal-api/requirements/models/create.requirement.model.js +17 -17
- package/src/saas/internal-api/requirements/models/policy.model.js +35 -35
- package/src/saas/internal-api/requirements/models/update.requirement.model.js +19 -19
- package/src/saas/internal-api/requirements/utils/utils.js +129 -129
- package/src/saas/internal-api/serviceArea/api/coordinates.api.js +12 -12
- package/src/saas/internal-api/serviceArea/api/coordinates.service.js +7 -7
- package/src/saas/internal-api/serviceArea/index.js +4 -4
- package/src/saas/internal-api/serviceArea/utils/utils.js +8 -8
- package/src/saas/internal-api/tabs/api/tabs.api.js +32 -32
- package/src/saas/internal-api/tabs/api/tabs.service.js +54 -54
- package/src/saas/internal-api/tabs/index.js +3 -3
- package/src/saas/internal-api/tabs/models/tabs.model.js +19 -19
- package/src/saas/internal-api/thread-scheduler/runner.js +55 -55
- package/src/saas/internal-api/uploadFiles/api/upload.file.api.js +43 -43
- package/src/saas/internal-api/uploadFiles/api/upload.file.service.js +107 -106
- package/src/saas/internal-api/uploadFiles/consts.js +12 -12
- package/src/saas/internal-api/uploadFiles/index.js +5 -5
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.api.js +38 -38
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.service.js +108 -108
- package/src/saas/internal-api/users/api/users.api.js +127 -127
- package/src/saas/internal-api/users/api/users.service.js +258 -258
- package/src/saas/internal-api/users/index.js +16 -16
- package/src/saas/internal-api/users/models/create.inner.system.user.model.js +18 -18
- package/src/saas/internal-api/users/models/notification.settings.model.js +12 -12
- package/src/saas/internal-api/users/models/tenent.user.model.js +11 -11
- package/src/saas/internal-api/users/models/users.model.js +43 -43
- package/src/saas/internal-api/users/utils/util.js +39 -39
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.api.js +26 -26
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.service.js +19 -19
- package/src/saas/internal-api/vendorProfile/index.js +3 -3
- package/src/saas/openapi/accounts/accounts.api.js +17 -17
- package/src/saas/openapi/accounts/accounts.service.js +11 -11
- package/src/saas/openapi/coi/coi.api.js +30 -30
- package/src/saas/openapi/coi/coi.service.js +43 -43
- package/src/saas/openapi/projects/projects.api.js +83 -83
- package/src/saas/openapi/projects/projects.service.js +64 -64
- package/src/saas/openapi/requests/index.js +7 -7
- package/src/saas/openapi/requests/models/invite.request.model.js +40 -40
- package/src/saas/openapi/requests/models/update.request.model.js +35 -35
- package/src/saas/openapi/requests/requests.api.js +93 -87
- package/src/saas/openapi/requests/requests.service.js +94 -81
- package/src/saas/openapi/requirements/index.js +6 -6
- package/src/saas/openapi/requirements/models/copy.requirement.model.js +10 -10
- package/src/saas/openapi/requirements/requirements.api.js +41 -41
- package/src/saas/openapi/requirements/requirements.service.js +49 -49
- package/src/saas/openapi/tabs/index.js +6 -6
- package/src/saas/openapi/tabs/models/create.tab.model.js +6 -6
- package/src/saas/openapi/tabs/tabs.api.js +27 -27
- package/src/saas/openapi/tabs/tabs.service.js +19 -19
- package/src/saas/openapi/users/user.model.js +10 -10
- package/src/saas/openapi/users/users.api.js +33 -33
- package/src/saas/openapi/users/users.service.js +51 -41
- package/tests/env.test.js +40 -40
- package/tests/validation.test.js +83 -83
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const recordNotesAPI = require('./record.notes.api');
|
|
2
|
-
const utils = require('./record.notes.utils');
|
|
3
|
-
|
|
4
|
-
const createRecordNote = (data, context, { tagUsers, multipleParagraphs } = {}) => {
|
|
5
|
-
tagUsers && (data.content = utils.getMentionedNoteContent(tagUsers, data.content, { multipleParagraphs }));
|
|
6
|
-
|
|
7
|
-
return recordNotesAPI.createRecordNote(data, context);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const getNotesByRecordId = (recordId, context) => {
|
|
11
|
-
return recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const getRecordNoteById = async (noteId, recordId, context) => {
|
|
15
|
-
const response = await recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
16
|
-
const notes = response.data;
|
|
17
|
-
const note = notes.find(note => note.id === noteId);
|
|
18
|
-
|
|
19
|
-
if (!note) {
|
|
20
|
-
throw new Error(`Note not found for note id: ${noteId} and record id: ${recordId}`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return note;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const getNotesCountByRecordId = (recordId, context) => {
|
|
27
|
-
return recordNotesAPI.getNotesCountByRecordId(recordId, context);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const deleteByNoteId = (noteId, data, context) => {
|
|
31
|
-
return recordNotesAPI.deleteByNoteId(noteId, data, context);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const updateByNoteId = (noteId, data, context, { tagUsers, multipleParagraphs } = {}) => {
|
|
35
|
-
tagUsers && (data.content = utils.getMentionedNoteContent(tagUsers, data.content, { multipleParagraphs }));
|
|
36
|
-
|
|
37
|
-
return recordNotesAPI.updateByNoteId(noteId, data, context);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
module.exports = {
|
|
41
|
-
createRecordNote,
|
|
42
|
-
getNotesByRecordId,
|
|
43
|
-
getNotesCountByRecordId,
|
|
44
|
-
deleteByNoteId,
|
|
45
|
-
updateByNoteId,
|
|
46
|
-
getRecordNoteById
|
|
47
|
-
};
|
|
1
|
+
const recordNotesAPI = require('./record.notes.api');
|
|
2
|
+
const utils = require('./record.notes.utils');
|
|
3
|
+
|
|
4
|
+
const createRecordNote = (data, context, { tagUsers, multipleParagraphs } = {}) => {
|
|
5
|
+
tagUsers && (data.content = utils.getMentionedNoteContent(tagUsers, data.content, { multipleParagraphs }));
|
|
6
|
+
|
|
7
|
+
return recordNotesAPI.createRecordNote(data, context);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const getNotesByRecordId = (recordId, context) => {
|
|
11
|
+
return recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const getRecordNoteById = async (noteId, recordId, context) => {
|
|
15
|
+
const response = await recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
16
|
+
const notes = response.data;
|
|
17
|
+
const note = notes.find(note => note.id === noteId);
|
|
18
|
+
|
|
19
|
+
if (!note) {
|
|
20
|
+
throw new Error(`Note not found for note id: ${noteId} and record id: ${recordId}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return note;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const getNotesCountByRecordId = (recordId, context) => {
|
|
27
|
+
return recordNotesAPI.getNotesCountByRecordId(recordId, context);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const deleteByNoteId = (noteId, data, context) => {
|
|
31
|
+
return recordNotesAPI.deleteByNoteId(noteId, data, context);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const updateByNoteId = (noteId, data, context, { tagUsers, multipleParagraphs } = {}) => {
|
|
35
|
+
tagUsers && (data.content = utils.getMentionedNoteContent(tagUsers, data.content, { multipleParagraphs }));
|
|
36
|
+
|
|
37
|
+
return recordNotesAPI.updateByNoteId(noteId, data, context);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
module.exports = {
|
|
41
|
+
createRecordNote,
|
|
42
|
+
getNotesByRecordId,
|
|
43
|
+
getNotesCountByRecordId,
|
|
44
|
+
deleteByNoteId,
|
|
45
|
+
updateByNoteId,
|
|
46
|
+
getRecordNoteById
|
|
47
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const getMentionedNoteContent = (usersArray, noteContent = '', { multipleParagraphs } = {}) => {
|
|
2
|
-
for (const user of usersArray) {
|
|
3
|
-
const newContent = `<span class="mention" data-full-name="${user.fullName}" data-id="${user.id}" draggable="false"><span contenteditable="false">@${user.fullName}</span></span>`;
|
|
4
|
-
noteContent += multipleParagraphs ? `<p>${newContent}</p>` : newContent;
|
|
5
|
-
}
|
|
6
|
-
noteContent = multipleParagraphs ? noteContent : `<p>${noteContent}</p>`;
|
|
7
|
-
return noteContent;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
getMentionedNoteContent
|
|
12
|
-
};
|
|
1
|
+
const getMentionedNoteContent = (usersArray, noteContent = '', { multipleParagraphs } = {}) => {
|
|
2
|
+
for (const user of usersArray) {
|
|
3
|
+
const newContent = `<span class="mention" data-full-name="${user.fullName}" data-id="${user.id}" draggable="false"><span contenteditable="false">@${user.fullName}</span></span>`;
|
|
4
|
+
noteContent += multipleParagraphs ? `<p>${newContent}</p>` : newContent;
|
|
5
|
+
}
|
|
6
|
+
noteContent = multipleParagraphs ? noteContent : `<p>${noteContent}</p>`;
|
|
7
|
+
return noteContent;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
getMentionedNoteContent
|
|
12
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const services = require('./api/record.notes.service');
|
|
2
|
-
|
|
3
|
-
module.exports = { services };
|
|
1
|
+
const services = require('./api/record.notes.service');
|
|
2
|
+
|
|
3
|
+
module.exports = { services };
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
-
const httpResponseTypes = require('../../../../common/httpResponseTypes.json');
|
|
4
|
-
|
|
5
|
-
const Endpoints = {
|
|
6
|
-
generateReportAndSendViaEmail: (accountId, reportType) => `${backendUrl}/saas/ExportXLSXReport/account/${accountId}/${reportType}`,
|
|
7
|
-
generateReportAndUploadToS3: reportType => `${backendUrl}/saas/integration-tests/ExportXLSXReport/${reportType}`,
|
|
8
|
-
getScheduledReports: accountId => `${backendUrl}/saas/scheduled-report/account/${accountId}`,
|
|
9
|
-
getDailyReportPresignedUrl: reportName => `${backendUrl}/saas/integration-tests/pre-signed-url/daily-report?fileName=${reportName}`,
|
|
10
|
-
updateScheduledReportLastSentDate: scheduledReportId => `${backendUrl}/saas/automation/scheduled-report/${scheduledReportId}`,
|
|
11
|
-
deleteScheduledReport: scheduledReportId => `${backendUrl}/saas/scheduled-report/${scheduledReportId}`,
|
|
12
|
-
reportsInAccount: accountId => `${backendUrl}/saas/integration-tests/reporting/account/${accountId}`
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
16
|
-
return requests.postRequestHandler(Endpoints.generateReportAndSendViaEmail(accountId, reportType), reportFilters, context);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
20
|
-
return requests.postRequestHandler(Endpoints.generateReportAndUploadToS3(reportType), reportFilters, context);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const getReportAsArrayBuffer = reportUrl => {
|
|
24
|
-
return requests.getRequestHandler(reportUrl, null, null, null, httpResponseTypes.arrayBuffer);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const getScheduledReports = (accountId, context) => {
|
|
28
|
-
return requests.getRequestHandler(Endpoints.getScheduledReports(accountId), null, context);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const getAllReportsInAccount = (accountId, context) => {
|
|
32
|
-
return requests.getRequestHandler(Endpoints.reportsInAccount(accountId), null, context);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const getDailyReportPresignedUrl = (reportName, context) => {
|
|
36
|
-
return requests.getRequestHandler(Endpoints.getDailyReportPresignedUrl(reportName), null, context);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
40
|
-
const url = `${Endpoints.updateScheduledReportLastSentDate(scheduledReportId)}?customLastSentDate=${customLastSentDate.toISOString()}`;
|
|
41
|
-
return requests.putRequestHandler(url, {}, context);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
45
|
-
return requests.deleteRequestHandler(Endpoints.deleteScheduledReport(scheduledReportId), context);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const deleteAllReportsInAccount = (accountId, context) => {
|
|
49
|
-
return requests.deleteRequestHandler(Endpoints.reportsInAccount(accountId), context);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
module.exports = {
|
|
53
|
-
generateReportAndSendViaEmail,
|
|
54
|
-
generateReportAndUploadToS3,
|
|
55
|
-
getReportAsArrayBuffer,
|
|
56
|
-
getScheduledReports,
|
|
57
|
-
getAllReportsInAccount,
|
|
58
|
-
getDailyReportPresignedUrl,
|
|
59
|
-
updateScheduledReportLastSentDate,
|
|
60
|
-
deleteScheduledReport,
|
|
61
|
-
deleteAllReportsInAccount
|
|
62
|
-
};
|
|
1
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
+
const httpResponseTypes = require('../../../../common/httpResponseTypes.json');
|
|
4
|
+
|
|
5
|
+
const Endpoints = {
|
|
6
|
+
generateReportAndSendViaEmail: (accountId, reportType) => `${backendUrl}/saas/ExportXLSXReport/account/${accountId}/${reportType}`,
|
|
7
|
+
generateReportAndUploadToS3: reportType => `${backendUrl}/saas/integration-tests/ExportXLSXReport/${reportType}`,
|
|
8
|
+
getScheduledReports: accountId => `${backendUrl}/saas/scheduled-report/account/${accountId}`,
|
|
9
|
+
getDailyReportPresignedUrl: reportName => `${backendUrl}/saas/integration-tests/pre-signed-url/daily-report?fileName=${reportName}`,
|
|
10
|
+
updateScheduledReportLastSentDate: scheduledReportId => `${backendUrl}/saas/automation/scheduled-report/${scheduledReportId}`,
|
|
11
|
+
deleteScheduledReport: scheduledReportId => `${backendUrl}/saas/scheduled-report/${scheduledReportId}`,
|
|
12
|
+
reportsInAccount: accountId => `${backendUrl}/saas/integration-tests/reporting/account/${accountId}`
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
16
|
+
return requests.postRequestHandler(Endpoints.generateReportAndSendViaEmail(accountId, reportType), reportFilters, context);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
20
|
+
return requests.postRequestHandler(Endpoints.generateReportAndUploadToS3(reportType), reportFilters, context);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const getReportAsArrayBuffer = reportUrl => {
|
|
24
|
+
return requests.getRequestHandler(reportUrl, null, null, null, httpResponseTypes.arrayBuffer);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const getScheduledReports = (accountId, context) => {
|
|
28
|
+
return requests.getRequestHandler(Endpoints.getScheduledReports(accountId), null, context);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const getAllReportsInAccount = (accountId, context) => {
|
|
32
|
+
return requests.getRequestHandler(Endpoints.reportsInAccount(accountId), null, context);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getDailyReportPresignedUrl = (reportName, context) => {
|
|
36
|
+
return requests.getRequestHandler(Endpoints.getDailyReportPresignedUrl(reportName), null, context);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
40
|
+
const url = `${Endpoints.updateScheduledReportLastSentDate(scheduledReportId)}?customLastSentDate=${customLastSentDate.toISOString()}`;
|
|
41
|
+
return requests.putRequestHandler(url, {}, context);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
45
|
+
return requests.deleteRequestHandler(Endpoints.deleteScheduledReport(scheduledReportId), context);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const deleteAllReportsInAccount = (accountId, context) => {
|
|
49
|
+
return requests.deleteRequestHandler(Endpoints.reportsInAccount(accountId), context);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
module.exports = {
|
|
53
|
+
generateReportAndSendViaEmail,
|
|
54
|
+
generateReportAndUploadToS3,
|
|
55
|
+
getReportAsArrayBuffer,
|
|
56
|
+
getScheduledReports,
|
|
57
|
+
getAllReportsInAccount,
|
|
58
|
+
getDailyReportPresignedUrl,
|
|
59
|
+
updateScheduledReportLastSentDate,
|
|
60
|
+
deleteScheduledReport,
|
|
61
|
+
deleteAllReportsInAccount
|
|
62
|
+
};
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
const reportsApi = require('./reports.api');
|
|
2
|
-
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
3
|
-
const { ReportFilters } = require('../models/report.model');
|
|
4
|
-
const httpResponseStatusCodes = require('../../../../common/httpResponseStatusCodes.json');
|
|
5
|
-
|
|
6
|
-
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
7
|
-
validateType(reportFilters, ReportFilters);
|
|
8
|
-
return reportsApi.generateReportAndSendViaEmail(reportFilters, accountId, reportType, context);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
12
|
-
validateType(reportFilters, ReportFilters);
|
|
13
|
-
return reportsApi.generateReportAndUploadToS3(reportFilters, reportType, context);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getReportAsArrayBuffer = async reportUrl => {
|
|
17
|
-
const response = await reportsApi.getReportAsArrayBuffer(reportUrl);
|
|
18
|
-
|
|
19
|
-
if (response.status !== httpResponseStatusCodes.OK) {
|
|
20
|
-
throw Error(`Failed to get report as array buffer\n${response}`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return response?.data;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const getScheduledReports = (accountId, context) => {
|
|
27
|
-
return reportsApi.getScheduledReports(accountId, context);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const getAllReportsInAccount = async (accountId, context) => {
|
|
31
|
-
const response = await reportsApi.getAllReportsInAccount(accountId, context);
|
|
32
|
-
|
|
33
|
-
if (response.status !== httpResponseStatusCodes.OK) {
|
|
34
|
-
throw Error(`Failed to get all reports in account\n${response}`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return response?.data;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getDailyReportPresignedUrl = async (reportName, context) => {
|
|
41
|
-
const response = await reportsApi.getDailyReportPresignedUrl(reportName, context);
|
|
42
|
-
|
|
43
|
-
if (response.status !== httpResponseStatusCodes.OK) {
|
|
44
|
-
throw Error(`Failed to get report presigned URL\n${response}`);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return response?.data;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
51
|
-
validateType(customLastSentDate, Date);
|
|
52
|
-
return reportsApi.updateScheduledReportLastSentDate(scheduledReportId, customLastSentDate, context);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
56
|
-
return reportsApi.deleteScheduledReport(scheduledReportId, context);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const deleteAllReportsInAccount = async (accountId, context) => {
|
|
60
|
-
const response = await reportsApi.deleteAllReportsInAccount(accountId, context);
|
|
61
|
-
|
|
62
|
-
if (response.status !== httpResponseStatusCodes.OK) {
|
|
63
|
-
throw new Error(`Failed to delete all reports in account\n${response}`);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return response;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
module.exports = {
|
|
70
|
-
generateReportAndSendViaEmail,
|
|
71
|
-
generateReportAndUploadToS3,
|
|
72
|
-
getReportAsArrayBuffer,
|
|
73
|
-
getScheduledReports,
|
|
74
|
-
getAllReportsInAccount,
|
|
75
|
-
getDailyReportPresignedUrl,
|
|
76
|
-
updateScheduledReportLastSentDate,
|
|
77
|
-
deleteScheduledReport,
|
|
78
|
-
deleteAllReportsInAccount
|
|
79
|
-
};
|
|
1
|
+
const reportsApi = require('./reports.api');
|
|
2
|
+
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
3
|
+
const { ReportFilters } = require('../models/report.model');
|
|
4
|
+
const httpResponseStatusCodes = require('../../../../common/httpResponseStatusCodes.json');
|
|
5
|
+
|
|
6
|
+
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
7
|
+
validateType(reportFilters, ReportFilters);
|
|
8
|
+
return reportsApi.generateReportAndSendViaEmail(reportFilters, accountId, reportType, context);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
12
|
+
validateType(reportFilters, ReportFilters);
|
|
13
|
+
return reportsApi.generateReportAndUploadToS3(reportFilters, reportType, context);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const getReportAsArrayBuffer = async reportUrl => {
|
|
17
|
+
const response = await reportsApi.getReportAsArrayBuffer(reportUrl);
|
|
18
|
+
|
|
19
|
+
if (response.status !== httpResponseStatusCodes.OK) {
|
|
20
|
+
throw Error(`Failed to get report as array buffer\n${response}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return response?.data;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const getScheduledReports = (accountId, context) => {
|
|
27
|
+
return reportsApi.getScheduledReports(accountId, context);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const getAllReportsInAccount = async (accountId, context) => {
|
|
31
|
+
const response = await reportsApi.getAllReportsInAccount(accountId, context);
|
|
32
|
+
|
|
33
|
+
if (response.status !== httpResponseStatusCodes.OK) {
|
|
34
|
+
throw Error(`Failed to get all reports in account\n${response}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return response?.data;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getDailyReportPresignedUrl = async (reportName, context) => {
|
|
41
|
+
const response = await reportsApi.getDailyReportPresignedUrl(reportName, context);
|
|
42
|
+
|
|
43
|
+
if (response.status !== httpResponseStatusCodes.OK) {
|
|
44
|
+
throw Error(`Failed to get report presigned URL\n${response}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return response?.data;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
51
|
+
validateType(customLastSentDate, Date);
|
|
52
|
+
return reportsApi.updateScheduledReportLastSentDate(scheduledReportId, customLastSentDate, context);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
56
|
+
return reportsApi.deleteScheduledReport(scheduledReportId, context);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const deleteAllReportsInAccount = async (accountId, context) => {
|
|
60
|
+
const response = await reportsApi.deleteAllReportsInAccount(accountId, context);
|
|
61
|
+
|
|
62
|
+
if (response.status !== httpResponseStatusCodes.OK) {
|
|
63
|
+
throw new Error(`Failed to delete all reports in account\n${response}`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return response;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
module.exports = {
|
|
70
|
+
generateReportAndSendViaEmail,
|
|
71
|
+
generateReportAndUploadToS3,
|
|
72
|
+
getReportAsArrayBuffer,
|
|
73
|
+
getScheduledReports,
|
|
74
|
+
getAllReportsInAccount,
|
|
75
|
+
getDailyReportPresignedUrl,
|
|
76
|
+
updateScheduledReportLastSentDate,
|
|
77
|
+
deleteScheduledReport,
|
|
78
|
+
deleteAllReportsInAccount
|
|
79
|
+
};
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
const REPORT_COMPLIANCE_STATUSES = {
|
|
2
|
-
COMPLIANT: 'COMPLIANT',
|
|
3
|
-
NOT_COMPLIANT: 'NOT_COMPLIANT',
|
|
4
|
-
AWAITING_COI: 'AWAITING_COI',
|
|
5
|
-
WAIVED: 'WAIVED',
|
|
6
|
-
EXPIRED: 'EXPIRED'
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES = {
|
|
10
|
-
EXPIRING_SOON: 'EXPIRING_SOON'
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const REPORT_CONTRACTOR_TYPES = {
|
|
14
|
-
VENDORS: 'Vendors',
|
|
15
|
-
TENANTS: 'Tenants',
|
|
16
|
-
GUESTS: 'Guests'
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const ALL_REPORT_COMPLIANCE_STATUSES = [
|
|
20
|
-
REPORT_COMPLIANCE_STATUSES.COMPLIANT,
|
|
21
|
-
REPORT_COMPLIANCE_STATUSES.NOT_COMPLIANT,
|
|
22
|
-
REPORT_COMPLIANCE_STATUSES.AWAITING_COI,
|
|
23
|
-
REPORT_COMPLIANCE_STATUSES.WAIVED,
|
|
24
|
-
REPORT_COMPLIANCE_STATUSES.EXPIRED
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const ALL_REPORT_CONTRACTOR_TYPES = [
|
|
28
|
-
REPORT_CONTRACTOR_TYPES.VENDORS,
|
|
29
|
-
REPORT_CONTRACTOR_TYPES.TENANTS,
|
|
30
|
-
REPORT_CONTRACTOR_TYPES.GUESTS
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const XlsxReportTypes = {
|
|
34
|
-
HIGH_LEVEL_PROPERTY_METRICS: 'HighLevelPropertyMetrics',
|
|
35
|
-
MASTER_COMPLIANCE_REPORT: 'MasterComplianceReport',
|
|
36
|
-
WAIVERS_REPORT: 'WaiversReport',
|
|
37
|
-
USER_MANAGEMENT_REPORT: 'UserManagementReport',
|
|
38
|
-
COVERAGE_GAPS_REPORT: 'CoverageGapsReport',
|
|
39
|
-
EXPIRING_RECORDS_REPORT: 'ExpiringRecordsReport',
|
|
40
|
-
COMPLIANCE_STATUS_BY_POLICY_REPORT: 'ComplianceStatusByPolicy',
|
|
41
|
-
NOT_COMPLIANT_REPORT: 'NotCompliantReport'
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const ScheduledReportFrequency = {
|
|
45
|
-
DAILY: 'Daily',
|
|
46
|
-
WEEKLY: 'Weekly',
|
|
47
|
-
MONTHLY: 'Monthly',
|
|
48
|
-
QUARTERLY: 'Quarterly'
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const SelectionType = {
|
|
52
|
-
ALL: 'All',
|
|
53
|
-
SELECTION: 'Selection'
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const CreatorTypes = {
|
|
57
|
-
USER: 'USER',
|
|
58
|
-
SYSTEM: 'SYSTEM'
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const NUM_OF_REPORT_TYPES = Object.keys(XlsxReportTypes).length;
|
|
62
|
-
|
|
63
|
-
module.exports = {
|
|
64
|
-
REPORT_COMPLIANCE_STATUSES,
|
|
65
|
-
REPORT_CONTRACTOR_TYPES,
|
|
66
|
-
ALL_REPORT_COMPLIANCE_STATUSES,
|
|
67
|
-
EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES,
|
|
68
|
-
ALL_REPORT_CONTRACTOR_TYPES,
|
|
69
|
-
NUM_OF_REPORT_TYPES,
|
|
70
|
-
XlsxReportTypes,
|
|
71
|
-
ScheduledReportFrequency,
|
|
72
|
-
SelectionType,
|
|
73
|
-
CreatorTypes
|
|
74
|
-
};
|
|
1
|
+
const REPORT_COMPLIANCE_STATUSES = {
|
|
2
|
+
COMPLIANT: 'COMPLIANT',
|
|
3
|
+
NOT_COMPLIANT: 'NOT_COMPLIANT',
|
|
4
|
+
AWAITING_COI: 'AWAITING_COI',
|
|
5
|
+
WAIVED: 'WAIVED',
|
|
6
|
+
EXPIRED: 'EXPIRED'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES = {
|
|
10
|
+
EXPIRING_SOON: 'EXPIRING_SOON'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const REPORT_CONTRACTOR_TYPES = {
|
|
14
|
+
VENDORS: 'Vendors',
|
|
15
|
+
TENANTS: 'Tenants',
|
|
16
|
+
GUESTS: 'Guests'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ALL_REPORT_COMPLIANCE_STATUSES = [
|
|
20
|
+
REPORT_COMPLIANCE_STATUSES.COMPLIANT,
|
|
21
|
+
REPORT_COMPLIANCE_STATUSES.NOT_COMPLIANT,
|
|
22
|
+
REPORT_COMPLIANCE_STATUSES.AWAITING_COI,
|
|
23
|
+
REPORT_COMPLIANCE_STATUSES.WAIVED,
|
|
24
|
+
REPORT_COMPLIANCE_STATUSES.EXPIRED
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const ALL_REPORT_CONTRACTOR_TYPES = [
|
|
28
|
+
REPORT_CONTRACTOR_TYPES.VENDORS,
|
|
29
|
+
REPORT_CONTRACTOR_TYPES.TENANTS,
|
|
30
|
+
REPORT_CONTRACTOR_TYPES.GUESTS
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const XlsxReportTypes = {
|
|
34
|
+
HIGH_LEVEL_PROPERTY_METRICS: 'HighLevelPropertyMetrics',
|
|
35
|
+
MASTER_COMPLIANCE_REPORT: 'MasterComplianceReport',
|
|
36
|
+
WAIVERS_REPORT: 'WaiversReport',
|
|
37
|
+
USER_MANAGEMENT_REPORT: 'UserManagementReport',
|
|
38
|
+
COVERAGE_GAPS_REPORT: 'CoverageGapsReport',
|
|
39
|
+
EXPIRING_RECORDS_REPORT: 'ExpiringRecordsReport',
|
|
40
|
+
COMPLIANCE_STATUS_BY_POLICY_REPORT: 'ComplianceStatusByPolicy',
|
|
41
|
+
NOT_COMPLIANT_REPORT: 'NotCompliantReport'
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const ScheduledReportFrequency = {
|
|
45
|
+
DAILY: 'Daily',
|
|
46
|
+
WEEKLY: 'Weekly',
|
|
47
|
+
MONTHLY: 'Monthly',
|
|
48
|
+
QUARTERLY: 'Quarterly'
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const SelectionType = {
|
|
52
|
+
ALL: 'All',
|
|
53
|
+
SELECTION: 'Selection'
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const CreatorTypes = {
|
|
57
|
+
USER: 'USER',
|
|
58
|
+
SYSTEM: 'SYSTEM'
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const NUM_OF_REPORT_TYPES = Object.keys(XlsxReportTypes).length;
|
|
62
|
+
|
|
63
|
+
module.exports = {
|
|
64
|
+
REPORT_COMPLIANCE_STATUSES,
|
|
65
|
+
REPORT_CONTRACTOR_TYPES,
|
|
66
|
+
ALL_REPORT_COMPLIANCE_STATUSES,
|
|
67
|
+
EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES,
|
|
68
|
+
ALL_REPORT_CONTRACTOR_TYPES,
|
|
69
|
+
NUM_OF_REPORT_TYPES,
|
|
70
|
+
XlsxReportTypes,
|
|
71
|
+
ScheduledReportFrequency,
|
|
72
|
+
SelectionType,
|
|
73
|
+
CreatorTypes
|
|
74
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const reportService = require('./api/reports.service');
|
|
2
|
-
const reportModels = require('./models/report.model');
|
|
3
|
-
const reportConsts = require('./consts/consts');
|
|
4
|
-
|
|
5
|
-
const services = {
|
|
6
|
-
report: reportService
|
|
7
|
-
};
|
|
8
|
-
const models = {
|
|
9
|
-
report: reportModels
|
|
10
|
-
};
|
|
11
|
-
const consts = {
|
|
12
|
-
report: reportConsts
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
module.exports = { models, services, consts };
|
|
1
|
+
const reportService = require('./api/reports.service');
|
|
2
|
+
const reportModels = require('./models/report.model');
|
|
3
|
+
const reportConsts = require('./consts/consts');
|
|
4
|
+
|
|
5
|
+
const services = {
|
|
6
|
+
report: reportService
|
|
7
|
+
};
|
|
8
|
+
const models = {
|
|
9
|
+
report: reportModels
|
|
10
|
+
};
|
|
11
|
+
const consts = {
|
|
12
|
+
report: reportConsts
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
module.exports = { models, services, consts };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const { ALL_REPORT_COMPLIANCE_STATUSES, ALL_REPORT_CONTRACTOR_TYPES } = require('../consts/consts');
|
|
2
|
-
|
|
3
|
-
class ReportFilters {
|
|
4
|
-
constructor(
|
|
5
|
-
projects,
|
|
6
|
-
{
|
|
7
|
-
complianceStatuses = ALL_REPORT_COMPLIANCE_STATUSES,
|
|
8
|
-
contractorTypes = ALL_REPORT_CONTRACTOR_TYPES,
|
|
9
|
-
scheduledReportFrequency,
|
|
10
|
-
isAllProjects,
|
|
11
|
-
isAllTabTypes,
|
|
12
|
-
isAllComplianceStatuses
|
|
13
|
-
} = {}
|
|
14
|
-
) {
|
|
15
|
-
this.projects = projects;
|
|
16
|
-
this.vendorTabTypes = contractorTypes;
|
|
17
|
-
this.complianceStatuses = complianceStatuses;
|
|
18
|
-
this.scheduledReportFrequency = scheduledReportFrequency,
|
|
19
|
-
this.isAllProjects = isAllProjects,
|
|
20
|
-
this.isAllTabTypes = isAllTabTypes,
|
|
21
|
-
this.isAllComplianceStatuses = isAllComplianceStatuses;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = {
|
|
26
|
-
ReportFilters
|
|
27
|
-
};
|
|
1
|
+
const { ALL_REPORT_COMPLIANCE_STATUSES, ALL_REPORT_CONTRACTOR_TYPES } = require('../consts/consts');
|
|
2
|
+
|
|
3
|
+
class ReportFilters {
|
|
4
|
+
constructor(
|
|
5
|
+
projects,
|
|
6
|
+
{
|
|
7
|
+
complianceStatuses = ALL_REPORT_COMPLIANCE_STATUSES,
|
|
8
|
+
contractorTypes = ALL_REPORT_CONTRACTOR_TYPES,
|
|
9
|
+
scheduledReportFrequency,
|
|
10
|
+
isAllProjects,
|
|
11
|
+
isAllTabTypes,
|
|
12
|
+
isAllComplianceStatuses
|
|
13
|
+
} = {}
|
|
14
|
+
) {
|
|
15
|
+
this.projects = projects;
|
|
16
|
+
this.vendorTabTypes = contractorTypes;
|
|
17
|
+
this.complianceStatuses = complianceStatuses;
|
|
18
|
+
this.scheduledReportFrequency = scheduledReportFrequency,
|
|
19
|
+
this.isAllProjects = isAllProjects,
|
|
20
|
+
this.isAllTabTypes = isAllTabTypes,
|
|
21
|
+
this.isAllComplianceStatuses = isAllComplianceStatuses;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
ReportFilters
|
|
27
|
+
};
|