@dynamatix/gb-schemas 2.3.237 → 2.3.238

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/README.md +309 -0
  2. package/dist/applicants/applicant-additional-income.model.d.ts +13 -12
  3. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
  4. package/dist/applicants/applicant-additional-income.model.js +3 -0
  5. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +19 -18
  6. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
  7. package/dist/applicants/applicant-commitment-creditCard.model.js +3 -0
  8. package/dist/applicants/applicant-commitment-loan.model.d.ts +19 -18
  9. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
  10. package/dist/applicants/applicant-commitment-loan.model.js +3 -0
  11. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +19 -18
  12. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
  13. package/dist/applicants/applicant-commitment-mortgage.model.js +3 -0
  14. package/dist/applicants/applicant-commitment-residence.model.d.ts +31 -30
  15. package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
  16. package/dist/applicants/applicant-commitment-residence.model.js +3 -0
  17. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +19 -18
  18. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
  19. package/dist/applicants/applicant-commitment-secureLoan.model.js +3 -0
  20. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +19 -18
  21. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
  22. package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +3 -0
  23. package/dist/applicants/applicant-credit-data.model.d.ts +3 -3
  24. package/dist/applicants/applicant-credit-report.model.d.ts +3754 -0
  25. package/dist/applicants/{applicant-income.model.d.ts.map → applicant-credit-report.model.d.ts.map} +1 -1
  26. package/dist/applicants/applicant-credit-report.model.js +116 -0
  27. package/dist/applicants/applicant-credit-report.type.d.ts +140 -0
  28. package/dist/applicants/applicant-credit-report.type.d.ts.map +1 -0
  29. package/dist/applicants/applicant-credit-report.type.js +1 -0
  30. package/dist/applicants/applicant-employment-income.model.d.ts +7 -6
  31. package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -1
  32. package/dist/applicants/applicant-employment-income.model.js +3 -0
  33. package/dist/applicants/applicant-employment.model.d.ts +88 -87
  34. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  35. package/dist/applicants/applicant-employment.model.js +19 -19
  36. package/dist/applicants/applicant-expenditure.model.d.ts +7 -0
  37. package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
  38. package/dist/applicants/applicant-expenditure.model.js +77 -0
  39. package/dist/applicants/applicant-expenditure.type.d.ts +42 -0
  40. package/dist/applicants/applicant-expenditure.type.d.ts.map +1 -0
  41. package/dist/applicants/applicant-expenditure.type.js +1 -0
  42. package/dist/applicants/applicant-income-settings.model.d.ts.map +1 -1
  43. package/dist/applicants/applicant-income-settings.model.js +3 -0
  44. package/dist/applicants/applicant-income-settings.type.d.ts +40 -0
  45. package/dist/applicants/applicant-income-settings.type.d.ts.map +1 -0
  46. package/dist/applicants/applicant-income-settings.type.js +1 -0
  47. package/dist/applicants/applicant-income-summary.model.d.ts +73 -72
  48. package/dist/applicants/applicant-income-summary.model.d.ts.map +1 -1
  49. package/dist/applicants/applicant-income-summary.model.js +3 -0
  50. package/dist/applicants/applicant-income-summary.type.d.ts +60 -0
  51. package/dist/applicants/applicant-income-summary.type.d.ts.map +1 -0
  52. package/dist/applicants/applicant-income-summary.type.js +1 -0
  53. package/dist/applicants/applicant-pension-income.model.d.ts +19 -18
  54. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
  55. package/dist/applicants/applicant-pension-income.model.js +3 -0
  56. package/dist/applicants/applicant-pension-income.type.d.ts +40 -0
  57. package/dist/applicants/applicant-pension-income.type.d.ts.map +1 -0
  58. package/dist/applicants/applicant-pension-income.type.js +1 -0
  59. package/dist/applicants/applicant-property-income.model.d.ts +37 -36
  60. package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
  61. package/dist/applicants/applicant-property-income.model.js +3 -0
  62. package/dist/applicants/applicant-self-employed-income.model.d.ts +7 -6
  63. package/dist/applicants/applicant-self-employed-income.model.d.ts.map +1 -1
  64. package/dist/applicants/applicant-self-employed-income.model.js +3 -0
  65. package/dist/applicants/applicant-self-employed-income.type.d.ts +37 -0
  66. package/dist/applicants/applicant-self-employed-income.type.d.ts.map +1 -0
  67. package/dist/applicants/applicant-self-employed-income.type.js +1 -0
  68. package/dist/applicants/applicant-self-employment.model.d.ts +6 -6
  69. package/dist/applicants/applicant-self-employment.model.d.ts.map +1 -1
  70. package/dist/applicants/applicant-self-employment.model.js +4 -1
  71. package/dist/applicants/applicant-sole-trader-income.model.d.ts +7 -6
  72. package/dist/applicants/applicant-sole-trader-income.model.d.ts.map +1 -1
  73. package/dist/applicants/applicant-sole-trader-income.model.js +3 -0
  74. package/dist/applicants/applicant-sole-trader-income.type.d.ts +37 -0
  75. package/dist/applicants/applicant-sole-trader-income.type.d.ts.map +1 -0
  76. package/dist/applicants/applicant-sole-trader-income.type.js +1 -0
  77. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +19 -18
  78. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
  79. package/dist/applicants/applicant-uk-tax-credits.model.js +3 -0
  80. package/dist/applicants/applicant-uk-tax-credits.type.d.ts +39 -0
  81. package/dist/applicants/applicant-uk-tax-credits.type.d.ts.map +1 -0
  82. package/dist/applicants/applicant-uk-tax-credits.type.js +1 -0
  83. package/dist/applicants/applicant-welcome-call.model.d.ts +288 -0
  84. package/dist/applicants/applicant-welcome-call.model.d.ts.map +1 -0
  85. package/dist/applicants/applicant-welcome-call.model.js +263 -0
  86. package/dist/applicants/applicant-welcome-call.type.d.ts +66 -0
  87. package/dist/applicants/applicant-welcome-call.type.d.ts.map +1 -0
  88. package/dist/applicants/applicant-welcome-call.type.js +1 -0
  89. package/dist/applicants/applicant.model.d.ts +49 -42
  90. package/dist/applicants/applicant.model.d.ts.map +1 -1
  91. package/dist/applicants/applicant.model.js +5 -1
  92. package/dist/applicants/applicant.type.d.ts +158 -0
  93. package/dist/applicants/applicant.type.d.ts.map +1 -0
  94. package/dist/applicants/applicant.type.js +1 -0
  95. package/dist/applicants/index.d.ts +14 -0
  96. package/dist/applicants/index.d.ts.map +1 -1
  97. package/dist/applicants/index.js +2 -0
  98. package/dist/applications/application-audit.model.d.ts +6 -6
  99. package/dist/applications/application-audit.model.d.ts.map +1 -1
  100. package/dist/applications/application-audit.model.js +3 -0
  101. package/dist/applications/application-checklist-Item.model.d.ts +6 -0
  102. package/dist/applications/application-checklist-Item.model.d.ts.map +1 -1
  103. package/dist/applications/application-checklist-Item.model.js +4 -0
  104. package/dist/applications/application-company-model.d.ts +64 -57
  105. package/dist/applications/application-company-model.d.ts.map +1 -1
  106. package/dist/applications/application-company-model.js +1 -0
  107. package/dist/applications/application-direct-debit.model.d.ts +29 -27
  108. package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
  109. package/dist/applications/application-direct-debit.model.js +3 -0
  110. package/dist/applications/application-euc.model.d.ts.map +1 -1
  111. package/dist/applications/application-euc.model.js +3 -0
  112. package/dist/applications/application-fieldconfig.model.d.ts.map +1 -1
  113. package/dist/applications/application-fieldconfig.model.js +3 -0
  114. package/dist/applications/application-legal.model.d.ts.map +1 -1
  115. package/dist/applications/application-legal.model.js +3 -0
  116. package/dist/applications/application-mortgage.model.d.ts +1 -0
  117. package/dist/applications/application-mortgage.model.d.ts.map +1 -1
  118. package/dist/applications/application-mortgage.model.js +3 -0
  119. package/dist/applications/application-mortgage.type.d.ts +76 -0
  120. package/dist/applications/application-mortgage.type.d.ts.map +1 -0
  121. package/dist/applications/application-mortgage.type.js +1 -0
  122. package/dist/applications/application-note.model.d.ts +36 -24
  123. package/dist/applications/application-note.model.d.ts.map +1 -1
  124. package/dist/applications/application-note.model.js +12 -3
  125. package/dist/applications/application-note.type.d.ts +55 -0
  126. package/dist/applications/application-note.type.d.ts.map +1 -0
  127. package/dist/applications/application-note.type.js +1 -0
  128. package/dist/applications/application-offer.model.d.ts.map +1 -1
  129. package/dist/applications/application-offer.model.js +3 -0
  130. package/dist/applications/application-onboarding.model.d.ts.map +1 -1
  131. package/dist/applications/application-onboarding.model.js +3 -0
  132. package/dist/applications/application-product.model.d.ts +77 -13
  133. package/dist/applications/application-product.model.d.ts.map +1 -1
  134. package/dist/applications/application-product.model.js +16 -3
  135. package/dist/applications/application-product.type.d.ts +58 -0
  136. package/dist/applications/application-product.type.d.ts.map +1 -0
  137. package/dist/applications/application-product.type.js +1 -0
  138. package/dist/applications/application-productfeatures.model.d.ts +12 -6
  139. package/dist/applications/application-productfeatures.model.d.ts.map +1 -1
  140. package/dist/applications/application-productfeatures.model.js +5 -1
  141. package/dist/applications/application-productfeatures.type.d.ts +125 -0
  142. package/dist/applications/application-productfeatures.type.d.ts.map +1 -0
  143. package/dist/applications/application-productfeatures.type.js +1 -0
  144. package/dist/applications/application-rationale.model.d.ts +6 -12
  145. package/dist/applications/application-rationale.model.d.ts.map +1 -1
  146. package/dist/applications/application-rationale.model.js +11 -20
  147. package/dist/applications/application-rationale.type.d.ts +7 -7
  148. package/dist/applications/application-rationale.type.d.ts.map +1 -1
  149. package/dist/applications/application-risk-narrative.model.d.ts.map +1 -1
  150. package/dist/applications/application-risk-narrative.model.js +3 -0
  151. package/dist/applications/application-valuation-report.model.d.ts +1246 -0
  152. package/dist/applications/application-valuation-report.model.d.ts.map +1 -0
  153. package/dist/applications/application-valuation-report.model.js +269 -0
  154. package/dist/applications/application-valuation-report.type.d.ts +108 -0
  155. package/dist/applications/application-valuation-report.type.d.ts.map +1 -0
  156. package/dist/applications/application-valuation-report.type.js +1 -0
  157. package/dist/applications/application-valuation.model.d.ts +695 -18
  158. package/dist/applications/application-valuation.model.d.ts.map +1 -1
  159. package/dist/applications/application-valuation.model.js +33 -7
  160. package/dist/applications/application-valuation.type.d.ts +54 -0
  161. package/dist/applications/application-valuation.type.d.ts.map +1 -0
  162. package/dist/applications/application-valuation.type.js +1 -0
  163. package/dist/applications/application.model.d.ts +36 -30
  164. package/dist/applications/application.model.d.ts.map +1 -1
  165. package/dist/applications/application.model.js +17 -4
  166. package/dist/applications/applications-task.model.d.ts +171 -67
  167. package/dist/applications/applications-task.model.d.ts.map +1 -1
  168. package/dist/applications/applications-task.model.js +36 -45
  169. package/dist/applications/applications-task.type.d.ts +57 -0
  170. package/dist/applications/applications-task.type.d.ts.map +1 -0
  171. package/dist/applications/applications-task.type.js +1 -0
  172. package/dist/applications/broker.model.d.ts.map +1 -1
  173. package/dist/applications/broker.model.js +3 -0
  174. package/dist/applications/index.d.ts +10 -3
  175. package/dist/applications/index.d.ts.map +1 -1
  176. package/dist/applications/index.js +2 -3
  177. package/dist/applications/solicitor.model.d.ts +2 -0
  178. package/dist/applications/solicitor.model.d.ts.map +1 -1
  179. package/dist/applications/solicitor.model.js +3 -0
  180. package/dist/index.d.ts +1 -0
  181. package/dist/index.d.ts.map +1 -1
  182. package/dist/index.js +2 -0
  183. package/dist/product-catalogues/index.d.ts +3 -0
  184. package/dist/product-catalogues/index.d.ts.map +1 -1
  185. package/dist/product-catalogues/product-catalogue.type.d.ts +15 -0
  186. package/dist/product-catalogues/product-catalogue.type.d.ts.map +1 -0
  187. package/dist/product-catalogues/product-catalogue.type.js +1 -0
  188. package/dist/product-catalogues/product-definitions.type.d.ts +53 -0
  189. package/dist/product-catalogues/product-definitions.type.d.ts.map +1 -0
  190. package/dist/product-catalogues/product-definitions.type.js +1 -0
  191. package/dist/product-catalogues/product-variant.type.d.ts +38 -0
  192. package/dist/product-catalogues/product-variant.type.d.ts.map +1 -0
  193. package/dist/product-catalogues/product-variant.type.js +1 -0
  194. package/dist/properties/property.model.d.ts +52 -51
  195. package/dist/properties/property.model.d.ts.map +1 -1
  196. package/dist/properties/property.model.js +1 -2
  197. package/dist/properties/security.model.d.ts +6 -0
  198. package/dist/properties/security.model.d.ts.map +1 -1
  199. package/dist/properties/security.model.js +1 -0
  200. package/dist/shared/alert.model.d.ts +12 -12
  201. package/dist/shared/api-log.model.d.ts +118 -0
  202. package/dist/shared/api-log.model.d.ts.map +1 -0
  203. package/dist/shared/api-log.model.js +21 -0
  204. package/dist/shared/apprivo-sync-journey.model.d.ts +6 -6
  205. package/dist/shared/checklist.model.d.ts +6 -6
  206. package/dist/shared/index.d.ts +5 -1
  207. package/dist/shared/index.d.ts.map +1 -1
  208. package/dist/shared/index.js +4 -1
  209. package/dist/shared/job-setting.model.d.ts +6 -6
  210. package/dist/shared/lookup-group.model.d.ts +25 -25
  211. package/dist/shared/lookup-group.model.d.ts.map +1 -1
  212. package/dist/shared/lookup-group.model.js +3 -0
  213. package/dist/shared/schema-doc.model.d.ts +6 -6
  214. package/dist/shared/system-parameter.model.d.ts +6 -6
  215. package/dist/shared/task-document.model.d.ts +6 -6
  216. package/dist/shared/task.model.d.ts +6 -6
  217. package/dist/shared/{document-type-model.d.ts → webhook-event.model.d.ts} +6 -45
  218. package/dist/shared/webhook-event.model.d.ts.map +1 -0
  219. package/dist/shared/webhook-event.model.js +53 -0
  220. package/dist/shared/webhook-event.type.d.ts +15 -0
  221. package/dist/shared/webhook-event.type.d.ts.map +1 -0
  222. package/dist/shared/webhook-event.type.js +1 -0
  223. package/dist/shared/workflow-trigger.model.d.ts +32 -0
  224. package/dist/shared/workflow-trigger.model.d.ts.map +1 -0
  225. package/dist/shared/workflow-trigger.model.js +45 -0
  226. package/dist/shared/workflow-trigger.type.d.ts +59 -0
  227. package/dist/shared/workflow-trigger.type.d.ts.map +1 -0
  228. package/dist/shared/workflow-trigger.type.js +1 -0
  229. package/dist/shared/workflow.init.d.ts +21 -0
  230. package/dist/shared/workflow.init.d.ts.map +1 -0
  231. package/dist/shared/workflow.init.js +41 -0
  232. package/dist/shared/workflow.middleware.d.ts +107 -0
  233. package/dist/shared/workflow.middleware.d.ts.map +1 -0
  234. package/dist/shared/workflow.middleware.js +230 -0
  235. package/dist/shared/workflow.plugin.d.ts +46 -0
  236. package/dist/shared/workflow.plugin.d.ts.map +1 -0
  237. package/dist/shared/workflow.plugin.js +102 -0
  238. package/dist/shared/workflow.service.d.ts +39 -0
  239. package/dist/shared/workflow.service.d.ts.map +1 -0
  240. package/dist/shared/workflow.service.js +115 -0
  241. package/dist/value-objects/pound.d.ts.map +1 -1
  242. package/package.json +14 -3
  243. package/dist/applicants/applicant-income.model.d.ts +0 -2558
  244. package/dist/applicants/applicant-income.model.js +0 -82
  245. package/dist/applications/application-document.model.d.ts +0 -186
  246. package/dist/applications/application-document.model.d.ts.map +0 -1
  247. package/dist/applications/application-document.model.js +0 -35
  248. package/dist/applications/document.model.d.ts +0 -186
  249. package/dist/applications/document.model.d.ts.map +0 -1
  250. package/dist/applications/document.model.js +0 -35
  251. package/dist/shared/document-type-model.d.ts.map +0 -1
  252. package/dist/shared/document-type-model.js +0 -10
