dt-common-device 4.0.7 → 5.0.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.
Files changed (211) hide show
  1. package/dist/alerts/Alert.service.d.ts +1 -1
  2. package/dist/audit/AuditUtils.d.ts +26 -2
  3. package/dist/audit/AuditUtils.js +255 -32
  4. package/dist/audit/IAuditProperties.d.ts +32 -0
  5. package/dist/audit/IAuditProperties.js +13 -0
  6. package/dist/audit/PushAudit.d.ts +5 -0
  7. package/dist/audit/PushAudit.js +16 -0
  8. package/dist/audit/index.d.ts +2 -0
  9. package/dist/audit/index.js +18 -0
  10. package/dist/config/config.d.ts +10 -3
  11. package/dist/config/config.js +120 -47
  12. package/dist/config/config.types.d.ts +1 -8
  13. package/dist/config/constants.d.ts +49 -0
  14. package/dist/config/constants.js +64 -0
  15. package/dist/db/db.d.ts +2 -0
  16. package/dist/db/db.js +23 -1
  17. package/dist/entities/accessGroup/AccessGroup.repository.d.ts +5 -0
  18. package/dist/entities/accessGroup/AccessGroup.repository.js +72 -0
  19. package/dist/entities/accessGroup/AccessGroup.service.d.ts +5 -0
  20. package/dist/{device/local/repository/Connection.repository.js → entities/accessGroup/AccessGroup.service.js} +50 -37
  21. package/dist/entities/accessGroup/IAccessGroup.d.ts +14 -0
  22. package/dist/entities/accessGroup/index.d.ts +2 -0
  23. package/dist/entities/accessGroup/index.js +18 -0
  24. package/dist/{admin → entities/admin}/Admin.repository.js +4 -4
  25. package/dist/{connection → entities/connection}/Connection.repository.js +1 -1
  26. package/dist/{device → entities/device}/local/repository/Device.repository.d.ts +1 -0
  27. package/dist/{device → entities/device}/local/repository/Device.repository.js +20 -3
  28. package/dist/{device → entities/device}/local/repository/Hub.repository.js +3 -3
  29. package/dist/{device → entities/device}/local/repository/Schedule.repository.js +2 -2
  30. package/dist/{device → entities/device}/local/services/Device.service.d.ts +10 -9
  31. package/dist/{device → entities/device}/local/services/Device.service.js +10 -4
  32. package/dist/entities/guest/Guest.repository.d.ts +6 -0
  33. package/dist/entities/guest/Guest.repository.js +74 -0
  34. package/dist/entities/guest/Guest.service.d.ts +6 -0
  35. package/dist/entities/guest/Guest.service.js +104 -0
  36. package/dist/entities/guest/IGuest.d.ts +12 -0
  37. package/dist/entities/guest/index.d.ts +2 -0
  38. package/dist/entities/guest/index.js +18 -0
  39. package/dist/{property → entities/property}/Property.repository.js +1 -1
  40. package/dist/entities/schedules/ISchedule.d.ts +14 -0
  41. package/dist/entities/schedules/Schedule.repository.d.ts +6 -0
  42. package/dist/entities/schedules/Schedule.repository.js +74 -0
  43. package/dist/entities/schedules/Schedule.service.d.ts +6 -0
  44. package/dist/entities/schedules/Schedule.service.js +104 -0
  45. package/dist/entities/schedules/index.d.ts +2 -0
  46. package/dist/entities/schedules/index.js +18 -0
  47. package/dist/{user → entities/user}/User.repository.js +2 -2
  48. package/dist/{user → entities/user}/User.service.js +3 -0
  49. package/dist/entities/zone/IZone.d.ts +10 -0
  50. package/dist/entities/zone/Zone.repository.d.ts +6 -0
  51. package/dist/{device/local/repository/Property.repository.js → entities/zone/Zone.repository.js} +14 -32
  52. package/dist/entities/zone/Zone.service.d.ts +6 -0
  53. package/dist/entities/zone/Zone.service.js +104 -0
  54. package/dist/entities/zone/index.d.ts +2 -0
  55. package/dist/entities/zone/index.js +18 -0
  56. package/dist/events/BaseEventHandler.d.ts +3 -3
  57. package/dist/events/BaseEventHandler.js +1 -1
  58. package/dist/events/DeviceEventHandler.d.ts +1 -1
  59. package/dist/events/DeviceEventHandler.js +4 -3
  60. package/dist/events/EventHandler.d.ts +10 -9
  61. package/dist/events/EventHandler.js +50 -9
  62. package/dist/events/InternalEventSubscription.js +1 -1
  63. package/dist/index.d.ts +9 -8
  64. package/dist/index.js +10 -8
  65. package/dist/issues/Issue.service.d.ts +1 -1
  66. package/dist/microservice/MicroServiceFactory.d.ts +1 -1
  67. package/dist/microservice/MicroServiceFactory.js +1 -1
  68. package/dist/utils/http.utils.d.ts +1 -2
  69. package/dist/utils/http.utils.js +5 -27
  70. package/package.json +1 -1
  71. package/dist/audit/AuditProperties.d.ts +0 -16
  72. package/dist/device/cloud/entities/CloudConnection.d.ts +0 -6
  73. package/dist/device/cloud/entities/CloudConnection.js +0 -6
  74. package/dist/device/cloud/interfaces/ICloudConnection.d.ts +0 -5
  75. package/dist/device/cloud/interfaces/IConnectionService.d.ts +0 -7
  76. package/dist/device/cloud/interfaces/IDeviceService.d.ts +0 -8
  77. package/dist/device/cloud/interfaces/IHubService.d.ts +0 -5
  78. package/dist/device/cloud/interfaces/IHubService.js +0 -2
  79. package/dist/device/cloud/services/CloudDevice.service.d.ts +0 -5
  80. package/dist/device/cloud/services/CloudDevice.service.js +0 -9
  81. package/dist/device/cloud/services/Connection.service.d.ts +0 -8
  82. package/dist/device/cloud/services/Connection.service.js +0 -6
  83. package/dist/device/cloud/services/index.d.ts +0 -2
  84. package/dist/device/cloud/services/index.js +0 -18
  85. package/dist/device/cloud/types.d.ts +0 -52
  86. package/dist/device/cloud/types.js +0 -15
  87. package/dist/device/local/entities/AlertBuilder.d.ts +0 -87
  88. package/dist/device/local/entities/AlertBuilder.example.d.ts +0 -11
  89. package/dist/device/local/entities/AlertBuilder.example.js +0 -117
  90. package/dist/device/local/entities/AlertBuilder.js +0 -179
  91. package/dist/device/local/entities/IssueBuilder.d.ts +0 -109
  92. package/dist/device/local/entities/IssueBuilder.example.d.ts +0 -16
  93. package/dist/device/local/entities/IssueBuilder.example.js +0 -196
  94. package/dist/device/local/entities/IssueBuilder.js +0 -237
  95. package/dist/device/local/entities/index.d.ts +0 -2
  96. package/dist/device/local/entities/index.js +0 -7
  97. package/dist/device/local/events/EventHandler.d.ts +0 -11
  98. package/dist/device/local/events/EventHandler.js +0 -86
  99. package/dist/device/local/events/Events.d.ts +0 -75
  100. package/dist/device/local/events/Events.js +0 -78
  101. package/dist/device/local/events/index.d.ts +0 -2
  102. package/dist/device/local/events/index.js +0 -7
  103. package/dist/device/local/handler/EventHandler.d.ts +0 -7
  104. package/dist/device/local/handler/EventHandler.js +0 -44
  105. package/dist/device/local/interfaces/IConnection.d.ts +0 -26
  106. package/dist/device/local/interfaces/IConnection.js +0 -14
  107. package/dist/device/local/interfaces/IHub.d.ts +0 -46
  108. package/dist/device/local/interfaces/IHub.js +0 -2
  109. package/dist/device/local/models/Alert.model.d.ts +0 -28
  110. package/dist/device/local/models/Alert.model.js +0 -222
  111. package/dist/device/local/models/Issue.model.d.ts +0 -28
  112. package/dist/device/local/models/Issue.model.js +0 -260
  113. package/dist/device/local/repository/Alert.repository.d.ts +0 -106
  114. package/dist/device/local/repository/Alert.repository.js +0 -374
  115. package/dist/device/local/repository/Connection.repository.d.ts +0 -8
  116. package/dist/device/local/repository/Issue.repository.d.ts +0 -113
  117. package/dist/device/local/repository/Issue.repository.js +0 -401
  118. package/dist/device/local/repository/Property.repository.d.ts +0 -8
  119. package/dist/device/local/services/Alert.service.d.ts +0 -137
  120. package/dist/device/local/services/Alert.service.js +0 -475
  121. package/dist/device/local/services/AlertService.example.d.ts +0 -55
  122. package/dist/device/local/services/AlertService.example.js +0 -148
  123. package/dist/device/local/services/Connection.service.d.ts +0 -8
  124. package/dist/device/local/services/Connection.service.js +0 -32
  125. package/dist/device/local/services/Issue.service.d.ts +0 -168
  126. package/dist/device/local/services/Issue.service.js +0 -642
  127. package/dist/device/local/services/IssueService.example.d.ts +0 -68
  128. package/dist/device/local/services/IssueService.example.js +0 -177
  129. package/dist/device/local/services/Property.service.d.ts +0 -8
  130. package/dist/device/local/services/Property.service.js +0 -36
  131. package/dist/property/IProperty.d.ts +0 -29
  132. package/dist/property/IProperty.js +0 -2
  133. package/dist/queue/interfaces/IHttpRequestJob.d.ts +0 -9
  134. package/dist/queue/interfaces/IHttpRequestJob.js +0 -2
  135. package/dist/types/alert.types.d.ts +0 -57
  136. package/dist/types/alert.types.js +0 -22
  137. package/dist/types/config.types.d.ts +0 -19
  138. package/dist/types/config.types.js +0 -2
  139. package/dist/types/index.d.ts +0 -3
  140. package/dist/types/index.js +0 -19
  141. package/dist/types/issue.types.d.ts +0 -90
  142. package/dist/types/issue.types.js +0 -40
  143. package/dist/utils/http-utils.d.ts +0 -13
  144. package/dist/utils/http-utils.js +0 -117
  145. /package/dist/{audit/AuditProperties.js → entities/accessGroup/IAccessGroup.js} +0 -0
  146. /package/dist/{admin → entities/admin}/Admin.repository.d.ts +0 -0
  147. /package/dist/{admin → entities/admin}/Admin.service.d.ts +0 -0
  148. /package/dist/{admin → entities/admin}/Admin.service.js +0 -0
  149. /package/dist/{admin → entities/admin}/index.d.ts +0 -0
  150. /package/dist/{admin → entities/admin}/index.js +0 -0
  151. /package/dist/{connection → entities/connection}/Connection.repository.d.ts +0 -0
  152. /package/dist/{connection → entities/connection}/Connection.service.d.ts +0 -0
  153. /package/dist/{connection → entities/connection}/Connection.service.js +0 -0
  154. /package/dist/{connection → entities/connection}/IConnection.d.ts +0 -0
  155. /package/dist/{connection → entities/connection}/IConnection.js +0 -0
  156. /package/dist/{connection → entities/connection}/index.d.ts +0 -0
  157. /package/dist/{connection → entities/connection}/index.js +0 -0
  158. /package/dist/{device → entities/device}/cloud/entities/CloudDevice.d.ts +0 -0
  159. /package/dist/{device → entities/device}/cloud/entities/CloudDevice.js +0 -0
  160. /package/dist/{device → entities/device}/cloud/entities/CloudDeviceService.d.ts +0 -0
  161. /package/dist/{device → entities/device}/cloud/entities/CloudDeviceService.js +0 -0
  162. /package/dist/{device → entities/device}/cloud/entities/DeviceFactory.d.ts +0 -0
  163. /package/dist/{device → entities/device}/cloud/entities/DeviceFactory.js +0 -0
  164. /package/dist/{device → entities/device}/cloud/entities/index.d.ts +0 -0
  165. /package/dist/{device → entities/device}/cloud/entities/index.js +0 -0
  166. /package/dist/{device → entities/device}/cloud/interfaces/ICloudDevice.d.ts +0 -0
  167. /package/dist/{device → entities/device}/cloud/interfaces/ICloudDevice.js +0 -0
  168. /package/dist/{device → entities/device}/cloud/interfaces/ICloudDeviceService.d.ts +0 -0
  169. /package/dist/{device → entities/device}/cloud/interfaces/ICloudDeviceService.js +0 -0
  170. /package/dist/{device → entities/device}/cloud/interfaces/IDeviceFactory.d.ts +0 -0
  171. /package/dist/{device → entities/device}/cloud/interfaces/IDeviceFactory.js +0 -0
  172. /package/dist/{device → entities/device}/cloud/interfaces/IRawDataTransformer.d.ts +0 -0
  173. /package/dist/{device → entities/device}/cloud/interfaces/IRawDataTransformer.js +0 -0
  174. /package/dist/{device → entities/device}/cloud/interfaces/IRawDevice.d.ts +0 -0
  175. /package/dist/{device → entities/device}/cloud/interfaces/IRawDevice.js +0 -0
  176. /package/dist/{device → entities/device}/cloud/interfaces/index.d.ts +0 -0
  177. /package/dist/{device → entities/device}/cloud/interfaces/index.js +0 -0
  178. /package/dist/{device → entities/device}/local/interfaces/IDevice.d.ts +0 -0
  179. /package/dist/{device → entities/device}/local/interfaces/IDevice.js +0 -0
  180. /package/dist/{device → entities/device}/local/interfaces/IDtDevice.d.ts +0 -0
  181. /package/dist/{device → entities/device}/local/interfaces/IDtDevice.js +0 -0
  182. /package/dist/{device → entities/device}/local/interfaces/ISchedule.d.ts +0 -0
  183. /package/dist/{device → entities/device}/local/interfaces/ISchedule.js +0 -0
  184. /package/dist/{device → entities/device}/local/interfaces/index.d.ts +0 -0
  185. /package/dist/{device → entities/device}/local/interfaces/index.js +0 -0
  186. /package/dist/{device → entities/device}/local/repository/Hub.repository.d.ts +0 -0
  187. /package/dist/{device → entities/device}/local/repository/Schedule.repository.d.ts +0 -0
  188. /package/dist/{device → entities/device}/local/services/Hub.service.d.ts +0 -0
  189. /package/dist/{device → entities/device}/local/services/Hub.service.js +0 -0
  190. /package/dist/{device → entities/device}/local/services/Schedule.service.d.ts +0 -0
  191. /package/dist/{device → entities/device}/local/services/Schedule.service.js +0 -0
  192. /package/dist/{device → entities/device}/local/services/index.d.ts +0 -0
  193. /package/dist/{device → entities/device}/local/services/index.js +0 -0
  194. /package/dist/{device/cloud/interfaces/ICloudConnection.js → entities/guest/IGuest.js} +0 -0
  195. /package/dist/{pms → entities/pms}/IPms.d.ts +0 -0
  196. /package/dist/{pms → entities/pms}/IPms.js +0 -0
  197. /package/dist/{pms → entities/pms}/index.d.ts +0 -0
  198. /package/dist/{pms → entities/pms}/index.js +0 -0
  199. /package/dist/{device/local/interfaces → entities/property}/IProperty.d.ts +0 -0
  200. /package/dist/{device/local/interfaces → entities/property}/IProperty.js +0 -0
  201. /package/dist/{property → entities/property}/Property.repository.d.ts +0 -0
  202. /package/dist/{property → entities/property}/Property.service.d.ts +0 -0
  203. /package/dist/{property → entities/property}/Property.service.js +0 -0
  204. /package/dist/{property → entities/property}/index.d.ts +0 -0
  205. /package/dist/{property → entities/property}/index.js +0 -0
  206. /package/dist/{device/cloud/interfaces/IConnectionService.js → entities/schedules/ISchedule.js} +0 -0
  207. /package/dist/{user → entities/user}/IUser.d.ts +0 -0
  208. /package/dist/{user → entities/user}/IUser.js +0 -0
  209. /package/dist/{user → entities/user}/User.repository.d.ts +0 -0
  210. /package/dist/{user → entities/user}/User.service.d.ts +0 -0
  211. /package/dist/{device/cloud/interfaces/IDeviceService.js → entities/zone/IZone.js} +0 -0
