@getjones/test-infra 2.8.4 → 2.8.5
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 +29 -29
- package/src/common/commonFlows/auth/auth.js +40 -40
- package/src/common/commonFlows/index.js +4 -4
- package/src/common/commonFlows/records/records.js +72 -72
- package/src/common/consts/dashboardCharts.js +17 -17
- package/src/common/consts/recordTypes.js +5 -5
- package/src/common/consts/userTypes.js +5 -5
- package/src/common/httpResponseStatusCodes.json +11 -11
- package/src/common/requests/apiKeyAuth/requests.js +44 -44
- package/src/common/requests/cookieAuth/requests.js +40 -40
- package/src/common/requests/requestHandlers.js +78 -78
- package/src/common/utils/complianceUtil.js +56 -56
- 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 +175 -175
- package/src/common/validations/errorValidation.js +16 -16
- package/src/common/validations/typeValidations.js +36 -36
- package/src/defaults/configs/auditConfigs.js +91 -91
- package/src/defaults/configs/coverage.js +227 -227
- package/src/defaults/configs/polices.js +49 -49
- package/src/defaults/configs/requirement.js +32 -32
- package/src/defaults/index.js +6 -6
- package/src/env.js +57 -57
- package/src/factory/index.js +7 -7
- package/src/factory/records/records.js +141 -142
- package/src/factory/users/users.js +79 -79
- package/src/index.js +81 -81
- package/src/saas/internal-api/accounts/api/core/accounts.core.api.js +28 -28
- package/src/saas/internal-api/accounts/api/core/accounts.core.service.js +77 -77
- 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 +6 -6
- package/src/saas/internal-api/accounts/index.js +21 -21
- 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 +38 -38
- package/src/saas/internal-api/accounts/utils/utils.js +66 -66
- 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 +34 -34
- package/src/saas/internal-api/coi/api/coi.service.js +22 -22
- package/src/saas/internal-api/coi/consts/uploaderTypes.js +5 -5
- package/src/saas/internal-api/coi/index.js +13 -13
- package/src/saas/internal-api/coi/models/submit.coi.model.js +9 -9
- package/src/saas/internal-api/coi/utils/utils.js +48 -48
- package/src/saas/internal-api/compliance/api/audit/audit.api.js +46 -46
- package/src/saas/internal-api/compliance/api/audit/audit.service.js +143 -143
- 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 +33 -33
- package/src/saas/internal-api/compliance/api/overrideGap/override.gap.service.js +127 -127
- package/src/saas/internal-api/compliance/consts/audit.js +71 -71
- package/src/saas/internal-api/compliance/index.js +33 -33
- package/src/saas/internal-api/compliance/models/audit/audit.model.js +84 -84
- package/src/saas/internal-api/compliance/models/waive/waive.model.js +49 -49
- package/src/saas/internal-api/compliance/utils/auditUtil.js +222 -222
- package/src/saas/internal-api/compliance/utils/coverageUtil.js +40 -40
- package/src/saas/internal-api/contractors/api/contractors.api.js +153 -153
- package/src/saas/internal-api/contractors/api/contractors.service.js +181 -169
- package/src/saas/internal-api/contractors/consts/consts.js +6 -6
- package/src/saas/internal-api/contractors/index.js +9 -9
- package/src/saas/internal-api/contractors/models/assign.requirement.model.js +10 -10
- package/src/saas/internal-api/contractors/models/create.contractor.model.js +22 -22
- package/src/saas/internal-api/contractors/models/edit.contractor.model.js +60 -60
- package/src/saas/internal-api/contractors/models/verification.contractor.model.js +27 -27
- 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 +127 -127
- package/src/saas/internal-api/dbEmails/consts/consts.js +37 -37
- package/src/saas/internal-api/dbEmails/index.js +5 -5
- package/src/saas/internal-api/dbEmails/models/db.emails.model.js +21 -21
- package/src/saas/internal-api/dbEmails/utils/util.js +68 -68
- package/src/saas/internal-api/globalRecord/api/global.record.api.js +82 -82
- package/src/saas/internal-api/globalRecord/api/global.record.service.js +95 -95
- 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 +43 -43
- package/src/saas/internal-api/globalRecord/utils/util.js +148 -148
- 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/projects/api/core/projects.api.js +39 -39
- package/src/saas/internal-api/projects/api/core/projects.service.js +65 -65
- 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 +41 -41
- package/src/saas/internal-api/projects/utils/utils.js +156 -156
- package/src/saas/internal-api/recordNotes/api/record.notes.api.js +38 -38
- package/src/saas/internal-api/recordNotes/api/record.notes.service.js +29 -29
- package/src/saas/internal-api/recordNotes/index.js +3 -3
- package/src/saas/internal-api/reports/api/reports.api.js +39 -39
- package/src/saas/internal-api/reports/api/reports.service.js +34 -34
- package/src/saas/internal-api/reports/consts/consts.js +63 -63
- 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 +72 -72
- package/src/saas/internal-api/requests/api/requests.service.js +114 -122
- package/src/saas/internal-api/requests/index.js +14 -14
- package/src/saas/internal-api/requests/models/create.request.model.js +33 -33
- package/src/saas/internal-api/requests/models/edit.request.model.js +31 -31
- package/src/saas/internal-api/requests/models/tenant.request.model.js +9 -9
- package/src/saas/internal-api/requests/utils.js +8 -8
- 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 +45 -45
- package/src/saas/internal-api/requirements/api/requirements.service.js +134 -134
- package/src/saas/internal-api/requirements/consts/attributeTypes.json +5 -5
- package/src/saas/internal-api/requirements/consts/consts.js +6 -6
- package/src/saas/internal-api/requirements/index.js +9 -9
- package/src/saas/internal-api/requirements/models/create.requirement.model.js +17 -17
- package/src/saas/internal-api/requirements/models/policy.model.js +32 -32
- package/src/saas/internal-api/requirements/models/update.requirement.model.js +19 -19
- package/src/saas/internal-api/requirements/utils/utils.js +102 -102
- 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 +18 -18
- package/src/saas/internal-api/thread-scheduler/runner.js +39 -39
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.api.js +32 -32
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.service.js +78 -78
- package/src/saas/internal-api/users/api/users.api.js +77 -77
- package/src/saas/internal-api/users/api/users.service.js +101 -101
- package/src/saas/internal-api/users/index.js +11 -11
- package/src/saas/internal-api/users/models/tenent.user.model.js +11 -11
- package/src/saas/internal-api/users/models/users.model.js +31 -31
- package/src/saas/internal-api/users/utils/util.js +20 -20
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.api.js +20 -20
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.service.js +14 -14
- 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 +20 -20
- package/src/saas/openapi/coi/coi.service.js +13 -13
- package/src/saas/openapi/projects/projects.api.js +59 -59
- package/src/saas/openapi/projects/projects.service.js +44 -44
- package/src/saas/openapi/requests/index.js +7 -7
- package/src/saas/openapi/requests/models/invite.request.model.js +37 -37
- package/src/saas/openapi/requests/models/update.request.model.js +35 -35
- package/src/saas/openapi/requests/requests.api.js +76 -76
- package/src/saas/openapi/requests/requests.service.js +65 -65
- 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 +26 -26
- package/src/saas/openapi/requirements/requirements.service.js +32 -32
- 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 +18 -18
- package/src/saas/openapi/tabs/tabs.service.js +11 -11
- package/tests/env.test.js +40 -40
- package/tests/validation.test.js +83 -83
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
-
|
|
4
|
-
const Endpoints = {
|
|
5
|
-
create: recordId => `${backendUrl}/saas/contractors/${recordId}/notes`,
|
|
6
|
-
getNotesByRecordId: recordId => `${backendUrl}/saas/contractors/${recordId}/notes`,
|
|
7
|
-
getNotesCountByRecordId: recordId => `${backendUrl}/saas/contractors/${recordId}/notes/count`,
|
|
8
|
-
deleteByNoteId: noteId => `${backendUrl}/saas/contractors/notes/${noteId}`,
|
|
9
|
-
updateByNoteId: noteId => `${backendUrl}/saas/contractors/notes/${noteId}`
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const createRecordNote = (recordId, data, context) => {
|
|
13
|
-
return requests.postRequestHandler(Endpoints.create(recordId), data, context);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const getNotesByRecordId = (recordId, context) => {
|
|
17
|
-
return requests.getRequestHandler(Endpoints.getNotesByRecordId(recordId), {}, context);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getNotesCountByRecordId = (recordId, context) => {
|
|
21
|
-
return requests.getRequestHandler(Endpoints.getNotesCountByRecordId(recordId), {}, context);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const deleteByNoteId = (id, data, context) => {
|
|
25
|
-
return requests.deleteRequestHandler(Endpoints.deleteByNoteId(id), context, {}, {}, data);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const updateByNoteId = (id, data, context) => {
|
|
29
|
-
return requests.putRequestHandler(Endpoints.updateByNoteId(id), data, context);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
module.exports = {
|
|
33
|
-
createRecordNote,
|
|
34
|
-
getNotesByRecordId,
|
|
35
|
-
getNotesCountByRecordId,
|
|
36
|
-
deleteByNoteId,
|
|
37
|
-
updateByNoteId
|
|
38
|
-
};
|
|
1
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
+
|
|
4
|
+
const Endpoints = {
|
|
5
|
+
create: recordId => `${backendUrl}/saas/contractors/${recordId}/notes`,
|
|
6
|
+
getNotesByRecordId: recordId => `${backendUrl}/saas/contractors/${recordId}/notes`,
|
|
7
|
+
getNotesCountByRecordId: recordId => `${backendUrl}/saas/contractors/${recordId}/notes/count`,
|
|
8
|
+
deleteByNoteId: noteId => `${backendUrl}/saas/contractors/notes/${noteId}`,
|
|
9
|
+
updateByNoteId: noteId => `${backendUrl}/saas/contractors/notes/${noteId}`
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const createRecordNote = (recordId, data, context) => {
|
|
13
|
+
return requests.postRequestHandler(Endpoints.create(recordId), data, context);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const getNotesByRecordId = (recordId, context) => {
|
|
17
|
+
return requests.getRequestHandler(Endpoints.getNotesByRecordId(recordId), {}, context);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getNotesCountByRecordId = (recordId, context) => {
|
|
21
|
+
return requests.getRequestHandler(Endpoints.getNotesCountByRecordId(recordId), {}, context);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const deleteByNoteId = (id, data, context) => {
|
|
25
|
+
return requests.deleteRequestHandler(Endpoints.deleteByNoteId(id), context, {}, {}, data);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const updateByNoteId = (id, data, context) => {
|
|
29
|
+
return requests.putRequestHandler(Endpoints.updateByNoteId(id), data, context);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
module.exports = {
|
|
33
|
+
createRecordNote,
|
|
34
|
+
getNotesByRecordId,
|
|
35
|
+
getNotesCountByRecordId,
|
|
36
|
+
deleteByNoteId,
|
|
37
|
+
updateByNoteId
|
|
38
|
+
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
const recordNotesAPI = require('./record.notes.api');
|
|
2
|
-
|
|
3
|
-
const createRecordNote = (recordId, data, context) => {
|
|
4
|
-
return recordNotesAPI.createRecordNote(recordId, data, context);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const getNotesByRecordId = (recordId, context) => {
|
|
8
|
-
return recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const getNotesCountByRecordId = (recordId, context) => {
|
|
12
|
-
return recordNotesAPI.getNotesCountByRecordId(recordId, context);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const deleteByNoteId = (noteId, data, context) => {
|
|
16
|
-
return recordNotesAPI.deleteByNoteId(noteId, data, context);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const updateByNoteId = (noteId, data, context) => {
|
|
20
|
-
return recordNotesAPI.updateByNoteId(noteId, data, context);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
module.exports = {
|
|
24
|
-
createRecordNote,
|
|
25
|
-
getNotesByRecordId,
|
|
26
|
-
getNotesCountByRecordId,
|
|
27
|
-
deleteByNoteId,
|
|
28
|
-
updateByNoteId
|
|
29
|
-
};
|
|
1
|
+
const recordNotesAPI = require('./record.notes.api');
|
|
2
|
+
|
|
3
|
+
const createRecordNote = (recordId, data, context) => {
|
|
4
|
+
return recordNotesAPI.createRecordNote(recordId, data, context);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const getNotesByRecordId = (recordId, context) => {
|
|
8
|
+
return recordNotesAPI.getNotesByRecordId(recordId, context);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const getNotesCountByRecordId = (recordId, context) => {
|
|
12
|
+
return recordNotesAPI.getNotesCountByRecordId(recordId, context);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const deleteByNoteId = (noteId, data, context) => {
|
|
16
|
+
return recordNotesAPI.deleteByNoteId(noteId, data, context);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const updateByNoteId = (noteId, data, context) => {
|
|
20
|
+
return recordNotesAPI.updateByNoteId(noteId, data, context);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
createRecordNote,
|
|
25
|
+
getNotesByRecordId,
|
|
26
|
+
getNotesCountByRecordId,
|
|
27
|
+
deleteByNoteId,
|
|
28
|
+
updateByNoteId
|
|
29
|
+
};
|
|
@@ -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,39 +1,39 @@
|
|
|
1
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
-
|
|
4
|
-
const Endpoints = {
|
|
5
|
-
generateReportAndSendViaEmail: (accountId, reportType) => `${backendUrl}/saas/ExportXLSXReport/account/${accountId}/${reportType}`,
|
|
6
|
-
generateReportAndUploadToS3: reportType => `${backendUrl}/saas/integration-tests/ExportXLSXReport/${reportType}`,
|
|
7
|
-
getScheduledReports: accountId => `${backendUrl}/saas/scheduled-report/account/${accountId}`,
|
|
8
|
-
deleteScheduledReport: scheduledReportId => `${backendUrl}/saas/scheduled-report/${scheduledReportId}`,
|
|
9
|
-
updateScheduledReportLastSentDate: scheduledReportId => `${backendUrl}/saas/automation/scheduled-report/${scheduledReportId}`
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
13
|
-
return requests.postRequestHandler(Endpoints.generateReportAndSendViaEmail(accountId, reportType), reportFilters, context);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
17
|
-
return requests.postRequestHandler(Endpoints.generateReportAndUploadToS3(reportType), reportFilters, context);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getScheduledReports = (accountId, context) => {
|
|
21
|
-
return requests.getRequestHandler(Endpoints.getScheduledReports(accountId), null, context);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
25
|
-
return requests.deleteRequestHandler(Endpoints.deleteScheduledReport(scheduledReportId), context);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
29
|
-
const url = `${Endpoints.updateScheduledReportLastSentDate(scheduledReportId)}?customLastSentDate=${customLastSentDate.toISOString()}`;
|
|
30
|
-
return requests.putRequestHandler(url, {}, context);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
module.exports = {
|
|
34
|
-
generateReportAndSendViaEmail,
|
|
35
|
-
generateReportAndUploadToS3,
|
|
36
|
-
getScheduledReports,
|
|
37
|
-
deleteScheduledReport,
|
|
38
|
-
updateScheduledReportLastSentDate
|
|
39
|
-
};
|
|
1
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
+
|
|
4
|
+
const Endpoints = {
|
|
5
|
+
generateReportAndSendViaEmail: (accountId, reportType) => `${backendUrl}/saas/ExportXLSXReport/account/${accountId}/${reportType}`,
|
|
6
|
+
generateReportAndUploadToS3: reportType => `${backendUrl}/saas/integration-tests/ExportXLSXReport/${reportType}`,
|
|
7
|
+
getScheduledReports: accountId => `${backendUrl}/saas/scheduled-report/account/${accountId}`,
|
|
8
|
+
deleteScheduledReport: scheduledReportId => `${backendUrl}/saas/scheduled-report/${scheduledReportId}`,
|
|
9
|
+
updateScheduledReportLastSentDate: scheduledReportId => `${backendUrl}/saas/automation/scheduled-report/${scheduledReportId}`
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
13
|
+
return requests.postRequestHandler(Endpoints.generateReportAndSendViaEmail(accountId, reportType), reportFilters, context);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
17
|
+
return requests.postRequestHandler(Endpoints.generateReportAndUploadToS3(reportType), reportFilters, context);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getScheduledReports = (accountId, context) => {
|
|
21
|
+
return requests.getRequestHandler(Endpoints.getScheduledReports(accountId), null, context);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
25
|
+
return requests.deleteRequestHandler(Endpoints.deleteScheduledReport(scheduledReportId), context);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
29
|
+
const url = `${Endpoints.updateScheduledReportLastSentDate(scheduledReportId)}?customLastSentDate=${customLastSentDate.toISOString()}`;
|
|
30
|
+
return requests.putRequestHandler(url, {}, context);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
module.exports = {
|
|
34
|
+
generateReportAndSendViaEmail,
|
|
35
|
+
generateReportAndUploadToS3,
|
|
36
|
+
getScheduledReports,
|
|
37
|
+
deleteScheduledReport,
|
|
38
|
+
updateScheduledReportLastSentDate
|
|
39
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
const reportsApi = require('./reports.api');
|
|
2
|
-
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
3
|
-
const { ReportFilters } = require('../models/report.model');
|
|
4
|
-
|
|
5
|
-
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
6
|
-
validateType(reportFilters, ReportFilters);
|
|
7
|
-
return reportsApi.generateReportAndSendViaEmail(reportFilters, accountId, reportType, context);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
11
|
-
validateType(reportFilters, ReportFilters);
|
|
12
|
-
return reportsApi.generateReportAndUploadToS3(reportFilters, reportType, context);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const getScheduledReports = (accountId, context) => {
|
|
16
|
-
return reportsApi.getScheduledReports(accountId, context);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
20
|
-
return reportsApi.deleteScheduledReport(scheduledReportId, context);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
24
|
-
validateType(customLastSentDate, Date);
|
|
25
|
-
return reportsApi.updateScheduledReportLastSentDate(scheduledReportId, customLastSentDate, context);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
module.exports = {
|
|
29
|
-
generateReportAndSendViaEmail,
|
|
30
|
-
generateReportAndUploadToS3,
|
|
31
|
-
getScheduledReports,
|
|
32
|
-
deleteScheduledReport,
|
|
33
|
-
updateScheduledReportLastSentDate
|
|
34
|
-
};
|
|
1
|
+
const reportsApi = require('./reports.api');
|
|
2
|
+
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
3
|
+
const { ReportFilters } = require('../models/report.model');
|
|
4
|
+
|
|
5
|
+
const generateReportAndSendViaEmail = (reportFilters, accountId, reportType, context) => {
|
|
6
|
+
validateType(reportFilters, ReportFilters);
|
|
7
|
+
return reportsApi.generateReportAndSendViaEmail(reportFilters, accountId, reportType, context);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const generateReportAndUploadToS3 = (reportFilters, reportType, context) => {
|
|
11
|
+
validateType(reportFilters, ReportFilters);
|
|
12
|
+
return reportsApi.generateReportAndUploadToS3(reportFilters, reportType, context);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const getScheduledReports = (accountId, context) => {
|
|
16
|
+
return reportsApi.getScheduledReports(accountId, context);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const deleteScheduledReport = (scheduledReportId, context) => {
|
|
20
|
+
return reportsApi.deleteScheduledReport(scheduledReportId, context);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const updateScheduledReportLastSentDate = (scheduledReportId, customLastSentDate, context) => {
|
|
24
|
+
validateType(customLastSentDate, Date);
|
|
25
|
+
return reportsApi.updateScheduledReportLastSentDate(scheduledReportId, customLastSentDate, context);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
generateReportAndSendViaEmail,
|
|
30
|
+
generateReportAndUploadToS3,
|
|
31
|
+
getScheduledReports,
|
|
32
|
+
deleteScheduledReport,
|
|
33
|
+
updateScheduledReportLastSentDate
|
|
34
|
+
};
|
|
@@ -1,63 +1,63 @@
|
|
|
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
|
-
};
|
|
41
|
-
|
|
42
|
-
const ScheduledReportFrequency = {
|
|
43
|
-
DAILY: 'Daily',
|
|
44
|
-
WEEKLY: 'Weekly',
|
|
45
|
-
MONTHLY: 'Monthly',
|
|
46
|
-
QUARTERLY: 'Quarterly'
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const SelectionType = {
|
|
50
|
-
ALL: 'All',
|
|
51
|
-
SELECTION: 'Selection'
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
module.exports = {
|
|
55
|
-
REPORT_COMPLIANCE_STATUSES,
|
|
56
|
-
REPORT_CONTRACTOR_TYPES,
|
|
57
|
-
ALL_REPORT_COMPLIANCE_STATUSES,
|
|
58
|
-
EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES,
|
|
59
|
-
ALL_REPORT_CONTRACTOR_TYPES,
|
|
60
|
-
XlsxReportTypes,
|
|
61
|
-
ScheduledReportFrequency,
|
|
62
|
-
SelectionType
|
|
63
|
-
};
|
|
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
|
+
};
|
|
41
|
+
|
|
42
|
+
const ScheduledReportFrequency = {
|
|
43
|
+
DAILY: 'Daily',
|
|
44
|
+
WEEKLY: 'Weekly',
|
|
45
|
+
MONTHLY: 'Monthly',
|
|
46
|
+
QUARTERLY: 'Quarterly'
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const SelectionType = {
|
|
50
|
+
ALL: 'All',
|
|
51
|
+
SELECTION: 'Selection'
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
module.exports = {
|
|
55
|
+
REPORT_COMPLIANCE_STATUSES,
|
|
56
|
+
REPORT_CONTRACTOR_TYPES,
|
|
57
|
+
ALL_REPORT_COMPLIANCE_STATUSES,
|
|
58
|
+
EXPIRING_RECORDS_REPORT_COMPLIANCE_STATUSES,
|
|
59
|
+
ALL_REPORT_CONTRACTOR_TYPES,
|
|
60
|
+
XlsxReportTypes,
|
|
61
|
+
ScheduledReportFrequency,
|
|
62
|
+
SelectionType
|
|
63
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
-
|
|
4
|
-
const Endpoints = {
|
|
5
|
-
create: `${backendUrl}/saas/requests/invite`,
|
|
6
|
-
addRequestToRecord: (recordId, tabId) => `${backendUrl}/saas/${tabId}/request/${recordId}`,
|
|
7
|
-
publicLinkInvite: `${backendUrl}/_saas/requests/publicinvite`,
|
|
8
|
-
edit: contractorId => `${backendUrl}/saas/requests/${contractorId}/update`,
|
|
9
|
-
getById: requestId => `${backendUrl}/saas/request/${requestId}`,
|
|
10
|
-
getAccountRequests: accountId => `${backendUrl}/saas/requests/${accountId}`,
|
|
11
|
-
getByTabId: `${backendUrl}/saas/requests`,
|
|
12
|
-
requestsGlobalSearch: (projectId, searchWord) =>
|
|
13
|
-
`${backendUrl}/saas/requests/search?&projectId=${projectId}&searchWord=${searchWord}`,
|
|
14
|
-
getAutocompleteAutoSelect: `${backendUrl}/saas/request/auto/selection`,
|
|
15
|
-
getTabTenantRequestsInProject: projectId => `${backendUrl}/saas/project/${projectId}/tenants/companies`
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const createRequest = (createRequestModel, context) => {
|
|
19
|
-
return requests.postRequestHandler(Endpoints.create, createRequestModel, context);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const addRequestToRecord = (recordId, tabId, context) => {
|
|
23
|
-
return requests.postRequestHandler(Endpoints.addRequestToRecord(recordId, tabId), {}, context);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const inviteRequestViaPublicLink = (createRequestModel, context) => {
|
|
27
|
-
return requests.postRequestHandler(Endpoints.publicLinkInvite, createRequestModel, context);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const editRequestAndRecordDetails = (editRequestModel, context) => {
|
|
31
|
-
const params = { updateInfoUser: 'EditVendor' };
|
|
32
|
-
const { record: { contractorId } } = editRequestModel;
|
|
33
|
-
return requests.postRequestHandler(Endpoints.edit(contractorId), editRequestModel, context, {}, params);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const getRequestById = (requestId, context) => {
|
|
37
|
-
return requests.getRequestHandler(Endpoints.getById(requestId), {}, context);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getAutocompleteAutoSelect = (params, context) => {
|
|
41
|
-
return requests.getRequestHandler(Endpoints.getAutocompleteAutoSelect, params, context);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const getRequestsByAccountId = (accountId, context, params) => {
|
|
45
|
-
return requests.getRequestHandler(Endpoints.getAccountRequests(accountId), params, context);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const getRequestsByTabId = (tabId, context, activityStatus) => {
|
|
49
|
-
const body = { tabId, activityStatus };
|
|
50
|
-
return requests.postRequestHandler(Endpoints.getByTabId, body, context);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const requestsGlobalSearch = (projectId, searchWord, context) => {
|
|
54
|
-
return requests.getRequestHandler(Endpoints.requestsGlobalSearch(projectId, searchWord), {}, context);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const getTabTenantRequestsInProject = (projectId, context) => {
|
|
58
|
-
return requests.getRequestHandler(Endpoints.getTabTenantRequestsInProject(projectId), {}, context);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
module.exports = {
|
|
62
|
-
createRequest,
|
|
63
|
-
addRequestToRecord,
|
|
64
|
-
inviteRequestViaPublicLink,
|
|
65
|
-
editRequestAndRecordDetails,
|
|
66
|
-
getRequestById,
|
|
67
|
-
getRequestsByAccountId,
|
|
68
|
-
getRequestsByTabId,
|
|
69
|
-
requestsGlobalSearch,
|
|
70
|
-
getAutocompleteAutoSelect,
|
|
71
|
-
getTabTenantRequestsInProject
|
|
72
|
-
};
|
|
1
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
+
|
|
4
|
+
const Endpoints = {
|
|
5
|
+
create: `${backendUrl}/saas/requests/invite`,
|
|
6
|
+
addRequestToRecord: (recordId, tabId) => `${backendUrl}/saas/${tabId}/request/${recordId}`,
|
|
7
|
+
publicLinkInvite: `${backendUrl}/_saas/requests/publicinvite`,
|
|
8
|
+
edit: contractorId => `${backendUrl}/saas/requests/${contractorId}/update`,
|
|
9
|
+
getById: requestId => `${backendUrl}/saas/request/${requestId}`,
|
|
10
|
+
getAccountRequests: accountId => `${backendUrl}/saas/requests/${accountId}`,
|
|
11
|
+
getByTabId: `${backendUrl}/saas/requests`,
|
|
12
|
+
requestsGlobalSearch: (projectId, searchWord) =>
|
|
13
|
+
`${backendUrl}/saas/requests/search?&projectId=${projectId}&searchWord=${searchWord}`,
|
|
14
|
+
getAutocompleteAutoSelect: `${backendUrl}/saas/request/auto/selection`,
|
|
15
|
+
getTabTenantRequestsInProject: projectId => `${backendUrl}/saas/project/${projectId}/tenants/companies`
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const createRequest = (createRequestModel, context) => {
|
|
19
|
+
return requests.postRequestHandler(Endpoints.create, createRequestModel, context);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const addRequestToRecord = (recordId, tabId, context) => {
|
|
23
|
+
return requests.postRequestHandler(Endpoints.addRequestToRecord(recordId, tabId), {}, context);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const inviteRequestViaPublicLink = (createRequestModel, context) => {
|
|
27
|
+
return requests.postRequestHandler(Endpoints.publicLinkInvite, createRequestModel, context);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const editRequestAndRecordDetails = (editRequestModel, context) => {
|
|
31
|
+
const params = { updateInfoUser: 'EditVendor' };
|
|
32
|
+
const { record: { contractorId } } = editRequestModel;
|
|
33
|
+
return requests.postRequestHandler(Endpoints.edit(contractorId), editRequestModel, context, {}, params);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const getRequestById = (requestId, context) => {
|
|
37
|
+
return requests.getRequestHandler(Endpoints.getById(requestId), {}, context);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getAutocompleteAutoSelect = (params, context) => {
|
|
41
|
+
return requests.getRequestHandler(Endpoints.getAutocompleteAutoSelect, params, context);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const getRequestsByAccountId = (accountId, context, params) => {
|
|
45
|
+
return requests.getRequestHandler(Endpoints.getAccountRequests(accountId), params, context);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const getRequestsByTabId = (tabId, context, activityStatus) => {
|
|
49
|
+
const body = { tabId, activityStatus };
|
|
50
|
+
return requests.postRequestHandler(Endpoints.getByTabId, body, context);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const requestsGlobalSearch = (projectId, searchWord, context) => {
|
|
54
|
+
return requests.getRequestHandler(Endpoints.requestsGlobalSearch(projectId, searchWord), {}, context);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const getTabTenantRequestsInProject = (projectId, context) => {
|
|
58
|
+
return requests.getRequestHandler(Endpoints.getTabTenantRequestsInProject(projectId), {}, context);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
createRequest,
|
|
63
|
+
addRequestToRecord,
|
|
64
|
+
inviteRequestViaPublicLink,
|
|
65
|
+
editRequestAndRecordDetails,
|
|
66
|
+
getRequestById,
|
|
67
|
+
getRequestsByAccountId,
|
|
68
|
+
getRequestsByTabId,
|
|
69
|
+
requestsGlobalSearch,
|
|
70
|
+
getAutocompleteAutoSelect,
|
|
71
|
+
getTabTenantRequestsInProject
|
|
72
|
+
};
|