@@ -28,81 +28,185 @@
28
28
  /// <reference types="mongoose/types/inferrawdoctype" />
29
29
  import mongoose from "mongoose";
30
30
  declare const ApplicationsTaskModel: mongoose.Model<{
31
- applicationId: string;
32
- description: string;
33
- status: string;
34
- feeType: string;
35
- applicationNumber: string;
36
- brokerId: string;
37
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
38
- activityName: string;
39
- instanceId: string;
40
- checkFlowId: string;
41
- hasAttachment: string;
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
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
49
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
50
+ responderId?: mongoose.Types.ObjectId | null | undefined;
51
+ taskType?: "internal" | "broker" | null | undefined;
52
+ acceptedDate?: string | null | undefined;
53
+ };
54
+ statusDate: string;
55
+ statusReason: string;
56
+ status?: number | null | undefined;
57
+ checkflowId?: string | null | undefined;
58
+ instanceId?: string | null | undefined;
42
59
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
43
- applicationId: string;
44
- description: string;
45
- status: string;
46
- feeType: string;
47
- applicationNumber: string;
48
- brokerId: string;
49
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
50
- activityName: string;
51
- instanceId: string;
52
- checkFlowId: string;
53
- hasAttachment: string;
60
+ createdAt: NativeDate;
61
+ updatedAt: NativeDate;
62
+ } & {
63
+ applicationId: mongoose.Types.ObjectId;
64
+ createdOn: string;
65
+ additionalData: {
66
+ concernTypeLid: mongoose.Types.ObjectId;
67
+ concernComments: string;
68
+ resolvedComments: string;
69
+ rejectionReason: string;
70
+ rejectionDate: string;
71
+ responderRemarks: string;
72
+ requesterAttachmentId: string;
73
+ responderAttachmentId: string;
74
+ requesterFileName: string;
75
+ responderFileName: string;
76
+ respondedDate: string;
77
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
78
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
79
+ responderId?: mongoose.Types.ObjectId | null | undefined;
80
+ taskType?: "internal" | "broker" | null | undefined;
81
+ acceptedDate?: string | null | undefined;
82
+ };
83
+ statusDate: string;
84
+ statusReason: string;
85
+ status?: number | null | undefined;
86
+ checkflowId?: string | null | undefined;
87
+ instanceId?: string | null | undefined;
54
88
  }, {}> & {
55
- applicationId: string;
56
- description: string;
57
- status: string;
58
- feeType: string;
59
- applicationNumber: string;
60
- brokerId: string;
61
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
62
- activityName: string;
63
- instanceId: string;
64
- checkFlowId: string;
65
- hasAttachment: string;
89
+ createdAt: NativeDate;
90
+ updatedAt: NativeDate;
91
+ } & {
92
+ applicationId: mongoose.Types.ObjectId;
93
+ createdOn: string;
94
+ additionalData: {
95
+ concernTypeLid: mongoose.Types.ObjectId;
96
+ concernComments: string;
97
+ resolvedComments: string;
98
+ rejectionReason: string;
99
+ rejectionDate: string;
100
+ responderRemarks: string;
101
+ requesterAttachmentId: string;
102
+ responderAttachmentId: string;
103
+ requesterFileName: string;
104
+ responderFileName: string;
105
+ respondedDate: string;
106
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
107
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
108
+ responderId?: mongoose.Types.ObjectId | null | undefined;
109
+ taskType?: "internal" | "broker" | null | undefined;
110
+ acceptedDate?: string | null | undefined;
111
+ };
112
+ statusDate: string;
113
+ statusReason: string;
114
+ status?: number | null | undefined;
115
+ checkflowId?: string | null | undefined;
116
+ instanceId?: string | null | undefined;
66
117
  } & {
67
118
  _id: mongoose.Types.ObjectId;
68
119
  } & {
69
120
  __v: number;
70
- }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
71
- applicationId: string;
72
- description: string;
73
- status: string;
74
- feeType: string;
75
- applicationNumber: string;
76
- brokerId: string;
77
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
78
- activityName: string;
79
- instanceId: string;
80
- checkFlowId: string;
81
- hasAttachment: string;
121
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
122
+ timestamps: true;
123
+ }, {
124
+ createdAt: NativeDate;
125
+ updatedAt: NativeDate;
126
+ } & {
127
+ applicationId: mongoose.Types.ObjectId;
128
+ createdOn: string;
129
+ additionalData: {
130
+ concernTypeLid: mongoose.Types.ObjectId;
131
+ concernComments: string;
132
+ resolvedComments: string;
133
+ rejectionReason: string;
134
+ rejectionDate: string;
135
+ responderRemarks: string;
136
+ requesterAttachmentId: string;
137
+ responderAttachmentId: string;
138
+ requesterFileName: string;
139
+ responderFileName: string;
140
+ respondedDate: string;
141
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
142
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
143
+ responderId?: mongoose.Types.ObjectId | null | undefined;
144
+ taskType?: "internal" | "broker" | null | undefined;
145
+ acceptedDate?: string | null | undefined;
146
+ };
147
+ statusDate: string;
148
+ statusReason: string;
149
+ status?: number | null | undefined;
150
+ checkflowId?: string | null | undefined;
151
+ instanceId?: string | null | undefined;
82
152
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
83
- applicationId: string;
84
- description: string;
85
- status: string;
86
- feeType: string;
87
- applicationNumber: string;
88
- brokerId: string;
89
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
90
- activityName: string;
91
- instanceId: string;
92
- checkFlowId: string;
93
- hasAttachment: string;
153
+ createdAt: NativeDate;
154
+ updatedAt: NativeDate;
155
+ } & {
156
+ applicationId: mongoose.Types.ObjectId;
157
+ createdOn: string;
158
+ additionalData: {
159
+ concernTypeLid: mongoose.Types.ObjectId;
160
+ concernComments: string;
161
+ resolvedComments: string;
162
+ rejectionReason: string;
163
+ rejectionDate: string;
164
+ responderRemarks: string;
165
+ requesterAttachmentId: string;
166
+ responderAttachmentId: string;
167
+ requesterFileName: string;
168
+ responderFileName: string;
169
+ respondedDate: string;
170
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
171
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
172
+ responderId?: mongoose.Types.ObjectId | null | undefined;
173
+ taskType?: "internal" | "broker" | null | undefined;
174
+ acceptedDate?: string | null | undefined;
175
+ };
176
+ statusDate: string;
177
+ statusReason: string;
178
+ status?: number | null | undefined;
179
+ checkflowId?: string | null | undefined;
180
+ instanceId?: string | null | undefined;
94
181
  }>, {}> & mongoose.FlatRecord<{
95
- applicationId: string;
96
- description: string;
97
- status: string;
98
- feeType: string;
99
- applicationNumber: string;
100
- brokerId: string;
101
- taskType: "DocumentTasks" | "InformationTasks" | "FeePaymentTasks";
102
- activityName: string;
103
- instanceId: string;
104
- checkFlowId: string;
105
- hasAttachment: string;
182
+ createdAt: NativeDate;
183
+ updatedAt: NativeDate;
184
+ } & {
185
+ applicationId: mongoose.Types.ObjectId;
186
+ createdOn: string;
187
+ additionalData: {
188
+ concernTypeLid: mongoose.Types.ObjectId;
189
+ concernComments: string;
190
+ resolvedComments: string;
191
+ rejectionReason: string;
192
+ rejectionDate: string;
193
+ responderRemarks: string;
194
+ requesterAttachmentId: string;
195
+ responderAttachmentId: string;
196
+ requesterFileName: string;
197
+ responderFileName: string;
198
+ respondedDate: string;
199
+ statusLid?: mongoose.Types.ObjectId | null | undefined;
200
+ requesterId?: mongoose.Types.ObjectId | null | undefined;
201
+ responderId?: mongoose.Types.ObjectId | null | undefined;
202
+ taskType?: "internal" | "broker" | null | undefined;
203
+ acceptedDate?: string | null | undefined;
204
+ };
205
+ statusDate: string;
206
+ statusReason: string;
207
+ status?: number | null | undefined;
208
+ checkflowId?: string | null | undefined;
209
+ instanceId?: string | null | undefined;
106
210
  }> & {
107
211
  _id: mongoose.Types.ObjectId;
108
212
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"applications-task.model.d.ts","sourceRoot":"","sources":["../../applications/applications-task.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAkDhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"applications-task.model.d.ts","sourceRoot":"","sources":["../../applications/applications-task.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA2ChC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
@@ -1,50 +1,41 @@
1
+ import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
1
3
  import mongoose from "mongoose";
2
- const applicationsTaskSchema = new mongoose.Schema({
3
- applicationId: {
4
- type: String,
5
- required: true
6
- },
7
- applicationNumber: {
8
- type: String,
9
- required: true
10
- },
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: "ConcernType", required: true },
10
+ concernComments: { type: String, required: true },
11
+ resolvedComments: { type: String, default: "" },
11
12
  taskType: {
12
13
  type: String,
13
- enum: ["DocumentTasks", "InformationTasks", "FeePaymentTasks"],
14
- required: true
15
- },
16
- brokerId: {
17
- type: String,
18
- default: ""
19
- },
20
- activityName: {
21
- type: String,
22
- default: ""
23
- },
24
- description: {
25
- type: String,
26
- default: ""
27
- },
28
- instanceId: {
29
- type: String,
30
- default: ""
31
- },
32
- checkFlowId: {
33
- type: String,
34
- default: ""
35
- },
36
- status: {
37
- type: String,
38
- default: ""
39
- },
40
- hasAttachment: {
41
- type: String,
42
- default: ""
43
- },
44
- feeType: {
45
- type: String,
46
- default: ""
47
- },
48
- });
14
+ enum: ["internal", "broker"], // allowed values
15
+ required: false
16
+ },
17
+ acceptedDate: { type: String },
18
+ rejectionReason: { type: String, default: null },
19
+ rejectionDate: { type: String, default: null },
20
+ responderRemarks: { type: String, default: "" },
21
+ requesterAttachmentId: { type: String, default: null },
22
+ responderAttachmentId: { type: String, default: null },
23
+ requesterFileName: { type: String, default: null },
24
+ responderFileName: { type: String, default: null },
25
+ respondedDate: { type: String, default: null }
26
+ }, { _id: false });
27
+ const applicationsTaskSchema = new mongoose.Schema({
28
+ checkflowId: { type: String, required: false },
29
+ applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
30
+ instanceId: { type: String, required: false },
31
+ status: { type: Number, required: false, default: 2 }, // 2 = pending
32
+ statusReason: { type: String, default: "" },
33
+ statusDate: { type: String, default: null },
34
+ additionalData: { type: additionalDataSchema, required: true },
35
+ createdOn: { type: String, required: true, default: () => new Date().toISOString() }
36
+ }, { timestamps: true });
37
+ applyAuditMiddleware(applicationsTaskSchema, "ApplicationsTask");
38
+ // Apply workflow plugin to the schema
39
+ applyWorkflowPlugin(applicationsTaskSchema, 'applicationstask');
49
40
  const ApplicationsTaskModel = mongoose.model("ApplicationsTask", applicationsTaskSchema);
