@dynamatix/gb-schemas 2.3.367 → 2.3.369

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 (29) 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/application.model.d.ts +6 -0
  12. package/dist/applications/application.model.d.ts.map +1 -1
  13. package/dist/applications/application.model.js +1 -0
  14. package/dist/applications/document.model.d.ts +158 -0
  15. package/dist/applications/document.model.d.ts.map +1 -0
  16. package/dist/applications/productfeatures.model.d.ts +368 -0
  17. package/dist/applications/productfeatures.model.d.ts.map +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/package.json +87 -87
  21. package/dist/shared/audit-log.model.d.ts +0 -180
  22. package/dist/shared/audit-log.model.d.ts.map +0 -1
  23. package/dist/shared/audit-log.model.js +0 -43
  24. package/dist/shared/document.model.d.ts +0 -180
  25. package/dist/shared/document.model.d.ts.map +0 -1
  26. package/dist/shared/document.model.js +0 -40
  27. package/dist/shared/queue.model.d.ts +0 -180
  28. package/dist/shared/queue.model.d.ts.map +0 -1
  29. package/dist/shared/queue.model.js +0 -42
@@ -1,42 +0,0 @@
1
- import mongoose from "mongoose";
2
- import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
3
- import { applyWorkflowPlugin } from "./workflow.plugin";
4
- const queueSchema = new mongoose.Schema({
5
- name: { type: String, required: true, unique: true },
6
- description: { type: String, required: false },
7
- isActive: { type: Boolean, default: true },
8
- priority: { type: Number, default: 0 },
9
- maxConcurrency: { type: Number, default: 1 },
10
- retryAttempts: { type: Number, default: 3 },
11
- retryDelay: { type: Number, default: 5000 }, // milliseconds
12
- processingTimeout: { type: Number, default: 300000 }, // 5 minutes in milliseconds
13
- assignedUsers: [{ type: mongoose.Schema.Types.ObjectId, ref: "User" }],
14
- departmentId: { type: mongoose.Schema.Types.ObjectId, ref: "Department", required: false },
15
- workflowId: { type: mongoose.Schema.Types.ObjectId, ref: "Workflow", required: false },
16
- settings: { type: mongoose.Schema.Types.Mixed, required: false },
17
- statistics: {
18
- totalProcessed: { type: Number, default: 0 },
19
- totalFailed: { type: Number, default: 0 },
20
- averageProcessingTime: { type: Number, default: 0 },
21
- lastProcessedAt: { type: Date, required: false }
22
- }
23
- }, {
24
- timestamps: true,
25
- toJSON: { virtuals: true },
26
- toObject: { virtuals: true }
27
- });
28
- // Virtual for current queue size (would need to be populated from related collections)
29
- queueSchema.virtual('currentSize').get(function () {
30
- // This would typically be calculated by counting related queue items
31
- return 0;
32
- });
33
- applyAuditMiddleware(queueSchema, "Queue");
34
- applyWorkflowPlugin(queueSchema, 'queue');
35
- // Add indexes to match database
36
- queueSchema.index({ name: 1 }, { unique: true }); // Unique queue name
37
- queueSchema.index({ isActive: 1 }); // Filter by active status
38
- queueSchema.index({ priority: -1 }); // Sort by priority (highest first)
39
- queueSchema.index({ departmentId: 1 }); // Filter by department
40
- queueSchema.index({ isActive: 1, priority: -1 }); // Compound: active + priority
41
- const QueueModel = mongoose.model("Queue", queueSchema);
42
- export default QueueModel;