@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.
- package/README.md +308 -308
- package/dist/applicants/applicant-income-source.model.d.ts +26 -0
- package/dist/applicants/applicant-income-source.model.d.ts.map +1 -0
- package/dist/applicants/applicant-income.model.d.ts +160 -0
- package/dist/applicants/applicant-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-other-income.model.d.ts +85 -0
- package/dist/applicants/applicant-other-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-welcome-call.model.js +9 -9
- package/dist/applications/application-document.model.d.ts +158 -0
- package/dist/applications/application-document.model.d.ts.map +1 -0
- package/dist/applications/document.model.d.ts +158 -0
- package/dist/applications/document.model.d.ts.map +1 -0
- package/dist/applications/productfeatures.model.d.ts +368 -0
- package/dist/applications/productfeatures.model.d.ts.map +1 -0
- package/dist/properties/security.model.d.ts +6 -0
- package/dist/properties/security.model.d.ts.map +1 -1
- package/dist/properties/security.model.js +1 -0
- package/dist/shared/document-type-model.d.ts +48 -0
- package/dist/shared/document-type-model.d.ts.map +1 -0
- package/dist/shared/workflow.init.d.ts.map +1 -1
- package/dist/shared/workflow.init.js +5 -4
- package/dist/shared/workflow.logger.d.ts +18 -0
- package/dist/shared/workflow.logger.d.ts.map +1 -0
- package/dist/shared/workflow.logger.js +41 -0
- package/dist/shared/workflow.middleware.d.ts.map +1 -1
- package/dist/shared/workflow.middleware.js +24 -23
- package/dist/shared/workflow.plugin.d.ts.map +1 -1
- package/dist/shared/workflow.plugin.js +15 -14
- package/dist/shared/workflow.service.d.ts.map +1 -1
- package/dist/shared/workflow.service.js +7 -6
- package/package.json +87 -87
|
@@ -2,6 +2,7 @@ import WorkflowTriggerModel from './workflow-trigger.model.js';
|
|
|
2
2
|
import { WorkflowService } from './workflow.service.js';
|
|
3
3
|
// @ts-ignore - No type declarations available for @dynamatix/cat-shared/services
|
|
4
4
|
import { getContext as getSharedContext } from '@dynamatix/cat-shared/services';
|
|
5
|
+
import { workflowLog, workflowWarn, workflowError } from './workflow.logger.js';
|
|
5
6
|
export class WorkflowMiddleware {
|
|
6
7
|
constructor(options) {
|
|
7
8
|
// Read configuration from environment variables with fallbacks
|
|
@@ -22,7 +23,7 @@ export class WorkflowMiddleware {
|
|
|
22
23
|
return WorkflowTriggerModel;
|
|
23
24
|
}
|
|
24
25
|
catch (error) {
|
|
25
|
-
|
|
26
|
+
workflowError('Error accessing WorkflowTrigger model:', error);
|
|
26
27
|
throw new Error('WorkflowTrigger model is not properly registered');
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -47,7 +48,7 @@ export class WorkflowMiddleware {
|
|
|
47
48
|
// Post-save middleware for create and update operations
|
|
48
49
|
postSave: async function (doc, next) {
|
|
49
50
|
try {
|
|
50
|
-
|
|
51
|
+
workflowLog('Post-save middleware for create and update operations');
|
|
51
52
|
const middleware = new WorkflowMiddleware(this.options || {});
|
|
52
53
|
await middleware.handleEvent({
|
|
53
54
|
recordType,
|
|
@@ -56,7 +57,7 @@ export class WorkflowMiddleware {
|
|
|
56
57
|
}, doc);
|
|
57
58
|
}
|
|
58
59
|
catch (error) {
|
|
59
|
-
|
|
60
|
+
workflowError('Workflow middleware error:', error);
|
|
60
61
|
// Don't throw error to avoid breaking the main operation
|
|
61
62
|
}
|
|
62
63
|
next();
|
|
@@ -64,7 +65,7 @@ export class WorkflowMiddleware {
|
|
|
64
65
|
// Post-remove middleware for delete operations
|
|
65
66
|
postRemove: async function (doc, next) {
|
|
66
67
|
try {
|
|
67
|
-
|
|
68
|
+
workflowLog('Post-remove middleware for delete operations');
|
|
68
69
|
const middleware = new WorkflowMiddleware(this.options || {});
|
|
69
70
|
await middleware.handleEvent({
|
|
70
71
|
recordType,
|
|
@@ -73,7 +74,7 @@ export class WorkflowMiddleware {
|
|
|
73
74
|
}, doc);
|
|
74
75
|
}
|
|
75
76
|
catch (error) {
|
|
76
|
-
|
|
77
|
+
workflowError('Workflow middleware error:', error);
|
|
77
78
|
// Don't throw error to avoid breaking the main operation
|
|
78
79
|
}
|
|
79
80
|
next();
|
|
@@ -88,24 +89,24 @@ export class WorkflowMiddleware {
|
|
|
88
89
|
async handleEvent(event, document) {
|
|
89
90
|
try {
|
|
90
91
|
// Find active triggers for this event
|
|
91
|
-
|
|
92
|
+
workflowLog('Finding active triggers for this event');
|
|
92
93
|
const WorkflowTrigger = this.getWorkflowTriggerModel();
|
|
93
94
|
const triggers = await WorkflowTrigger.find({
|
|
94
95
|
triggerKey: event.triggerKey,
|
|
95
96
|
isActive: true
|
|
96
97
|
});
|
|
97
98
|
if (triggers.length === 0) {
|
|
98
|
-
|
|
99
|
+
workflowLog(`No active triggers found for ${event.triggerKey}`);
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
101
102
|
// Process each trigger
|
|
102
|
-
|
|
103
|
+
workflowLog('Processing each trigger');
|
|
103
104
|
for (const trigger of triggers) {
|
|
104
105
|
await this.processTrigger(trigger, document, event);
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
catch (error) {
|
|
108
|
-
|
|
109
|
+
workflowError(`Error handling workflow event ${event.triggerKey}:`, error);
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
/**
|
|
@@ -116,28 +117,28 @@ export class WorkflowMiddleware {
|
|
|
116
117
|
*/
|
|
117
118
|
async processTrigger(trigger, document, event) {
|
|
118
119
|
try {
|
|
119
|
-
|
|
120
|
+
workflowLog('Processing trigger');
|
|
120
121
|
// Check if condition is met (if specified)
|
|
121
122
|
if (trigger.condition && !this.evaluateCondition(trigger.condition, document)) {
|
|
122
|
-
|
|
123
|
+
workflowLog(`Condition not met for trigger ${trigger.triggerKey}`);
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
125
126
|
// Extract variables from document
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
workflowLog('Extracting variables from document');
|
|
128
|
+
workflowLog(` Required variables: ${JSON.stringify(trigger.requiredVariables)}`);
|
|
129
|
+
workflowLog(` Optional variables: ${JSON.stringify(trigger.optionalVariables || [])}`);
|
|
129
130
|
const variables = this.workflowService.extractVariables(trigger.requiredVariables, trigger.optionalVariables || [], document);
|
|
130
|
-
|
|
131
|
+
workflowLog(` Extracted variables: ${JSON.stringify(variables, null, 2)}`);
|
|
131
132
|
// Validate required variables
|
|
132
133
|
if (!this.workflowService.validateRequiredVariables(trigger.requiredVariables, variables)) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
workflowWarn(`❌ Required variables missing for trigger ${trigger.triggerKey}`);
|
|
135
|
+
workflowWarn(` Required: ${JSON.stringify(trigger.requiredVariables)}`);
|
|
136
|
+
workflowWarn(` Got: ${JSON.stringify(variables)}`);
|
|
136
137
|
return;
|
|
137
138
|
}
|
|
138
139
|
// Add metadata
|
|
139
140
|
const metadata = this.extractMetadata(document, event, trigger.parentKey);
|
|
140
|
-
|
|
141
|
+
workflowLog(` Metadata: ${JSON.stringify(metadata, null, 2)}`);
|
|
141
142
|
const enrichedVariables = {
|
|
142
143
|
...variables,
|
|
143
144
|
...metadata
|
|
@@ -148,13 +149,13 @@ export class WorkflowMiddleware {
|
|
|
148
149
|
version: 1, // Default version, could be made configurable
|
|
149
150
|
variables: enrichedVariables
|
|
150
151
|
};
|
|
151
|
-
|
|
152
|
+
workflowLog('📦 Workflow payload:', JSON.stringify(payload, null, 2));
|
|
152
153
|
// Trigger workflow in background
|
|
153
154
|
await this.workflowService.triggerWorkflow(payload);
|
|
154
|
-
|
|
155
|
+
workflowLog(`Workflow ${trigger.workflowKey} triggered for ${event.triggerKey}`);
|
|
155
156
|
}
|
|
156
157
|
catch (error) {
|
|
157
|
-
|
|
158
|
+
workflowError(`Error processing trigger ${trigger.triggerKey}:`, error);
|
|
158
159
|
}
|
|
159
160
|
}
|
|
160
161
|
/**
|
|
@@ -176,7 +177,7 @@ export class WorkflowMiddleware {
|
|
|
176
177
|
return true;
|
|
177
178
|
}
|
|
178
179
|
catch (error) {
|
|
179
|
-
|
|
180
|
+
workflowError('Error evaluating condition:', error);
|
|
180
181
|
return false;
|
|
181
182
|
}
|
|
182
183
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.plugin.d.ts","sourceRoot":"","sources":["../../shared/workflow.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.plugin.d.ts","sourceRoot":"","sources":["../../shared/workflow.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,QAyGnE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,SAGrC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,QAE9E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
import { WorkflowMiddleware } from './workflow.middleware.js';
|
|
3
|
+
import { workflowLog, workflowError } from './workflow.logger.js';
|
|
3
4
|
/**
|
|
4
5
|
* Workflow plugin that automatically applies workflow middleware to schemas
|
|
5
6
|
* This plugin reads the record type from schema options and applies the appropriate middleware
|
|
@@ -7,17 +8,17 @@ import { WorkflowMiddleware } from './workflow.middleware.js';
|
|
|
7
8
|
export function workflowPlugin(schema, options) {
|
|
8
9
|
// For global plugins, we'll determine the record type when the middleware is triggered
|
|
9
10
|
// by looking at the document's constructor name
|
|
10
|
-
|
|
11
|
+
workflowLog(`🔌 Workflow plugin applied to schema`);
|
|
11
12
|
// Create workflow middleware instance
|
|
12
13
|
const middleware = new WorkflowMiddleware();
|
|
13
14
|
// Apply post-save middleware
|
|
14
15
|
schema.post('save', async function (doc, next) {
|
|
15
16
|
// Determine record type from document constructor name
|
|
16
17
|
const recordType = doc.constructor.modelName?.toLowerCase() || 'unknown';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
workflowLog(`💾 Post-save middleware triggered for ${recordType}`);
|
|
19
|
+
workflowLog(` Document ID: ${doc._id}`);
|
|
20
|
+
workflowLog(` Is new: ${doc.isNew}`);
|
|
21
|
+
workflowLog(` Trigger key: ${recordType}.${doc.isNew ? 'created' : 'updated'}`);
|
|
21
22
|
try {
|
|
22
23
|
await middleware.handleEvent({
|
|
23
24
|
recordType,
|
|
@@ -26,7 +27,7 @@ export function workflowPlugin(schema, options) {
|
|
|
26
27
|
}, doc);
|
|
27
28
|
}
|
|
28
29
|
catch (error) {
|
|
29
|
-
|
|
30
|
+
workflowError('Workflow middleware error:', error);
|
|
30
31
|
// Don't throw error to avoid breaking the main operation
|
|
31
32
|
}
|
|
32
33
|
next();
|
|
@@ -34,9 +35,9 @@ export function workflowPlugin(schema, options) {
|
|
|
34
35
|
// Apply post-findOneAndUpdate middleware
|
|
35
36
|
schema.post('findOneAndUpdate', async function (doc, next) {
|
|
36
37
|
const recordType = doc.constructor.modelName?.toLowerCase() || 'unknown';
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
workflowLog(`🔄 Post-findOneAndUpdate middleware triggered for ${recordType}`);
|
|
39
|
+
workflowLog(` Document ID: ${doc._id}`);
|
|
40
|
+
workflowLog(` Trigger key: ${recordType}.updated`);
|
|
40
41
|
try {
|
|
41
42
|
await middleware.handleEvent({
|
|
42
43
|
recordType,
|
|
@@ -45,7 +46,7 @@ export function workflowPlugin(schema, options) {
|
|
|
45
46
|
}, doc);
|
|
46
47
|
}
|
|
47
48
|
catch (error) {
|
|
48
|
-
|
|
49
|
+
workflowError('Workflow middleware error:', error);
|
|
49
50
|
// Don't throw error to avoid breaking the main operation
|
|
50
51
|
}
|
|
51
52
|
next();
|
|
@@ -72,7 +73,7 @@ export function workflowPlugin(schema, options) {
|
|
|
72
73
|
else if (result?.constructor?.modelName) {
|
|
73
74
|
recordType = result.constructor.modelName.toLowerCase();
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
workflowLog(`🗑️ Post-delete middleware triggered for ${recordType}`);
|
|
76
77
|
try {
|
|
77
78
|
await middleware.handleEvent({
|
|
78
79
|
recordType,
|
|
@@ -81,14 +82,14 @@ export function workflowPlugin(schema, options) {
|
|
|
81
82
|
}, result);
|
|
82
83
|
}
|
|
83
84
|
catch (error) {
|
|
84
|
-
|
|
85
|
+
workflowError('Workflow middleware error:', error);
|
|
85
86
|
// Don't throw error to avoid breaking the main operation
|
|
86
87
|
}
|
|
87
88
|
next();
|
|
88
89
|
});
|
|
89
90
|
schema.post('findOneAndDelete', async function (doc, next) {
|
|
90
91
|
const recordType = doc.constructor.modelName?.toLowerCase() || 'unknown';
|
|
91
|
-
|
|
92
|
+
workflowLog(`🗑️ Post-findOneAndDelete middleware triggered for ${recordType}`);
|
|
92
93
|
try {
|
|
93
94
|
await middleware.handleEvent({
|
|
94
95
|
recordType,
|
|
@@ -97,7 +98,7 @@ export function workflowPlugin(schema, options) {
|
|
|
97
98
|
}, doc);
|
|
98
99
|
}
|
|
99
100
|
catch (error) {
|
|
100
|
-
|
|
101
|
+
workflowError('Workflow middleware error:', error);
|
|
101
102
|
// Don't throw error to avoid breaking the main operation
|
|
102
103
|
}
|
|
103
104
|
next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.service.d.ts","sourceRoot":"","sources":["../../shared/workflow.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.service.d.ts","sourceRoot":"","sources":["../../shared/workflow.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGxF,qBAAa,eAAe;IACxB,OAAO,CAAC,OAAO,CAA4B;gBAE/B,OAAO,EAAE,yBAAyB;IAS9C;;;;OAIG;IACG,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYjE;;;OAGG;YACW,mBAAmB;IA6DjC;;;;;OAKG;IACH,yBAAyB,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO;IAO1F;;;;;;OAMG;IACH,gBAAgB,CACZ,iBAAiB,EAAE,MAAM,EAAE,EAC3B,iBAAiB,EAAE,MAAM,EAAE,EAC3B,QAAQ,EAAE,GAAG,GACd,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAmBtB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAKzB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { workflowLog, workflowWarn, workflowError } from './workflow.logger.js';
|
|
1
2
|
export class WorkflowService {
|
|
2
3
|
constructor(options) {
|
|
3
4
|
this.options = {
|
|
@@ -19,7 +20,7 @@ export class WorkflowService {
|
|
|
19
20
|
await this.executeWorkflowCall(payload);
|
|
20
21
|
}
|
|
21
22
|
catch (error) {
|
|
22
|
-
|
|
23
|
+
workflowError('Workflow execution failed:', error);
|
|
23
24
|
// Could implement retry logic or error reporting here
|
|
24
25
|
}
|
|
25
26
|
}, 1000);
|
|
@@ -47,9 +48,9 @@ export class WorkflowService {
|
|
|
47
48
|
let lastError = null;
|
|
48
49
|
for (let attempt = 1; attempt <= this.options.retryAttempts; attempt++) {
|
|
49
50
|
try {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
workflowLog(`🚀 Workflow API call attempt ${attempt}:`);
|
|
52
|
+
workflowLog(` URL: ${this.options.workflowApiUrl}`);
|
|
53
|
+
workflowLog(` Payload: ${JSON.stringify(payload, null, 2)}`);
|
|
53
54
|
const response = await fetch(this.options.workflowApiUrl, requestOptions);
|
|
54
55
|
if (!response.ok) {
|
|
55
56
|
// Try to get error details from response body
|
|
@@ -66,12 +67,12 @@ export class WorkflowService {
|
|
|
66
67
|
throw new Error(`HTTP ${response.status}: ${errorDetails}`);
|
|
67
68
|
}
|
|
68
69
|
const result = await response.json();
|
|
69
|
-
|
|
70
|
+
workflowLog(`✅ Workflow ${payload.workflowKey} triggered successfully: ${JSON.stringify(result, null, 2)}`);
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
73
|
catch (error) {
|
|
73
74
|
lastError = error;
|
|
74
|
-
|
|
75
|
+
workflowWarn(`Workflow API call attempt ${attempt} failed:`, error);
|
|
75
76
|
if (attempt < this.options.retryAttempts) {
|
|
76
77
|
// Wait before retrying
|
|
77
78
|
await new Promise(resolve => setTimeout(resolve, this.options.retryDelay * attempt));
|
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dynamatix/gb-schemas",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "All the schemas for gatehouse bank back-end",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"test:workflow": "npm run build && node test-workflow.js",
|
|
12
|
-
"test:workflow:env": "npm run build && WORKFLOW_API_KEY=test-key WORKFLOW_API_URL=http://localhost:3000/api/workflows node test-workflow-with-env.js",
|
|
13
|
-
"example:app": "npm run build && node example-app-usage.js",
|
|
14
|
-
"test:workflow:triggers": "npm run build && node test-workflow-with-triggers.js",
|
|
15
|
-
"test:workflow:direct": "npm run build && node test-direct-middleware.js",
|
|
16
|
-
"patch": "tsc && npm version patch && npm publish --access public && exit 0",
|
|
17
|
-
"generate-docs": "NODE_OPTIONS='--loader ts-node/esm' ts-node schema-docs/docs.seeder.ts",
|
|
18
|
-
"example:income": "NODE_OPTIONS='--loader ts-node/esm' ts-node examples/add-applicant-income.ts",
|
|
19
|
-
"migrate:applicant-income": "node migrate-applicant-income.js",
|
|
20
|
-
"migrate:self-employed-id": "node migrate-self-employed-id.js",
|
|
21
|
-
"check:applicants-employment": "node check-applicants-without-employment.js",
|
|
22
|
-
"delete:applications-by-type": "node delete-applications-by-type.js",
|
|
23
|
-
"find:applications-many-audits": "node find-applications-with-many-audits.js",
|
|
24
|
-
"update:apiconfigs-paths": "node scripts/update-apiconfigs-paths.js",
|
|
25
|
-
"seed:property-metadata": "node scripts/seed-property-metadata.js",
|
|
26
|
-
"migrate:lookups-qa-to-uat": "node scripts/update-lookups-qa-to-uat.js"
|
|
27
|
-
},
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas.git"
|
|
31
|
-
},
|
|
32
|
-
"author": "Dynamatix",
|
|
33
|
-
"license": "ISC",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas/issues"
|
|
36
|
-
},
|
|
37
|
-
"homepage": "https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas#readme",
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@dynamatix/cat-shared": "^0.0.151",
|
|
40
|
-
"dotenv": "^16.4.5",
|
|
41
|
-
"mongodb": "^6.14.2",
|
|
42
|
-
"mongoose": "^8.9.5"
|
|
43
|
-
},
|
|
44
|
-
"files": [
|
|
45
|
-
"dist"
|
|
46
|
-
],
|
|
47
|
-
"exports": {
|
|
48
|
-
".": {
|
|
49
|
-
"import": "./dist/index.js",
|
|
50
|
-
"types": "./dist/index.d.ts"
|
|
51
|
-
},
|
|
52
|
-
"./applications": {
|
|
53
|
-
"import": "./dist/applications/index.js",
|
|
54
|
-
"types": "./dist/applications/index.d.ts"
|
|
55
|
-
},
|
|
56
|
-
"./applicants": {
|
|
57
|
-
"import": "./dist/applicants/index.js",
|
|
58
|
-
"types": "./dist/applicants/index.d.ts"
|
|
59
|
-
},
|
|
60
|
-
"./shared": {
|
|
61
|
-
"import": "./dist/shared/index.js",
|
|
62
|
-
"types": "./dist/shared/index.d.ts"
|
|
63
|
-
},
|
|
64
|
-
"./properties": {
|
|
65
|
-
"import": "./dist/properties/index.js",
|
|
66
|
-
"types": "./dist/properties/index.d.ts"
|
|
67
|
-
},
|
|
68
|
-
"./users": {
|
|
69
|
-
"import": "./dist/users/index.js",
|
|
70
|
-
"types": "./dist/users/index.d.ts"
|
|
71
|
-
},
|
|
72
|
-
"./product-catalogues": {
|
|
73
|
-
"import": "./dist/product-catalogues/index.js",
|
|
74
|
-
"types": "./dist/product-catalogues/index.d.ts"
|
|
75
|
-
},
|
|
76
|
-
"./underwriter": {
|
|
77
|
-
"import": "./dist/underwriter/index.js",
|
|
78
|
-
"types": "./dist/underwriter/index.d.ts"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"devDependencies": {
|
|
82
|
-
"@types/mongoose": "^5.11.96",
|
|
83
|
-
"@types/node": "^22.14.0",
|
|
84
|
-
"ts-node": "^10.9.2",
|
|
85
|
-
"typescript": "^5.3.3"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dynamatix/gb-schemas",
|
|
3
|
+
"version": "2.3.372",
|
|
4
|
+
"description": "All the schemas for gatehouse bank back-end",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"test:workflow": "npm run build && node test-workflow.js",
|
|
12
|
+
"test:workflow:env": "npm run build && WORKFLOW_API_KEY=test-key WORKFLOW_API_URL=http://localhost:3000/api/workflows node test-workflow-with-env.js",
|
|
13
|
+
"example:app": "npm run build && node example-app-usage.js",
|
|
14
|
+
"test:workflow:triggers": "npm run build && node test-workflow-with-triggers.js",
|
|
15
|
+
"test:workflow:direct": "npm run build && node test-direct-middleware.js",
|
|
16
|
+
"patch": "tsc && npm version patch && npm publish --access public && exit 0",
|
|
17
|
+
"generate-docs": "NODE_OPTIONS='--loader ts-node/esm' ts-node schema-docs/docs.seeder.ts",
|
|
18
|
+
"example:income": "NODE_OPTIONS='--loader ts-node/esm' ts-node examples/add-applicant-income.ts",
|
|
19
|
+
"migrate:applicant-income": "node migrate-applicant-income.js",
|
|
20
|
+
"migrate:self-employed-id": "node migrate-self-employed-id.js",
|
|
21
|
+
"check:applicants-employment": "node check-applicants-without-employment.js",
|
|
22
|
+
"delete:applications-by-type": "node delete-applications-by-type.js",
|
|
23
|
+
"find:applications-many-audits": "node find-applications-with-many-audits.js",
|
|
24
|
+
"update:apiconfigs-paths": "node scripts/update-apiconfigs-paths.js",
|
|
25
|
+
"seed:property-metadata": "node scripts/seed-property-metadata.js",
|
|
26
|
+
"migrate:lookups-qa-to-uat": "node scripts/update-lookups-qa-to-uat.js"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas.git"
|
|
31
|
+
},
|
|
32
|
+
"author": "Dynamatix",
|
|
33
|
+
"license": "ISC",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/DynamatixAnalyticsPvtLtd/gb-schemas#readme",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@dynamatix/cat-shared": "^0.0.151",
|
|
40
|
+
"dotenv": "^16.4.5",
|
|
41
|
+
"mongodb": "^6.14.2",
|
|
42
|
+
"mongoose": "^8.9.5"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist"
|
|
46
|
+
],
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"import": "./dist/index.js",
|
|
50
|
+
"types": "./dist/index.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"./applications": {
|
|
53
|
+
"import": "./dist/applications/index.js",
|
|
54
|
+
"types": "./dist/applications/index.d.ts"
|
|
55
|
+
},
|
|
56
|
+
"./applicants": {
|
|
57
|
+
"import": "./dist/applicants/index.js",
|
|
58
|
+
"types": "./dist/applicants/index.d.ts"
|
|
59
|
+
},
|
|
60
|
+
"./shared": {
|
|
61
|
+
"import": "./dist/shared/index.js",
|
|
62
|
+
"types": "./dist/shared/index.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./properties": {
|
|
65
|
+
"import": "./dist/properties/index.js",
|
|
66
|
+
"types": "./dist/properties/index.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./users": {
|
|
69
|
+
"import": "./dist/users/index.js",
|
|
70
|
+
"types": "./dist/users/index.d.ts"
|
|
71
|
+
},
|
|
72
|
+
"./product-catalogues": {
|
|
73
|
+
"import": "./dist/product-catalogues/index.js",
|
|
74
|
+
"types": "./dist/product-catalogues/index.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./underwriter": {
|
|
77
|
+
"import": "./dist/underwriter/index.js",
|
|
78
|
+
"types": "./dist/underwriter/index.d.ts"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@types/mongoose": "^5.11.96",
|
|
83
|
+
"@types/node": "^22.14.0",
|
|
84
|
+
"ts-node": "^10.9.2",
|
|
85
|
+
"typescript": "^5.3.3"
|
|
86
|
+
}
|
|
87
|
+
}
|