50
41
  export default ApplicationsTaskModel;
@@ -0,0 +1,57 @@
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 { Types } from "mongoose";
30
+ import { IBaseType } from "../types/base.types";
31
+ export interface IApplicationsTaskAdditionalData extends IBaseType {
32
+ requesterId: string;
33
+ responderId: string;
34
+ statusLid: Types.ObjectId;
35
+ concernTypeLid: Types.ObjectId;
36
+ concernComments: string;
37
+ resolvedComments?: string;
38
+ rejectionReason?: string | null;
39
+ rejectionDate?: string | null;
40
+ responderRemarks?: string;
41
+ requesterAttachmentId?: string | null;
42
+ responderAttachmentId?: string | null;
43
+ requesterFileName?: string | null;
44
+ responderFileName?: string | null;
45
+ respondedDate?: string | null;
46
+ }
47
+ export default interface IApplicationsTaskType extends IBaseType {
48
+ checkflowId: string;
49
+ applicationId: Types.ObjectId;
50
+ instanceId: string;
51
+ status: number;
52
+ statusReason?: string;
53
+ statusDate?: string | null;
54
+ additionalData: IApplicationsTaskAdditionalData;
55
+ createdOn: string;
56
+ }
57
+ //# sourceMappingURL=applications-task.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applications-task.type.d.ts","sourceRoot":"","sources":["../../applications/applications-task.type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,WAAW,+BAAgC,SAAQ,SAAS;IAC9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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyC,CAAC;AAC3D,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"broker.model.d.ts","sourceRoot":"","sources":["../../applications/broker.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA2BhC,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyC,CAAC;AAC3D,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  const brokerSchema = new mongoose.Schema({
3
4
  brokerId: { type: String },
