@getjones/test-infra 5.2.13 → 5.2.14
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/eslint.config.mjs +156 -156
- package/package.json +43 -43
- package/src/common/commonFlows/auth/auth.js +95 -95
- package/src/common/commonFlows/index.js +5 -5
- package/src/common/commonFlows/records/records.js +452 -500
- package/src/common/commonFlows/users/users.js +15 -15
- package/src/common/consts/accountSettings.js +112 -112
- package/src/common/consts/activationStatuses.js +6 -6
- package/src/common/consts/analysisStatuses.js +7 -7
- package/src/common/consts/autocomplete.js +10 -10
- package/src/common/consts/constantsForRecordsSortingAndFilters.js +49 -49
- package/src/common/consts/dashboardCharts.js +18 -18
- package/src/common/consts/homepage/AttentionTab.js +6 -6
- package/src/common/consts/homepage/sortOptions.js +19 -19
- package/src/common/consts/projectSettings.js +28 -35
- package/src/common/consts/recordTypes.js +5 -5
- package/src/common/consts/requirementActions.js +10 -10
- package/src/common/consts/s3FileTypes.js +12 -12
- package/src/common/consts/userRoles.js +21 -21
- package/src/common/consts/userTypes.js +16 -16
- package/src/common/errorCodes.js +13 -13
- package/src/common/httpResponseStatusCodes.json +19 -19
- package/src/common/httpResponseTypes.json +2 -2
- package/src/common/requests/apiKeyAuth/requests.js +45 -45
- package/src/common/requests/cookieAuth/requests.js +40 -40
- package/src/common/requests/internalAuth/requests.js +48 -48
- package/src/common/requests/requestHandlers.js +112 -112
- package/src/common/utils/arrayUtils.js +19 -19
- package/src/common/utils/complianceUtil.js +114 -114
- package/src/common/utils/configsUtil.js +22 -22
- package/src/common/utils/dataTypeUtils.js +41 -41
- package/src/common/utils/numberUtils.js +22 -22
- package/src/common/utils/objectUtils.js +102 -102
- package/src/common/utils/timeUtils.js +202 -195
- package/src/common/validations/typeValidations.js +36 -36
- package/src/defaults/configs/attributes.js +170 -170
- package/src/defaults/configs/auditConfigs.js +129 -129
- package/src/defaults/configs/coverage.js +144 -144
- package/src/defaults/configs/polices.js +28 -28
- package/src/defaults/configs/requirement.js +218 -218
- package/src/defaults/index.js +7 -7
- package/src/env.js +58 -58
- package/src/factory/globalRecord/globalRecord.js +43 -43
- package/src/factory/index.js +8 -8
- package/src/factory/records/records.js +295 -295
- package/src/factory/users/users.js +70 -70
- package/src/index.js +118 -118
- package/src/reporters/mochaReporter.js +273 -273
- package/src/saas/internal-api/accountDirectory/api/accountDirectory.api.js +152 -152
- package/src/saas/internal-api/accountDirectory/api/accountDirectory.service.js +576 -576
- package/src/saas/internal-api/accountDirectory/consts/accountDirectory.consts.js +75 -75
- package/src/saas/internal-api/accountDirectory/index.js +5 -5
- package/src/saas/internal-api/accountDirectory/models/accountDirectory.models.js +172 -172
- package/src/saas/internal-api/accounts/api/core/accounts.core.api.js +54 -54
- package/src/saas/internal-api/accounts/api/core/accounts.core.service.js +114 -114
- package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.api.js +29 -29
- package/src/saas/internal-api/accounts/api/emailCustomization/accounts.email.customizations.service.js +60 -60
- package/src/saas/internal-api/accounts/api/emailCustomization/consts.js +8 -8
- package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.api.js +54 -54
- package/src/saas/internal-api/accounts/api/openapi/accounts.openapi.service.js +67 -67
- package/src/saas/internal-api/accounts/api/settings/settings.api.js +21 -21
- package/src/saas/internal-api/accounts/api/settings/settings.service.js +58 -58
- package/src/saas/internal-api/accounts/consts/consts.js +8 -8
- package/src/saas/internal-api/accounts/index.js +22 -22
- 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 +110 -110
- package/src/saas/internal-api/accounts/utils/utils.js +60 -60
- package/src/saas/internal-api/agreement/api/agreement.api.js +39 -39
- package/src/saas/internal-api/agreement/api/agreement.service.js +121 -121
- package/src/saas/internal-api/agreement/consts/consts.js +11 -11
- package/src/saas/internal-api/agreement/index.js +12 -12
- package/src/saas/internal-api/agreement/models/create.agreement.model.js +12 -12
- package/src/saas/internal-api/agreement/models/createAgreementByAuditorModel.js +11 -11
- package/src/saas/internal-api/agreement/models/createAgreementByPMModel.js +13 -13
- package/src/saas/internal-api/auditCustomerRules/api/customer.rules.api.js +49 -49
- package/src/saas/internal-api/auditCustomerRules/api/customer.rules.service.js +121 -121
- package/src/saas/internal-api/auditCustomerRules/consts/customer.rule.js +40 -40
- package/src/saas/internal-api/auditCustomerRules/index.js +7 -7
- package/src/saas/internal-api/auditCustomerRules/models/customer.rule.model.js +55 -55
- package/src/saas/internal-api/auditCustomerRules/utils/customer.rule.util.js +70 -70
- package/src/saas/internal-api/auditNotes/api/audit.notes.api.js +40 -40
- package/src/saas/internal-api/auditNotes/api/audit.notes.service.js +116 -116
- package/src/saas/internal-api/auditNotes/index.js +4 -4
- package/src/saas/internal-api/auditNotes/models/audit.note.model.js +32 -32
- package/src/saas/internal-api/auditorComments/api/auditor.comments.api.js +20 -20
- package/src/saas/internal-api/auditorComments/api/auditor.comments.service.js +27 -27
- package/src/saas/internal-api/auditorComments/consts/auditor.comment.js +16 -16
- package/src/saas/internal-api/auditorComments/index.js +5 -5
- package/src/saas/internal-api/auditorComments/models/auditor.comment.model.js +40 -40
- package/src/saas/internal-api/auth/api/auth.api.js +78 -78
- package/src/saas/internal-api/auth/api/auth.service.js +217 -217
- package/src/saas/internal-api/auth/index.js +3 -3
- package/src/saas/internal-api/certificial/api/certificial.api.js +15 -15
- package/src/saas/internal-api/certificial/api/certificial.service.js +24 -24
- package/src/saas/internal-api/certificial/consts.js +8 -8
- package/src/saas/internal-api/certificial/index.js +4 -4
- package/src/saas/internal-api/coi/api/coi.api.js +76 -76
- package/src/saas/internal-api/coi/api/coi.service.js +104 -104
- package/src/saas/internal-api/coi/consts/duplicateHandling.js +7 -7
- package/src/saas/internal-api/coi/consts/hashes.js +5 -5
- package/src/saas/internal-api/coi/consts/uploaderStatuses.js +9 -0
- package/src/saas/internal-api/coi/consts/uploaderTypes.js +3 -3
- package/src/saas/internal-api/coi/index.js +17 -16
- package/src/saas/internal-api/coi/models/Combine.last.two.cois.model.js +25 -25
- package/src/saas/internal-api/coi/models/submit.coi.batch.model.js +23 -23
- package/src/saas/internal-api/coi/models/submit.coi.model.js +23 -23
- package/src/saas/internal-api/coi/utils/utils.js +185 -185
- package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.api.js +12 -12
- package/src/saas/internal-api/compliance/api/amBestRating/am.best.rating.service.js +14 -14
- package/src/saas/internal-api/compliance/api/audit/aiAudit/aiAudit.api.js +63 -63
- package/src/saas/internal-api/compliance/api/audit/aiAudit/aiAudit.service.js +99 -99
- package/src/saas/internal-api/compliance/api/audit/audit.api.js +124 -124
- package/src/saas/internal-api/compliance/api/audit/audit.service.js +390 -390
- package/src/saas/internal-api/compliance/api/complianceSnapshot/compliance.snapshot.api.js +32 -32
- package/src/saas/internal-api/compliance/api/complianceSnapshot/compliance.snapshot.service.js +73 -73
- package/src/saas/internal-api/compliance/api/convert/convert.api.js +12 -12
- package/src/saas/internal-api/compliance/api/convert/convert.service.js +7 -7
- package/src/saas/internal-api/compliance/api/coverage/coverage.api.js +33 -33
- package/src/saas/internal-api/compliance/api/coverage/coverage.service.js +46 -46
- package/src/saas/internal-api/compliance/api/overrideGap/override.gap.api.js +86 -109
- package/src/saas/internal-api/compliance/api/overrideGap/override.gap.service.js +300 -391
- package/src/saas/internal-api/compliance/consts/audit.js +130 -130
- package/src/saas/internal-api/compliance/consts/overrideGapRequest/override.gap.request.js +7 -14
- package/src/saas/internal-api/compliance/index.js +41 -41
- package/src/saas/internal-api/compliance/models/audit/audit.model.js +109 -109
- package/src/saas/internal-api/compliance/models/overrideGapRequest/override.gap.request.model.js +16 -31
- package/src/saas/internal-api/compliance/models/waive/waive.model.js +112 -112
- package/src/saas/internal-api/compliance/utils/auditUtil.js +308 -308
- package/src/saas/internal-api/compliance/utils/coverageUtil.js +45 -45
- package/src/saas/internal-api/contractors/api/contractors.api.js +251 -251
- package/src/saas/internal-api/contractors/api/contractors.service.js +482 -482
- package/src/saas/internal-api/contractors/consts/consts.js +6 -6
- package/src/saas/internal-api/contractors/index.js +8 -8
- package/src/saas/internal-api/contractors/models/assign.requirement.model.js +11 -11
- package/src/saas/internal-api/contractors/models/edit.contractor.model.js +73 -73
- package/src/saas/internal-api/contractors/models/link.request.model.js +10 -10
- package/src/saas/internal-api/contractors/models/verification.contractor.model.js +29 -29
- package/src/saas/internal-api/contractors/utils.js +25 -25
- package/src/saas/internal-api/customTags/api/customTags.api.js +47 -47
- package/src/saas/internal-api/customTags/api/customTags.service.js +96 -96
- package/src/saas/internal-api/customTags/index.js +4 -4
- package/src/saas/internal-api/customTags/models/customTagsModels.js +17 -17
- 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 +209 -209
- package/src/saas/internal-api/dbEmails/consts/consts.js +66 -69
- package/src/saas/internal-api/dbEmails/index.js +6 -6
- package/src/saas/internal-api/dbEmails/models/db.emails.model.js +22 -22
- package/src/saas/internal-api/dbEmails/utils/util.js +82 -82
- package/src/saas/internal-api/emailCustomization/api/email.customization.api.js +26 -26
- package/src/saas/internal-api/emailCustomization/api/email.customization.service.js +50 -50
- package/src/saas/internal-api/emailCustomization/index.js +3 -3
- package/src/saas/internal-api/fileScan/api/file.scan.api.js +14 -14
- package/src/saas/internal-api/fileScan/api/file.scan.service.js +35 -35
- package/src/saas/internal-api/fileScan/index.js +3 -3
- package/src/saas/internal-api/fileScan/models/update.scan.status.model.js +13 -13
- package/src/saas/internal-api/globalRecord/api/global.record.api.js +95 -95
- package/src/saas/internal-api/globalRecord/api/global.record.service.js +112 -112
- 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 +60 -60
- package/src/saas/internal-api/globalRecord/utils/util.js +161 -161
- 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/notificationCenter/api/notification.center.api.js +32 -32
- package/src/saas/internal-api/notificationCenter/api/notification.center.service.js +49 -49
- package/src/saas/internal-api/notificationCenter/consts.js +9 -12
- package/src/saas/internal-api/notificationCenter/index.js +4 -4
- package/src/saas/internal-api/outlook/api/outlook.api.js +14 -14
- package/src/saas/internal-api/outlook/api/outlook.service.js +14 -14
- package/src/saas/internal-api/outlook/index.js +3 -3
- package/src/saas/internal-api/policyFile/api/policy.file.api.js +43 -43
- package/src/saas/internal-api/policyFile/api/policy.file.service.js +117 -117
- package/src/saas/internal-api/policyFile/consts.js +21 -21
- package/src/saas/internal-api/policyFile/index.js +11 -11
- package/src/saas/internal-api/policyFile/models/create.policy.file.model.js +11 -11
- package/src/saas/internal-api/policyFile/models/set.publish.flag.to.policy.model.js +13 -13
- package/src/saas/internal-api/projects/api/core/projects.api.js +39 -39
- package/src/saas/internal-api/projects/api/core/projects.service.js +77 -77
- 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 +56 -64
- package/src/saas/internal-api/projects/utils/utils.js +159 -159
- package/src/saas/internal-api/recordHub/api/record.hub.api.js +20 -20
- package/src/saas/internal-api/recordHub/api/record.hub.service.js +86 -86
- package/src/saas/internal-api/recordHub/index.js +3 -3
- package/src/saas/internal-api/recordNotes/api/record.notes.api.js +38 -38
- package/src/saas/internal-api/recordNotes/api/record.notes.service.js +56 -56
- package/src/saas/internal-api/recordNotes/api/record.notes.utils.js +12 -12
- package/src/saas/internal-api/recordNotes/index.js +3 -3
- package/src/saas/internal-api/relatedDocs/api/related.docs.api.js +98 -98
- package/src/saas/internal-api/relatedDocs/api/related.docs.service.js +180 -180
- package/src/saas/internal-api/relatedDocs/index.js +4 -4
- package/src/saas/internal-api/relatedDocs/models/related.doc.model.js +36 -36
- package/src/saas/internal-api/reports/api/reports.api.js +56 -56
- package/src/saas/internal-api/reports/api/reports.service.js +68 -68
- package/src/saas/internal-api/reports/consts/consts.js +71 -71
- 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 +132 -132
- package/src/saas/internal-api/requests/api/requests.service.js +315 -315
- package/src/saas/internal-api/requests/index.js +21 -21
- package/src/saas/internal-api/requests/models/create.request.model.js +39 -39
- package/src/saas/internal-api/requests/models/draft.request.criteria.model.js +18 -18
- package/src/saas/internal-api/requests/models/draft.request.report.model.js +14 -14
- package/src/saas/internal-api/requests/models/edit.request.model.js +31 -31
- package/src/saas/internal-api/requests/models/homepageRequestCriteriaModel.js +19 -19
- package/src/saas/internal-api/requests/models/requestListCriteriaModel.js +17 -17
- package/src/saas/internal-api/requests/models/tenant.request.model.js +9 -9
- package/src/saas/internal-api/requests/utils.js +16 -16
- 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/lease/lease.api.js +74 -74
- package/src/saas/internal-api/requirements/api/lease/lease.service.js +167 -167
- package/src/saas/internal-api/requirements/api/requirements.api.js +65 -65
- package/src/saas/internal-api/requirements/api/requirements.service.js +198 -198
- package/src/saas/internal-api/requirements/consts/attributeTypes.json +8 -8
- package/src/saas/internal-api/requirements/consts/consts.js +22 -22
- package/src/saas/internal-api/requirements/index.js +22 -22
- package/src/saas/internal-api/requirements/models/create.requirement.model.js +17 -17
- package/src/saas/internal-api/requirements/models/extraction.request.model.js +16 -16
- package/src/saas/internal-api/requirements/models/policy.model.js +35 -35
- package/src/saas/internal-api/requirements/models/tab.extraction.request.model.js +14 -14
- package/src/saas/internal-api/requirements/models/update.requirement.model.js +19 -19
- package/src/saas/internal-api/requirements/utils/utils.js +129 -129
- package/src/saas/internal-api/sampleCoi/api/sample.coi.api.js +15 -15
- package/src/saas/internal-api/sampleCoi/api/sample.coi.service.js +48 -48
- package/src/saas/internal-api/sampleCoi/consts/consts.js +22 -22
- package/src/saas/internal-api/sampleCoi/index.js +4 -4
- package/src/saas/internal-api/schedulerJobRun/api/scheduler.job.run.api.js +31 -31
- package/src/saas/internal-api/schedulerJobRun/api/scheduler.job.run.service.js +56 -56
- package/src/saas/internal-api/schedulerJobRun/index.js +3 -3
- 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/tableOfContents/api/table.of.contents.api.js +37 -37
- package/src/saas/internal-api/tableOfContents/api/table.of.contents.service.js +19 -19
- package/src/saas/internal-api/tableOfContents/index.js +3 -3
- package/src/saas/internal-api/tabs/api/tabs.api.js +32 -32
- package/src/saas/internal-api/tabs/api/tabs.service.js +60 -60
- package/src/saas/internal-api/tabs/index.js +3 -3
- package/src/saas/internal-api/tabs/models/tabs.model.js +19 -19
- package/src/saas/internal-api/thread-scheduler/runner.js +86 -86
- package/src/saas/internal-api/thread-scheduler/schedulerJobs.js +10 -10
- package/src/saas/internal-api/uploadFiles/api/upload.file.api.js +49 -49
- package/src/saas/internal-api/uploadFiles/api/upload.file.service.js +176 -176
- package/src/saas/internal-api/uploadFiles/consts.js +36 -36
- package/src/saas/internal-api/uploadFiles/index.js +5 -5
- package/src/saas/internal-api/uploadFiles/utils.js +34 -34
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.api.js +38 -38
- package/src/saas/internal-api/users/api/tenantApp/tenant.app.service.js +109 -109
- package/src/saas/internal-api/users/api/users.api.js +158 -158
- package/src/saas/internal-api/users/api/users.service.js +363 -363
- package/src/saas/internal-api/users/index.js +17 -17
- package/src/saas/internal-api/users/models/create.inner.system.user.model.js +18 -18
- package/src/saas/internal-api/users/models/notification.settings.model.js +15 -15
- package/src/saas/internal-api/users/models/tenant.user.model.js +11 -11
- package/src/saas/internal-api/users/models/users.model.js +43 -43
- package/src/saas/internal-api/users/utils/util.js +50 -50
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.api.js +26 -26
- package/src/saas/internal-api/vendorProfile/api/vendor.profile.service.js +19 -19
- 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 +35 -35
- package/src/saas/openapi/coi/coi.service.js +53 -53
- package/src/saas/openapi/projects/projects.api.js +83 -83
- package/src/saas/openapi/projects/projects.service.js +89 -71
- package/src/saas/openapi/relatedDocs/related.docs.api.js +30 -30
- package/src/saas/openapi/relatedDocs/related.docs.service.js +56 -55
- package/src/saas/openapi/requests/index.js +7 -7
- package/src/saas/openapi/requests/models/invite.request.model.js +42 -42
- package/src/saas/openapi/requests/models/update.request.model.js +37 -37
- package/src/saas/openapi/requests/requests.api.js +93 -93
- package/src/saas/openapi/requests/requests.service.js +100 -94
- 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 +41 -41
- package/src/saas/openapi/requirements/requirements.service.js +61 -55
- 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 +27 -27
- package/src/saas/openapi/tabs/tabs.service.js +26 -19
- package/src/saas/openapi/users/user.model.js +10 -10
- package/src/saas/openapi/users/users.api.js +33 -33
- package/src/saas/openapi/users/users.service.js +51 -51
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const { RELATED_DOC_TYPES } = require('../../uploadFiles/consts');
|
|
2
|
-
|
|
3
|
-
class TabExtractionRequestModel {
|
|
4
|
-
constructor({ tempFileName, name, requirementName, fileSize, docType = RELATED_DOC_TYPES.SERVICE_AGREEMENT, notes = null }) {
|
|
5
|
-
this.tempFileName = tempFileName;
|
|
6
|
-
this.name = name;
|
|
7
|
-
this.requirementName = requirementName;
|
|
8
|
-
this.fileSize = fileSize;
|
|
9
|
-
this.docType = docType;
|
|
10
|
-
this.notes = notes;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
module.exports = { TabExtractionRequestModel };
|
|
1
|
+
const { RELATED_DOC_TYPES } = require('../../uploadFiles/consts');
|
|
2
|
+
|
|
3
|
+
class TabExtractionRequestModel {
|
|
4
|
+
constructor({ tempFileName, name, requirementName, fileSize, docType = RELATED_DOC_TYPES.SERVICE_AGREEMENT, notes = null }) {
|
|
5
|
+
this.tempFileName = tempFileName;
|
|
6
|
+
this.name = name;
|
|
7
|
+
this.requirementName = requirementName;
|
|
8
|
+
this.fileSize = fileSize;
|
|
9
|
+
this.docType = docType;
|
|
10
|
+
this.notes = notes;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = { TabExtractionRequestModel };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
2
|
-
const { REQUIREMENT_SHARING_LEVELS } = require('../consts/consts');
|
|
3
|
-
const { PolicyModel } = require('./policy.model');
|
|
4
|
-
const { VENDORS } = require('../../../../common/consts/recordTypes');
|
|
5
|
-
class UpdateRequirementModel {
|
|
6
|
-
constructor({ id, name, policies, dateModified, sharingLevel = REQUIREMENT_SHARING_LEVELS.TAB, recordType = VENDORS }) {
|
|
7
|
-
this.id = id;
|
|
8
|
-
this.name = name;
|
|
9
|
-
this.policies = policies;
|
|
10
|
-
this.dateModified = dateModified;
|
|
11
|
-
this.sharingLevel = sharingLevel;
|
|
12
|
-
this.recordType = recordType;
|
|
13
|
-
|
|
14
|
-
validateType(policies, Array);
|
|
15
|
-
policies && validateType(policies[0], PolicyModel);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
module.exports = { UpdateRequirementModel };
|
|
1
|
+
const { validateType } = require('../../../../common/validations/typeValidations');
|
|
2
|
+
const { REQUIREMENT_SHARING_LEVELS } = require('../consts/consts');
|
|
3
|
+
const { PolicyModel } = require('./policy.model');
|
|
4
|
+
const { VENDORS } = require('../../../../common/consts/recordTypes');
|
|
5
|
+
class UpdateRequirementModel {
|
|
6
|
+
constructor({ id, name, policies, dateModified, sharingLevel = REQUIREMENT_SHARING_LEVELS.TAB, recordType = VENDORS }) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.policies = policies;
|
|
10
|
+
this.dateModified = dateModified;
|
|
11
|
+
this.sharingLevel = sharingLevel;
|
|
12
|
+
this.recordType = recordType;
|
|
13
|
+
|
|
14
|
+
validateType(policies, Array);
|
|
15
|
+
policies && validateType(policies[0], PolicyModel);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { UpdateRequirementModel };
|
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
const attributeTypes = require('../consts/attributeTypes.json');
|
|
2
|
-
const dataTypeUtils = require('../../../../common/utils/dataTypeUtils');
|
|
3
|
-
const { UpdateRequirementModel } = require('../models/update.requirement.model');
|
|
4
|
-
const { AttributeModel, PolicyModel, AttributeTypes } = require('../models/policy.model');
|
|
5
|
-
const { CreateRequirementModel } = require('../models/create.requirement.model');
|
|
6
|
-
|
|
7
|
-
const customAttributes = {
|
|
8
|
-
Including: 'multiple' //because attributeTypes.multiple => 'Multiple' with capital M
|
|
9
|
-
};
|
|
10
|
-
const numericAttributes = ['Indemnity Period', 'Notice of Cancellation', 'Notice of Cancellation Endorsement'];
|
|
11
|
-
const amBestAttributes = {
|
|
12
|
-
amBestRating: 'AM Best Rating',
|
|
13
|
-
amBestFinancialSizeCategory: 'AM Best Financial Size Category'
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const convertNumericValuesToNumberType = function(value, attributeName) {
|
|
17
|
-
if (dataTypeUtils.isString(value) && value.startsWith('$')) {
|
|
18
|
-
return Number(value.replace(/[$,]/g, ''));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (numericAttributes.includes(attributeName)) {
|
|
22
|
-
return Number(value);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return value;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const preparePolicyAttributesTypes = function(value, attributeName) {
|
|
29
|
-
const attributesValue = convertNumericValuesToNumberType(value, attributeName);
|
|
30
|
-
|
|
31
|
-
if (dataTypeUtils.isNumber(attributesValue)) {
|
|
32
|
-
return numericAttributes.includes(attributeName) ?
|
|
33
|
-
AttributeTypes.get(attributeTypes.numeric) :
|
|
34
|
-
AttributeTypes.get(attributeTypes.limit);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (dataTypeUtils.isBoolean(attributesValue)) {
|
|
38
|
-
return AttributeTypes.get(attributeTypes.boolean);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (dataTypeUtils.isString(attributesValue)) {
|
|
42
|
-
if (attributeName === amBestAttributes.amBestRating) {
|
|
43
|
-
return AttributeTypes.get(attributeTypes.amBestRating);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (attributeName === amBestAttributes.amBestFinancialSizeCategory) {
|
|
47
|
-
return AttributeTypes.get(attributeTypes.amBestFinancialSizeCategory);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return AttributeTypes.get(attributeTypes.multiple);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const prepareEndorsementAttributesTypes = function(value) {
|
|
55
|
-
if (dataTypeUtils.isBoolean(value)) {
|
|
56
|
-
return AttributeTypes.get(attributeTypes.boolean);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return AttributeTypes.get(attributeTypes.endorsement);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const parseRequirementConfig = function(config) {
|
|
63
|
-
if (dataTypeUtils.isArray(config)) {
|
|
64
|
-
// If config is an array type it means the config is already parsed.
|
|
65
|
-
return config;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const policies = [];
|
|
69
|
-
for (const policy in config) {
|
|
70
|
-
const attributes = [];
|
|
71
|
-
|
|
72
|
-
if (dataTypeUtils.isObject(config[policy])) {
|
|
73
|
-
for (const attribute in config[policy]) {
|
|
74
|
-
const attributeName = customAttributes[attribute] || attribute;
|
|
75
|
-
|
|
76
|
-
attributes.push({
|
|
77
|
-
name: attributeName,
|
|
78
|
-
type: preparePolicyAttributesTypes(config[policy][attribute], attributeName),
|
|
79
|
-
values: attributeName === customAttributes.Including ? //Including attributes in Automobile Liability
|
|
80
|
-
config[policy][attribute].split(', ') :
|
|
81
|
-
[convertNumericValuesToNumberType(config[policy][attribute], attributeName)]
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
} else {
|
|
85
|
-
attributes.push({
|
|
86
|
-
name: policy,
|
|
87
|
-
type: prepareEndorsementAttributesTypes(config[policy]),
|
|
88
|
-
values: [config[policy]]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
policies.push({
|
|
93
|
-
name: policy,
|
|
94
|
-
attributes
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return policies;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const getPolicyModel = function(policyData) {
|
|
101
|
-
const attributes = policyData.attributes;
|
|
102
|
-
const attributeModels = attributes.map(attribute =>
|
|
103
|
-
new AttributeModel(attribute.name, attribute.type, attribute.values));
|
|
104
|
-
|
|
105
|
-
return new PolicyModel(policyData.name, attributeModels);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const getCreateRequirementModel = function(requirement) {
|
|
109
|
-
const { policies, name, sharingLevel } = requirement;
|
|
110
|
-
|
|
111
|
-
const parsedPolicies = parseRequirementConfig(policies);
|
|
112
|
-
const policyModels = parsedPolicies.map(policy => getPolicyModel(policy));
|
|
113
|
-
|
|
114
|
-
return new CreateRequirementModel(name, policyModels, sharingLevel);
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const getUpdateRequirementModel = function(updatedRequirement) {
|
|
118
|
-
const { id, policies, name, recordType, sharingLevel, dateModified } = updatedRequirement;
|
|
119
|
-
|
|
120
|
-
const parsedPolicies = parseRequirementConfig(policies);
|
|
121
|
-
const policyModels = parsedPolicies.map(policy => getPolicyModel(policy));
|
|
122
|
-
|
|
123
|
-
return new UpdateRequirementModel({ id, name, policies: policyModels, dateModified, sharingLevel, recordType });
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
module.exports = {
|
|
127
|
-
getCreateRequirementModel,
|
|
128
|
-
getUpdateRequirementModel
|
|
129
|
-
};
|
|
1
|
+
const attributeTypes = require('../consts/attributeTypes.json');
|
|
2
|
+
const dataTypeUtils = require('../../../../common/utils/dataTypeUtils');
|
|
3
|
+
const { UpdateRequirementModel } = require('../models/update.requirement.model');
|
|
4
|
+
const { AttributeModel, PolicyModel, AttributeTypes } = require('../models/policy.model');
|
|
5
|
+
const { CreateRequirementModel } = require('../models/create.requirement.model');
|
|
6
|
+
|
|
7
|
+
const customAttributes = {
|
|
8
|
+
Including: 'multiple' //because attributeTypes.multiple => 'Multiple' with capital M
|
|
9
|
+
};
|
|
10
|
+
const numericAttributes = ['Indemnity Period', 'Notice of Cancellation', 'Notice of Cancellation Endorsement'];
|
|
11
|
+
const amBestAttributes = {
|
|
12
|
+
amBestRating: 'AM Best Rating',
|
|
13
|
+
amBestFinancialSizeCategory: 'AM Best Financial Size Category'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const convertNumericValuesToNumberType = function(value, attributeName) {
|
|
17
|
+
if (dataTypeUtils.isString(value) && value.startsWith('$')) {
|
|
18
|
+
return Number(value.replace(/[$,]/g, ''));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (numericAttributes.includes(attributeName)) {
|
|
22
|
+
return Number(value);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return value;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const preparePolicyAttributesTypes = function(value, attributeName) {
|
|
29
|
+
const attributesValue = convertNumericValuesToNumberType(value, attributeName);
|
|
30
|
+
|
|
31
|
+
if (dataTypeUtils.isNumber(attributesValue)) {
|
|
32
|
+
return numericAttributes.includes(attributeName) ?
|
|
33
|
+
AttributeTypes.get(attributeTypes.numeric) :
|
|
34
|
+
AttributeTypes.get(attributeTypes.limit);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (dataTypeUtils.isBoolean(attributesValue)) {
|
|
38
|
+
return AttributeTypes.get(attributeTypes.boolean);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (dataTypeUtils.isString(attributesValue)) {
|
|
42
|
+
if (attributeName === amBestAttributes.amBestRating) {
|
|
43
|
+
return AttributeTypes.get(attributeTypes.amBestRating);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (attributeName === amBestAttributes.amBestFinancialSizeCategory) {
|
|
47
|
+
return AttributeTypes.get(attributeTypes.amBestFinancialSizeCategory);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return AttributeTypes.get(attributeTypes.multiple);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const prepareEndorsementAttributesTypes = function(value) {
|
|
55
|
+
if (dataTypeUtils.isBoolean(value)) {
|
|
56
|
+
return AttributeTypes.get(attributeTypes.boolean);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return AttributeTypes.get(attributeTypes.endorsement);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const parseRequirementConfig = function(config) {
|
|
63
|
+
if (dataTypeUtils.isArray(config)) {
|
|
64
|
+
// If config is an array type it means the config is already parsed.
|
|
65
|
+
return config;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const policies = [];
|
|
69
|
+
for (const policy in config) {
|
|
70
|
+
const attributes = [];
|
|
71
|
+
|
|
72
|
+
if (dataTypeUtils.isObject(config[policy])) {
|
|
73
|
+
for (const attribute in config[policy]) {
|
|
74
|
+
const attributeName = customAttributes[attribute] || attribute;
|
|
75
|
+
|
|
76
|
+
attributes.push({
|
|
77
|
+
name: attributeName,
|
|
78
|
+
type: preparePolicyAttributesTypes(config[policy][attribute], attributeName),
|
|
79
|
+
values: attributeName === customAttributes.Including ? //Including attributes in Automobile Liability
|
|
80
|
+
config[policy][attribute].split(', ') :
|
|
81
|
+
[convertNumericValuesToNumberType(config[policy][attribute], attributeName)]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
} else {
|
|
85
|
+
attributes.push({
|
|
86
|
+
name: policy,
|
|
87
|
+
type: prepareEndorsementAttributesTypes(config[policy]),
|
|
88
|
+
values: [config[policy]]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
policies.push({
|
|
93
|
+
name: policy,
|
|
94
|
+
attributes
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return policies;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const getPolicyModel = function(policyData) {
|
|
101
|
+
const attributes = policyData.attributes;
|
|
102
|
+
const attributeModels = attributes.map(attribute =>
|
|
103
|
+
new AttributeModel(attribute.name, attribute.type, attribute.values));
|
|
104
|
+
|
|
105
|
+
return new PolicyModel(policyData.name, attributeModels);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const getCreateRequirementModel = function(requirement) {
|
|
109
|
+
const { policies, name, sharingLevel } = requirement;
|
|
110
|
+
|
|
111
|
+
const parsedPolicies = parseRequirementConfig(policies);
|
|
112
|
+
const policyModels = parsedPolicies.map(policy => getPolicyModel(policy));
|
|
113
|
+
|
|
114
|
+
return new CreateRequirementModel(name, policyModels, sharingLevel);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const getUpdateRequirementModel = function(updatedRequirement) {
|
|
118
|
+
const { id, policies, name, recordType, sharingLevel, dateModified } = updatedRequirement;
|
|
119
|
+
|
|
120
|
+
const parsedPolicies = parseRequirementConfig(policies);
|
|
121
|
+
const policyModels = parsedPolicies.map(policy => getPolicyModel(policy));
|
|
122
|
+
|
|
123
|
+
return new UpdateRequirementModel({ id, name, policies: policyModels, dateModified, sharingLevel, recordType });
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
module.exports = {
|
|
127
|
+
getCreateRequirementModel,
|
|
128
|
+
getUpdateRequirementModel
|
|
129
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
2
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
3
|
-
const { SAMPLE_COI_DOWNLOAD_PATH } = require('../consts/consts');
|
|
4
|
-
|
|
5
|
-
const Endpoints = {
|
|
6
|
-
downloadSampleCoi: requirementId => `${backendUrl}${SAMPLE_COI_DOWNLOAD_PATH}${requirementId}/download`
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const downloadSampleCoi = (requirementId, context = null, { source, recordId } = {}) => {
|
|
10
|
-
return requests.getRequestHandler(Endpoints.downloadSampleCoi(requirementId), { source, recordId }, context);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
module.exports = {
|
|
14
|
-
downloadSampleCoi
|
|
15
|
-
};
|
|
1
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
2
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
3
|
+
const { SAMPLE_COI_DOWNLOAD_PATH } = require('../consts/consts');
|
|
4
|
+
|
|
5
|
+
const Endpoints = {
|
|
6
|
+
downloadSampleCoi: requirementId => `${backendUrl}${SAMPLE_COI_DOWNLOAD_PATH}${requirementId}/download`
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const downloadSampleCoi = (requirementId, context = null, { source, recordId } = {}) => {
|
|
10
|
+
return requests.getRequestHandler(Endpoints.downloadSampleCoi(requirementId), { source, recordId }, context);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
downloadSampleCoi
|
|
15
|
+
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
const sampleCoiAPI = require('./sample.coi.api');
|
|
2
|
-
const httpResponseStatusCodes = require('../../../../common/httpResponseStatusCodes.json');
|
|
3
|
-
const timeUtils = require('../../../../common/utils/timeUtils');
|
|
4
|
-
const { DEFAULT_POLLING } = require('../consts/consts');
|
|
5
|
-
|
|
6
|
-
const CONTENT_DISPOSITION_PARAM = 'response-content-disposition';
|
|
7
|
-
const FILE_NAME_PATTERN = /filename="([^"]+)"/;
|
|
8
|
-
|
|
9
|
-
const downloadSampleCoi = (requirementId, context = null, { source, recordId } = {}) => {
|
|
10
|
-
return sampleCoiAPI.downloadSampleCoi(requirementId, context, { source, recordId });
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const waitForServableSample = async (requirementId, context = null, { source, recordId, maxRetries = DEFAULT_POLLING.maxRetries, pollIntervalSeconds = DEFAULT_POLLING.pollIntervalSeconds } = {}) => {
|
|
14
|
-
let response = await downloadSampleCoi(requirementId, context, { source, recordId });
|
|
15
|
-
|
|
16
|
-
for (let retry = 0; retry < maxRetries && response.status !== httpResponseStatusCodes.FOUND; retry++) {
|
|
17
|
-
await timeUtils.waitFor(pollIntervalSeconds).seconds;
|
|
18
|
-
response = await downloadSampleCoi(requirementId, context, { source, recordId });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return response;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const getPresignedUrl = response => response?.headers?.location;
|
|
25
|
-
|
|
26
|
-
const getDownloadFileName = response => {
|
|
27
|
-
const presignedUrl = getPresignedUrl(response);
|
|
28
|
-
|
|
29
|
-
if (!presignedUrl) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const contentDisposition = new URL(presignedUrl).searchParams.get(CONTENT_DISPOSITION_PARAM);
|
|
34
|
-
return contentDisposition?.match(FILE_NAME_PATTERN)?.[1] || null;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const getS3ObjectKey = response => {
|
|
38
|
-
const presignedUrl = getPresignedUrl(response);
|
|
39
|
-
return presignedUrl ? new URL(presignedUrl).pathname.replace(/^\//, '') : null;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
module.exports = {
|
|
43
|
-
downloadSampleCoi,
|
|
44
|
-
waitForServableSample,
|
|
45
|
-
getPresignedUrl,
|
|
46
|
-
getDownloadFileName,
|
|
47
|
-
getS3ObjectKey
|
|
48
|
-
};
|
|
1
|
+
const sampleCoiAPI = require('./sample.coi.api');
|
|
2
|
+
const httpResponseStatusCodes = require('../../../../common/httpResponseStatusCodes.json');
|
|
3
|
+
const timeUtils = require('../../../../common/utils/timeUtils');
|
|
4
|
+
const { DEFAULT_POLLING } = require('../consts/consts');
|
|
5
|
+
|
|
6
|
+
const CONTENT_DISPOSITION_PARAM = 'response-content-disposition';
|
|
7
|
+
const FILE_NAME_PATTERN = /filename="([^"]+)"/;
|
|
8
|
+
|
|
9
|
+
const downloadSampleCoi = (requirementId, context = null, { source, recordId } = {}) => {
|
|
10
|
+
return sampleCoiAPI.downloadSampleCoi(requirementId, context, { source, recordId });
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const waitForServableSample = async (requirementId, context = null, { source, recordId, maxRetries = DEFAULT_POLLING.maxRetries, pollIntervalSeconds = DEFAULT_POLLING.pollIntervalSeconds } = {}) => {
|
|
14
|
+
let response = await downloadSampleCoi(requirementId, context, { source, recordId });
|
|
15
|
+
|
|
16
|
+
for (let retry = 0; retry < maxRetries && response.status !== httpResponseStatusCodes.FOUND; retry++) {
|
|
17
|
+
await timeUtils.waitFor(pollIntervalSeconds).seconds;
|
|
18
|
+
response = await downloadSampleCoi(requirementId, context, { source, recordId });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return response;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const getPresignedUrl = response => response?.headers?.location;
|
|
25
|
+
|
|
26
|
+
const getDownloadFileName = response => {
|
|
27
|
+
const presignedUrl = getPresignedUrl(response);
|
|
28
|
+
|
|
29
|
+
if (!presignedUrl) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const contentDisposition = new URL(presignedUrl).searchParams.get(CONTENT_DISPOSITION_PARAM);
|
|
34
|
+
return contentDisposition?.match(FILE_NAME_PATTERN)?.[1] || null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const getS3ObjectKey = response => {
|
|
38
|
+
const presignedUrl = getPresignedUrl(response);
|
|
39
|
+
return presignedUrl ? new URL(presignedUrl).pathname.replace(/^\//, '') : null;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
module.exports = {
|
|
43
|
+
downloadSampleCoi,
|
|
44
|
+
waitForServableSample,
|
|
45
|
+
getPresignedUrl,
|
|
46
|
+
getDownloadFileName,
|
|
47
|
+
getS3ObjectKey
|
|
48
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const SAMPLE_COI_DOWNLOAD_SOURCE = {
|
|
2
|
-
email: 'email',
|
|
3
|
-
uploadFlowStep2: 'upload_flow_step2',
|
|
4
|
-
uploadFlowStep3: 'upload_flow_step3',
|
|
5
|
-
recordHub: 'record_hub',
|
|
6
|
-
requirementsPage: 'requirements_page',
|
|
7
|
-
saasReport: 'saas_report',
|
|
8
|
-
unknown: 'unknown'
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const SAMPLE_COI_DOWNLOAD_PATH = '/sample-coi/requirement/';
|
|
12
|
-
|
|
13
|
-
const SAMPLE_COI_FILE_NAME_PREFIX = 'Sample_ACORD25_';
|
|
14
|
-
|
|
15
|
-
const DEFAULT_POLLING = { maxRetries: 3, pollIntervalSeconds: 1 };
|
|
16
|
-
|
|
17
|
-
module.exports = {
|
|
18
|
-
SAMPLE_COI_DOWNLOAD_SOURCE,
|
|
19
|
-
SAMPLE_COI_DOWNLOAD_PATH,
|
|
20
|
-
SAMPLE_COI_FILE_NAME_PREFIX,
|
|
21
|
-
DEFAULT_POLLING
|
|
22
|
-
};
|
|
1
|
+
const SAMPLE_COI_DOWNLOAD_SOURCE = {
|
|
2
|
+
email: 'email',
|
|
3
|
+
uploadFlowStep2: 'upload_flow_step2',
|
|
4
|
+
uploadFlowStep3: 'upload_flow_step3',
|
|
5
|
+
recordHub: 'record_hub',
|
|
6
|
+
requirementsPage: 'requirements_page',
|
|
7
|
+
saasReport: 'saas_report',
|
|
8
|
+
unknown: 'unknown'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const SAMPLE_COI_DOWNLOAD_PATH = '/sample-coi/requirement/';
|
|
12
|
+
|
|
13
|
+
const SAMPLE_COI_FILE_NAME_PREFIX = 'Sample_ACORD25_';
|
|
14
|
+
|
|
15
|
+
const DEFAULT_POLLING = { maxRetries: 3, pollIntervalSeconds: 1 };
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
SAMPLE_COI_DOWNLOAD_SOURCE,
|
|
19
|
+
SAMPLE_COI_DOWNLOAD_PATH,
|
|
20
|
+
SAMPLE_COI_FILE_NAME_PREFIX,
|
|
21
|
+
DEFAULT_POLLING
|
|
22
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const services = require('./api/sample.coi.service');
|
|
2
|
-
const consts = require('./consts/consts');
|
|
3
|
-
|
|
4
|
-
module.exports = { services, consts };
|
|
1
|
+
const services = require('./api/sample.coi.service');
|
|
2
|
+
const consts = require('./consts/consts');
|
|
3
|
+
|
|
4
|
+
module.exports = { services, consts };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
-
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
-
|
|
4
|
-
const Endpoints = {
|
|
5
|
-
base: `${backendUrl}/saas/integration-tests/scheduler-job-run`,
|
|
6
|
-
byId: id => `${backendUrl}/saas/integration-tests/scheduler-job-run/${id}`,
|
|
7
|
-
reclaim: `${backendUrl}/saas/integration-tests/scheduler-job-run/reclaim`
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const seedJobRun = (body, context) => {
|
|
11
|
-
return requests.postRequestHandler(Endpoints.base, body, context);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const reclaimStaleJobRuns = (jobType, context) => {
|
|
15
|
-
return requests.postRequestHandler(Endpoints.reclaim, null, context, {}, { jobType });
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const getJobRun = (id, context) => {
|
|
19
|
-
return requests.getRequestHandler(Endpoints.byId(id), {}, context);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const deleteJobRunsByType = (jobType, context) => {
|
|
23
|
-
return requests.deleteRequestHandler(Endpoints.base, context, {}, { jobType });
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
seedJobRun,
|
|
28
|
-
reclaimStaleJobRuns,
|
|
29
|
-
getJobRun,
|
|
30
|
-
deleteJobRunsByType
|
|
31
|
-
};
|
|
1
|
+
const requests = require('../../../../common/requests/cookieAuth/requests');
|
|
2
|
+
const { backendUrl } = require('../../../../env').getEnv();
|
|
3
|
+
|
|
4
|
+
const Endpoints = {
|
|
5
|
+
base: `${backendUrl}/saas/integration-tests/scheduler-job-run`,
|
|
6
|
+
byId: id => `${backendUrl}/saas/integration-tests/scheduler-job-run/${id}`,
|
|
7
|
+
reclaim: `${backendUrl}/saas/integration-tests/scheduler-job-run/reclaim`
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const seedJobRun = (body, context) => {
|
|
11
|
+
return requests.postRequestHandler(Endpoints.base, body, context);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const reclaimStaleJobRuns = (jobType, context) => {
|
|
15
|
+
return requests.postRequestHandler(Endpoints.reclaim, null, context, {}, { jobType });
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const getJobRun = (id, context) => {
|
|
19
|
+
return requests.getRequestHandler(Endpoints.byId(id), {}, context);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const deleteJobRunsByType = (jobType, context) => {
|
|
23
|
+
return requests.deleteRequestHandler(Endpoints.base, context, {}, { jobType });
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
module.exports = {
|
|
27
|
+
seedJobRun,
|
|
28
|
+
reclaimStaleJobRuns,
|
|
29
|
+
getJobRun,
|
|
30
|
+
deleteJobRunsByType
|
|
31
|
+
};
|