@getjones/test-infra 1.2.10 → 1.2.11

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getjones/test-infra",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Providing internal and openapi interface",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -5,8 +5,8 @@ const Endpoints = {
5
5
  login: `${backendUrl}/logincontroller`
6
6
  };
7
7
 
8
- const login = async (email, password) => {
9
- return await requests.postRequestHandler(Endpoints.login, { email, password }).then(res => res);
8
+ const login = (email, password) => {
9
+ return requests.postRequestHandler(Endpoints.login, { email, password });
10
10
  };
11
11
 
12
12
  module.exports = { login };
@@ -20,15 +20,15 @@ const uploadToS3 = (contractorId, fileData) => {
20
20
  };
21
21
 
22
22
  const submitCoi = submitCoiModel => {
23
- return requests.postRequestHandler(Endpoints.submitCoi, submitCoiModel).then(res => res.data);
23
+ return requests.postRequestHandler(Endpoints.submitCoi, submitCoiModel);
24
24
  };
25
25
 
26
26
  const completeScan = (contractorId, pdfFileName, context) => {
27
- return requests.postRequestHandler(Endpoints.completeScan(contractorId), { pdfFileName }, context).then(res => res.data);
27
+ return requests.postRequestHandler(Endpoints.completeScan(contractorId), { pdfFileName }, context);
28
28
  };
29
29
 
30
30
  const getCoiPreSignedUrl = (coiFileName, context) => {
31
- return requests.getRequestHandler(Endpoints.getCoiPresignedUrl(coiFileName), {}, context).then(res => res.data);
31
+ return requests.getRequestHandler(Endpoints.getCoiPresignedUrl(coiFileName), {}, context);
32
32
  };
33
33
 
34
34
  module.exports = { uploadToS3, submitCoi, getCoiPreSignedUrl, completeScan };
@@ -6,17 +6,17 @@ const uploadToS3 = (contractorId, fileData) => {
6
6
  return coiApi.uploadToS3(contractorId, fileData);
7
7
  };
8
8
 
9
- const submitCoi = async submitCoiModel => {
9
+ const submitCoi = submitCoiModel => {
10
10
  validateType(submitCoiModel, SubmitCoiModel);
11
- return await coiApi.submitCoi(submitCoiModel);
11
+ return coiApi.submitCoi(submitCoiModel);
12
12
  };
13
13
 
14
- const completeScan = async (contractorId, pdfFileName, context) => {
15
- return await coiApi.completeScan(contractorId, pdfFileName, context);
14
+ const completeScan = (contractorId, pdfFileName, context) => {
15
+ return coiApi.completeScan(contractorId, pdfFileName, context);
16
16
  };
17
17
 
18
- const getCoiPreSignedUrl = async (coiFileName, context) => {
19
- return await coiApi.getCoiPreSignedUrl(coiFileName, context);
18
+ const getCoiPreSignedUrl = (coiFileName, context) => {
19
+ return coiApi.getCoiPreSignedUrl(coiFileName, context);
20
20
  };
21
21
 
22
22
  module.exports = { uploadToS3, submitCoi, getCoiPreSignedUrl, completeScan };
@@ -10,15 +10,19 @@ const Endpoints = {
10
10
  isReaudit: contractorId => `${backendUrl}/saas/auditor/contractors/${contractorId}/isreaudit`
11
11
  };
12
12
 
13
- const getAuditorContractorList = (page, accountId, context) => {
14
- return requests.getRequestHandler(Endpoints.auditorContractorList, { page, accountId }, context);
15
- };
16
-
17
13
  const audit = async (contractorId, auditRequestModel, context) => {
18
14
  await requests.getRequestHandler(Endpoints.preAudit(contractorId), {}, context);
19
15
  return requests.postRequestHandler(Endpoints.audit, auditRequestModel, context);
20
16
  };
21
17
 
18
+ const isReaudit = (contractorId, context) => {
19
+ return requests.getRequestHandler(Endpoints.isReaudit(contractorId), {}, context);
20
+ };
21
+
22
+ const getAuditorContractorList = (page, accountId, context) => {
23
+ return requests.getRequestHandler(Endpoints.auditorContractorList, { page, accountId }, context);
24
+ };
25
+
22
26
  const getContractorDetailsForAudit = (contractorId, context) => {
23
27
  return requests.getRequestHandler(Endpoints.contractorDetailsForAudit(contractorId), {}, context);
24
28
  };
@@ -27,10 +31,6 @@ const getRequirementDetailsForAudit = (contractorId, context) => {
27
31
  return requests.getRequestHandler(Endpoints.requirementDetailsForAudit(contractorId), {}, context);
28
32
  };
29
33
 
30
- const isReaudit = (contractorId, context) => {
31
- return requests.getRequestHandler(Endpoints.isReaudit(contractorId), {}, context);
32
- };
33
-
34
34
  module.exports = {
35
35
  audit,
36
36
  isReaudit,
@@ -7,6 +7,10 @@ const audit = async (auditRequestModel, context) => {
7
7
  return await auditApi.audit(auditRequestModel.auditData.contractorId, auditRequestModel, context);
8
8
  };
9
9
 
10
+ const isReaudit = (contractorId, context) => {
11
+ return auditApi.isReaudit(contractorId, context);
12
+ };
13
+
10
14
  const getAuditorContractorList = async (page, accountId, context) => {
11
15
  return await auditApi.getAuditorContractorList(page, accountId, context);
12
16
  };
@@ -19,10 +23,6 @@ const getRequirementDetailsForAudit = async (contractorId, context) => {
19
23
  return await auditApi.getRequirementDetailsForAudit(contractorId, context);
20
24
  };
21
25
 
22
- const isReaudit = (contractorId, context) => {
23
- return auditApi.isReaudit(contractorId, context);
24
- };
25
-
26
26
  module.exports = {
27
27
  audit,
28
28
  isReaudit,
@@ -12,9 +12,9 @@ const createGlobalRecord = async createGlobalRecordModel => {
12
12
  return globalRecordAPI.createGlobalRecord(createGlobalRecordModel, nodeBackendSecret);
13
13
  };
14
14
 
15
- const getAllGlobalRecordsInPage = async (pageNumber, contxet, itemsInPage = 10) => {
15
+ const getAllGlobalRecordsInPage = async (pageNumber, context, itemsInPage = 10) => {
16
16
  const param = {};
17
- return globalRecordAPI.getAllGlobalRecords(param, pageNumber, itemsInPage, contxet);
17
+ return globalRecordAPI.getAllGlobalRecords(param, pageNumber, itemsInPage, context);
18
18
  };
19
19
 
20
20
  const getAllGlobalRecordsInPageByServiceArea = async (serviceArea, pageNumber, contxet, itemsInPage = 10) => {
@@ -13,7 +13,8 @@ class CreateGlobalRecordModel {
13
13
  dismissDate,
14
14
  serviceArea,
15
15
  primaryEmail,
16
- dba
16
+ dba,
17
+ publishUserName
17
18
  } = {}
18
19
  ) {
19
20
  this.header = header;
@@ -27,8 +28,9 @@ class CreateGlobalRecordModel {
27
28
  this.brokerEmail = brokerEmail;
28
29
  this.numberOfFilledMandatory = numberOfFilledMandatory;
29
30
  this.serviceArea = serviceArea;
30
- this.primaryEmail = primaryEmail,
31
+ this.primaryEmail = primaryEmail;
31
32
  this.dba = dba;
33
+ this.publishUserName = publishUserName;
32
34
  }
33
35
  }
34
36
 
@@ -6,7 +6,7 @@ const Endpoints = {
6
6
  };
7
7
 
8
8
  const getHomePageChartsData = context => {
9
- return requests.getRequestHandler(Endpoints.getHomePageChartsDataApi(), {}, context).then(res => res.data);
9
+ return requests.postRequestHandler(Endpoints.getHomePageChartsDataApi(), {}, context).then(res => res.data);
10
10
  };
11
11
 
12
12
  module.exports = { getHomePageChartsData };