4
5
  landlinePhone: { type: String },
@@ -17,5 +18,7 @@ const brokerSchema = new mongoose.Schema({
17
18
  firstName: { type: String },
18
19
  lastName: { type: String }
19
20
  }, { timestamps: true });
21
+ // Apply workflow plugin to the schema
22
+ applyWorkflowPlugin(brokerSchema, 'broker');
20
23
  const BrokerModel = mongoose.model("Broker", brokerSchema);
21
24
  export default BrokerModel;
@@ -3,22 +3,29 @@ export { default as ApplicationAuditModel } from './application-audit.model';
3
3
  export { default as ApplicationCheckListModel } from './application-checklist-Item.model';
4
4
  export { default as ApplicationCompanyModel } from './application-company-model.js';
5
5
  export { default as ApplicationNoteModel } from './application-note.model';
6
+ export { default as IApplicationNoteType } from './application-note.type';
6
7
  export { default as ApplicationCreditProfileModel } from './application-credit-profile.model';
7
8
  export { default as ApplicationDirectDebitModel } from './application-direct-debit.model';
8
9
  export { default as ApplicationMortgageModel } from './application-mortgage.model';
10
+ export { default as ApplicationMortgageType } from './application-mortgage.type';
9
11
  export { default as ApplicationOnboardingModel } from './application-onboarding.model';
