@dynamatix/gb-schemas 2.17.8 → 2.17.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/applicants/applicant-additional-income.model.d.ts +0 -378
- package/dist/applicants/applicant-additional-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-additional-income.model.js +0 -35
- package/dist/applicants/applicant-additional-income.type.d.ts +0 -40
- package/dist/applicants/applicant-additional-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-additional-income.type.js +0 -1
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +0 -545
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-creditCard.model.js +0 -40
- package/dist/applicants/applicant-commitment-loan.model.d.ts +0 -434
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-loan.model.js +0 -51
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +0 -506
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +0 -69
- package/dist/applicants/applicant-commitment-residence.model.d.ts +0 -768
- package/dist/applicants/applicant-commitment-residence.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-residence.model.js +0 -57
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +0 -426
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.js +0 -43
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +0 -426
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +0 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +0 -43
- package/dist/applicants/applicant-credit-data.model.d.ts +0 -60
- package/dist/applicants/applicant-credit-data.model.d.ts.map +0 -1
- package/dist/applicants/applicant-credit-data.model.js +0 -11
- package/dist/applicants/applicant-credit-profile.model.d.ts +0 -51
- package/dist/applicants/applicant-credit-profile.model.d.ts.map +0 -1
- package/dist/applicants/applicant-credit-profile.model.js +0 -20
- package/dist/applicants/applicant-credit-report.model.d.ts +0 -3816
- package/dist/applicants/applicant-credit-report.model.d.ts.map +0 -1
- package/dist/applicants/applicant-credit-report.model.js +0 -126
- package/dist/applicants/applicant-credit-report.type.d.ts +0 -145
- package/dist/applicants/applicant-credit-report.type.d.ts.map +0 -1
- package/dist/applicants/applicant-credit-report.type.js +0 -1
- package/dist/applicants/applicant-direct-debit.model.d.ts +0 -86
- package/dist/applicants/applicant-direct-debit.model.d.ts.map +0 -1
- package/dist/applicants/applicant-direct-debit.model.js +0 -16
- package/dist/applicants/applicant-employment-income.model.d.ts +0 -206
- package/dist/applicants/applicant-employment-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-employment-income.model.js +0 -20
- package/dist/applicants/applicant-employment-income.type.d.ts +0 -37
- package/dist/applicants/applicant-employment-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-employment-income.type.js +0 -1
- package/dist/applicants/applicant-employment.model.d.ts +0 -828
- package/dist/applicants/applicant-employment.model.d.ts.map +0 -1
- package/dist/applicants/applicant-employment.model.js +0 -46
- package/dist/applicants/applicant-expenditure.model.d.ts +0 -127
- package/dist/applicants/applicant-expenditure.model.d.ts.map +0 -1
- package/dist/applicants/applicant-expenditure.model.js +0 -146
- package/dist/applicants/applicant-expenditure.type.d.ts +0 -42
- package/dist/applicants/applicant-expenditure.type.d.ts.map +0 -1
- package/dist/applicants/applicant-expenditure.type.js +0 -1
- package/dist/applicants/applicant-income-settings.model.d.ts +0 -82
- package/dist/applicants/applicant-income-settings.model.d.ts.map +0 -1
- package/dist/applicants/applicant-income-settings.model.js +0 -22
- package/dist/applicants/applicant-income-settings.type.d.ts +0 -40
- package/dist/applicants/applicant-income-settings.type.d.ts.map +0 -1
- package/dist/applicants/applicant-income-settings.type.js +0 -1
- package/dist/applicants/applicant-income-summary.model.d.ts +0 -2964
- package/dist/applicants/applicant-income-summary.model.d.ts.map +0 -1
- package/dist/applicants/applicant-income-summary.model.js +0 -59
- package/dist/applicants/applicant-income-summary.type.d.ts +0 -72
- package/dist/applicants/applicant-income-summary.type.d.ts.map +0 -1
- package/dist/applicants/applicant-income-summary.type.js +0 -1
- package/dist/applicants/applicant-large-exposure.model.d.ts +0 -667
- package/dist/applicants/applicant-large-exposure.model.d.ts.map +0 -1
- package/dist/applicants/applicant-large-exposure.model.js +0 -16
- package/dist/applicants/applicant-large-exposure.type.d.ts +0 -39
- package/dist/applicants/applicant-large-exposure.type.d.ts.map +0 -1
- package/dist/applicants/applicant-large-exposure.type.js +0 -1
- package/dist/applicants/applicant-pension-income.model.d.ts +0 -494
- package/dist/applicants/applicant-pension-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-pension-income.model.js +0 -35
- package/dist/applicants/applicant-pension-income.type.d.ts +0 -40
- package/dist/applicants/applicant-pension-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-pension-income.type.js +0 -1
- package/dist/applicants/applicant-property-income.model.d.ts +0 -953
- package/dist/applicants/applicant-property-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-property-income.model.js +0 -34
- package/dist/applicants/applicant-property-income.type.d.ts +0 -44
- package/dist/applicants/applicant-property-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-property-income.type.js +0 -1
- package/dist/applicants/applicant-risk-narrative.model.d.ts +0 -66
- package/dist/applicants/applicant-risk-narrative.model.d.ts.map +0 -1
- package/dist/applicants/applicant-risk-narrative.model.js +0 -13
- package/dist/applicants/applicant-self-employed-income.model.d.ts +0 -213
- package/dist/applicants/applicant-self-employed-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-self-employed-income.model.js +0 -23
- package/dist/applicants/applicant-self-employed-income.type.d.ts +0 -37
- package/dist/applicants/applicant-self-employed-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-self-employed-income.type.js +0 -1
- package/dist/applicants/applicant-self-employment.model.d.ts +0 -269
- package/dist/applicants/applicant-self-employment.model.d.ts.map +0 -1
- package/dist/applicants/applicant-self-employment.model.js +0 -55
- package/dist/applicants/applicant-sole-trader-income.model.d.ts +0 -213
- package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +0 -1
- package/dist/applicants/applicant-sole-trader-income.model.js +0 -21
- package/dist/applicants/applicant-sole-trader-income.type.d.ts +0 -37
- package/dist/applicants/applicant-sole-trader-income.type.d.ts.map +0 -1
- package/dist/applicants/applicant-sole-trader-income.type.js +0 -1
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +0 -500
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +0 -1
- package/dist/applicants/applicant-uk-tax-credits.model.js +0 -21
- package/dist/applicants/applicant-uk-tax-credits.type.d.ts +0 -39
- package/dist/applicants/applicant-uk-tax-credits.type.d.ts.map +0 -1
- package/dist/applicants/applicant-uk-tax-credits.type.js +0 -1
- package/dist/applicants/applicant-welcome-call.model.d.ts +0 -384
- package/dist/applicants/applicant-welcome-call.model.d.ts.map +0 -1
- package/dist/applicants/applicant-welcome-call.model.js +0 -709
- package/dist/applicants/applicant-welcome-call.type.d.ts +0 -66
- package/dist/applicants/applicant-welcome-call.type.d.ts.map +0 -1
- package/dist/applicants/applicant-welcome-call.type.js +0 -1
- package/dist/applicants/applicant.model.d.ts +0 -1569
- package/dist/applicants/applicant.model.d.ts.map +0 -1
- package/dist/applicants/applicant.model.js +0 -254
- package/dist/applicants/applicant.type.d.ts +0 -158
- package/dist/applicants/applicant.type.d.ts.map +0 -1
- package/dist/applicants/applicant.type.js +0 -1
- package/dist/applicants/index.d.ts +0 -37
- package/dist/applicants/index.d.ts.map +0 -1
- package/dist/applicants/index.js +0 -22
- package/dist/applications/application-audit.model.d.ts +0 -120
- package/dist/applications/application-audit.model.d.ts.map +0 -1
- package/dist/applications/application-audit.model.js +0 -45
- package/dist/applications/application-checklist-Item.model.d.ts +0 -292
- package/dist/applications/application-checklist-Item.model.d.ts.map +0 -1
- package/dist/applications/application-checklist-Item.model.js +0 -49
- package/dist/applications/application-company-model.d.ts +0 -1548
- package/dist/applications/application-company-model.d.ts.map +0 -1
- package/dist/applications/application-company-model.js +0 -134
- package/dist/applications/application-credit-profile.model.d.ts +0 -63
- package/dist/applications/application-credit-profile.model.d.ts.map +0 -1
- package/dist/applications/application-credit-profile.model.js +0 -12
- package/dist/applications/application-direct-debit.model.d.ts +0 -697
- package/dist/applications/application-direct-debit.model.d.ts.map +0 -1
- package/dist/applications/application-direct-debit.model.js +0 -173
- package/dist/applications/application-direct-debit.type.d.ts +0 -63
- package/dist/applications/application-direct-debit.type.d.ts.map +0 -1
- package/dist/applications/application-direct-debit.type.js +0 -1
- package/dist/applications/application-euc.model.d.ts +0 -196
- package/dist/applications/application-euc.model.d.ts.map +0 -1
- package/dist/applications/application-euc.model.js +0 -39
- package/dist/applications/application-euc.type.d.ts +0 -58
- package/dist/applications/application-euc.type.d.ts.map +0 -1
- package/dist/applications/application-euc.type.js +0 -1
- package/dist/applications/application-fieldconfig.model.d.ts +0 -58
- package/dist/applications/application-fieldconfig.model.d.ts.map +0 -1
- package/dist/applications/application-fieldconfig.model.js +0 -10
- package/dist/applications/application-illustration-model.d.ts +0 -52
- package/dist/applications/application-illustration-model.d.ts.map +0 -1
- package/dist/applications/application-illustration-model.js +0 -6
- package/dist/applications/application-legal.model.d.ts +0 -58
- package/dist/applications/application-legal.model.d.ts.map +0 -1
- package/dist/applications/application-legal.model.js +0 -10
- package/dist/applications/application-mortgage.model.d.ts +0 -307
- package/dist/applications/application-mortgage.model.d.ts.map +0 -1
- package/dist/applications/application-mortgage.model.js +0 -274
- package/dist/applications/application-mortgage.type.d.ts +0 -76
- package/dist/applications/application-mortgage.type.d.ts.map +0 -1
- package/dist/applications/application-mortgage.type.js +0 -1
- package/dist/applications/application-note.model.d.ts +0 -184
- package/dist/applications/application-note.model.d.ts.map +0 -1
- package/dist/applications/application-note.model.js +0 -105
- package/dist/applications/application-note.type.d.ts +0 -55
- package/dist/applications/application-note.type.d.ts.map +0 -1
- package/dist/applications/application-note.type.js +0 -1
- package/dist/applications/application-offer.model.d.ts +0 -196
- package/dist/applications/application-offer.model.d.ts.map +0 -1
- package/dist/applications/application-offer.model.js +0 -56
- package/dist/applications/application-offer.type.d.ts +0 -54
- package/dist/applications/application-offer.type.d.ts.map +0 -1
- package/dist/applications/application-offer.type.js +0 -1
- package/dist/applications/application-onboarding.model.d.ts +0 -70
- package/dist/applications/application-onboarding.model.d.ts.map +0 -1
- package/dist/applications/application-onboarding.model.js +0 -12
- package/dist/applications/application-product.model.d.ts +0 -290
- package/dist/applications/application-product.model.d.ts.map +0 -1
- package/dist/applications/application-product.model.js +0 -90
- package/dist/applications/application-product.type.d.ts +0 -58
- package/dist/applications/application-product.type.d.ts.map +0 -1
- package/dist/applications/application-product.type.js +0 -1
- package/dist/applications/application-productfeatures.model.d.ts +0 -772
- package/dist/applications/application-productfeatures.model.d.ts.map +0 -1
- package/dist/applications/application-productfeatures.model.js +0 -100
- package/dist/applications/application-productfeatures.type.d.ts +0 -125
- package/dist/applications/application-productfeatures.type.d.ts.map +0 -1
- package/dist/applications/application-productfeatures.type.js +0 -1
- package/dist/applications/application-rationale.model.d.ts +0 -126
- package/dist/applications/application-rationale.model.d.ts.map +0 -1
- package/dist/applications/application-rationale.model.js +0 -23
- package/dist/applications/application-rationale.type.d.ts +0 -44
- package/dist/applications/application-rationale.type.d.ts.map +0 -1
- package/dist/applications/application-rationale.type.js +0 -1
- package/dist/applications/application-risk-narrative.model.d.ts +0 -100
- package/dist/applications/application-risk-narrative.model.d.ts.map +0 -1
- package/dist/applications/application-risk-narrative.model.js +0 -17
- package/dist/applications/application-valuation-report.model.d.ts +0 -1438
- package/dist/applications/application-valuation-report.model.d.ts.map +0 -1
- package/dist/applications/application-valuation-report.model.js +0 -799
- package/dist/applications/application-valuation-report.type.d.ts +0 -256
- package/dist/applications/application-valuation-report.type.d.ts.map +0 -1
- package/dist/applications/application-valuation-report.type.js +0 -1
- package/dist/applications/application-valuation.model.d.ts +0 -1358
- package/dist/applications/application-valuation.model.d.ts.map +0 -1
- package/dist/applications/application-valuation.model.js +0 -72
- package/dist/applications/application-valuation.type.d.ts +0 -55
- package/dist/applications/application-valuation.type.d.ts.map +0 -1
- package/dist/applications/application-valuation.type.js +0 -1
- package/dist/applications/application.model.d.ts +0 -636
- package/dist/applications/application.model.d.ts.map +0 -1
- package/dist/applications/application.model.js +0 -247
- package/dist/applications/applications-task.model.d.ts +0 -312
- package/dist/applications/applications-task.model.d.ts.map +0 -1
- package/dist/applications/applications-task.model.js +0 -58
- package/dist/applications/applications-task.type.d.ts +0 -59
- package/dist/applications/applications-task.type.d.ts.map +0 -1
- package/dist/applications/applications-task.type.js +0 -1
- package/dist/applications/broker.model.d.ts +0 -162
- package/dist/applications/broker.model.d.ts.map +0 -1
- package/dist/applications/broker.model.js +0 -24
- package/dist/applications/broker.type.d.ts +0 -51
- package/dist/applications/broker.type.d.ts.map +0 -1
- package/dist/applications/broker.type.js +0 -1
- package/dist/applications/index.d.ts +0 -36
- package/dist/applications/index.d.ts.map +0 -1
- package/dist/applications/index.js +0 -23
- package/dist/applications/solicitor.model.d.ts +0 -206
- package/dist/applications/solicitor.model.d.ts.map +0 -1
- package/dist/applications/solicitor.model.js +0 -121
- package/dist/applications/solicitor.type.d.ts +0 -56
- package/dist/applications/solicitor.type.d.ts.map +0 -1
- package/dist/applications/solicitor.type.js +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -9
- package/dist/product-catalogues/index.d.ts +0 -7
- package/dist/product-catalogues/index.d.ts.map +0 -1
- package/dist/product-catalogues/index.js +0 -3
- package/dist/product-catalogues/product-catalogue.model.d.ts +0 -132
- package/dist/product-catalogues/product-catalogue.model.d.ts.map +0 -1
- package/dist/product-catalogues/product-catalogue.model.js +0 -22
- package/dist/product-catalogues/product-catalogue.type.d.ts +0 -15
- package/dist/product-catalogues/product-catalogue.type.d.ts.map +0 -1
- package/dist/product-catalogues/product-catalogue.type.js +0 -1
- package/dist/product-catalogues/product-definitions.model.d.ts +0 -318
- package/dist/product-catalogues/product-definitions.model.d.ts.map +0 -1
- package/dist/product-catalogues/product-definitions.model.js +0 -29
- package/dist/product-catalogues/product-definitions.type.d.ts +0 -53
- package/dist/product-catalogues/product-definitions.type.d.ts.map +0 -1
- package/dist/product-catalogues/product-definitions.type.js +0 -1
- package/dist/product-catalogues/product-variant.model.d.ts +0 -96
- package/dist/product-catalogues/product-variant.model.d.ts.map +0 -1
- package/dist/product-catalogues/product-variant.model.js +0 -16
- package/dist/product-catalogues/product-variant.type.d.ts +0 -38
- package/dist/product-catalogues/product-variant.type.d.ts.map +0 -1
- package/dist/product-catalogues/product-variant.type.js +0 -1
- package/dist/properties/index.d.ts +0 -3
- package/dist/properties/index.d.ts.map +0 -1
- package/dist/properties/index.js +0 -2
- package/dist/properties/property.model.d.ts +0 -1174
- package/dist/properties/property.model.d.ts.map +0 -1
- package/dist/properties/property.model.js +0 -152
- package/dist/properties/security.model.d.ts +0 -331
- package/dist/properties/security.model.d.ts.map +0 -1
- package/dist/properties/security.model.js +0 -155
- package/dist/shared/alert.model.d.ts +0 -102
- package/dist/shared/alert.model.d.ts.map +0 -1
- package/dist/shared/alert.model.js +0 -24
- package/dist/shared/api-log.model.d.ts +0 -124
- package/dist/shared/api-log.model.d.ts.map +0 -1
- package/dist/shared/api-log.model.js +0 -25
- package/dist/shared/api-performance.model.d.ts +0 -37
- package/dist/shared/api-performance.model.d.ts.map +0 -1
- package/dist/shared/api-performance.model.js +0 -22
- package/dist/shared/api-performance.type.d.ts +0 -178
- package/dist/shared/api-performance.type.d.ts.map +0 -1
- package/dist/shared/api-performance.type.js +0 -1
- package/dist/shared/apprivo-sync-journey.model.d.ts +0 -114
- package/dist/shared/apprivo-sync-journey.model.d.ts.map +0 -1
- package/dist/shared/apprivo-sync-journey.model.js +0 -19
- package/dist/shared/checklist.model.d.ts +0 -102
- package/dist/shared/checklist.model.d.ts.map +0 -1
- package/dist/shared/checklist.model.js +0 -35
- package/dist/shared/index.d.ts +0 -19
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/index.js +0 -16
- package/dist/shared/job-run.model.d.ts +0 -76
- package/dist/shared/job-run.model.d.ts.map +0 -1
- package/dist/shared/job-run.model.js +0 -14
- package/dist/shared/job-setting.model.d.ts +0 -70
- package/dist/shared/job-setting.model.d.ts.map +0 -1
- package/dist/shared/job-setting.model.js +0 -11
- package/dist/shared/lookup-group.model.d.ts +0 -78
- package/dist/shared/lookup-group.model.d.ts.map +0 -1
- package/dist/shared/lookup-group.model.js +0 -22
- package/dist/shared/lookup.model.d.ts +0 -96
- package/dist/shared/lookup.model.d.ts.map +0 -1
- package/dist/shared/lookup.model.js +0 -32
- package/dist/shared/schema-doc.model.d.ts +0 -76
- package/dist/shared/schema-doc.model.d.ts.map +0 -1
- package/dist/shared/schema-doc.model.js +0 -11
- package/dist/shared/system-parameter.model.d.ts +0 -88
- package/dist/shared/system-parameter.model.d.ts.map +0 -1
- package/dist/shared/system-parameter.model.js +0 -32
- package/dist/shared/task-document.model.d.ts +0 -70
- package/dist/shared/task-document.model.d.ts.map +0 -1
- package/dist/shared/task-document.model.js +0 -23
- package/dist/shared/task.model.d.ts +0 -234
- package/dist/shared/task.model.d.ts.map +0 -1
- package/dist/shared/task.model.js +0 -15
- package/dist/shared/webhook-event.model.d.ts +0 -37
- package/dist/shared/webhook-event.model.d.ts.map +0 -1
- package/dist/shared/webhook-event.model.js +0 -57
- package/dist/shared/webhook-event.type.d.ts +0 -15
- package/dist/shared/webhook-event.type.d.ts.map +0 -1
- package/dist/shared/webhook-event.type.js +0 -1
- package/dist/shared/workflow-trigger.model.d.ts +0 -32
- package/dist/shared/workflow-trigger.model.d.ts.map +0 -1
- package/dist/shared/workflow-trigger.model.js +0 -49
- package/dist/shared/workflow-trigger.type.d.ts +0 -60
- package/dist/shared/workflow-trigger.type.d.ts.map +0 -1
- package/dist/shared/workflow-trigger.type.js +0 -1
- package/dist/shared/workflow.init.d.ts +0 -21
- package/dist/shared/workflow.init.d.ts.map +0 -1
- package/dist/shared/workflow.init.js +0 -42
- package/dist/shared/workflow.logger.d.ts +0 -18
- package/dist/shared/workflow.logger.d.ts.map +0 -1
- package/dist/shared/workflow.logger.js +0 -41
- package/dist/shared/workflow.middleware.d.ts +0 -108
- package/dist/shared/workflow.middleware.d.ts.map +0 -1
- package/dist/shared/workflow.middleware.js +0 -246
- package/dist/shared/workflow.plugin.d.ts +0 -46
- package/dist/shared/workflow.plugin.d.ts.map +0 -1
- package/dist/shared/workflow.plugin.js +0 -151
- package/dist/shared/workflow.service.d.ts +0 -42
- package/dist/shared/workflow.service.d.ts.map +0 -1
- package/dist/shared/workflow.service.js +0 -134
- package/dist/types/base.types.d.ts +0 -35
- package/dist/types/base.types.d.ts.map +0 -1
- package/dist/types/base.types.js +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -1
- package/dist/underwriter/index.d.ts +0 -2
- package/dist/underwriter/index.d.ts.map +0 -1
- package/dist/underwriter/index.js +0 -1
- package/dist/underwriter/underwriter.model.d.ts +0 -126
- package/dist/underwriter/underwriter.model.d.ts.map +0 -1
- package/dist/underwriter/underwriter.model.js +0 -17
- package/dist/users/auth-log.model.d.ts +0 -70
- package/dist/users/auth-log.model.d.ts.map +0 -1
- package/dist/users/auth-log.model.js +0 -24
- package/dist/users/index.d.ts +0 -7
- package/dist/users/index.d.ts.map +0 -1
- package/dist/users/index.js +0 -6
- package/dist/users/permission.model.d.ts +0 -84
- package/dist/users/permission.model.d.ts.map +0 -1
- package/dist/users/permission.model.js +0 -12
- package/dist/users/role-group.model.d.ts +0 -90
- package/dist/users/role-group.model.d.ts.map +0 -1
- package/dist/users/role-group.model.js +0 -17
- package/dist/users/role.model.d.ts +0 -90
- package/dist/users/role.model.d.ts.map +0 -1
- package/dist/users/role.model.js +0 -16
- package/dist/users/tasks.model.d.ts +0 -114
- package/dist/users/tasks.model.d.ts.map +0 -1
- package/dist/users/tasks.model.js +0 -18
- package/dist/users/user.model.d.ts +0 -222
- package/dist/users/user.model.d.ts.map +0 -1
- package/dist/users/user.model.js +0 -41
- package/dist/users/user.type.d.ts +0 -55
- package/dist/users/user.type.d.ts.map +0 -1
- package/dist/users/user.type.js +0 -1
- package/dist/value-objects/account-number.d.ts +0 -42
- package/dist/value-objects/account-number.d.ts.map +0 -1
- package/dist/value-objects/account-number.js +0 -24
- package/dist/value-objects/pound.d.ts +0 -43
- package/dist/value-objects/pound.d.ts.map +0 -1
- package/dist/value-objects/pound.js +0 -50
- package/dist/value-objects/sort-code.d.ts +0 -42
- package/dist/value-objects/sort-code.d.ts.map +0 -1
- package/dist/value-objects/sort-code.js +0 -34
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
|
|
3
|
-
import creditProfileSchema from "./application-credit-profile.model";
|
|
4
|
-
import { applyWorkflowPlugin } from "../shared/workflow.plugin";
|
|
5
|
-
const applicationSchema = new mongoose.Schema({
|
|
6
|
-
queueId: [{
|
|
7
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
8
|
-
ref: "Queue",
|
|
9
|
-
default: null,
|
|
10
|
-
}],
|
|
11
|
-
underwriterReviewDate: { type: Date, default: null },
|
|
12
|
-
assignedToUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
13
|
-
assignedToUserDate: { type: Date, default: null },
|
|
14
|
-
firstAssignedToUserDate: { type: Date, default: null },
|
|
15
|
-
slaClockStart: { type: Date, default: null },
|
|
16
|
-
slaClockStop: { type: Date, default: null },
|
|
17
|
-
affordabilityCompletedAt: { type: Date, default: null },
|
|
18
|
-
applicationId: { type: String, required: true },
|
|
19
|
-
isApplicationFeePaid: { type: String, required: true },
|
|
20
|
-
applicationNumber: { type: String, required: true },
|
|
21
|
-
applicationTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
22
|
-
bankSolicitor: { type: String, default: "" },
|
|
23
|
-
brokerId: { type: mongoose.Schema.Types.ObjectId, ref: "Broker", default: null },
|
|
24
|
-
caseManager: { type: String, default: "" },
|
|
25
|
-
caseManagerAccepted: { type: String, default: false },
|
|
26
|
-
completedReason: { type: String, default: "" },
|
|
27
|
-
isIntendToOccupy: { type: String, required: true },
|
|
28
|
-
introducer: { type: String, default: "" },
|
|
29
|
-
isIntroducerSubmission: { type: String, required: true },
|
|
30
|
-
isBrokerAssigned: { type: String, default: false },
|
|
31
|
-
isFinanceRecommendedToApplicant: { type: String, required: true },
|
|
32
|
-
isWorkflowTaskCreated: { type: String, required: true },
|
|
33
|
-
lastUpdated: { type: String },
|
|
34
|
-
lendingTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
35
|
-
networkClubName: { type: String, default: "" },
|
|
36
|
-
isNetworkClubSubmission: { type: String, required: true },
|
|
37
|
-
newReason: { type: String, default: "" },
|
|
38
|
-
purchaseTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
39
|
-
rejectedReason: { type: String, default: "" },
|
|
40
|
-
repaymentTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
41
|
-
selectedProduct: { type: String, required: false },
|
|
42
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
43
|
-
submitReason: { type: String, default: "" },
|
|
44
|
-
submittedDate: { type: String },
|
|
45
|
-
underwriter: { type: String, default: "" },
|
|
46
|
-
isValuationFeePaid: { type: String, required: true },
|
|
47
|
-
withdrawalReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
48
|
-
declineReasonLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
49
|
-
isPortfolioConfirmed: { type: Boolean, default: false },
|
|
50
|
-
productId: { type: mongoose.Schema.Types.ObjectId, ref: "Product", default: null },
|
|
51
|
-
product: { type: String },
|
|
52
|
-
securityId: { type: mongoose.Schema.Types.ObjectId, ref: "Security", default: null },
|
|
53
|
-
solicitorId: { type: mongoose.Schema.Types.ObjectId, ref: "Solicitor", default: null },
|
|
54
|
-
riskNarrativeId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationRiskNarrative", default: null },
|
|
55
|
-
riskNarrative: {
|
|
56
|
-
call1RequestedOn: { type: String, default: null },
|
|
57
|
-
call2RequestedOn: { type: String, default: null },
|
|
58
|
-
retryCount: { type: String, default: null },
|
|
59
|
-
riskRating: { type: String, default: null },
|
|
60
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
61
|
-
call2StatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null },
|
|
62
|
-
},
|
|
63
|
-
applicants: [
|
|
64
|
-
{ type: mongoose.Schema.Types.ObjectId, ref: "Applicant", default: null }
|
|
65
|
-
],
|
|
66
|
-
isActive: { type: String, default: false },
|
|
67
|
-
riskRating: { type: String },
|
|
68
|
-
directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "Application_DirectDebit", default: null },
|
|
69
|
-
creditProfile: creditProfileSchema,
|
|
70
|
-
mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage", default: null },
|
|
71
|
-
companyId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationCompany", default: null },
|
|
72
|
-
offerId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationOffer", default: null },
|
|
73
|
-
newAuditRecordsCount: { type: Number, default: 0 }, // Ensure it is a Number
|
|
74
|
-
currentApprivoAuditId: Number,
|
|
75
|
-
propertyIds: [{ type: mongoose.Schema.Types.ObjectId, ref: "Property" }],
|
|
76
|
-
valuationId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationValuation" },
|
|
77
|
-
valuationReportId: { type: mongoose.Schema.Types.ObjectId, ref: "ApplicationValuationReport" },
|
|
78
|
-
isMandateRequested: { type: Boolean, default: false },
|
|
79
|
-
isMandateApproved: { type: Boolean, default: null },
|
|
80
|
-
mandateReviewComments: { type: String, default: "" },
|
|
81
|
-
mandateRequestedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
82
|
-
mandateRequestedDate: { type: Date, default: null },
|
|
83
|
-
mandateReviewedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
84
|
-
mandateReviewedDate: { type: Date, default: null },
|
|
85
|
-
isReferred: { type: Boolean, default: false },
|
|
86
|
-
referredByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
87
|
-
referredDate: { type: Date, default: null },
|
|
88
|
-
referralClearedByUserId: { type: mongoose.Schema.Types.ObjectId, ref: "User", default: null },
|
|
89
|
-
referralClearedDate: { type: Date, default: null },
|
|
90
|
-
brokerTaskCount: {
|
|
91
|
-
type: Number,
|
|
92
|
-
default: 0
|
|
93
|
-
},
|
|
94
|
-
lenderTaskCount: {
|
|
95
|
-
type: Number,
|
|
96
|
-
default: 0
|
|
97
|
-
},
|
|
98
|
-
pendingTaskCountForUser: {
|
|
99
|
-
type: Number,
|
|
100
|
-
default: 0
|
|
101
|
-
},
|
|
102
|
-
applicationFormSignedDate: {
|
|
103
|
-
type: Date, // Stores as ISODate in MongoDB (e.g., "2023-11-15T12:30:45.123Z")
|
|
104
|
-
default: null
|
|
105
|
-
},
|
|
106
|
-
isUkResident: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false
|
|
109
|
-
},
|
|
110
|
-
creditReportId: { type: String, default: null },
|
|
111
|
-
isAlgbraEligible: { type: Boolean, default: false },
|
|
112
|
-
}, {
|
|
113
|
-
timestamps: true,
|
|
114
|
-
toJSON: { virtuals: true },
|
|
115
|
-
toObject: { virtuals: true }
|
|
116
|
-
});
|
|
117
|
-
applyAuditMiddleware(applicationSchema, "Application");
|
|
118
|
-
// Apply workflow plugin to the schema
|
|
119
|
-
applyWorkflowPlugin(applicationSchema, 'application');
|
|
120
|
-
// Virtual property 'noOfApplicants'
|
|
121
|
-
applicationSchema.virtual('noOfApplicants').get(function () {
|
|
122
|
-
return this.applicants ? this.applicants.length : 0;
|
|
123
|
-
});
|
|
124
|
-
// Virtual property 'applicationTypeName'
|
|
125
|
-
applicationSchema.virtual('applicationTypeName').get(function () {
|
|
126
|
-
return this.applicationTypeLid instanceof mongoose.Types.ObjectId
|
|
127
|
-
? null
|
|
128
|
-
: this.applicationTypeLid?.name ?? null;
|
|
129
|
-
});
|
|
130
|
-
// Virtual property 'lendingType'
|
|
131
|
-
applicationSchema.virtual('lendingType').get(function () {
|
|
132
|
-
return this.lendingTypeLid instanceof mongoose.Types.ObjectId
|
|
133
|
-
? null
|
|
134
|
-
: this.lendingTypeLid?.name ?? null;
|
|
135
|
-
});
|
|
136
|
-
// Virtual property 'purchaseType'
|
|
137
|
-
applicationSchema.virtual('purchaseType').get(function () {
|
|
138
|
-
return this.purchaseTypeLid instanceof mongoose.Types.ObjectId
|
|
139
|
-
? null
|
|
140
|
-
: this.purchaseTypeLid?.text ?? null;
|
|
141
|
-
});
|
|
142
|
-
// Virtual property 'status'
|
|
143
|
-
applicationSchema.virtual('status').get(function () {
|
|
144
|
-
return this.statusLid instanceof mongoose.Types.ObjectId ? null : this.statusLid?.name ?? null;
|
|
145
|
-
});
|
|
146
|
-
// Ensure the fields are populated when querying
|
|
147
|
-
applicationSchema.pre('find', function () {
|
|
148
|
-
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid');
|
|
149
|
-
});
|
|
150
|
-
applicationSchema.pre('findOne', function () {
|
|
151
|
-
this.populate('applicationTypeLid').populate('lendingTypeLid').populate('statusLid');
|
|
152
|
-
});
|
|
153
|
-
// Virtual property 'LTV %'
|
|
154
|
-
applicationSchema.virtual('ltv').get(function () {
|
|
155
|
-
const purchasePrice = this.mortgageId?.purchasePrice;
|
|
156
|
-
const loanRequired = this.mortgageId?.loanRequired;
|
|
157
|
-
if (purchasePrice && loanRequired) {
|
|
158
|
-
const parseCurrency = (value) => {
|
|
159
|
-
if (typeof value === 'string') {
|
|
160
|
-
return parseFloat(value.replace(/[^0-9.-]+/g, ""));
|
|
161
|
-
}
|
|
162
|
-
return value;
|
|
163
|
-
};
|
|
164
|
-
const parsedPurchasePrice = parseCurrency(purchasePrice);
|
|
165
|
-
const parsedLoanRequired = parseCurrency(loanRequired);
|
|
166
|
-
const ltv = (parsedLoanRequired / parsedPurchasePrice) * 100;
|
|
167
|
-
return ltv.toFixed(2) + "%";
|
|
168
|
-
}
|
|
169
|
-
return null;
|
|
170
|
-
});
|
|
171
|
-
applicationSchema.virtual('submittedDateFormatted').get(function () {
|
|
172
|
-
if (!this.submittedDate)
|
|
173
|
-
return null;
|
|
174
|
-
const date = new Date(this.submittedDate);
|
|
175
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
176
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
177
|
-
const year = date.getFullYear();
|
|
178
|
-
return `${day}-${month}-${year}`;
|
|
179
|
-
});
|
|
180
|
-
// Virtual property for broker name
|
|
181
|
-
applicationSchema.virtual('brokerName').get(function () {
|
|
182
|
-
if (this.brokerId && typeof this.brokerId === 'object' && this.brokerId.firstName && this.brokerId.lastName) {
|
|
183
|
-
return this.brokerId.firstName + " " + this.brokerId.lastName;
|
|
184
|
-
}
|
|
185
|
-
return null;
|
|
186
|
-
});
|
|
187
|
-
applicationSchema.virtual('brokerEmail').get(function () {
|
|
188
|
-
return this.brokerId && typeof this.brokerId === 'object' ? this.brokerId.email : null;
|
|
189
|
-
});
|
|
190
|
-
applicationSchema.virtual('solicitorName').get(function () {
|
|
191
|
-
return this.solicitorId && typeof this.solicitorId === 'object' ? this.solicitorId.nameOfAccountHolder : null;
|
|
192
|
-
});
|
|
193
|
-
applicationSchema.virtual('solicitorEmail').get(function () {
|
|
194
|
-
return this.solicitorId && typeof this.solicitorId === 'object' ? this.solicitorId.email : null;
|
|
195
|
-
});
|
|
196
|
-
applicationSchema.virtual('brokerPhone').get(function () {
|
|
197
|
-
return this.brokerId && typeof this.brokerId === 'object' ? this.brokerId.mobileTelephone : null;
|
|
198
|
-
});
|
|
199
|
-
applicationSchema.virtual('solicitorPhone').get(function () {
|
|
200
|
-
return this.solicitorId && typeof this.solicitorId === 'object' ? this.solicitorId.telephone : null;
|
|
201
|
-
});
|
|
202
|
-
// Virtual property 'pendingDays'
|
|
203
|
-
applicationSchema.virtual('pendingDays').get(function () {
|
|
204
|
-
if (!this.applicationFormSignedDate)
|
|
205
|
-
return null;
|
|
206
|
-
// Get current date at midnight (ignoring time)
|
|
207
|
-
const now = new Date();
|
|
208
|
-
const todayMidnight = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
209
|
-
// Get signed date at midnight (ignoring time)
|
|
210
|
-
const signedDate = new Date(this.applicationFormSignedDate);
|
|
211
|
-
const signedMidnight = new Date(signedDate.getFullYear(), signedDate.getMonth(), signedDate.getDate());
|
|
212
|
-
// Calculate difference in just date
|
|
213
|
-
const diffTime = todayMidnight.getTime() - signedMidnight.getTime();
|
|
214
|
-
// Convert to days
|
|
215
|
-
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
|
216
|
-
return diffDays;
|
|
217
|
-
});
|
|
218
|
-
// Virtual property 'taskCompletionPercent'
|
|
219
|
-
applicationSchema.virtual('taskCompletionPercent').get(function () {
|
|
220
|
-
const broker = typeof this.brokerTaskCount === 'number' ? this.brokerTaskCount : 0;
|
|
221
|
-
const lender = typeof this.lenderTaskCount === 'number' ? this.lenderTaskCount : 0;
|
|
222
|
-
const total = broker + lender;
|
|
223
|
-
// If both broker and lender are 0, return 100.00
|
|
224
|
-
if (broker === 0 && lender === 0)
|
|
225
|
-
return 100.00;
|
|
226
|
-
// If broker is 0 and lender is not, return 100.00
|
|
227
|
-
if (broker === 0 && lender > 0)
|
|
228
|
-
return 100.00;
|
|
229
|
-
// If lender is 0 and broker is not, return 0.00
|
|
230
|
-
if (lender === 0 && broker > 0)
|
|
231
|
-
return 0.00;
|
|
232
|
-
// Calculate (lender/total)*100
|
|
233
|
-
return Number(((lender / total) * 100).toFixed(2));
|
|
234
|
-
});
|
|
235
|
-
// Database indexes for performance optimization
|
|
236
|
-
// Single field indexes
|
|
237
|
-
applicationSchema.index({ applicationId: 1 });
|
|
238
|
-
applicationSchema.index({ assignedToUserId: 1 });
|
|
239
|
-
applicationSchema.index({ brokerId: 1 });
|
|
240
|
-
applicationSchema.index({ applicants: 1 }); // For array membership queries
|
|
241
|
-
// Compound indexes for common query combinations
|
|
242
|
-
applicationSchema.index({ applicants: 1, _id: 1 }); // For finding application by applicant
|
|
243
|
-
applicationSchema.index({ assignedToUserId: 1, statusLid: 1 }); // For filtering by assignee and status
|
|
244
|
-
// Text index for search functionality
|
|
245
|
-
applicationSchema.index({ applicationNumber: "text" });
|
|
246
|
-
const ApplicationModel = mongoose.model("Application", applicationSchema);
|
|
247
|
-
export default ApplicationModel;
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
/// <reference path="../value-objects/pound.d.ts" />
|
|
2
|
-
/// <reference path="../value-objects/account-number.d.ts" />
|
|
3
|
-
/// <reference path="../value-objects/sort-code.d.ts" />
|
|
4
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
5
|
-
/// <reference types="mongoose/types/callback" />
|
|
6
|
-
/// <reference types="mongoose/types/collection" />
|
|
7
|
-
/// <reference types="mongoose/types/connection" />
|
|
8
|
-
/// <reference types="mongoose/types/cursor" />
|
|
9
|
-
/// <reference types="mongoose/types/document" />
|
|
10
|
-
/// <reference types="mongoose/types/error" />
|
|
11
|
-
/// <reference types="mongoose/types/expressions" />
|
|
12
|
-
/// <reference types="mongoose/types/helpers" />
|
|
13
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
14
|
-
/// <reference types="mongoose/types/indexes" />
|
|
15
|
-
/// <reference types="mongoose/types/models" />
|
|
16
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
17
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
18
|
-
/// <reference types="mongoose/types/populate" />
|
|
19
|
-
/// <reference types="mongoose/types/query" />
|
|
20
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
21
|
-
/// <reference types="mongoose/types/session" />
|
|
22
|
-
/// <reference types="mongoose/types/types" />
|
|
23
|
-
/// <reference types="mongoose/types/utility" />
|
|
24
|
-
/// <reference types="mongoose/types/validation" />
|
|
25
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
26
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
27
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
28
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
29
|
-
import mongoose from "mongoose";
|
|
30
|
-
declare const ApplicationsTaskModel: mongoose.Model<{
|
|
31
|
-
createdAt: NativeDate;
|
|
32
|
-
updatedAt: NativeDate;
|
|
33
|
-
} & {
|
|
34
|
-
applicationId: mongoose.Types.ObjectId;
|
|
35
|
-
createdOn: string;
|
|
36
|
-
additionalData: {
|
|
37
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
38
|
-
concernComments: string;
|
|
39
|
-
resolvedComments: string;
|
|
40
|
-
rejectionReason: string;
|
|
41
|
-
rejectionDate: string;
|
|
42
|
-
responderRemarks: string;
|
|
43
|
-
requesterAttachmentId: string;
|
|
44
|
-
responderAttachmentId: string;
|
|
45
|
-
requesterFileName: string;
|
|
46
|
-
responderFileName: string;
|
|
47
|
-
respondedDate: string;
|
|
48
|
-
description?: string | null | undefined;
|
|
49
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
50
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
51
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
52
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
53
|
-
acceptedDate?: string | null | undefined;
|
|
54
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
55
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
56
|
-
};
|
|
57
|
-
statusDate: string;
|
|
58
|
-
statusReason: string;
|
|
59
|
-
comments: mongoose.Types.DocumentArray<{
|
|
60
|
-
createdAt: NativeDate;
|
|
61
|
-
message: string;
|
|
62
|
-
createdBy: mongoose.Types.ObjectId;
|
|
63
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
64
|
-
createdAt: NativeDate;
|
|
65
|
-
message: string;
|
|
66
|
-
createdBy: mongoose.Types.ObjectId;
|
|
67
|
-
}> & {
|
|
68
|
-
createdAt: NativeDate;
|
|
69
|
-
message: string;
|
|
70
|
-
createdBy: mongoose.Types.ObjectId;
|
|
71
|
-
}>;
|
|
72
|
-
status?: number | null | undefined;
|
|
73
|
-
checkflowId?: string | null | undefined;
|
|
74
|
-
instanceId?: string | null | undefined;
|
|
75
|
-
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
76
|
-
createdAt: NativeDate;
|
|
77
|
-
updatedAt: NativeDate;
|
|
78
|
-
} & {
|
|
79
|
-
applicationId: mongoose.Types.ObjectId;
|
|
80
|
-
createdOn: string;
|
|
81
|
-
additionalData: {
|
|
82
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
83
|
-
concernComments: string;
|
|
84
|
-
resolvedComments: string;
|
|
85
|
-
rejectionReason: string;
|
|
86
|
-
rejectionDate: string;
|
|
87
|
-
responderRemarks: string;
|
|
88
|
-
requesterAttachmentId: string;
|
|
89
|
-
responderAttachmentId: string;
|
|
90
|
-
requesterFileName: string;
|
|
91
|
-
responderFileName: string;
|
|
92
|
-
respondedDate: string;
|
|
93
|
-
description?: string | null | undefined;
|
|
94
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
95
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
96
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
97
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
98
|
-
acceptedDate?: string | null | undefined;
|
|
99
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
100
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
101
|
-
};
|
|
102
|
-
statusDate: string;
|
|
103
|
-
statusReason: string;
|
|
104
|
-
comments: mongoose.Types.DocumentArray<{
|
|
105
|
-
createdAt: NativeDate;
|
|
106
|
-
message: string;
|
|
107
|
-
createdBy: mongoose.Types.ObjectId;
|
|
108
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
109
|
-
createdAt: NativeDate;
|
|
110
|
-
message: string;
|
|
111
|
-
createdBy: mongoose.Types.ObjectId;
|
|
112
|
-
}> & {
|
|
113
|
-
createdAt: NativeDate;
|
|
114
|
-
message: string;
|
|
115
|
-
createdBy: mongoose.Types.ObjectId;
|
|
116
|
-
}>;
|
|
117
|
-
status?: number | null | undefined;
|
|
118
|
-
checkflowId?: string | null | undefined;
|
|
119
|
-
instanceId?: string | null | undefined;
|
|
120
|
-
}, {}> & {
|
|
121
|
-
createdAt: NativeDate;
|
|
122
|
-
updatedAt: NativeDate;
|
|
123
|
-
} & {
|
|
124
|
-
applicationId: mongoose.Types.ObjectId;
|
|
125
|
-
createdOn: string;
|
|
126
|
-
additionalData: {
|
|
127
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
128
|
-
concernComments: string;
|
|
129
|
-
resolvedComments: string;
|
|
130
|
-
rejectionReason: string;
|
|
131
|
-
rejectionDate: string;
|
|
132
|
-
responderRemarks: string;
|
|
133
|
-
requesterAttachmentId: string;
|
|
134
|
-
responderAttachmentId: string;
|
|
135
|
-
requesterFileName: string;
|
|
136
|
-
responderFileName: string;
|
|
137
|
-
respondedDate: string;
|
|
138
|
-
description?: string | null | undefined;
|
|
139
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
140
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
141
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
142
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
143
|
-
acceptedDate?: string | null | undefined;
|
|
144
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
145
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
146
|
-
};
|
|
147
|
-
statusDate: string;
|
|
148
|
-
statusReason: string;
|
|
149
|
-
comments: mongoose.Types.DocumentArray<{
|
|
150
|
-
createdAt: NativeDate;
|
|
151
|
-
message: string;
|
|
152
|
-
createdBy: mongoose.Types.ObjectId;
|
|
153
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
154
|
-
createdAt: NativeDate;
|
|
155
|
-
message: string;
|
|
156
|
-
createdBy: mongoose.Types.ObjectId;
|
|
157
|
-
}> & {
|
|
158
|
-
createdAt: NativeDate;
|
|
159
|
-
message: string;
|
|
160
|
-
createdBy: mongoose.Types.ObjectId;
|
|
161
|
-
}>;
|
|
162
|
-
status?: number | null | undefined;
|
|
163
|
-
checkflowId?: string | null | undefined;
|
|
164
|
-
instanceId?: string | null | undefined;
|
|
165
|
-
} & {
|
|
166
|
-
_id: mongoose.Types.ObjectId;
|
|
167
|
-
} & {
|
|
168
|
-
__v: number;
|
|
169
|
-
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
170
|
-
timestamps: true;
|
|
171
|
-
}, {
|
|
172
|
-
createdAt: NativeDate;
|
|
173
|
-
updatedAt: NativeDate;
|
|
174
|
-
} & {
|
|
175
|
-
applicationId: mongoose.Types.ObjectId;
|
|
176
|
-
createdOn: string;
|
|
177
|
-
additionalData: {
|
|
178
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
179
|
-
concernComments: string;
|
|
180
|
-
resolvedComments: string;
|
|
181
|
-
rejectionReason: string;
|
|
182
|
-
rejectionDate: string;
|
|
183
|
-
responderRemarks: string;
|
|
184
|
-
requesterAttachmentId: string;
|
|
185
|
-
responderAttachmentId: string;
|
|
186
|
-
requesterFileName: string;
|
|
187
|
-
responderFileName: string;
|
|
188
|
-
respondedDate: string;
|
|
189
|
-
description?: string | null | undefined;
|
|
190
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
191
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
192
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
193
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
194
|
-
acceptedDate?: string | null | undefined;
|
|
195
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
196
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
197
|
-
};
|
|
198
|
-
statusDate: string;
|
|
199
|
-
statusReason: string;
|
|
200
|
-
comments: mongoose.Types.DocumentArray<{
|
|
201
|
-
createdAt: NativeDate;
|
|
202
|
-
message: string;
|
|
203
|
-
createdBy: mongoose.Types.ObjectId;
|
|
204
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
205
|
-
createdAt: NativeDate;
|
|
206
|
-
message: string;
|
|
207
|
-
createdBy: mongoose.Types.ObjectId;
|
|
208
|
-
}> & {
|
|
209
|
-
createdAt: NativeDate;
|
|
210
|
-
message: string;
|
|
211
|
-
createdBy: mongoose.Types.ObjectId;
|
|
212
|
-
}>;
|
|
213
|
-
status?: number | null | undefined;
|
|
214
|
-
checkflowId?: string | null | undefined;
|
|
215
|
-
instanceId?: string | null | undefined;
|
|
216
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
217
|
-
createdAt: NativeDate;
|
|
218
|
-
updatedAt: NativeDate;
|
|
219
|
-
} & {
|
|
220
|
-
applicationId: mongoose.Types.ObjectId;
|
|
221
|
-
createdOn: string;
|
|
222
|
-
additionalData: {
|
|
223
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
224
|
-
concernComments: string;
|
|
225
|
-
resolvedComments: string;
|
|
226
|
-
rejectionReason: string;
|
|
227
|
-
rejectionDate: string;
|
|
228
|
-
responderRemarks: string;
|
|
229
|
-
requesterAttachmentId: string;
|
|
230
|
-
responderAttachmentId: string;
|
|
231
|
-
requesterFileName: string;
|
|
232
|
-
responderFileName: string;
|
|
233
|
-
respondedDate: string;
|
|
234
|
-
description?: string | null | undefined;
|
|
235
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
236
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
237
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
238
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
239
|
-
acceptedDate?: string | null | undefined;
|
|
240
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
241
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
242
|
-
};
|
|
243
|
-
statusDate: string;
|
|
244
|
-
statusReason: string;
|
|
245
|
-
comments: mongoose.Types.DocumentArray<{
|
|
246
|
-
createdAt: NativeDate;
|
|
247
|
-
message: string;
|
|
248
|
-
createdBy: mongoose.Types.ObjectId;
|
|
249
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
250
|
-
createdAt: NativeDate;
|
|
251
|
-
message: string;
|
|
252
|
-
createdBy: mongoose.Types.ObjectId;
|
|
253
|
-
}> & {
|
|
254
|
-
createdAt: NativeDate;
|
|
255
|
-
message: string;
|
|
256
|
-
createdBy: mongoose.Types.ObjectId;
|
|
257
|
-
}>;
|
|
258
|
-
status?: number | null | undefined;
|
|
259
|
-
checkflowId?: string | null | undefined;
|
|
260
|
-
instanceId?: string | null | undefined;
|
|
261
|
-
}>, {}> & mongoose.FlatRecord<{
|
|
262
|
-
createdAt: NativeDate;
|
|
263
|
-
updatedAt: NativeDate;
|
|
264
|
-
} & {
|
|
265
|
-
applicationId: mongoose.Types.ObjectId;
|
|
266
|
-
createdOn: string;
|
|
267
|
-
additionalData: {
|
|
268
|
-
concernTypeLid: mongoose.Types.ObjectId;
|
|
269
|
-
concernComments: string;
|
|
270
|
-
resolvedComments: string;
|
|
271
|
-
rejectionReason: string;
|
|
272
|
-
rejectionDate: string;
|
|
273
|
-
responderRemarks: string;
|
|
274
|
-
requesterAttachmentId: string;
|
|
275
|
-
responderAttachmentId: string;
|
|
276
|
-
requesterFileName: string;
|
|
277
|
-
responderFileName: string;
|
|
278
|
-
respondedDate: string;
|
|
279
|
-
description?: string | null | undefined;
|
|
280
|
-
statusLid?: mongoose.Types.ObjectId | null | undefined;
|
|
281
|
-
requesterId?: mongoose.Types.ObjectId | null | undefined;
|
|
282
|
-
responderId?: mongoose.Types.ObjectId | null | undefined;
|
|
283
|
-
taskType?: "internal" | "broker" | null | undefined;
|
|
284
|
-
acceptedDate?: string | null | undefined;
|
|
285
|
-
acceptedById?: mongoose.Types.ObjectId | null | undefined;
|
|
286
|
-
rejectedById?: mongoose.Types.ObjectId | null | undefined;
|
|
287
|
-
};
|
|
288
|
-
statusDate: string;
|
|
289
|
-
statusReason: string;
|
|
290
|
-
comments: mongoose.Types.DocumentArray<{
|
|
291
|
-
createdAt: NativeDate;
|
|
292
|
-
message: string;
|
|
293
|
-
createdBy: mongoose.Types.ObjectId;
|
|
294
|
-
}, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
|
|
295
|
-
createdAt: NativeDate;
|
|
296
|
-
message: string;
|
|
297
|
-
createdBy: mongoose.Types.ObjectId;
|
|
298
|
-
}> & {
|
|
299
|
-
createdAt: NativeDate;
|
|
300
|
-
message: string;
|
|
301
|
-
createdBy: mongoose.Types.ObjectId;
|
|
302
|
-
}>;
|
|
303
|
-
status?: number | null | undefined;
|
|
304
|
-
checkflowId?: string | null | undefined;
|
|
305
|
-
instanceId?: string | null | undefined;
|
|
306
|
-
}> & {
|
|
307
|
-
_id: mongoose.Types.ObjectId;
|
|
308
|
-
} & {
|
|
309
|
-
__v: number;
|
|
310
|
-
}>>;
|
|
311
|
-
export default ApplicationsTaskModel;
|
|
312
|
-
//# sourceMappingURL=applications-task.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applications-task.model.d.ts","sourceRoot":"","sources":["../../applications/applications-task.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAiEhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
|
|
2
|
-
import { applyWorkflowPlugin } from "../shared/workflow.plugin";
|
|
3
|
-
import mongoose from "mongoose";
|
|
4
|
-
// Additional Data schema for the nested object
|
|
5
|
-
const additionalDataSchema = new mongoose.Schema({
|
|
6
|
-
requesterId: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
7
|
-
responderId: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
8
|
-
statusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: false },
|
|
9
|
-
concernTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
10
|
-
description: { type: String },
|
|
11
|
-
concernComments: { type: String, required: true },
|
|
12
|
-
resolvedComments: { type: String, default: "" },
|
|
13
|
-
taskType: {
|
|
14
|
-
type: String,
|
|
15
|
-
enum: ["internal", "broker"], // allowed values
|
|
16
|
-
required: false
|
|
17
|
-
},
|
|
18
|
-
acceptedDate: { type: String },
|
|
19
|
-
acceptedById: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
20
|
-
rejectedById: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: false },
|
|
21
|
-
rejectionReason: { type: String, default: null },
|
|
22
|
-
rejectionDate: { type: String, default: null },
|
|
23
|
-
responderRemarks: { type: String, default: "" },
|
|
24
|
-
requesterAttachmentId: { type: String, default: null },
|
|
25
|
-
responderAttachmentId: { type: String, default: null },
|
|
26
|
-
requesterFileName: { type: String, default: null },
|
|
27
|
-
responderFileName: { type: String, default: null },
|
|
28
|
-
respondedDate: { type: String, default: null }
|
|
29
|
-
}, { _id: false });
|
|
30
|
-
const applicationsTaskSchema = new mongoose.Schema({
|
|
31
|
-
checkflowId: { type: String, required: false },
|
|
32
|
-
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
|
|
33
|
-
instanceId: { type: String, required: false },
|
|
34
|
-
status: { type: Number, required: false, default: 2 }, // 2 = pending
|
|
35
|
-
statusReason: { type: String, default: "" },
|
|
36
|
-
statusDate: { type: String, default: null },
|
|
37
|
-
additionalData: { type: additionalDataSchema, required: true },
|
|
38
|
-
comments: [{
|
|
39
|
-
createdBy: { type: mongoose.Schema.Types.ObjectId, ref: "User", required: true },
|
|
40
|
-
createdAt: { type: Date, default: Date.now },
|
|
41
|
-
message: { type: String, default: "", maxlength: 2000 }
|
|
42
|
-
}],
|
|
43
|
-
createdOn: { type: String, required: true, default: () => new Date().toISOString() }
|
|
44
|
-
}, { timestamps: true });
|
|
45
|
-
applyAuditMiddleware(applicationsTaskSchema, "ApplicationsTask");
|
|
46
|
-
// Apply workflow plugin to the schema
|
|
47
|
-
applyWorkflowPlugin(applicationsTaskSchema, 'applicationstask');
|
|
48
|
-
// Indexes for query optimization
|
|
49
|
-
applicationsTaskSchema.index({ applicationId: 1, instanceId: 1 }); // Compound index for findByApplicationIdAndInstanceId queries
|
|
50
|
-
applicationsTaskSchema.index({ applicationId: 1, createdOn: -1 }); // Compound index for findAll with sort by createdOn descending
|
|
51
|
-
// Unique index to prevent duplicate tasks created by concurrent syncs (background job + frontend-triggered sync).
|
|
52
|
-
// partialFilterExpression excludes internal system tasks (instanceId = "") so they are not affected by this constraint.
|
|
53
|
-
applicationsTaskSchema.index({ instanceId: 1, checkflowId: 1 }, {
|
|
54
|
-
unique: true,
|
|
55
|
-
partialFilterExpression: { instanceId: { $exists: true, $ne: "" } }
|
|
56
|
-
});
|
|
57
|
-
const ApplicationsTaskModel = mongoose.model("ApplicationsTask", applicationsTaskSchema);
|
|
58
|
-
export default ApplicationsTaskModel;
|