@getjones/test-infra 2.7.8 → 2.7.10
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 +1 -1
- package/src/defaults/configs/auditConfigs.js +3 -1
- package/src/factory/users/users.js +1 -1
- package/src/saas/internal-api/compliance/api/waive/waive.api.js +12 -2
- package/src/saas/internal-api/compliance/api/waive/waive.service.js +13 -1
- package/src/saas/internal-api/compliance/index.js +6 -1
- package/src/saas/internal-api/compliance/models/waive/waive.model.js +3 -2
- package/src/saas/internal-api/projects/models/settings/update.project.settings.model.js +0 -2
- package/src/saas/internal-api/projects/utils/utils.js +11 -11
package/package.json
CHANGED
|
@@ -4,7 +4,9 @@ const { getOneWeekAgoDate, getOneWeekAheadDate } = require('../../common/utils/t
|
|
|
4
4
|
|
|
5
5
|
const DEFAULT_POLICY_DATE = '24/05/2030';
|
|
6
6
|
const DEFAULT_AM_SCORE = 'A';
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
//Excluded from creating global record: 'ABC-12345-XYZ', 'ABC-123-XYZ', 'ABC-123'. When GR is needed - use different GL number.
|
|
9
|
+
const DEFAULT_POLICY_NUMBER = 'ABC-12345-XYZ';
|
|
8
10
|
|
|
9
11
|
const {
|
|
10
12
|
certificateIssueDate,
|
|
@@ -3,7 +3,9 @@ const { backendUrl } = require('../../../../../env').getEnv();
|
|
|
3
3
|
|
|
4
4
|
const Endpoints = {
|
|
5
5
|
waive: contractorId => `${backendUrl}/saas/contractors/${contractorId}/waiver`,
|
|
6
|
-
retract: contractorId => `${backendUrl}/saas/contractors/${contractorId}/waiver
|
|
6
|
+
retract: contractorId => `${backendUrl}/saas/contractors/${contractorId}/waiver`,
|
|
7
|
+
overrideGap: `${backendUrl}/saas/record/override-gap`,
|
|
8
|
+
retractOverride: `${backendUrl}/saas/record/retract-override`
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
const waive = async (contractorId, waiveRequestModel, context) => {
|
|
@@ -18,4 +20,12 @@ const retract = async (contractorId, retractRequestModel, context) => {
|
|
|
18
20
|
return requests.postRequestHandler(Endpoints.retract(contractorId), retractRequestModel, context, {}, { status });
|
|
19
21
|
};
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
const overrideGap = (waiveRequestModel, context) => {
|
|
24
|
+
return requests.postRequestHandler(Endpoints.overrideGap, waiveRequestModel, context);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const retractOverride = (retractRequestModel, context) => {
|
|
28
|
+
return requests.postRequestHandler(Endpoints.retractOverride, retractRequestModel, context);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
module.exports = { waive, retract, overrideGap, retractOverride };
|
|
@@ -19,6 +19,16 @@ const retract = (retractRequestModel, context) => {
|
|
|
19
19
|
return waiveApi.retract(retractRequestModel.contractorId, retractRequestModel, context);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
const overrideGap = (waiveRequestModel, context) => {
|
|
23
|
+
validateType(waiveRequestModel, WaiveRequestModel);
|
|
24
|
+
return waiveApi.overrideGap(waiveRequestModel, context);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const retractOverride = (retractRequestModel, context) => {
|
|
28
|
+
validateType(retractRequestModel, RetractRequestModel);
|
|
29
|
+
return waiveApi.retractOverride(retractRequestModel, context);
|
|
30
|
+
};
|
|
31
|
+
|
|
22
32
|
const getWaiveModel = (
|
|
23
33
|
record,
|
|
24
34
|
policyName,
|
|
@@ -111,5 +121,7 @@ module.exports = {
|
|
|
111
121
|
retract,
|
|
112
122
|
getWaiveModel,
|
|
113
123
|
getRetractModel,
|
|
114
|
-
getWaiveModelByGap
|
|
124
|
+
getWaiveModelByGap,
|
|
125
|
+
overrideGap,
|
|
126
|
+
retractOverride
|
|
115
127
|
};
|
|
@@ -8,6 +8,7 @@ const convertServices = require('./api/convert/convert.service');
|
|
|
8
8
|
const coverageServices = require('./api/coverage/coverage.service');
|
|
9
9
|
|
|
10
10
|
const auditConsts = require('./consts/audit');
|
|
11
|
+
const auditUtils = require('./utils/auditUtil');
|
|
11
12
|
|
|
12
13
|
const models = {
|
|
13
14
|
audit: auditModels,
|
|
@@ -18,6 +19,10 @@ const consts = {
|
|
|
18
19
|
audit: auditConsts
|
|
19
20
|
};
|
|
20
21
|
|
|
22
|
+
const utils = {
|
|
23
|
+
audit: auditUtils
|
|
24
|
+
};
|
|
25
|
+
|
|
21
26
|
const services = {
|
|
22
27
|
audit: auditServices,
|
|
23
28
|
waive: waiveServices,
|
|
@@ -25,4 +30,4 @@ const services = {
|
|
|
25
30
|
coverage: coverageServices
|
|
26
31
|
};
|
|
27
32
|
|
|
28
|
-
module.exports = { services, models, consts };
|
|
33
|
+
module.exports = { services, models, consts, utils };
|
|
@@ -5,8 +5,9 @@ const WAIVE_ACTIONS = {
|
|
|
5
5
|
|
|
6
6
|
const WAIVER_REASONS = {
|
|
7
7
|
BUSINESS_DECISION: 'Business Decision',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
EXECUTIVE_APPROVAL: 'Executive Approval',
|
|
9
|
+
ACCEPT_NO_EXPOSURE: 'Accept / No Exposure',
|
|
10
|
+
NO_EXPOSURE: 'No Exposure' // DEPRECATED - BACKWARD COMPATIBILITY
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
function WaiveRequestModel({
|
|
@@ -7,7 +7,6 @@ class UpdateProjectSettingsModel {
|
|
|
7
7
|
ocrEnabled = false,
|
|
8
8
|
onboardingPhase = false,
|
|
9
9
|
projectId = null,
|
|
10
|
-
qrEnabled = false,
|
|
11
10
|
tenantSolution = false,
|
|
12
11
|
autocompleteSettings = {}
|
|
13
12
|
} = {}
|
|
@@ -18,7 +17,6 @@ class UpdateProjectSettingsModel {
|
|
|
18
17
|
this.ocrEnabled = ocrEnabled;
|
|
19
18
|
this.onboardingPhase = onboardingPhase;
|
|
20
19
|
this.projectId = projectId;
|
|
21
|
-
this.qrEnabled = qrEnabled;
|
|
22
20
|
this.tenantSolution = tenantSolution;
|
|
23
21
|
this.autocompleteSettings = { ... DEFAULT_AUTOCOMPLETE_ADD_VENDORS, ... autocompleteSettings };
|
|
24
22
|
}
|
|
@@ -68,8 +68,8 @@ const getProjectConfig = (projectName, { city, state, accountName, projectNumber
|
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const deleteProjectByName = (
|
|
72
|
-
return services.deleteProjectByName(
|
|
71
|
+
const deleteProjectByName = (accountId, projectName, context) => {
|
|
72
|
+
return services.deleteProjectByName(accountId, projectName, context);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const isUIConfig = config => {
|
|
@@ -80,28 +80,28 @@ const isUIConfig = config => {
|
|
|
80
80
|
return convectorKeys.some(key => configKeys.includes(key));
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const assignNewSettingFormat = (target,
|
|
84
|
-
const attributeKey = dictionaryObject[
|
|
85
|
-
const attributeValue = JSON.parse(
|
|
83
|
+
const assignNewSettingFormat = (target, sourceKey, sourceValue, dictionaryObject) => {
|
|
84
|
+
const attributeKey = dictionaryObject[sourceKey];
|
|
85
|
+
const attributeValue = JSON.parse(sourceValue);
|
|
86
86
|
Object.assign(target, { [attributeKey]: attributeValue });
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
const marketplaceParser = (settings,
|
|
89
|
+
const marketplaceParser = (settings, sourceKey, sourceValue, dictionary) => {
|
|
90
90
|
settings.marketplaceSettings = settings.marketplaceSettings || {};
|
|
91
91
|
|
|
92
|
-
assignNewSettingFormat(settings.marketplaceSettings,
|
|
92
|
+
assignNewSettingFormat(settings.marketplaceSettings, sourceKey, sourceValue, dictionary);
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
const autoGapsParser = (settings,
|
|
95
|
+
const autoGapsParser = (settings, sourceKey, sourceValue, dictionary) => {
|
|
96
96
|
settings.autoGaps = settings.autoGaps || {};
|
|
97
97
|
|
|
98
|
-
assignNewSettingFormat(settings.autoGaps,
|
|
98
|
+
assignNewSettingFormat(settings.autoGaps, sourceKey, sourceValue, dictionary);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
const autocompleteParser = (settings,
|
|
101
|
+
const autocompleteParser = (settings, sourceKey, sourceValue, dictionary) => {
|
|
102
102
|
settings.autocompleteSettings = settings.autocompleteSettings || {};
|
|
103
103
|
|
|
104
|
-
assignNewSettingFormat(settings.autocompleteSettings,
|
|
104
|
+
assignNewSettingFormat(settings.autocompleteSettings, sourceKey, sourceValue, dictionary);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
const parseProjectSettingsConfig = (projectId, settingsConfig) => {
|