10
12
  export { default as ApplicationRationaleModel } from './application-rationale.model';
13
+ export { default as ApplicationRationaleType } from './application-rationale.type';
11
14
  export { default as ApplicationValuationModel } from './application-valuation.model';
15
+ export { default as ApplicationValuationType } from './application-valuation.type';
12
16
  export { default as BrokerModel } from './broker.model';
13
17
  export { default as ProductModel } from './application-product.model';
14
18
  export { default as SolicitorModel } from './solicitor.model';
15
- export { default as ApplicationDocumentModel } from './application-document.model';
16
19
  export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
17
20
  export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
18
- export { default as DocumentModel } from './document.model';
19
21
  export { default as MortgageModel } from './application-mortgage.model';
20
22
  export { default as ApplicationProductFeaturesModel } from './application-productfeatures.model';
21
23
  export { default as ApplicationEucModel } from './application-euc.model';
22
24
  export { default as ApplicationsTaskModel } from './applications-task.model';
23
- export * from './application-rationale.type';
25
+ export { default as ApplicationProductType } from './application-product.type';
26
+ export { default as ApplicationProductFeaturesType } from './application-productfeatures.type';
27
+ export { default as IApplicationsTaskType } from './applications-task.type';
28
+ export { default as ApplicantCreditReportModel } from '../applicants/applicant-credit-report.model';
29
+ export { default as ApplicationValuationReportModel } from './application-valuation-report.model';
30
+ export { default as ApplicationValuationReportType } from './application-valuation-report.type';
24
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EA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AO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,qCAAqC,CAAC"}
@@ -12,12 +12,11 @@ export { default as ApplicationValuationModel } from './application-valuation.mo
12
12
  export { default as BrokerModel } from './broker.model';