@@ -1,8 +0,0 @@
1
- import { IConnection } from "../interfaces/IConnection";
2
- export declare class LocalConnectionService {
3
- private readonly connectionRepository;
4
- constructor();
5
- createConnection(data: Partial<IConnection>): Promise<IConnection>;
6
- getConnection(connectionId: string): Promise<IConnection>;
7
- updateConnection(connectionId: string, data: Partial<IConnection>): Promise<IConnection>;
8
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocalConnectionService = void 0;
4
- const typedi_1 = require("typedi");
5
- const Connection_repository_1 = require("../repository/Connection.repository");
6
- class LocalConnectionService {
7
- constructor() {
8
- this.connectionRepository = typedi_1.Container.get(Connection_repository_1.ConnectionRepository);
9
- }
10
- async createConnection(data) {
11
- if (!data.connectionName ||
12
- !data.connectionRefId ||
13
- !data.propertyId ||
14
- !data.connectionProvider) {
15
- throw new Error("Missing required fields");
16
- }
17
- return await this.connectionRepository.createConnection(data);
18
- }
19
- async getConnection(connectionId) {
20
- if (!connectionId) {
21
- throw new Error("Connection ID is required");
22
- }
23
- return await this.connectionRepository.getConnectionById(connectionId);
24
- }
25
- async updateConnection(connectionId, data) {
26
- if (!connectionId) {
27
- throw new Error("Connection ID is required");
28
- }
29
- return await this.connectionRepository.updateConnection(connectionId, data);
30
- }
31
- }
32
- exports.LocalConnectionService = LocalConnectionService;
@@ -1,168 +0,0 @@
1
- import { IssueRepository } from "../repository/Issue.repository";
2
- import { IIssueDocument } from "../models/Issue.model";
3
- import { CreateIssueData, UpdateIssueData, AddCommentData, IssueStatus, IssuePriority, IssuesCategory, EntityType } from "../../../types/issue.types";
4
- import { IssueBuilder } from "../entities/IssueBuilder";
5
- export declare class IssueService {
6
- private readonly issueRepository;
7
- constructor(issueRepository: IssueRepository);
8
- /**
9
- * Create a readiness issue using IssueBuilder
10
- */
11
- createReadinessIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
12
- /**
13
- * Create an operations issue using IssueBuilder
14
- */
15
- createOperationsIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
16
- /**
17
- * Create a security issue using IssueBuilder
18
- */
19
- createSecurityIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
20
- /**
21
- * Create an energy issue using IssueBuilder
22
- */
23
- createEnergyIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
24
- /**
25
- * Create a device-specific issue using IssueBuilder
26
- */
27
- createDeviceIssue(deviceId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
28
- /**
29
- * Create a hub-specific issue using IssueBuilder
30
- */
31
- createHubIssue(hubId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
32
- /**
33
- * Create a user-specific issue using IssueBuilder
34
- */
35
- createUserIssue(userId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
36
- /**
37
- * Create a maintenance issue using IssueBuilder
38
- */
39
- createMaintenanceIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
40
- /**
41
- * Create an urgent issue using IssueBuilder
42
- */
43
- createUrgentIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
44
- /**
45
- * Create a new issue with business logic validation
46
- * Accepts either a CreateIssueData object or an IssueBuilder instance
47
- */
48
- createIssue(issueData: CreateIssueData | IssueBuilder): Promise<IIssueDocument>;
49
- /**
50
- * Get issue by ID with business logic
51
- */
52
- getIssueById(id: string, includeDeleted?: boolean): Promise<IIssueDocument | null>;
53
- /**
54
- * Get all issues with business logic filtering
55
- */
56
- getIssues(filters?: {
57
- propertyId?: string;
58
- assignedTo?: string;
59
- status?: IssueStatus;
60
- priority?: IssuePriority;
61
- category?: IssuesCategory;
62
- entityType?: EntityType;
63
- entityId?: string;
64
- includeDeleted?: boolean;
65
- limit?: number;
66
- skip?: number;
67
- }): Promise<IIssueDocument[]>;
68
- /**
69
- * Update an issue with business logic validation
70
- */
71
- updateIssue(id: string, updateData: UpdateIssueData): Promise<IIssueDocument | null>;
72
- /**
73
- * Soft delete an issue with business logic
74
- */
75
- deleteIssue(id: string, deletedBy: string): Promise<boolean>;
76
- /**
77
- * Permanently delete an issue
78
- */
79
- permanentlyDeleteIssue(id: string): Promise<boolean>;
80
- /**
81
- * Add a comment with business logic
82
- */
83
- addComment(issueId: string, commentData: AddCommentData): Promise<IIssueDocument | null>;
84
- /**
85
- * Update a comment on an issue
86
- */
87
- updateComment(issueId: string, commentId: string, content: string, userId: string): Promise<boolean>;
88
- /**
89
- * Remove a comment from an issue
90
- */
91
- removeComment(issueId: string, commentId: string): Promise<boolean>;
92
- /**
93
- * Resolve an issue with business logic
94
- */
95
- resolveIssue(id: string, resolvedBy: string): Promise<IIssueDocument | null>;
96
- /**
97
- * Reopen a resolved issue
98
- */
99
- reopenIssue(id: string, reopenedBy: string): Promise<IIssueDocument | null>;
100
- /**
101
- * Assign an issue with business logic
102
- */
103
- assignIssue(id: string, userId: string, assignedBy: string): Promise<IIssueDocument | null>;
104
- /**
105
- * Unassign an issue
106
- */
107
- unassignIssue(id: string, unassignedBy: string): Promise<IIssueDocument | null>;
108
- /**
109
- * Get issues by property with business logic
110
- */
111
- getIssuesByProperty(propertyId: string, includeDeleted?: boolean): Promise<IIssueDocument[]>;
112
- /**
113
- * Get issues assigned to a user with business logic
114
- */
115
- getIssuesByAssignee(assignedTo: string, includeDeleted?: boolean): Promise<IIssueDocument[]>;
116
- /**
117
- * Get issues by entity
118
- */
119
- getIssuesByEntity(entityId: string, entityType: EntityType, includeDeleted?: boolean): Promise<IIssueDocument[]>;
120
- /**
121
- * Get issues by status
122
- */
123
- getIssuesByStatus(status: IssueStatus, includeDeleted?: boolean): Promise<IIssueDocument[]>;
124
- /**
125
- * Get issues by priority
126
- */
127
- getIssuesByPriority(priority: IssuePriority, includeDeleted?: boolean): Promise<IIssueDocument[]>;
128
- /**
129
- * Get overdue issues with business logic
130
- */
131
- getOverdueIssues(includeDeleted?: boolean): Promise<IIssueDocument[]>;
132
- /**
133
- * Get upcoming issues (due within specified days)
134
- */
135
- getUpcomingIssues(days?: number, includeDeleted?: boolean): Promise<IIssueDocument[]>;
136
- /**
137
- * Get issue statistics with business logic
138
- */
139
- getIssueStatistics(propertyId?: string): Promise<{
140
- total: number;
141
- pending: number;
142
- inProgress: number;
143
- resolved: number;
144
- closed: number;
145
- overdue: number;
146
- byPriority: Record<IssuePriority, number>;
147
- byCategory: Record<IssuesCategory, number>;
148
- }>;
149
- /**
150
- * Search issues with business logic
151
- */
152
- searchIssues(searchTerm: string, filters?: {
153
- propertyId?: string;
154
- includeDeleted?: boolean;
155
- limit?: number;
156
- skip?: number;
157
- }): Promise<IIssueDocument[]>;
158
- private validateIssueData;
159
- private validateFilters;
160
- private validateUpdateData;
161
- private validateStatusTransition;
162
- private validatePriorityChange;
163
- private determineDefaultPriority;
164
- private applyBusinessRules;
165
- private shouldUpdateStatusOnComment;
166
- private calculateAverageResponseTime;
167
- private calculateResolutionRate;
168
- }