sowell-models 1.27.1 → 1.29.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sowell-models",
3
- "version": "1.27.1",
3
+ "version": "1.29.0",
4
4
  "description": "SoWell models",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -15,7 +15,7 @@
15
15
  "build/**/*"
16
16
  ],
17
17
  "engines": {
18
- "node": ">= 20.9 < 21 || ^22"
18
+ "node": ">=20.0.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@eslint/js": "~9.10",
@@ -19,6 +19,12 @@ export enum CheckpointStatus {
19
19
  PENDING = "PENDING"
20
20
  }
21
21
 
22
+ export interface VisitReportMetadata {
23
+ comment_imgs_count: number,
24
+ issue_reports_count: number,
25
+ issue_reports_imgs_count: number
26
+ }
27
+
22
28
  export interface VisitReportPayload {
23
29
  visitSchedule?: string
24
30
  checkpoints: CheckpointProps[]
@@ -35,7 +41,8 @@ export interface VisitReportPayload {
35
41
  providerCompany?: {
36
42
  id: string
37
43
  name: string
38
- }
44
+ },
45
+ metadata?: VisitReportMetadata
39
46
  }
40
47
 
41
48
  export interface CheckpointProps {
@@ -76,6 +83,7 @@ export interface IVisitReport extends IModel {
76
83
  id: string
77
84
  name: string
78
85
  }
86
+ metadata?: VisitReportMetadata
79
87
  validate?: (payload: VisitReportPayload) => string
80
88
  }
81
89
 
@@ -95,6 +103,7 @@ export class SPVisitReport extends ApplicationRecord implements IVisitReport {
95
103
  id: string
96
104
  name: string
97
105
  }
106
+ @Attr() metadata!: VisitReportMetadata
98
107
  @BelongsTo() author!: SPUserItem
99
108
  @BelongsTo() visitSchedule!: SPVisitSchedule
100
109
  @BelongsTo() checklist!: SPChecklistItem