13
13
  export { default as ProductModel } from './application-product.model';
14
14
  export { default as SolicitorModel } from './solicitor.model';
15
- export { default as ApplicationDocumentModel } from './application-document.model';
16
15
  export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
17
16
  export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
18
- export { default as DocumentModel } from './document.model';
19
17
  export { default as MortgageModel } from './application-mortgage.model';
20
18
  export { default as ApplicationProductFeaturesModel } from './application-productfeatures.model';
21
19
  export { default as ApplicationEucModel } from './application-euc.model';
22
20
  export { default as ApplicationsTaskModel } from './applications-task.model';
23
- export * from './application-rationale.type';
21
+ export { default as ApplicantCreditReportModel } from '../applicants/applicant-credit-report.model';
22
+ export { default as ApplicationValuationReportModel } from './application-valuation-report.model';
@@ -1,4 +1,6 @@
1
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" />
2
4
  /// <reference types="mongoose/types/aggregate" />
3
5
  /// <reference types="mongoose/types/callback" />
4
6
  /// <reference types="mongoose/types/collection" />
@@ -1 +1 @@
1
- {"version":3,"file":"solicitor.model.d.ts","sourceRoot":"","sources":["../../applications/solicitor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAsHhE,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AACpE,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"solicitor.model.d.ts","sourceRoot":"","sources":["../../applications/solicitor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AA6HhE,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AACpE,eAAe,cAAc,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  import { SortCode } from "../value-objects/sort-code";
3
4
  import { AccountNumber } from "../value-objects/account-number";
4
5
  const Schema = mongoose.Schema;
@@ -111,5 +112,7 @@ const virtualCountry = solicitorSchema.virtual('addressCountry', {
111
112
  justOne: true
112
113
  });
113
114
  virtualCountry.description = 'Populated lookup value for the solicitor\'s address country';
115
+ // Apply workflow plugin to the schema
116
+ applyWorkflowPlugin(solicitorSchema, 'solicitor');
114
117
  const SolicitorModel = mongoose.model("Solicitor", solicitorSchema);
115
118
  export default SolicitorModel;
package/dist/index.d.ts CHANGED
@@ -5,4 +5,5 @@ export * from './applicants/index.js';
5
5
  export * from './users/index.js';
6
6
  export * from './product-catalogues/index.js';
7
7
  export * from './underwriter/index.js';
8
+ export { initializeWorkflowMiddleware, initializeWorkflowMiddlewareWithCheck, isWorkflowMiddlewareConfigured } from './shared/index.js';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EACH,4BAA4B,EAC5B,qCAAqC,EACrC,8BAA8B,EACjC,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -5,3 +5,5 @@ export * from './applicants/index.js';
5
5
  export * from './users/index.js';
6
6
  export * from './product-catalogues/index.js';
7
7
  export * from './underwriter/index.js';
8
+ // Re-export workflow middleware initialization for easy access
9
+ export { initializeWorkflowMiddleware, initializeWorkflowMiddlewareWithCheck, isWorkflowMiddlewareConfigured } from './shared/index.js';
@@ -1,4 +1,7 @@
1
1
  export { default as ProductCatalogueModel } from './product-catalogue.model';
2
2
  export { default as ProductDefinitionsModel } from './product-definitions.model';
3
3
  export { default as ProductVariantModel } from './product-variant.model';
4
+ export { default as ProductCatalogueType } from './product-catalogue.type';
5
+ export { default as ProductDefinitionsType } from './product-definitions.type';
6
+ export { default as ProductVariantType } from './product-variant.type';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../product-catalogues/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAC,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../product-catalogues/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAC,MAAM,yBAAyB,CAAA;AAGvE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { IBaseType } from "../types/base.types";
2
+ export default interface IProductCatalogue extends IBaseType {
3
+ productCatalogueId: string;
4
+ name: string;
5
+ description?: string;
6
+ applyFrom: string;
7
+ applyUntil: string;
8
+ submitUntil: string;
9
+ status: string;
10
+ lockedForEdit: string;
11
+ baseRateName?: string;
12
+ baseRate?: string;
13
+ mapperName?: string;
14
+ }
15
+ //# sourceMappingURL=product-catalogue.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-catalogue.type.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-catalogue.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,SAAS;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CAEvB"}
@@ -0,0 +1 @@
1
+ export {};