@getjones/test-infra 4.5.24 → 4.5.25

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.
Files changed (249) hide show
  1. package/package.json +36 -36
  2. package/src/common/commonFlows/auth/auth.js +40 -40
  3. package/src/common/commonFlows/index.js +4 -4
  4. package/src/common/commonFlows/records/records.js +269 -269
  5. package/src/common/consts/accountSettings.js +44 -44
  6. package/src/common/consts/activationStatuses.js +6 -6
  7. package/src/common/consts/autocomplete.js +10 -10
  8. package/src/common/consts/constantsForRecordsSortingAndFilters.js +49 -49
  9. package/src/common/consts/dashboardCharts.js +18 -18
  10. package/src/common/consts/homepage/AttentionTab.js +6 -6
  11. package/src/common/consts/homepage/sortOptions.js +19 -19
  12. package/src/common/consts/ocrStatuses.js +6 -6
  13. package/src/common/consts/projectSettings.js +21 -21
  14. package/src/common/consts/recordTypes.js +5 -5
  15. package/src/common/consts/requirementActions.js +10 -10
  16. package/src/common/consts/s3FileTypes.js +13 -13
  17. package/src/common/consts/userRoles.js +18 -18
  18. package/src/common/consts/userTypes.js +8 -8
  19. package/src/common/errorCodes.js +3 -3
  20. package/src/common/httpResponseStatusCodes.json +11 -11
  21. package/src/common/httpResponseTypes.json +2 -2
  22. package/src/common/requests/apiKeyAuth/requests.js +44 -44
  23. package/src/common/requests/cookieAuth/requests.js +40 -40
  24. package/src/common/requests/internalAuth/requests.js +48 -48
  25. package/src/common/requests/requestHandlers.js +80 -80
  26. package/src/common/utils/complianceUtil.js +113 -113
  27. package/src/common/utils/configsUtil.js +22 -22
  28. package/src/common/utils/dataTypeUtils.js +41 -41
  29. package/src/common/utils/numberUtils.js +22 -22
  30. package/src/common/utils/objectUtils.js +7 -7
  31. package/src/common/utils/timeUtils.js +177 -177
  32. package/src/common/validations/errorValidation.js +16 -16
  33. package/src/common/validations/typeValidations.js +36 -36
  34. package/src/defaults/configs/auditConfigs.js +125 -125
  35. package/src/defaults/configs/coverage.js +144 -144
  36. package/src/defaults/configs/polices.js +76 -76
  37. package/src/defaults/configs/requirement.js +32 -32
  38. package/src/defaults/index.js +6 -6
  39. package/src/env.js +57 -57
  40. package/src/factory/globalRecord/globalRecord.js +43 -43
  41. package/src/factory/index.js +8 -8
  42. package/src/factory/records/records.js +281 -281
  43. package/src/factory/users/users.js +69 -69
  44. package/src/index.js +105 -105
  45. package/src/saas/internal-api/accountDirectory/api/accountDirectory.api.js +50 -50
  46. package/src/saas/internal-api/accountDirectory/api/accountDirectory.service.js +182 -182
  47. package/src/saas/internal-api/accountDirectory/index.js +4 -4
  48. package/src/saas/internal-api/accountDirectory/models/accountDirectory.model.js +40 -40
  49. package/src/saas/internal-api/accounts/api/core/accounts.core.api.js +35 -35
  50. package/src/saas/internal-api/accounts/api/core/accounts.core.service.js +93 -93
  51. package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.api.js +29 -29
  52. package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.service.js +61 -61
  53. package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.api.js +48 -48
  54. package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.service.js +74 -74
  55. package/src/saas/internal-api/accounts/api/settings/settings.api.js +21 -21
  56. package/src/saas/internal-api/accounts/api/settings/settings.service.js +41 -41
  57. package/src/saas/internal-api/accounts/consts/consts.js +8 -8
  58. package/src/saas/internal-api/accounts/index.js +22 -22
  59. package/src/saas/internal-api/accounts/models/core/create.account.model.js +16 -16
  60. package/src/saas/internal-api/accounts/models/settings/update.settings.model.js +53 -53
  61. package/src/saas/internal-api/accounts/utils/utils.js +61 -61
  62. package/src/saas/internal-api/agreement/api/agreement.api.js +39 -39
  63. package/src/saas/internal-api/agreement/api/agreement.service.js +121 -121
  64. package/src/saas/internal-api/agreement/consts/consts.js +11 -11
  65. package/src/saas/internal-api/agreement/index.js +12 -12
  66. package/src/saas/internal-api/agreement/models/create.agreement.model.js +12 -12
  67. package/src/saas/internal-api/agreement/models/createAgreementByAuditorModel.js +11 -11
  68. package/src/saas/internal-api/agreement/models/createAgreementByPMModel.js +13 -13
  69. package/src/saas/internal-api/auditCustomerRules/api/customer.rules.api.js +43 -43
  70. package/src/saas/internal-api/auditCustomerRules/api/customer.rules.service.js +105 -105
  71. package/src/saas/internal-api/auditCustomerRules/consts/customer.rule.js +11 -11
  72. package/src/saas/internal-api/auditCustomerRules/index.js +6 -6
  73. package/src/saas/internal-api/auditCustomerRules/models/customer.rule.model.js +46 -46
  74. package/src/saas/internal-api/auditCustomerRules/utils/customer.rule.util.js +19 -19
  75. package/src/saas/internal-api/auditNotes/api/audit.notes.api.js +40 -40
  76. package/src/saas/internal-api/auditNotes/api/audit.notes.service.js +115 -115
  77. package/src/saas/internal-api/auditNotes/index.js +4 -4
  78. package/src/saas/internal-api/auditNotes/models/audit.note.model.js +30 -30
  79. package/src/saas/internal-api/auth/api/auth.api.js +27 -27
  80. package/src/saas/internal-api/auth/api/auth.service.js +90 -90
  81. package/src/saas/internal-api/auth/index.js +3 -3
  82. package/src/saas/internal-api/coi/api/coi.api.js +58 -58
  83. package/src/saas/internal-api/coi/api/coi.service.js +61 -61
  84. package/src/saas/internal-api/coi/consts/hashes.js +5 -5
  85. package/src/saas/internal-api/coi/consts/uploaderTypes.js +5 -5
  86. package/src/saas/internal-api/coi/index.js +14 -14
  87. package/src/saas/internal-api/coi/models/Combine.last.two.cois.model.js +25 -25
  88. package/src/saas/internal-api/coi/models/submit.coi.model.js +19 -19
  89. package/src/saas/internal-api/coi/utils/utils.js +117 -117
  90. package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.api.js +12 -12
  91. package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.service.js +14 -14
  92. package/src/saas/internal-api/compliance/api/audit/aiAudit/aiAudit.api.js +27 -27
  93. package/src/saas/internal-api/compliance/api/audit/aiAudit/aiAudit.service.js +38 -38
  94. package/src/saas/internal-api/compliance/api/audit/audit.api.js +112 -112
  95. package/src/saas/internal-api/compliance/api/audit/audit.service.js +319 -319
  96. package/src/saas/internal-api/compliance/api/convert/convert.api.js +17 -17
  97. package/src/saas/internal-api/compliance/api/convert/convert.service.js +11 -11
  98. package/src/saas/internal-api/compliance/api/coverage/coverage.api.js +33 -33
  99. package/src/saas/internal-api/compliance/api/coverage/coverage.service.js +46 -46
  100. package/src/saas/internal-api/compliance/api/overrideGap/override.gap.api.js +38 -38
  101. package/src/saas/internal-api/compliance/api/overrideGap/override.gap.service.js +189 -189
  102. package/src/saas/internal-api/compliance/consts/audit.js +113 -113
  103. package/src/saas/internal-api/compliance/index.js +38 -38
  104. package/src/saas/internal-api/compliance/models/audit/audit.model.js +96 -96
  105. package/src/saas/internal-api/compliance/models/waive/waive.model.js +49 -49
  106. package/src/saas/internal-api/compliance/utils/auditUtil.js +269 -269
  107. package/src/saas/internal-api/compliance/utils/coverageUtil.js +45 -45
  108. package/src/saas/internal-api/contractors/api/contractors.api.js +209 -209
  109. package/src/saas/internal-api/contractors/api/contractors.service.js +361 -361
  110. package/src/saas/internal-api/contractors/consts/consts.js +6 -6
  111. package/src/saas/internal-api/contractors/index.js +8 -8
  112. package/src/saas/internal-api/contractors/models/assign.requirement.model.js +10 -10
  113. package/src/saas/internal-api/contractors/models/edit.contractor.model.js +73 -73
  114. package/src/saas/internal-api/contractors/models/link.request.model.js +10 -10
  115. package/src/saas/internal-api/contractors/models/subscription.contractor.model.js +13 -13
  116. package/src/saas/internal-api/contractors/models/verification.contractor.model.js +27 -27
  117. package/src/saas/internal-api/contractors/utils.js +25 -25
  118. package/src/saas/internal-api/dashboard/api/recordList.api.js +38 -38
  119. package/src/saas/internal-api/dashboard/api/recordList.service.js +60 -60
  120. package/src/saas/internal-api/dashboard/index.js +5 -5
  121. package/src/saas/internal-api/dashboard/models/dashboard.filter.criteria.model.js +38 -38
  122. package/src/saas/internal-api/dbEmails/api/db.emails.api.js +25 -25
  123. package/src/saas/internal-api/dbEmails/api/db.emails.service.js +163 -163
  124. package/src/saas/internal-api/dbEmails/consts/consts.js +56 -56
  125. package/src/saas/internal-api/dbEmails/index.js +6 -6
  126. package/src/saas/internal-api/dbEmails/models/db.emails.model.js +22 -22
  127. package/src/saas/internal-api/dbEmails/utils/util.js +87 -87
  128. package/src/saas/internal-api/emailCustomization/api/email.customization.api.js +26 -26
  129. package/src/saas/internal-api/emailCustomization/api/email.customization.service.js +50 -50
  130. package/src/saas/internal-api/emailCustomization/index.js +3 -3
  131. package/src/saas/internal-api/globalRecord/api/global.record.api.js +95 -95
  132. package/src/saas/internal-api/globalRecord/api/global.record.service.js +112 -112
  133. package/src/saas/internal-api/globalRecord/consts.js +20 -20
  134. package/src/saas/internal-api/globalRecord/index.js +6 -6
  135. package/src/saas/internal-api/globalRecord/models/global.record.model.js +60 -60
  136. package/src/saas/internal-api/globalRecord/utils/util.js +161 -161
  137. package/src/saas/internal-api/homepageCharts/api/charts.api.js +12 -12
  138. package/src/saas/internal-api/homepageCharts/api/charts.service.js +7 -7
  139. package/src/saas/internal-api/homepageCharts/index.js +3 -3
  140. package/src/saas/internal-api/jonesNetworkTab/api/jones.network.tab.api.js +14 -14
  141. package/src/saas/internal-api/jonesNetworkTab/api/jones.network.tab.service.js +16 -16
  142. package/src/saas/internal-api/jonesNetworkTab/index.js +3 -3
  143. package/src/saas/internal-api/notificationCenter/api/notification.center.api.js +32 -32
  144. package/src/saas/internal-api/notificationCenter/api/notification.center.service.js +49 -49
  145. package/src/saas/internal-api/notificationCenter/index.js +3 -3
  146. package/src/saas/internal-api/outlook/api/outlook.api.js +14 -14
  147. package/src/saas/internal-api/outlook/api/outlook.service.js +14 -14
  148. package/src/saas/internal-api/outlook/index.js +3 -3
  149. package/src/saas/internal-api/policyFile/api/policy.file.api.js +43 -43
  150. package/src/saas/internal-api/policyFile/api/policy.file.service.js +117 -117
  151. package/src/saas/internal-api/policyFile/consts.js +21 -21
  152. package/src/saas/internal-api/policyFile/index.js +11 -11
  153. package/src/saas/internal-api/policyFile/models/create.policy.file.model.js +11 -11
  154. package/src/saas/internal-api/policyFile/models/set.publish.flag.to.policy.model.js +13 -13
  155. package/src/saas/internal-api/projects/api/core/projects.api.js +39 -39
  156. package/src/saas/internal-api/projects/api/core/projects.service.js +77 -77
  157. package/src/saas/internal-api/projects/api/settings/project.settings.api.js +18 -18
  158. package/src/saas/internal-api/projects/api/settings/project.settings.service.js +35 -35
  159. package/src/saas/internal-api/projects/consts/defaultProject.js +3 -3
  160. package/src/saas/internal-api/projects/index.js +24 -24
  161. package/src/saas/internal-api/projects/models/core/create.project.model.js +41 -41
  162. package/src/saas/internal-api/projects/models/core/update.project.model.js +47 -47
  163. package/src/saas/internal-api/projects/models/settings/update.project.settings.model.js +40 -40
  164. package/src/saas/internal-api/projects/utils/utils.js +155 -155
  165. package/src/saas/internal-api/recordHub/api/record.hub.api.js +14 -14
  166. package/src/saas/internal-api/recordHub/api/record.hub.service.js +32 -32
  167. package/src/saas/internal-api/recordHub/index.js +3 -3
  168. package/src/saas/internal-api/recordNotes/api/record.notes.api.js +38 -38
  169. package/src/saas/internal-api/recordNotes/api/record.notes.service.js +56 -56
  170. package/src/saas/internal-api/recordNotes/api/record.notes.utils.js +12 -12
  171. package/src/saas/internal-api/recordNotes/index.js +3 -3
  172. package/src/saas/internal-api/reports/api/reports.api.js +62 -62
  173. package/src/saas/internal-api/reports/api/reports.service.js +79 -79
  174. package/src/saas/internal-api/reports/consts/consts.js +74 -74
  175. package/src/saas/internal-api/reports/index.js +15 -15
  176. package/src/saas/internal-api/reports/models/report.model.js +27 -27
  177. package/src/saas/internal-api/requests/api/requests.api.js +132 -132
  178. package/src/saas/internal-api/requests/api/requests.service.js +312 -312
  179. package/src/saas/internal-api/requests/index.js +21 -21
  180. package/src/saas/internal-api/requests/models/create.request.model.js +36 -36
  181. package/src/saas/internal-api/requests/models/draft.request.criteria.model.js +18 -18
  182. package/src/saas/internal-api/requests/models/draft.request.report.model.js +14 -14
  183. package/src/saas/internal-api/requests/models/edit.request.model.js +31 -31
  184. package/src/saas/internal-api/requests/models/homepageRequestCriteriaModel.js +19 -19
  185. package/src/saas/internal-api/requests/models/requestListCriteriaModel.js +17 -17
  186. package/src/saas/internal-api/requests/models/tenant.request.model.js +9 -9
  187. package/src/saas/internal-api/requests/utils.js +16 -16
  188. package/src/saas/internal-api/requestsTable/api/requests.table.api.js +20 -20
  189. package/src/saas/internal-api/requestsTable/api/requests.table.service.js +14 -14
  190. package/src/saas/internal-api/requestsTable/index.js +3 -3
  191. package/src/saas/internal-api/requirements/api/requirements.api.js +57 -57
  192. package/src/saas/internal-api/requirements/api/requirements.service.js +184 -184
  193. package/src/saas/internal-api/requirements/consts/attributeTypes.json +8 -8
  194. package/src/saas/internal-api/requirements/consts/consts.js +6 -6
  195. package/src/saas/internal-api/requirements/index.js +10 -10
  196. package/src/saas/internal-api/requirements/models/create.requirement.model.js +17 -17
  197. package/src/saas/internal-api/requirements/models/policy.model.js +35 -35
  198. package/src/saas/internal-api/requirements/models/update.requirement.model.js +19 -19
  199. package/src/saas/internal-api/requirements/utils/utils.js +129 -129
  200. package/src/saas/internal-api/serviceArea/api/coordinates.api.js +12 -12
  201. package/src/saas/internal-api/serviceArea/api/coordinates.service.js +7 -7
  202. package/src/saas/internal-api/serviceArea/index.js +4 -4
  203. package/src/saas/internal-api/serviceArea/utils/utils.js +8 -8
  204. package/src/saas/internal-api/tabs/api/tabs.api.js +32 -32
  205. package/src/saas/internal-api/tabs/api/tabs.service.js +60 -60
  206. package/src/saas/internal-api/tabs/index.js +3 -3
  207. package/src/saas/internal-api/tabs/models/tabs.model.js +19 -19
  208. package/src/saas/internal-api/thread-scheduler/runner.js +55 -55
  209. package/src/saas/internal-api/uploadFiles/api/upload.file.api.js +43 -43
  210. package/src/saas/internal-api/uploadFiles/api/upload.file.service.js +107 -107
  211. package/src/saas/internal-api/uploadFiles/consts.js +12 -12
  212. package/src/saas/internal-api/uploadFiles/index.js +5 -5
  213. package/src/saas/internal-api/users/api/tenantApp/tenant.app.api.js +38 -38
  214. package/src/saas/internal-api/users/api/tenantApp/tenant.app.service.js +108 -108
  215. package/src/saas/internal-api/users/api/users.api.js +126 -126
  216. package/src/saas/internal-api/users/api/users.service.js +258 -258
  217. package/src/saas/internal-api/users/index.js +16 -16
  218. package/src/saas/internal-api/users/models/create.inner.system.user.model.js +18 -18
  219. package/src/saas/internal-api/users/models/notification.settings.model.js +12 -12
  220. package/src/saas/internal-api/users/models/tenent.user.model.js +11 -11
  221. package/src/saas/internal-api/users/models/users.model.js +43 -43
  222. package/src/saas/internal-api/users/utils/util.js +39 -39
  223. package/src/saas/internal-api/vendorProfile/api/vendor.profile.api.js +26 -26
  224. package/src/saas/internal-api/vendorProfile/api/vendor.profile.service.js +19 -19
  225. package/src/saas/internal-api/vendorProfile/index.js +3 -3
  226. package/src/saas/openapi/accounts/accounts.api.js +17 -17
  227. package/src/saas/openapi/accounts/accounts.service.js +11 -11
  228. package/src/saas/openapi/coi/coi.api.js +30 -30
  229. package/src/saas/openapi/coi/coi.service.js +43 -43
  230. package/src/saas/openapi/projects/projects.api.js +83 -83
  231. package/src/saas/openapi/projects/projects.service.js +64 -64
  232. package/src/saas/openapi/requests/index.js +7 -7
  233. package/src/saas/openapi/requests/models/invite.request.model.js +40 -40
  234. package/src/saas/openapi/requests/models/update.request.model.js +35 -35
  235. package/src/saas/openapi/requests/requests.api.js +93 -93
  236. package/src/saas/openapi/requests/requests.service.js +94 -94
  237. package/src/saas/openapi/requirements/index.js +6 -6
  238. package/src/saas/openapi/requirements/models/copy.requirement.model.js +10 -10
  239. package/src/saas/openapi/requirements/requirements.api.js +41 -41
  240. package/src/saas/openapi/requirements/requirements.service.js +49 -49
  241. package/src/saas/openapi/tabs/index.js +6 -6
  242. package/src/saas/openapi/tabs/models/create.tab.model.js +6 -6
  243. package/src/saas/openapi/tabs/tabs.api.js +27 -27
  244. package/src/saas/openapi/tabs/tabs.service.js +19 -19
  245. package/src/saas/openapi/users/user.model.js +10 -10
  246. package/src/saas/openapi/users/users.api.js +33 -33
  247. package/src/saas/openapi/users/users.service.js +51 -51
  248. package/tests/env.test.js +40 -40
  249. package/tests/validation.test.js +83 -83
