@dynamatix/gb-schemas 2.3.255 → 2.3.257

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.
@@ -1 +1 @@
1
- {"version":3,"file":"application-company-model.d.ts","sourceRoot":"","sources":["../../applications/application-company-model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAe,MAAM,0BAA0B,CAAA;AA8I7D,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsD,CAAC;AACpF,eAAe,uBAAuB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import mongoose from "mongoose";
2
2
  import { Pound, formatPound } from "./../value-objects/pound";
3
3
  import { AccountNumber } from "../value-objects/account-number";
4
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
4
5
  const ApplicantShareholdingSchema = new mongoose.Schema({
5
6
  applicantId: { type: mongoose.Schema.Types.ObjectId, ref: "Applicant", required: true, default: null },
6
7
  applicantName: { type: String, default: "" },
@@ -119,5 +120,7 @@ const virtualApplicationType = companySchema.virtual('applicationType', {
119
120
  options: { select: 'label' }
120
121
  });
121
122
  virtualApplicationType.description = 'Populated lookup value for application type';
123
+ // Apply workflow plugin to the schema
124
+ applyWorkflowPlugin(companySchema, 'applicationcompany');
122
125
  const ApplicationCompanyModel = mongoose.model("ApplicationCompany", companySchema);
123
126
  export default ApplicationCompanyModel;
@@ -1 +1 @@
1
- {"version":3,"file":"product-catalogue.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-catalogue.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAmBhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"product-catalogue.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-catalogue.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAuBhC,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC;AACzF,eAAe,qBAAqB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  const productCatalogueSchema = new mongoose.Schema({
3
4
  productCatalogueId: { type: String, required: true },
4
5
  name: { type: String, required: true },
@@ -14,5 +15,7 @@ const productCatalogueSchema = new mongoose.Schema({
14
15
  }, {
15
16
  timestamps: true
16
17
  });
18
+ // Apply workflow plugin to the schema
19
+ applyWorkflowPlugin(productCatalogueSchema, 'productcatalogue');
17
20
  const ProductCatalogueModel = mongoose.model('ProductCatalogue', productCatalogueSchema);
18
21
  export default ProductCatalogueModel;
@@ -1 +1 @@
1
- {"version":3,"file":"product-definitions.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-definitions.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA4BhC,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiE,CAAC;AAC/F,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"product-definitions.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-definitions.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAgChC,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiE,CAAC;AAC/F,eAAe,uBAAuB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  const ruleSchema = new mongoose.Schema({
3
4
  ruleId: { type: String, required: true },
4
5
  rule: { type: String, required: true }, // Storing as a string (JSON stringified)
@@ -22,5 +23,7 @@ const productDefinitionsSchema = new mongoose.Schema({
22
23
  }, {
23
24
  timestamps: true
24
25
  });
26
+ // Apply workflow plugin to the schema
27
+ applyWorkflowPlugin(productDefinitionsSchema, 'productdefinitions');
25
28
  const ProductDefinitionsModel = mongoose.model('ProductDefinitions', productDefinitionsSchema);
26
29
  export default ProductDefinitionsModel;
@@ -1 +1 @@
1
- {"version":3,"file":"product-variant.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-variant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAchC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"product-variant.model.d.ts","sourceRoot":"","sources":["../../product-catalogues/product-variant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAkBhC,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAyD,CAAC;AACnF,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  const productVariantSchema = new mongoose.Schema({
3
4
  productCatalogueId: { ref: "ProductCatalogue", type: mongoose.Schema.Types.ObjectId, required: true },
4
5
  variantid: { type: String, required: true },
@@ -8,5 +9,7 @@ const productVariantSchema = new mongoose.Schema({
8
9
  }, {
9
10
  timestamps: true
10
11
  });
12
+ // Apply workflow plugin to the schema
13
+ applyWorkflowPlugin(productVariantSchema, 'productvariant');
11
14
  const ProductVariantModel = mongoose.model('ProductVariant', productVariantSchema);
12
15
  export default ProductVariantModel;
@@ -1 +1 @@
1
- {"version":3,"file":"property.model.d.ts","sourceRoot":"","sources":["../../properties/property.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import mongoose from 'mongoose';
2
2
  import { Pound, formatPound } from '../value-objects/pound';
3
+ import { applyWorkflowPlugin } from '../shared/workflow.plugin';
3
4
  const propertySchema = new mongoose.Schema({
4
5
  applicationId: {
5
6
  type: mongoose.Schema.Types.ObjectId, ref: "Application",
@@ -145,5 +146,7 @@ propertySchema.virtual('lendingType').get(function () {
145
146
  ? null
146
147
  : this.applicationId?.lendingTypeLid?.name || null;
147
148
  });
149
+ // Apply workflow plugin to the schema
150
+ applyWorkflowPlugin(propertySchema, 'property');
148
151
  const PropertyModel = mongoose.model('Property', propertySchema);
149
152
  export default PropertyModel;
@@ -1 +1 @@
1
- {"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA6JhC,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;AAiKhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
@@ -1,6 +1,7 @@
1
1
  // security.model.ts
2
2
  import mongoose from "mongoose";
3
3
  import { Pound, formatPound } from "../value-objects/pound";
4
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
4
5
  const dataStreetSchema = new mongoose.Schema({
5
6
  floorArea: { type: String, default: '' },
6
7
  propertyType: { type: String, default: '' },
@@ -142,5 +143,7 @@ securitySchema.virtual('lendingType').get(function () {
142
143
  ? null
143
144
  : this.applicationId?.lendingTypeLid?.name || null;
144
145
  });
146
+ // Apply workflow plugin to the schema
147
+ applyWorkflowPlugin(securitySchema, 'security');
145
148
  const SecurityModel = mongoose.model("Security", securitySchema);
146
149
  export default SecurityModel;
@@ -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;IA8C5B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkBzB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAYvB;;;;;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,CAA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,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,QAShI"}
@@ -124,16 +124,23 @@ export class WorkflowMiddleware {
124
124
  }
125
125
  // Extract variables from document
126
126
  console.log('Extracting variables from document');
127
+ console.log(` Required variables: ${JSON.stringify(trigger.requiredVariables)}`);
128
+ console.log(` Optional variables: ${JSON.stringify(trigger.optionalVariables || [])}`);
127
129
  const variables = this.workflowService.extractVariables(trigger.requiredVariables, trigger.optionalVariables || [], document);
130
+ console.log(` Extracted variables: ${JSON.stringify(variables, null, 2)}`);
128
131
  // Validate required variables
129
132
  if (!this.workflowService.validateRequiredVariables(trigger.requiredVariables, variables)) {
130
- console.warn(`Required variables missing for trigger ${trigger.triggerKey}`);
133
+ console.warn(`❌ Required variables missing for trigger ${trigger.triggerKey}`);
134
+ console.warn(` Required: ${JSON.stringify(trigger.requiredVariables)}`);
135
+ console.warn(` Got: ${JSON.stringify(variables)}`);
131
136
  return;
132
137
  }
133
138
  // Add metadata
139
+ const metadata = this.extractMetadata(document, event);
140
+ console.log(` Metadata: ${JSON.stringify(metadata, null, 2)}`);
134
141
  const enrichedVariables = {
135
142
  ...variables,
136
- ...this.extractMetadata(document, event)
143
+ ...metadata
137
144
  };
138
145
  // Create workflow payload
139
146
  const payload = {
@@ -141,6 +148,7 @@ export class WorkflowMiddleware {
141
148
  version: 1, // Default version, could be made configurable
142
149
  variables: enrichedVariables
143
150
  };
151
+ console.log('📦 Workflow payload:', JSON.stringify(payload, null, 2));
144
152
  // Trigger workflow in background
145
153
  await this.workflowService.triggerWorkflow(payload);
146
154
  console.log(`Workflow ${trigger.workflowKey} triggered for ${event.triggerKey}`);
@@ -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;AAExF,qBAA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@@ export class WorkflowService {
47
47
  let lastError = null;
48
48
  for (let attempt = 1; attempt <= this.options.retryAttempts; attempt++) {
49
49
  try {
50
+ console.log(`🚀 Workflow API call attempt ${attempt}:`);
51
+ console.log(` URL: ${this.options.workflowApiUrl}`);
52
+ console.log(` Payload: ${JSON.stringify(payload, null, 2)}`);
50
53
  const response = await fetch(this.options.workflowApiUrl, requestOptions);
51
54
  if (!response.ok) {
52
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
55
+ // Try to get error details from response body
56
+ let errorDetails = response.statusText;
57
+ try {
58
+ const errorBody = await response.text();
59
+ if (errorBody) {
60
+ errorDetails = errorBody;
61
+ }
62
+ }
63
+ catch (e) {
64
+ // Ignore if we can't read the body
65
+ }
66
+ throw new Error(`HTTP ${response.status}: ${errorDetails}`);
53
67
  }
54
68
  const result = await response.json();
55
69
  console.log(`Workflow ${payload.workflowKey} triggered successfully:`, result);
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.model.d.ts","sourceRoot":"","sources":["../../users/tasks.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAgBhC,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuC,CAAC;AAExD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"tasks.model.d.ts","sourceRoot":"","sources":["../../users/tasks.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAoBhC,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAuC,CAAC;AAExD,eAAe,UAAU,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import { applyWorkflowPlugin } from "../shared/workflow.plugin";
2
3
  const TasksSchema = new mongoose.Schema({
3
4
  taskTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // LookupGroup: TaskType ["Document", "Information"]
4
5
  actionTypeLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", default: null }, // Example: "Request Document Delete"
@@ -11,5 +12,7 @@ const TasksSchema = new mongoose.Schema({
11
12
  }, {
12
13
  timestamps: true
13
14
  });
14
- const TasksModel = mongoose.model("Tasks", TasksSchema);
15
+ // Apply workflow plugin to the schema
16
+ applyWorkflowPlugin(TasksSchema, 'tasks');
17
+ const TasksModel = mongoose.model('Tasks', TasksSchema);
15
18
  export default TasksModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.3.255",
3
+ "version": "2.3.257",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",