@getjones/test-infra 1.2.7 → 1.2.8
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
CHANGED
|
@@ -38,8 +38,7 @@ const getOrCreateAccount = async (createAccountModel, context) => {
|
|
|
38
38
|
return existingAccount;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
return newAccountResponse.data;
|
|
41
|
+
return createAccount(createAccountModel, context);
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
const getAccountId = async (accountName, context) => {
|
|
@@ -6,24 +6,35 @@ const Endpoints = {
|
|
|
6
6
|
preAudit: contractorId => `${backendUrl}/saas/auditor/contractors/${contractorId}/master-audit`,
|
|
7
7
|
audit: `${backendUrl}/saas/auditor/contractors/submit/audits`,
|
|
8
8
|
contractorDetailsForAudit: contractorId => `${backendUrl}/saas/auditor/contractors/${contractorId}/master-audit`,
|
|
9
|
-
requirementDetailsForAudit: contractorId => `${backendUrl}/saas/auditor/contractor/${contractorId}/requirement
|
|
9
|
+
requirementDetailsForAudit: contractorId => `${backendUrl}/saas/auditor/contractor/${contractorId}/requirement`,
|
|
10
|
+
isReaudit: contractorId => `${backendUrl}/saas/auditor/contractor/${contractorId}/isreaudit`
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const getAuditorContractorList = (page, accountId, context) => {
|
|
13
|
-
return requests.getRequestHandler(Endpoints.auditorContractorList, { page, accountId }, context)
|
|
14
|
+
return requests.getRequestHandler(Endpoints.auditorContractorList, { page, accountId }, context);
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
const audit = async (contractorId, auditRequestModel, context) => {
|
|
17
18
|
await requests.getRequestHandler(Endpoints.preAudit(contractorId), {}, context);
|
|
18
|
-
return requests.postRequestHandler(Endpoints.audit, auditRequestModel, context)
|
|
19
|
+
return requests.postRequestHandler(Endpoints.audit, auditRequestModel, context);
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
const getContractorDetailsForAudit = (contractorId, context) => {
|
|
22
|
-
return requests.getRequestHandler(Endpoints.contractorDetailsForAudit(contractorId), {}, context)
|
|
23
|
+
return requests.getRequestHandler(Endpoints.contractorDetailsForAudit(contractorId), {}, context);
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
const getRequirementDetailsForAudit = (contractorId, context) => {
|
|
26
|
-
return requests.getRequestHandler(Endpoints.requirementDetailsForAudit(contractorId), {}, context)
|
|
27
|
+
return requests.getRequestHandler(Endpoints.requirementDetailsForAudit(contractorId), {}, context);
|
|
27
28
|
};
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
const isReaudit = (contractorId, context) => {
|
|
31
|
+
return requests.getRequestHandler(Endpoints.isReaudit(contractorId), {}, context);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
module.exports = {
|
|
35
|
+
audit,
|
|
36
|
+
isReaudit,
|
|
37
|
+
getAuditorContractorList,
|
|
38
|
+
getContractorDetailsForAudit,
|
|
39
|
+
getRequirementDetailsForAudit
|
|
40
|
+
};
|
|
@@ -19,4 +19,14 @@ const getRequirementDetailsForAudit = async (contractorId, context) => {
|
|
|
19
19
|
return await auditApi.getRequirementDetailsForAudit(contractorId, context);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const isReaudit = (contractorId, context) => {
|
|
23
|
+
return auditApi.isReaudit(contractorId, context);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports = {
|
|
27
|
+
audit,
|
|
28
|
+
isReaudit,
|
|
29
|
+
getAuditorContractorList,
|
|
30
|
+
getContractorDetailsForAudit,
|
|
31
|
+
getRequirementDetailsForAudit
|
|
32
|
+
};
|