@@ -1,269 +1,269 @@
1
- const { expect } = require('chai');
2
-
3
- const threadScheduler = require('../../../saas/internal-api/thread-scheduler/runner');
4
- const timeUtils = require('../../utils/timeUtils');
5
- const httpResponseStatusCodes = require('../../../common/httpResponseStatusCodes.json');
6
- const ocrStatuses = require('../../consts/ocrStatuses');
7
- const contractors = require('../../../saas/internal-api/contractors');
8
- const compliance = require('../../../saas/internal-api/compliance');
9
- const requests = require('../../../saas/internal-api/requests');
10
- const dbEmails = require('../../../saas/internal-api/dbEmails');
11
- const activationStatuses = require('../../../common/consts/activationStatuses');
12
- const recordTypes = require('../../../common/consts/recordTypes');
13
- const { policyNames } = require('../../../defaults/index').polices;
14
-
15
- const makeRecordNotResponsive = async function(recordId, context) {
16
- const { data: record } = await contractors.services.getContractorById(recordId, context);
17
- const isTenant = record.recordType === recordTypes.TENANTS;
18
-
19
- const offsetInDaysList = isTenant ?
20
- timeUtils.getInviteActionOffsetInDaysForNotResponsiveTenant() :
21
- timeUtils.getInviteActionOffsetInDaysForNotResponsiveVendor();
22
-
23
- for (const offsetInDays of offsetInDaysList) {
24
- await updateLastInviteActionDate(recordId, offsetInDays, context);
25
- }
26
- };
27
-
28
- const makeRecordAboutToExpire = async (recordId, policyExpiryDate, { policyName = policyNames.generalLiability } = {}) => {
29
- await contractors.services.updateExpiryDate(recordId, policyExpiryDate, policyName);
30
-
31
- const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
32
- expect(threadSchedulerResponse.status, 'Run thread scheduler has failed.').to.equal(httpResponseStatusCodes.OK);
33
- };
34
-
35
- const resendInvitationByRecordId = async (recordId, tabId, context) => {
36
- const { id: requestId } = await requests.services.getRequestFromTabByRecordId(recordId, tabId, context);
37
- const recordModifyDateVerificationModel = await contractors.services.getRecordVerificationModel(recordId, context);
38
-
39
- const resendInvitationResponse = await contractors.services.resendInvitation(requestId, recordModifyDateVerificationModel, context);
40
-
41
- if (resendInvitationResponse.status !== httpResponseStatusCodes.OK) {
42
- throw new Error(`Failed to resend invitation for record: ${resendInvitationResponse.statusText}`);
43
- }
44
-
45
- return resendInvitationResponse;
46
- };
47
-
48
- const editRequestAndRecordDetails = async function(request, recordConfig, context, { isDraft, expectError } = {}) {
49
- const tabModel = new requests.models.TabModel(request.tab.type);
50
- const recordDetailsModel = contractors.services.getContractorDetailsModel(recordConfig);
51
-
52
- const record = isDraft ?
53
- new contractors.models.edit.DraftRecordModel(
54
- request.record.contractorId,
55
- request.record.recordType,
56
- recordConfig.company,
57
- recordConfig.emailAddress,
58
- recordDetailsModel,
59
- isDraft,
60
- recordConfig.requirementsAction
61
- ) :
62
- new contractors.models.edit.ContractorModel(
63
- request.record.contractorId,
64
- request.record.recordType,
65
- recordConfig.company,
66
- recordConfig.emailAddress,
67
- recordDetailsModel
68
- );
69
-
70
- const requestEditModel = new requests.models.RequestModel(request.id, record, tabModel, {});
71
-
72
- const editRequestResponse = await requests.services.editRequestAndRecordDetails(requestEditModel, context);
73
-
74
- if (editRequestResponse.status !== httpResponseStatusCodes.OK && !expectError) {
75
- throw Error(`Failed to edit record \n${editRequestResponse.data.message}`);
76
- }
77
-
78
- return editRequestResponse;
79
- };
80
-
81
- const updateInviteDate = async function(recordId, inviteDate, context) {
82
- await timeUtils.waitFor(1).seconds;
83
- const updateResponse = await contractors.services.updateInviteDate(recordId, inviteDate, context);
84
-
85
- if (updateResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
86
- throw new Error(`Failed to update record invite date\n${updateResponse}`);
87
- }
88
-
89
- const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
90
-
91
- if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
92
- throw new Error(`Failed to run thread scheduler\n${threadSchedulerResponse}`);
93
- }
94
-
95
- await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
96
- };
97
-
98
- const updateLastInviteActionDate = async function(recordId, offsetInDays, context) {
99
- await timeUtils.waitFor(1).seconds;
100
- //In order to prevent situations where the date of the compliance audit action is equal or greater than the date of the last mail send audit,
101
- //we move back another day!!
102
- const complianceAuditActionOffsetInDays = offsetInDays + 1;
103
- /*
104
- To run the reminders mails successfully we must first update the compliance audit actions date,
105
- Since the thread scheduler will trigger the logic of the reminders mails
106
- only if last invite action date will be equal or after compliance audit actions date
107
- */
108
- const updateComplianceAuditResponse = await compliance.services.audit.updateComplianceAuditActionsDate(recordId, complianceAuditActionOffsetInDays, context);
109
-
110
- if (updateComplianceAuditResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
111
- throw new Error(`Failed to update compliance audit date\n${updateComplianceAuditResponse}`);
112
- }
113
-
114
- const updateLastInviteActionResponse = await contractors.services.updateLastInviteActionDate(recordId, offsetInDays, context);
115
-
116
- if (updateLastInviteActionResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
117
- throw new Error(`Failed to update record invite date\n${updateLastInviteActionResponse}`);
118
- }
119
-
120
- const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
121
-
122
- if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
123
- throw new Error(`Failed to run thread scheduler\n${threadSchedulerResponse}`);
124
- }
125
-
126
- await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
127
- };
128
-
129
- const runOverAllRenewalDatesForRecord = async function(recordId, policyName) {
130
- const dates = timeUtils.getAutomaticRenewalsExpirationDates();
131
-
132
- for (const date of dates) {
133
- await updatePolicyExpiryDateForRecord(recordId, date, policyName);
134
- }
135
- };
136
-
137
- const updatePolicyExpiryDateForRecord = async function(recordId, expiryDate, policyName) {
138
- const updateResponse = await contractors.services.updateExpiryDate(recordId, expiryDate, policyName);
139
-
140
- if (updateResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
141
- throw new Error(`Record expiry date could not be updated\n${updateResponse}`);
142
- }
143
-
144
- const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
145
-
146
- if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
147
- throw new Error(`Thread scheduler has failed to run\n${threadSchedulerResponse}`);
148
- }
149
-
150
- await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
151
- };
152
-
153
- const getHistoryEvents = async function(recordId, context) {
154
- const recordHistory = await contractors.services.getRecordHistory(recordId, context);
155
- expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
156
-
157
- return recordHistory.data.map(item => item.itemTitle).reverse();
158
- };
159
-
160
- const getFirstHistoryEventId = async function(recordId, context) {
161
- const recordHistory = await contractors.services.getRecordHistory(recordId, context);
162
- expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
163
- return recordHistory.data[recordHistory.data.length - 1].itemId;
164
- };
165
-
166
- const getLatestHistoryEventId = async function(recordId, context) {
167
- const recordHistory = await contractors.services.getRecordHistory(recordId, context);
168
- expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
169
- return recordHistory.data[0].itemId;
170
- };
171
-
172
- const getLatestRecordHistoryEventByItemTitle = async function(recordId, itemTitle, context) {
173
- const recordHistory = await contractors.services.getRecordHistory(recordId, context);
174
- expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
175
-
176
- const latestHistoryByTitle = recordHistory.data.find(historyItem => historyItem.itemTitle === itemTitle);
177
-
178
- if (!latestHistoryByTitle) {
179
- throw new Error(`History event with title ${itemTitle} not found`);
180
- }
181
-
182
- return latestHistoryByTitle;
183
- };
184
-
185
- const getLatestRecordHistoryEventIdByItemTitle = async function(recordId, itemTitle, context) {
186
- const latestHistoryByTitle = await getLatestRecordHistoryEventByItemTitle(recordId, itemTitle, context);
187
-
188
- return latestHistoryByTitle.itemId;
189
- };
190
-
191
- const getRecordHistoryItemById = async (recordId, itemId, context) => {
192
- const recordHistory = await contractors.services.getRecordHistory(recordId, context);
193
-
194
- return recordHistory.data.find(item => item.itemId === itemId);
195
- };
196
-
197
- const waitForOcrStatus = async function(recordId, context, { expectedStatus = ocrStatuses.SUCCESS } = {}) {
198
- let { data: recordOcrStatus } = await contractors.services.getRecordOcrStatus(recordId, context);
199
- let maxRetries = 25;
200
- while (recordOcrStatus !== expectedStatus && recordOcrStatus !== ocrStatuses.FAILED && maxRetries > 0) {
201
- await timeUtils.waitFor(5).seconds;
202
- recordOcrStatus = (await contractors.services.getRecordOcrStatus(recordId, context)).data;
203
- maxRetries--;
204
- }
205
-
206
- if (recordOcrStatus !== expectedStatus) {
207
- throw new Error(`Record OCR status not is as expected. Expected: ${expectedStatus}, Actual: ${recordOcrStatus}`);
208
- }
209
- };
210
-
211
- const deleteAllRequestsInProject = async function(accountId, projectId, context) {
212
- const activationStatus = [activationStatuses.ACTIVE, activationStatuses.ARCHIVED, activationStatuses.DRAFT];
213
- const { data: requestsInAccount } = await requests.services.getRequestsByAccountId(accountId, context, activationStatus);
214
-
215
- for (const request of requestsInAccount) {
216
- if (request.projectInfo.projectId === projectId) {
217
- const response = await contractors.services.deleteByContractorId(request.record.contractorId, context);
218
-
219
- if (response.status !== httpResponseStatusCodes.NO_CONTENT) {
220
- throw new Error(`Failed to delete request ${request.id}\n${response}`);
221
- }
222
- }
223
- }
224
- };
225
-
226
- const generateSubscriptionModelFromMail = async function(recipients) {
227
- const data = await dbEmails.services.getSubscriptionData(recipients);
228
- return contractors.services.getSubscriptionModel(data);
229
- };
230
-
231
- const overrideGap = async (recordId, reason, note, policyName, attributeName, context) => {
232
- const { data: record } = await contractors.services.getContractorById(recordId, context);
233
- const overrideModel = compliance.services.overrideGap.getWaiveModel(record, policyName, attributeName, reason, note);
234
- return compliance.services.overrideGap.overrideGap({ waiveRequestModel: overrideModel, context });
235
- };
236
-
237
- const retractOverriddenGap = async (recordId, policyName, attributeName, context) => {
238
- const { data: record } = await contractors.services.getContractorById(recordId, context);
239
- const retractModel = compliance.services.overrideGap.getRetractModel(record, policyName, attributeName);
240
- return compliance.services.overrideGap.retractOverride(retractModel, context);
241
- };
242
-
243
- const waiveAllGaps = async (recordId, context) => {
244
- const { data: record } = await contractors.services.getContractorById(recordId, context);
245
- await compliance.services.overrideGap.waiveAll(record, context);
246
- };
247
-
248
- module.exports = {
249
- makeRecordNotResponsive,
250
- makeRecordAboutToExpire,
251
- resendInvitationByRecordId,
252
- runOverAllRenewalDatesForRecord,
253
- editRequestAndRecordDetails,
254
- updateInviteDate,
255
- updatePolicyExpiryDateForRecord,
256
- getHistoryEvents,
257
- getFirstHistoryEventId,
258
- getLatestHistoryEventId,
259
- updateLastInviteActionDate,
260
- waitForOcrStatus,
261
- generateSubscriptionModelFromMail,
262
- deleteAllRequestsInProject,
263
- getLatestRecordHistoryEventIdByItemTitle,
264
- getRecordHistoryItemById,
265
- getLatestRecordHistoryEventByItemTitle,
266
- waiveAllGaps,
267
- overrideGap,
268
- retractOverriddenGap
269
- };
1
+ const { expect } = require('chai');
2
+
3
+ const threadScheduler = require('../../../saas/internal-api/thread-scheduler/runner');
4
+ const timeUtils = require('../../utils/timeUtils');
5
+ const httpResponseStatusCodes = require('../../../common/httpResponseStatusCodes.json');
6
+ const ocrStatuses = require('../../consts/ocrStatuses');
7
+ const contractors = require('../../../saas/internal-api/contractors');
8
+ const compliance = require('../../../saas/internal-api/compliance');
9
+ const requests = require('../../../saas/internal-api/requests');
10
+ const dbEmails = require('../../../saas/internal-api/dbEmails');
11
+ const activationStatuses = require('../../../common/consts/activationStatuses');
12
+ const recordTypes = require('../../../common/consts/recordTypes');
13
+ const { policyNames } = require('../../../defaults/index').polices;
14
+
15
+ const makeRecordNotResponsive = async function(recordId, context) {
16
+ const { data: record } = await contractors.services.getContractorById(recordId, context);
17
+ const isTenant = record.recordType === recordTypes.TENANTS;
18
+
19
+ const offsetInDaysList = isTenant ?
20
+ timeUtils.getInviteActionOffsetInDaysForNotResponsiveTenant() :
21
+ timeUtils.getInviteActionOffsetInDaysForNotResponsiveVendor();
22
+
23
+ for (const offsetInDays of offsetInDaysList) {
24
+ await updateLastInviteActionDate(recordId, offsetInDays, context);
25
+ }
26
+ };
27
+
28
+ const makeRecordAboutToExpire = async (recordId, policyExpiryDate, { policyName = policyNames.generalLiability } = {}) => {
29
+ await contractors.services.updateExpiryDate(recordId, policyExpiryDate, policyName);
30
+
31
+ const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
32
+ expect(threadSchedulerResponse.status, 'Run thread scheduler has failed.').to.equal(httpResponseStatusCodes.OK);
33
+ };
34
+
35
+ const resendInvitationByRecordId = async (recordId, tabId, context) => {
36
+ const { id: requestId } = await requests.services.getRequestFromTabByRecordId(recordId, tabId, context);
37
+ const recordModifyDateVerificationModel = await contractors.services.getRecordVerificationModel(recordId, context);
38
+
39
+ const resendInvitationResponse = await contractors.services.resendInvitation(requestId, recordModifyDateVerificationModel, context);
40
+
41
+ if (resendInvitationResponse.status !== httpResponseStatusCodes.OK) {
42
+ throw new Error(`Failed to resend invitation for record: ${resendInvitationResponse.statusText}`);
43
+ }
44
+
45
+ return resendInvitationResponse;
46
+ };
47
+
48
+ const editRequestAndRecordDetails = async function(request, recordConfig, context, { isDraft, expectError } = {}) {
49
+ const tabModel = new requests.models.TabModel(request.tab.type);
50
+ const recordDetailsModel = contractors.services.getContractorDetailsModel(recordConfig);
51
+
52
+ const record = isDraft ?
53
+ new contractors.models.edit.DraftRecordModel(
54
+ request.record.contractorId,
55
+ request.record.recordType,
56
+ recordConfig.company,
57
+ recordConfig.emailAddress,
58
+ recordDetailsModel,
59
+ isDraft,
60
+ recordConfig.requirementsAction
61
+ ) :
62
+ new contractors.models.edit.ContractorModel(
63
+ request.record.contractorId,
64
+ request.record.recordType,
65
+ recordConfig.company,
66
+ recordConfig.emailAddress,
67
+ recordDetailsModel
68
+ );
69
+
70
+ const requestEditModel = new requests.models.RequestModel(request.id, record, tabModel, {});
71
+
72
+ const editRequestResponse = await requests.services.editRequestAndRecordDetails(requestEditModel, context);
73
+
74
+ if (editRequestResponse.status !== httpResponseStatusCodes.OK && !expectError) {
75
+ throw Error(`Failed to edit record \n${editRequestResponse.data.message}`);
76
+ }
77
+
78
+ return editRequestResponse;
79
+ };
80
+
81
+ const updateInviteDate = async function(recordId, inviteDate, context) {
82
+ await timeUtils.waitFor(1).seconds;
83
+ const updateResponse = await contractors.services.updateInviteDate(recordId, inviteDate, context);
84
+
85
+ if (updateResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
86
+ throw new Error(`Failed to update record invite date\n${updateResponse}`);
87
+ }
88
+
89
+ const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
90
+
91
+ if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
92
+ throw new Error(`Failed to run thread scheduler\n${threadSchedulerResponse}`);
93
+ }
94
+
95
+ await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
96
+ };
97
+
98
+ const updateLastInviteActionDate = async function(recordId, offsetInDays, context) {
99
+ await timeUtils.waitFor(1).seconds;
100
+ //In order to prevent situations where the date of the compliance audit action is equal or greater than the date of the last mail send audit,
101
+ //we move back another day!!
102
+ const complianceAuditActionOffsetInDays = offsetInDays + 1;
103
+ /*
104
+ To run the reminders mails successfully we must first update the compliance audit actions date,
105
+ Since the thread scheduler will trigger the logic of the reminders mails
106
+ only if last invite action date will be equal or after compliance audit actions date
107
+ */
108
+ const updateComplianceAuditResponse = await compliance.services.audit.updateComplianceAuditActionsDate(recordId, complianceAuditActionOffsetInDays, context);
109
+
110
+ if (updateComplianceAuditResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
111
+ throw new Error(`Failed to update compliance audit date\n${updateComplianceAuditResponse}`);
112
+ }
113
+
114
+ const updateLastInviteActionResponse = await contractors.services.updateLastInviteActionDate(recordId, offsetInDays, context);
115
+
116
+ if (updateLastInviteActionResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
117
+ throw new Error(`Failed to update record invite date\n${updateLastInviteActionResponse}`);
118
+ }
119
+
120
+ const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
121
+
122
+ if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
123
+ throw new Error(`Failed to run thread scheduler\n${threadSchedulerResponse}`);
124
+ }
125
+
126
+ await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
127
+ };
128
+
129
+ const runOverAllRenewalDatesForRecord = async function(recordId, policyName) {
130
+ const dates = timeUtils.getAutomaticRenewalsExpirationDates();
131
+
132
+ for (const date of dates) {
133
+ await updatePolicyExpiryDateForRecord(recordId, date, policyName);
134
+ }
135
+ };
136
+
137
+ const updatePolicyExpiryDateForRecord = async function(recordId, expiryDate, policyName) {
138
+ const updateResponse = await contractors.services.updateExpiryDate(recordId, expiryDate, policyName);
139
+
140
+ if (updateResponse.status !== httpResponseStatusCodes.NO_CONTENT) {
141
+ throw new Error(`Record expiry date could not be updated\n${updateResponse}`);
142
+ }
143
+
144
+ const threadSchedulerResponse = await threadScheduler.runForRecords([recordId]);
145
+
146
+ if (threadSchedulerResponse.status !== httpResponseStatusCodes.OK) {
147
+ throw new Error(`Thread scheduler has failed to run\n${threadSchedulerResponse}`);
148
+ }
149
+
150
+ await timeUtils.waitFor(2.5).seconds; // calls for the same records can override each other
151
+ };
152
+
153
+ const getHistoryEvents = async function(recordId, context) {
154
+ const recordHistory = await contractors.services.getRecordHistory(recordId, context);
155
+ expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
156
+
157
+ return recordHistory.data.map(item => item.itemTitle).reverse();
158
+ };
159
+
160
+ const getFirstHistoryEventId = async function(recordId, context) {
161
+ const recordHistory = await contractors.services.getRecordHistory(recordId, context);
162
+ expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
163
+ return recordHistory.data[recordHistory.data.length - 1].itemId;
164
+ };
165
+
166
+ const getLatestHistoryEventId = async function(recordId, context) {
167
+ const recordHistory = await contractors.services.getRecordHistory(recordId, context);
168
+ expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
169
+ return recordHistory.data[0].itemId;
170
+ };
171
+
172
+ const getLatestRecordHistoryEventByItemTitle = async function(recordId, itemTitle, context) {
173
+ const recordHistory = await contractors.services.getRecordHistory(recordId, context);
174
+ expect(recordHistory.status, 'Expected record history response status to equal 200.').to.equal(httpResponseStatusCodes.OK);
175
+
176
+ const latestHistoryByTitle = recordHistory.data.find(historyItem => historyItem.itemTitle === itemTitle);
177
+
178
+ if (!latestHistoryByTitle) {
179
+ throw new Error(`History event with title ${itemTitle} not found`);
180
+ }
181
+
182
+ return latestHistoryByTitle;
183
+ };
184
+
185
+ const getLatestRecordHistoryEventIdByItemTitle = async function(recordId, itemTitle, context) {
186
+ const latestHistoryByTitle = await getLatestRecordHistoryEventByItemTitle(recordId, itemTitle, context);
187
+
188
+ return latestHistoryByTitle.itemId;
189
+ };
190
+
191
+ const getRecordHistoryItemById = async (recordId, itemId, context) => {
192
+ const recordHistory = await contractors.services.getRecordHistory(recordId, context);
193
+
194
+ return recordHistory.data.find(item => item.itemId === itemId);
195
+ };
196
+
197
+ const waitForOcrStatus = async function(recordId, context, { expectedStatus = ocrStatuses.SUCCESS } = {}) {
198
+ let { data: recordOcrStatus } = await contractors.services.getRecordOcrStatus(recordId, context);
199
+ let maxRetries = 25;
200
+ while (recordOcrStatus !== expectedStatus && recordOcrStatus !== ocrStatuses.FAILED && maxRetries > 0) {
201
+ await timeUtils.waitFor(5).seconds;
202
+ recordOcrStatus = (await contractors.services.getRecordOcrStatus(recordId, context)).data;
203
+ maxRetries--;
204
+ }
205
+
206
+ if (recordOcrStatus !== expectedStatus) {
207
+ throw new Error(`Record OCR status not is as expected. Expected: ${expectedStatus}, Actual: ${recordOcrStatus}`);
208
+ }
209
+ };
210
+
211
+ const deleteAllRequestsInProject = async function(accountId, projectId, context) {
212
+ const activationStatus = [activationStatuses.ACTIVE, activationStatuses.ARCHIVED, activationStatuses.DRAFT];
213
+ const { data: requestsInAccount } = await requests.services.getRequestsByAccountId(accountId, context, activationStatus);
214
+
215
+ for (const request of requestsInAccount) {
216
+ if (request.projectInfo.projectId === projectId) {
217
+ const response = await contractors.services.deleteByContractorId(request.record.contractorId, context);
218
+
219
+ if (response.status !== httpResponseStatusCodes.NO_CONTENT) {
220
+ throw new Error(`Failed to delete request ${request.id}\n${response}`);
221
+ }
222
+ }
223
+ }
224
+ };
225
+
226
+ const generateSubscriptionModelFromMail = async function(recipients) {
227
+ const data = await dbEmails.services.getSubscriptionData(recipients);
228
+ return contractors.services.getSubscriptionModel(data);
229
+ };
230
+
231
+ const overrideGap = async (recordId, reason, note, policyName, attributeName, context) => {
232
+ const { data: record } = await contractors.services.getContractorById(recordId, context);
233
+ const overrideModel = compliance.services.overrideGap.getWaiveModel(record, policyName, attributeName, reason, note);
234
+ return compliance.services.overrideGap.overrideGap({ waiveRequestModel: overrideModel, context });
235
+ };
236
+
237
+ const retractOverriddenGap = async (recordId, policyName, attributeName, context) => {
238
+ const { data: record } = await contractors.services.getContractorById(recordId, context);
239
+ const retractModel = compliance.services.overrideGap.getRetractModel(record, policyName, attributeName);
240
+ return compliance.services.overrideGap.retractOverride(retractModel, context);
241
+ };
242
+
243
+ const waiveAllGaps = async (recordId, context) => {
244
+ const { data: record } = await contractors.services.getContractorById(recordId, context);
245
+ await compliance.services.overrideGap.waiveAll(record, context);
246
+ };
247
+
248
+ module.exports = {
249
+ makeRecordNotResponsive,
250
+ makeRecordAboutToExpire,
251
+ resendInvitationByRecordId,
252
+ runOverAllRenewalDatesForRecord,
253
+ editRequestAndRecordDetails,
254
+ updateInviteDate,
255
+ updatePolicyExpiryDateForRecord,
256
+ getHistoryEvents,
257
+ getFirstHistoryEventId,
258
+ getLatestHistoryEventId,
259
+ updateLastInviteActionDate,
260
+ waitForOcrStatus,
261
+ generateSubscriptionModelFromMail,
262
+ deleteAllRequestsInProject,
263
+ getLatestRecordHistoryEventIdByItemTitle,
264
+ getRecordHistoryItemById,
265
+ getLatestRecordHistoryEventByItemTitle,
266
+ waiveAllGaps,
267
+ overrideGap,
268
+ retractOverriddenGap
269
+ };
@@ -1,44 +1,44 @@
1
- module.exports = {
2
- isOcrEnabled: {
3
- on: { isOcrEnabled: true },
4
- off: { isOcrEnabled: false }
5
- },
6
- isAccountRequirementsEnabled: {
7
- on: { isAccountRequirementsEnabled: true },
8
- off: { isAccountRequirementsEnabled: false }
9
- },
10
- isPolicyVerificationEnabled: {
11
- on: { hasPolicyVerification: true },
12
- off: { hasPolicyVerification: false }
13
- },
14
- isAuditingAiEnabled: {
15
- on: { isAuditingAiEnabled: true },
16
- off: { isAuditingAiEnabled: false }
17
- },
18
- externalIntegrations: {
19
- vendorsAndTenantsON: {
20
- integrations: {
21
- isVendorIntegrationsEnabled: true,
22
- isTenantIntegrationsEnabled: true
23
- }
24
- },
25
- vendorsAndTenantsOFF: {
26
- integrations: {
27
- isVendorIntegrationsEnabled: false,
28
- isTenantIntegrationsEnabled: false
29
- }
30
- },
31
- vendorsON: {
32
- integrations: {
33
- isVendorIntegrationsEnabled: true,
34
- isTenantIntegrationsEnabled: false
35
- }
36
- },
37
- tenantsON: {
38
- integrations: {
39
- isVendorIntegrationsEnabled: false,
40
- isTenantIntegrationsEnabled: true
41
- }
42
- }
43
- }
44
- };
1
+ module.exports = {
2
+ isOcrEnabled: {
3
+ on: { isOcrEnabled: true },
4
+ off: { isOcrEnabled: false }
5
+ },
6
+ isAccountRequirementsEnabled: {
7
+ on: { isAccountRequirementsEnabled: true },
8
+ off: { isAccountRequirementsEnabled: false }
9
+ },
10
+ isPolicyVerificationEnabled: {
11
+ on: { hasPolicyVerification: true },
12
+ off: { hasPolicyVerification: false }
13
+ },
14
+ isAuditingAiEnabled: {
15
+ on: { isAuditingAiEnabled: true },
16
+ off: { isAuditingAiEnabled: false }
17
+ },
18
+ externalIntegrations: {
19
+ vendorsAndTenantsON: {
20
+ integrations: {
21
+ isVendorIntegrationsEnabled: true,
22
+ isTenantIntegrationsEnabled: true
23
+ }
24
+ },
25
+ vendorsAndTenantsOFF: {
26
+ integrations: {
27
+ isVendorIntegrationsEnabled: false,
28
+ isTenantIntegrationsEnabled: false
29
+ }
30
+ },
31
+ vendorsON: {
32
+ integrations: {
33
+ isVendorIntegrationsEnabled: true,
34
+ isTenantIntegrationsEnabled: false
35
+ }
36
+ },
37
+ tenantsON: {
38
+ integrations: {
39
+ isVendorIntegrationsEnabled: false,
40
+ isTenantIntegrationsEnabled: true
41
+ }
42
+ }
43
+ }
44
+ };
@@ -1,6 +1,6 @@
1
- module.exports = {
2
- ACTIVE: 'Active',
3
- ARCHIVED: 'Archived',
4
- DRAFT: 'Draft',
5
- DELETED: 'Deleted'
6
- };
1
+ module.exports = {
2
+ ACTIVE: 'Active',
3
+ ARCHIVED: 'Archived',
4
+ DRAFT: 'Draft',
5
+ DELETED: 'Deleted'
6
+ };
@@ -1,10 +1,10 @@
1
- const autocompleteResultType = {
2
- account: 'Account',
3
- jonesGlobalCoi: 'JonesGlobalCoi',
4
- network: 'Network',
5
- policiesOnFile: 'PoliciesOnFile'
6
- };
7
-
8
- module.exports = {
9
- autocompleteResultType
10
- };
1
+ const autocompleteResultType = {
2
+ account: 'Account',
3
+ jonesGlobalCoi: 'JonesGlobalCoi',
4
+ network: 'Network',
5
+ policiesOnFile: 'PoliciesOnFile'
6
+ };
7
+
8
+ module.exports = {
9
+ autocompleteResultType
10
+ };