@dynamatix/gb-schemas 2.3.370 → 2.3.372

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 (31) hide show
  1. package/README.md +308 -308
  2. package/dist/applicants/applicant-income-source.model.d.ts +26 -0
  3. package/dist/applicants/applicant-income-source.model.d.ts.map +1 -0
  4. package/dist/applicants/applicant-income.model.d.ts +160 -0
  5. package/dist/applicants/applicant-income.model.d.ts.map +1 -0
  6. package/dist/applicants/applicant-other-income.model.d.ts +85 -0
  7. package/dist/applicants/applicant-other-income.model.d.ts.map +1 -0
  8. package/dist/applicants/applicant-welcome-call.model.js +9 -9
  9. package/dist/applications/application-document.model.d.ts +158 -0
  10. package/dist/applications/application-document.model.d.ts.map +1 -0
  11. package/dist/applications/document.model.d.ts +158 -0
  12. package/dist/applications/document.model.d.ts.map +1 -0
  13. package/dist/applications/productfeatures.model.d.ts +368 -0
  14. package/dist/applications/productfeatures.model.d.ts.map +1 -0
  15. package/dist/properties/security.model.d.ts +6 -0
  16. package/dist/properties/security.model.d.ts.map +1 -1
  17. package/dist/properties/security.model.js +1 -0
  18. package/dist/shared/document-type-model.d.ts +48 -0
  19. package/dist/shared/document-type-model.d.ts.map +1 -0
  20. package/dist/shared/workflow.init.d.ts.map +1 -1
  21. package/dist/shared/workflow.init.js +5 -4
  22. package/dist/shared/workflow.logger.d.ts +18 -0
  23. package/dist/shared/workflow.logger.d.ts.map +1 -0
  24. package/dist/shared/workflow.logger.js +41 -0
  25. package/dist/shared/workflow.middleware.d.ts.map +1 -1
  26. package/dist/shared/workflow.middleware.js +24 -23
  27. package/dist/shared/workflow.plugin.d.ts.map +1 -1
  28. package/dist/shared/workflow.plugin.js +15 -14
  29. package/dist/shared/workflow.service.d.ts.map +1 -1
  30. package/dist/shared/workflow.service.js +7 -6
  31. package/package.json +87 -87
@@ -0,0 +1,368 @@
1
+ import mongoose from "mongoose";
2
+ declare const productFeaturesSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
3
+ name: string;
4
+ repaymentType: string;
5
+ ltv: string;
6
+ reimbursementPerPound: string;
7
+ stressedPayment: string;
8
+ stressedPaymentRate: string;
9
+ rentalCoverage: string;
10
+ clientAdvance: string;
11
+ repayment: string;
12
+ variableRepayment: string;
13
+ reversionRateWithoutBaseRate: string;
14
+ totalReversionRate: string;
15
+ initialRate: string;
16
+ fixedTerm: string;
17
+ fixedTermEndDate: string;
18
+ baseRate: string;
19
+ productRate: string;
20
+ apr: string;
21
+ applicationCategory: string;
22
+ securityType: string;
23
+ erc: string;
24
+ loanType: string;
25
+ maxLtvLimit: string;
26
+ reimbursement: string;
27
+ stressedApr: string;
28
+ stressedRate: string;
29
+ stressedRepayment: string;
30
+ liborFloorRate: string;
31
+ totalTermInMonths: string;
32
+ chargeType: string;
33
+ productCategory: string;
34
+ ercCode: string;
35
+ variableTerm: string;
36
+ totalFeePayable: string;
37
+ dipIssueDate: string;
38
+ estimatedCompletionDate: string;
39
+ dipExpiryDate: string;
40
+ fixedRepaymentUntillDate: string;
41
+ rentalReviewDate: string;
42
+ totalReimbursementWithFee: string;
43
+ finalRentPayment: string;
44
+ clientDeposit: string;
45
+ firstRentPayment: string;
46
+ fees: mongoose.Types.DocumentArray<{
47
+ description: string;
48
+ additionalData: any;
49
+ feeType: string;
50
+ feeAmount: string;
51
+ rate: string;
52
+ addedToLoan: string;
53
+ allowOverride: string;
54
+ }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
55
+ description: string;
56
+ additionalData: any;
57
+ feeType: string;
58
+ feeAmount: string;
59
+ rate: string;
60
+ addedToLoan: string;
61
+ allowOverride: string;
62
+ }> & {
63
+ description: string;
64
+ additionalData: any;
65
+ feeType: string;
66
+ feeAmount: string;
67
+ rate: string;
68
+ addedToLoan: string;
69
+ allowOverride: string;
70
+ }>;
71
+ ercFeatures: any;
72
+ icr: string;
73
+ ufssProductCode: string;
74
+ ufssInterestRateCode: string;
75
+ calculations?: {
76
+ ltv: string;
77
+ rentalCoverageRatioRate: string;
78
+ bankContributionRate: string;
79
+ bankInitialShareRate: string;
80
+ totalAmountPayable: string;
81
+ fixedMonthlyPayment: string;
82
+ fixedMonthlyCapital: string;
83
+ fixedMonthlyInterest: string;
84
+ variableMonthlyPayment: string;
85
+ summaryTotal: string;
86
+ reimbursementPerPound: string;
87
+ stressedPayment: string;
88
+ stressedPaymentRate: string;
89
+ rentalCoverage: string;
90
+ rentalCoverageWithoutTopUp: string;
91
+ } | null | undefined;
92
+ cashflowPeriods?: {
93
+ totalNoOfPayments: string;
94
+ fixed?: {
95
+ from: string;
96
+ to: string;
97
+ instalmentAmount: string;
98
+ instalmentInterest: string;
99
+ instalmentCapitalRepaid: string;
100
+ otherCosts: string;
101
+ outstandingCapital: string;
102
+ } | null | undefined;
103
+ variable?: {
104
+ from: string;
105
+ to: string;
106
+ instalmentAmount: string;
107
+ instalmentInterest: string;
108
+ instalmentCapitalRepaid: string;
109
+ otherCosts: string;
110
+ outstandingCapital: string;
111
+ } | null | undefined;
112
+ total?: {
113
+ from: string;
114
+ to: string;
115
+ instalmentAmount: string;
116
+ instalmentInterest: string;
117
+ instalmentCapitalRepaid: string;
118
+ otherCosts: string;
119
+ outstandingCapital: string;
120
+ } | null | undefined;
121
+ } | null | undefined;
122
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
123
+ name: string;
124
+ repaymentType: string;
125
+ ltv: string;
126
+ reimbursementPerPound: string;
127
+ stressedPayment: string;
128
+ stressedPaymentRate: string;
129
+ rentalCoverage: string;
130
+ clientAdvance: string;
131
+ repayment: string;
132
+ variableRepayment: string;
133
+ reversionRateWithoutBaseRate: string;
134
+ totalReversionRate: string;
135
+ initialRate: string;
136
+ fixedTerm: string;
137
+ fixedTermEndDate: string;
138
+ baseRate: string;
139
+ productRate: string;
140
+ apr: string;
141
+ applicationCategory: string;
142
+ securityType: string;
143
+ erc: string;
144
+ loanType: string;
145
+ maxLtvLimit: string;
146
+ reimbursement: string;
147
+ stressedApr: string;
148
+ stressedRate: string;
149
+ stressedRepayment: string;
150
+ liborFloorRate: string;
151
+ totalTermInMonths: string;
152
+ chargeType: string;
153
+ productCategory: string;
154
+ ercCode: string;
155
+ variableTerm: string;
156
+ totalFeePayable: string;
157
+ dipIssueDate: string;
158
+ estimatedCompletionDate: string;
159
+ dipExpiryDate: string;
160
+ fixedRepaymentUntillDate: string;
161
+ rentalReviewDate: string;
162
+ totalReimbursementWithFee: string;
163
+ finalRentPayment: string;
164
+ clientDeposit: string;
165
+ firstRentPayment: string;
166
+ fees: mongoose.Types.DocumentArray<{
167
+ description: string;
168
+ additionalData: any;
169
+ feeType: string;
170
+ feeAmount: string;
171
+ rate: string;
172
+ addedToLoan: string;
173
+ allowOverride: string;
174
+ }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
175
+ description: string;
176
+ additionalData: any;
177
+ feeType: string;
178
+ feeAmount: string;
179
+ rate: string;
180
+ addedToLoan: string;
181
+ allowOverride: string;
182
+ }> & {
183
+ description: string;
184
+ additionalData: any;
185
+ feeType: string;
186
+ feeAmount: string;
187
+ rate: string;
188
+ addedToLoan: string;
189
+ allowOverride: string;
190
+ }>;
191
+ ercFeatures: any;
192
+ icr: string;
193
+ ufssProductCode: string;
194
+ ufssInterestRateCode: string;
195
+ calculations?: {
196
+ ltv: string;
197
+ rentalCoverageRatioRate: string;
198
+ bankContributionRate: string;
199
+ bankInitialShareRate: string;
200
+ totalAmountPayable: string;
201
+ fixedMonthlyPayment: string;
202
+ fixedMonthlyCapital: string;
203
+ fixedMonthlyInterest: string;
204
+ variableMonthlyPayment: string;
205
+ summaryTotal: string;
206
+ reimbursementPerPound: string;
207
+ stressedPayment: string;
208
+ stressedPaymentRate: string;
209
+ rentalCoverage: string;
210
+ rentalCoverageWithoutTopUp: string;
211
+ } | null | undefined;
212
+ cashflowPeriods?: {
213
+ totalNoOfPayments: string;
214
+ fixed?: {
215
+ from: string;
216
+ to: string;
217
+ instalmentAmount: string;
218
+ instalmentInterest: string;
219
+ instalmentCapitalRepaid: string;
220
+ otherCosts: string;
221
+ outstandingCapital: string;
222
+ } | null | undefined;
223
+ variable?: {
224
+ from: string;
225
+ to: string;
226
+ instalmentAmount: string;
227
+ instalmentInterest: string;
228
+ instalmentCapitalRepaid: string;
229
+ otherCosts: string;
230
+ outstandingCapital: string;
231
+ } | null | undefined;
232
+ total?: {
233
+ from: string;
234
+ to: string;
235
+ instalmentAmount: string;
236
+ instalmentInterest: string;
237
+ instalmentCapitalRepaid: string;
238
+ otherCosts: string;
239
+ outstandingCapital: string;
240
+ } | null | undefined;
241
+ } | null | undefined;
242
+ }>> & mongoose.FlatRecord<{
243
+ name: string;
244
+ repaymentType: string;
245
+ ltv: string;
246
+ reimbursementPerPound: string;
247
+ stressedPayment: string;
248
+ stressedPaymentRate: string;
249
+ rentalCoverage: string;
250
+ clientAdvance: string;
251
+ repayment: string;
252
+ variableRepayment: string;
253
+ reversionRateWithoutBaseRate: string;
254
+ totalReversionRate: string;
255
+ initialRate: string;
256
+ fixedTerm: string;
257
+ fixedTermEndDate: string;
258
+ baseRate: string;
259
+ productRate: string;
260
+ apr: string;
261
+ applicationCategory: string;
262
+ securityType: string;
263
+ erc: string;
264
+ loanType: string;
265
+ maxLtvLimit: string;
266
+ reimbursement: string;
267
+ stressedApr: string;
268
+ stressedRate: string;
269
+ stressedRepayment: string;
270
+ liborFloorRate: string;
271
+ totalTermInMonths: string;
272
+ chargeType: string;
273
+ productCategory: string;
274
+ ercCode: string;
275
+ variableTerm: string;
276
+ totalFeePayable: string;
277
+ dipIssueDate: string;
278
+ estimatedCompletionDate: string;
279
+ dipExpiryDate: string;
280
+ fixedRepaymentUntillDate: string;
281
+ rentalReviewDate: string;
282
+ totalReimbursementWithFee: string;
283
+ finalRentPayment: string;
284
+ clientDeposit: string;
285
+ firstRentPayment: string;
286
+ fees: mongoose.Types.DocumentArray<{
287
+ description: string;
288
+ additionalData: any;
289
+ feeType: string;
290
+ feeAmount: string;
291
+ rate: string;
292
+ addedToLoan: string;
293
+ allowOverride: string;
294
+ }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
295
+ description: string;
296
+ additionalData: any;
297
+ feeType: string;
298
+ feeAmount: string;
299
+ rate: string;
300
+ addedToLoan: string;
301
+ allowOverride: string;
302
+ }> & {
303
+ description: string;
304
+ additionalData: any;
305
+ feeType: string;
306
+ feeAmount: string;
307
+ rate: string;
308
+ addedToLoan: string;
309
+ allowOverride: string;
310
+ }>;
311
+ ercFeatures: any;
312
+ icr: string;
313
+ ufssProductCode: string;
314
+ ufssInterestRateCode: string;
315
+ calculations?: {
316
+ ltv: string;
317
+ rentalCoverageRatioRate: string;
318
+ bankContributionRate: string;
319
+ bankInitialShareRate: string;
320
+ totalAmountPayable: string;
321
+ fixedMonthlyPayment: string;
322
+ fixedMonthlyCapital: string;
323
+ fixedMonthlyInterest: string;
324
+ variableMonthlyPayment: string;
325
+ summaryTotal: string;
326
+ reimbursementPerPound: string;
327
+ stressedPayment: string;
328
+ stressedPaymentRate: string;
329
+ rentalCoverage: string;
330
+ rentalCoverageWithoutTopUp: string;
331
+ } | null | undefined;
332
+ cashflowPeriods?: {
333
+ totalNoOfPayments: string;
334
+ fixed?: {
335
+ from: string;
336
+ to: string;
337
+ instalmentAmount: string;
338
+ instalmentInterest: string;
339
+ instalmentCapitalRepaid: string;
340
+ otherCosts: string;
341
+ outstandingCapital: string;
342
+ } | null | undefined;
343
+ variable?: {
344
+ from: string;
345
+ to: string;
346
+ instalmentAmount: string;
347
+ instalmentInterest: string;
348
+ instalmentCapitalRepaid: string;
349
+ otherCosts: string;
350
+ outstandingCapital: string;
351
+ } | null | undefined;
352
+ total?: {
353
+ from: string;
354
+ to: string;
355
+ instalmentAmount: string;
356
+ instalmentInterest: string;
357
+ instalmentCapitalRepaid: string;
358
+ otherCosts: string;
359
+ outstandingCapital: string;
360
+ } | null | undefined;
361
+ } | null | undefined;
362
+ }> & {
363
+ _id: mongoose.Types.ObjectId;
364
+ } & {
365
+ __v: number;
366
+ }>;
367
+ export default productFeaturesSchema;
368
+ //# sourceMappingURL=productfeatures.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productfeatures.model.d.ts","sourceRoot":"","sources":["../../applications/productfeatures.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAyChC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDzB,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
@@ -72,6 +72,7 @@ declare const SecurityModel: mongoose.Model<{
72
72
  energyEfficiencyRating: any;
73
73
  energyEfficiencyRatingValue: any;
74
74
  dataStreetSchema: any;
75
+ lastCheckedAt: any;
75
76
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
76
77
  applicationId: any;
77
78
  pageValidFlag: any;
@@ -117,6 +118,7 @@ declare const SecurityModel: mongoose.Model<{
117
118
  energyEfficiencyRating: any;
118
119
  energyEfficiencyRatingValue: any;
119
120
  dataStreetSchema: any;
121
+ lastCheckedAt: any;
120
122
  }, {}> & {
121
123
  applicationId: any;
122
124
  pageValidFlag: any;
@@ -162,6 +164,7 @@ declare const SecurityModel: mongoose.Model<{
162
164
  energyEfficiencyRating: any;
163
165
  energyEfficiencyRatingValue: any;
164
166
  dataStreetSchema: any;
167
+ lastCheckedAt: any;
165
168
  } & {
166
169
  _id: mongoose.Types.ObjectId;
167
170
  } & {
@@ -220,6 +223,7 @@ declare const SecurityModel: mongoose.Model<{
220
223
  energyEfficiencyRating: any;
221
224
  energyEfficiencyRatingValue: any;
222
225
  dataStreetSchema: any;
226
+ lastCheckedAt: any;
223
227
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
224
228
  applicationId: any;
225
229
  pageValidFlag: any;
@@ -265,6 +269,7 @@ declare const SecurityModel: mongoose.Model<{
265
269
  energyEfficiencyRating: any;
266
270
  energyEfficiencyRatingValue: any;
267
271
  dataStreetSchema: any;
272
+ lastCheckedAt: any;
268
273
  }>, {}> & mongoose.FlatRecord<{
269
274
  applicationId: any;
270
275
  pageValidFlag: any;
@@ -310,6 +315,7 @@ declare const SecurityModel: mongoose.Model<{
310
315
  energyEfficiencyRating: any;
311
316
  energyEfficiencyRatingValue: any;
312
317
  dataStreetSchema: any;
318
+ lastCheckedAt: any;
313
319
  }> & {
314
320
  _id: mongoose.Types.ObjectId;
315
321
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAsKhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAuKhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -109,6 +109,7 @@ const securitySchema = new mongoose.Schema({
109
109
  energyEfficiencyRating: { type: String }, // not-form data-street
110
110
  energyEfficiencyRatingValue: { type: String }, // not-form data-street
111
111
  dataStreetSchema: dataStreetSchema, // not-form data-street
112
+ lastCheckedAt: { type: String }
112
113
  }, {
113
114
  toJSON: { getters: true, virtuals: true },
114
115
  toObject: { getters: true, virtuals: true }
@@ -0,0 +1,48 @@
1
+ import mongoose from "mongoose";
2
+ declare const DocumentTypeModel: mongoose.Model<{
3
+ name: string;
4
+ source: string;
5
+ parentDocumentTypeId: mongoose.Types.ObjectId;
6
+ label?: string | null | undefined;
7
+ matchRules?: any;
8
+ }, {}, {}, {}, mongoose.Document<unknown, {}, {
9
+ name: string;
10
+ source: string;
11
+ parentDocumentTypeId: mongoose.Types.ObjectId;
12
+ label?: string | null | undefined;
13
+ matchRules?: any;
14
+ }> & {
15
+ name: string;
16
+ source: string;
17
+ parentDocumentTypeId: mongoose.Types.ObjectId;
18
+ label?: string | null | undefined;
19
+ matchRules?: any;
20
+ } & {
21
+ _id: mongoose.Types.ObjectId;
22
+ } & {
23
+ __v: number;
24
+ }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
25
+ name: string;
26
+ source: string;
27
+ parentDocumentTypeId: mongoose.Types.ObjectId;
28
+ label?: string | null | undefined;
29
+ matchRules?: any;
30
+ }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
31
+ name: string;
32
+ source: string;
33
+ parentDocumentTypeId: mongoose.Types.ObjectId;
34
+ label?: string | null | undefined;
35
+ matchRules?: any;
36
+ }>> & mongoose.FlatRecord<{
37
+ name: string;
38
+ source: string;
39
+ parentDocumentTypeId: mongoose.Types.ObjectId;
40
+ label?: string | null | undefined;
41
+ matchRules?: any;
42
+ }> & {
43
+ _id: mongoose.Types.ObjectId;
44
+ } & {
45
+ __v: number;
46
+ }>>;
47
+ export default DocumentTypeModel;
48
+ //# sourceMappingURL=document-type-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type-model.d.ts","sourceRoot":"","sources":["../../shared/document-type-model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAUhC,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqD,CAAC;AAE7E,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.init.d.ts","sourceRoot":"","sources":["../../shared/workflow.init.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,wBAAgB,4BAA4B,SAI3C;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,OAAO,CAUxD;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CAAC,OAAO,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,WAQ5F"}
1
+ {"version":3,"file":"workflow.init.d.ts","sourceRoot":"","sources":["../../shared/workflow.init.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,4BAA4B,SAI3C;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,OAAO,CAUxD;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CAAC,OAAO,CAAC,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,WAQ5F"}
@@ -1,5 +1,6 @@
1
1
  import dotenv from 'dotenv';
2
2
  import { registerWorkflowPlugin } from './workflow.plugin.js';
3
+ import { workflowLog, workflowWarn } from './workflow.logger.js';
3
4
  // Load environment variables from .env file
4
5
  dotenv.config();
5
6
  /**
@@ -10,9 +11,9 @@ dotenv.config();
10
11
  * The record type will be inferred from the model name (e.g., 'Application' -> 'applications')
11
12
  */
12
13
  export function initializeWorkflowMiddleware() {
13
- console.log('Initializing workflow middleware for all schemas...');
14
+ workflowLog('Initializing workflow middleware for all schemas...');
14
15
  registerWorkflowPlugin();
15
- console.log('Workflow middleware initialized successfully');
16
+ workflowLog('Workflow middleware initialized successfully');
16
17
  }
17
18
  /**
18
19
  * Check if workflow middleware is properly configured
@@ -22,7 +23,7 @@ export function isWorkflowMiddlewareConfigured() {
22
23
  const requiredEnvVars = ['WORKFLOW_API_KEY'];
23
24
  const missingVars = requiredEnvVars.filter(varName => !process.env[varName]);
24
25
  if (missingVars.length > 0) {
25
- console.warn(`Missing required environment variables for workflow middleware: ${missingVars.join(', ')}`);
26
+ workflowWarn(`Missing required environment variables for workflow middleware: ${missingVars.join(', ')}`);
26
27
  return false;
27
28
  }
28
29
  return true;
@@ -33,7 +34,7 @@ export function isWorkflowMiddlewareConfigured() {
33
34
  */
34
35
  export function initializeWorkflowMiddlewareWithCheck(options) {
35
36
  if (!options?.skipConfigCheck && !isWorkflowMiddlewareConfigured()) {
36
- console.warn('Workflow middleware configuration incomplete. Middleware will be disabled.');
37
+ workflowWarn('Workflow middleware configuration incomplete. Middleware will be disabled.');
37
38
  return false;
38
39
  }
39
40
  initializeWorkflowMiddleware();
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Utility functions for workflow engine logging
3
+ * Logs are controlled by the SHOW_WORKFLOW_ENGINE_LOGS environment variable
4
+ */
5
+ /**
6
+ * Conditional console.log that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
7
+ */
8
+ export declare function workflowLog(...args: any[]): void;
9
+ /**
10
+ * Conditional console.warn that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
11
+ */
12
+ export declare function workflowWarn(...args: any[]): void;
13
+ /**
14
+ * Conditional console.error that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
15
+ * Note: Error logs might be important, but we'll respect the flag for consistency
16
+ */
17
+ export declare function workflowError(...args: any[]): void;
18
+ //# sourceMappingURL=workflow.logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.logger.d.ts","sourceRoot":"","sources":["../../shared/workflow.logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAIhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAIjD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAIlD"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Utility functions for workflow engine logging
3
+ * Logs are controlled by the SHOW_WORKFLOW_ENGINE_LOGS environment variable
4
+ */
5
+ /**
6
+ * Checks if workflow engine logs should be displayed
7
+ * @returns true if SHOW_WORKFLOW_ENGINE_LOGS is set to a truthy value
8
+ */
9
+ function shouldShowLogs() {
10
+ const envValue = process.env.SHOW_WORKFLOW_ENGINE_LOGS;
11
+ if (!envValue)
12
+ return false;
13
+ // Check for truthy string values
14
+ const normalizedValue = envValue.toLowerCase().trim();
15
+ return normalizedValue === 'true' || normalizedValue === '1' || normalizedValue === 'yes';
16
+ }
17
+ /**
18
+ * Conditional console.log that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
19
+ */
20
+ export function workflowLog(...args) {
21
+ if (shouldShowLogs()) {
22
+ console.log(...args);
23
+ }
24
+ }
25
+ /**
26
+ * Conditional console.warn that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
27
+ */
28
+ export function workflowWarn(...args) {
29
+ if (shouldShowLogs()) {
30
+ console.warn(...args);
31
+ }
32
+ }
33
+ /**
34
+ * Conditional console.error that only logs if SHOW_WORKFLOW_ENGINE_LOGS is enabled
35
+ * Note: Error logs might be important, but we'll respect the flag for consistency
36
+ */
37
+ export function workflowError(...args) {
38
+ if (shouldShowLogs()) {
39
+ console.error(...args);
40
+ }
41
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.middleware.d.ts","sourceRoot":"","sources":["../../shared/workflow.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,OAAO,EACH,oBAAoB,EAEpB,yBAAyB,EAC5B,MAAM,4BAA4B,CAAC;AAIpC,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,OAAO,CAA4B;gBAE/B,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAYxD;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;OAGG;IACH,UAAU;;;IAMV;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM;yBAGK,GAAG,OAAO,GAAG,QAAQ,QAAQ;2BAiB3B,GAAG,OAAO,GAAG,QAAQ,QAAQ;;IAkBvE;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B5E;;;;;OAKG;YACW,cAAc;IAqD5B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkBzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAavB;;;;;OAKG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5F;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;;;EAGxG;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,QAShI"}
1
+ {"version":3,"file":"workflow.middleware.d.ts","sourceRoot":"","sources":["../../shared/workflow.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,OAAO,EACH,oBAAoB,EAEpB,yBAAyB,EAC5B,MAAM,4BAA4B,CAAC;AAKpC,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,OAAO,CAA4B;gBAE/B,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAYxD;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAS/B;;;OAGG;IACH,UAAU;;;IAMV;;;;OAIG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM;yBAGK,GAAG,OAAO,GAAG,QAAQ,QAAQ;2BAiB3B,GAAG,OAAO,GAAG,QAAQ,QAAQ;;IAkBvE;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B5E;;;;;OAKG;YACW,cAAc;IAqD5B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkBzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAavB;;;;;OAKG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5F;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC;;;EAGxG;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,QAShI"}