dt-common-device 13.0.27 → 13.1.2

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 (169) hide show
  1. package/README.md +1 -1
  2. package/dist/cronicle/Cronicle.service.js +3 -1
  3. package/dist/issues/Issue.service.d.ts +1 -1
  4. package/dist/issues/Issue.service.js +8 -6
  5. package/dist/issues/issue.types.d.ts +7 -4
  6. package/dist/issues/issue.types.js +5 -2
  7. package/package.json +1 -1
  8. package/dist/admin/Admin.repository.d.ts +0 -7
  9. package/dist/admin/Admin.service.d.ts +0 -5
  10. package/dist/admin/index.d.ts +0 -1
  11. package/dist/alerts/AlertBuilder.example.d.ts +0 -11
  12. package/dist/alerts/AlertService.example.d.ts +0 -55
  13. package/dist/audit/AuditProperties.d.ts +0 -16
  14. package/dist/chronicle/Cronicle.service.d.ts +0 -9
  15. package/dist/chronicle/IChronicle.interface.d.ts +0 -14
  16. package/dist/chronicle/ICronicle.interface.d.ts +0 -15
  17. package/dist/chronicle/chronicle.service.d.ts +0 -4
  18. package/dist/chronicle/index.d.ts +0 -2
  19. package/dist/connection/Connection.repository.d.ts +0 -8
  20. package/dist/connection/Connection.service.d.ts +0 -8
  21. package/dist/connection/IConnection.d.ts +0 -28
  22. package/dist/connection/index.d.ts +0 -2
  23. package/dist/copilotQueue/examples/CopilotQueue.example.d.ts +0 -37
  24. package/dist/copilotQueue/examples/index.d.ts +0 -1
  25. package/dist/device/cloud/entities/CloudConnection.d.ts +0 -6
  26. package/dist/device/cloud/entities/CloudDevice.d.ts +0 -16
  27. package/dist/device/cloud/entities/CloudDeviceService.d.ts +0 -5
  28. package/dist/device/cloud/entities/DeviceFactory.d.ts +0 -7
  29. package/dist/device/cloud/entities/index.d.ts +0 -3
  30. package/dist/device/cloud/interface.d.ts +0 -101
  31. package/dist/device/cloud/interfaces/ICloudConnection.d.ts +0 -5
  32. package/dist/device/cloud/interfaces/ICloudDevice.d.ts +0 -9
  33. package/dist/device/cloud/interfaces/ICloudDeviceService.d.ts +0 -4
  34. package/dist/device/cloud/interfaces/IConnectionService.d.ts +0 -7
  35. package/dist/device/cloud/interfaces/IDeviceConnectionService.d.ts +0 -7
  36. package/dist/device/cloud/interfaces/IDeviceFactory.d.ts +0 -4
  37. package/dist/device/cloud/interfaces/IDeviceService.d.ts +0 -8
  38. package/dist/device/cloud/interfaces/IDevicesService.d.ts +0 -9
  39. package/dist/device/cloud/interfaces/IHubService.d.ts +0 -5
  40. package/dist/device/cloud/interfaces/IRawDataTransformer.d.ts +0 -4
  41. package/dist/device/cloud/interfaces/IRawDevice.d.ts +0 -17
  42. package/dist/device/cloud/interfaces/index.d.ts +0 -5
  43. package/dist/device/cloud/services/CloudDevice.service.d.ts +0 -5
  44. package/dist/device/cloud/services/Connection.service.d.ts +0 -8
  45. package/dist/device/cloud/services/Device.service.d.ts +0 -39
  46. package/dist/device/cloud/services/DeviceCloudService.d.ts +0 -42
  47. package/dist/device/cloud/services/DeviceHub.service.d.ts +0 -3
  48. package/dist/device/cloud/services/Hub.service.d.ts +0 -25
  49. package/dist/device/cloud/services/SmartThingsDeviceService.d.ts +0 -38
  50. package/dist/device/cloud/services/SmartThingsDeviceService.js +0 -52
  51. package/dist/device/cloud/services/index.d.ts +0 -2
  52. package/dist/device/cloud/types.d.ts +0 -52
  53. package/dist/device/cloud/types.js +0 -15
  54. package/dist/device/index.d.ts +0 -4
  55. package/dist/device/local/entities/AlertBuilder.d.ts +0 -87
  56. package/dist/device/local/entities/AlertBuilder.example.d.ts +0 -11
  57. package/dist/device/local/entities/IssueBuilder.d.ts +0 -109
  58. package/dist/device/local/entities/IssueBuilder.example.d.ts +0 -16
  59. package/dist/device/local/entities/IssueBuilder.example.js +0 -196
  60. package/dist/device/local/entities/IssueBuilder.js +0 -237
  61. package/dist/device/local/entities/index.d.ts +0 -2
  62. package/dist/device/local/events/EventHandler.d.ts +0 -11
  63. package/dist/device/local/events/Events.d.ts +0 -54
  64. package/dist/device/local/events/index.d.ts +0 -2
  65. package/dist/device/local/handler/EventHandler.d.ts +0 -7
  66. package/dist/device/local/interface.d.ts +0 -0
  67. package/dist/device/local/interfaces/IConnection.d.ts +0 -26
  68. package/dist/device/local/interfaces/IDevice.d.ts +0 -68
  69. package/dist/device/local/interfaces/IDtDevice.d.ts +0 -16
  70. package/dist/device/local/interfaces/IHub.d.ts +0 -46
  71. package/dist/device/local/interfaces/IProperty.d.ts +0 -29
  72. package/dist/device/local/interfaces/ISchedule.d.ts +0 -25
  73. package/dist/device/local/interfaces/index.d.ts +0 -3
  74. package/dist/device/local/models/Alert.model.d.ts +0 -28
  75. package/dist/device/local/models/Issue.model.d.ts +0 -28
  76. package/dist/device/local/repository/Alert.repository.d.ts +0 -106
  77. package/dist/device/local/repository/Connection.repository.d.ts +0 -8
  78. package/dist/device/local/repository/Device.repository.d.ts +0 -30
  79. package/dist/device/local/repository/Hub.repository.d.ts +0 -13
  80. package/dist/device/local/repository/Issue.repository.d.ts +0 -113
  81. package/dist/device/local/repository/Property.repository.d.ts +0 -8
  82. package/dist/device/local/repository/Property.repository.js +0 -95
  83. package/dist/device/local/repository/Schedule.repository.d.ts +0 -9
  84. package/dist/device/local/repository/Schedule.repository.js +0 -109
  85. package/dist/device/local/services/Alert.service.d.ts +0 -137
  86. package/dist/device/local/services/AlertService.example.d.ts +0 -55
  87. package/dist/device/local/services/Connection.service.d.ts +0 -8
  88. package/dist/device/local/services/Device.service.d.ts +0 -40
  89. package/dist/device/local/services/DeviceHub.service.d.ts +0 -11
  90. package/dist/device/local/services/Hub.service.d.ts +0 -12
  91. package/dist/device/local/services/Issue.service.d.ts +0 -168
  92. package/dist/device/local/services/Issue.service.js +0 -642
  93. package/dist/device/local/services/IssueService.example.d.ts +0 -68
  94. package/dist/device/local/services/IssueService.example.js +0 -177
  95. package/dist/device/local/services/Property.service.d.ts +0 -8
  96. package/dist/device/local/services/Property.service.js +0 -36
  97. package/dist/device/local/services/Schedule.service.d.ts +0 -9
  98. package/dist/device/local/services/Schedule.service.js +0 -26
  99. package/dist/device/local/services/index.d.ts +0 -3
  100. package/dist/entities/accessGroup/AccessGroup.repository.d.ts +0 -5
  101. package/dist/entities/accessGroup/AccessGroup.service.d.ts +0 -5
  102. package/dist/entities/accessGroup/IAccessGroup.d.ts +0 -14
  103. package/dist/entities/accessGroup/index.d.ts +0 -2
  104. package/dist/entities/device/local/repository/DeviceProfile.repository.d.ts +0 -5
  105. package/dist/entities/guest/Guest.repository.d.ts +0 -6
  106. package/dist/entities/guest/Guest.service.d.ts +0 -6
  107. package/dist/entities/guest/IGuest.d.ts +0 -12
  108. package/dist/entities/guest/index.d.ts +0 -2
  109. package/dist/entities/schedules/ISchedule.d.ts +0 -14
  110. package/dist/entities/schedules/Schedule.repository.d.ts +0 -6
  111. package/dist/entities/schedules/Schedule.repository.js +0 -74
  112. package/dist/entities/schedules/Schedule.service.d.ts +0 -6
  113. package/dist/entities/schedules/Schedule.service.js +0 -104
  114. package/dist/entities/schedules/index.d.ts +0 -2
  115. package/dist/entities/user/IUser.d.ts +0 -15
  116. package/dist/entities/user/IUser.js +0 -2
  117. package/dist/entities/user/User.repository.d.ts +0 -5
  118. package/dist/entities/user/User.repository.js +0 -68
  119. package/dist/entities/user/User.service.d.ts +0 -6
  120. package/dist/entities/user/User.service.js +0 -103
  121. package/dist/entities/zone/IZone.d.ts +0 -10
  122. package/dist/entities/zone/IZone.js +0 -2
  123. package/dist/entities/zone/Zone.repository.d.ts +0 -6
  124. package/dist/entities/zone/Zone.repository.js +0 -77
  125. package/dist/entities/zone/Zone.service.d.ts +0 -6
  126. package/dist/entities/zone/Zone.service.js +0 -104
  127. package/dist/entities/zone/index.d.ts +0 -2
  128. package/dist/issues/IssueBuilder.example.d.ts +0 -16
  129. package/dist/issues/IssueBuilder.example.js +0 -196
  130. package/dist/issues/IssueService.example.d.ts +0 -68
  131. package/dist/issues/IssueService.example.js +0 -292
  132. package/dist/pms/IPms.d.ts +0 -6
  133. package/dist/pms/index.d.ts +0 -1
  134. package/dist/pms/webhookQueue/examples/index.d.ts +0 -2
  135. package/dist/pms/webhookQueue/examples/pms-integration.d.ts +0 -65
  136. package/dist/pms/webhookQueue/examples/pms-integration.js +0 -254
  137. package/dist/pms/webhookQueue/examples/usage.d.ts +0 -7
  138. package/dist/pms/webhookQueue/examples/usage.js +0 -175
  139. package/dist/pms/webhookQueue/index.d.ts +0 -3
  140. package/dist/pms/webhookQueue/interfaces/IWebhookQueue.d.ts +0 -33
  141. package/dist/pms/webhookQueue/interfaces/IWebhookQueue.js +0 -2
  142. package/dist/pms/webhookQueue/interfaces/IWebhookWorker.d.ts +0 -38
  143. package/dist/pms/webhookQueue/interfaces/IWebhookWorker.js +0 -2
  144. package/dist/pms/webhookQueue/interfaces/index.d.ts +0 -1
  145. package/dist/pms/webhookQueue/services/WebhookQueueFactory.d.ts +0 -38
  146. package/dist/pms/webhookQueue/services/WebhookQueueFactory.js +0 -131
  147. package/dist/pms/webhookQueue/services/WebhookQueueIntegration.d.ts +0 -70
  148. package/dist/pms/webhookQueue/services/WebhookQueueIntegration.js +0 -207
  149. package/dist/pms/webhookQueue/services/WebhookQueueService.d.ts +0 -45
  150. package/dist/pms/webhookQueue/services/WebhookQueueService.js +0 -270
  151. package/dist/pms/webhookQueue/services/WebhookWorker.d.ts +0 -37
  152. package/dist/pms/webhookQueue/services/WebhookWorker.js +0 -201
  153. package/dist/pms/webhookQueue/services/index.d.ts +0 -1
  154. package/dist/pms/webhookQueue/types/index.d.ts +0 -1
  155. package/dist/pms/webhookQueue/types/webhook.types.d.ts +0 -39
  156. package/dist/pms/webhookQueue/types/webhook.types.js +0 -2
  157. package/dist/property/IProperty.d.ts +0 -29
  158. package/dist/property/Property.repository.d.ts +0 -8
  159. package/dist/property/Property.repository.js +0 -109
  160. package/dist/property/Property.service.d.ts +0 -8
  161. package/dist/property/Property.service.js +0 -124
  162. package/dist/property/index.d.ts +0 -2
  163. package/dist/queue/interfaces/IHttpRequestJob.d.ts +0 -9
  164. package/dist/types/alert.types.d.ts +0 -57
  165. package/dist/types/config.types.d.ts +0 -19
  166. package/dist/types/index.d.ts +0 -3
  167. package/dist/types/issue.types.d.ts +0 -90
  168. package/dist/types/issue.types.js +0 -40
  169. package/dist/utils/http-utils.d.ts +0 -13
@@ -1,109 +0,0 @@
1
- "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
35
- };
36
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
37
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
38
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.PropertyRepository = void 0;
42
- const db_1 = require("../db");
43
- const typedi_1 = require("typedi");
44
- let PropertyRepository = (() => {
45
- let _classDecorators = [(0, typedi_1.Service)()];
46
- let _classDescriptor;
47
- let _classExtraInitializers = [];
48
- let _classThis;
49
- var PropertyRepository = _classThis = class {
50
- constructor() {
51
- this.postgres = (0, db_1.getPostgresClient)();
52
- }
53
- async getPropertyPreferences(propertyId, keys) {
54
- try {
55
- const propertyPreferences = await this.postgres.query(`SELECT * FROM dt_property_settings WHERE "propertyId" = $1`, [propertyId]);
56
- if (propertyPreferences.rows.length > 0) {
57
- if (keys && keys.length > 0) {
58
- const settings = propertyPreferences.rows[0].settings;
59
- const filteredSettings = {};
60
- // Only include the requested keys from settings
61
- keys.forEach((key) => {
62
- if (settings && settings[key] !== undefined) {
63
- filteredSettings[key] = settings[key];
64
- }
65
- });
66
- return {
67
- ...propertyPreferences.rows[0],
68
- settings: filteredSettings,
69
- };
70
- }
71
- return propertyPreferences.rows[0];
72
- }
73
- return null;
74
- }
75
- catch (error) {
76
- console.error("Error in getPropertyPreferences:", error);
77
- throw new Error("Failed to get property preferences");
78
- }
79
- }
80
- async getProperty(propertyId) {
81
- const property = await this.postgres.query("SELECT * FROM dt_properties WHERE id = $1", [propertyId]);
82
- if (property.rows.length > 0) {
83
- return property.rows[0];
84
- }
85
- return null;
86
- }
87
- async getAllProperties() {
88
- try {
89
- //Retrieve all the properties ids from the database
90
- const properties = await this.postgres.query("SELECT id FROM dt_properties");
91
- return properties.rows.map((property) => property.id);
92
- }
93
- catch (error) {
94
- console.log(error);
95
- throw new Error("Failed to get all properties");
96
- }
97
- }
98
- };
99
- __setFunctionName(_classThis, "PropertyRepository");
100
- (() => {
101
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
102
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
103
- PropertyRepository = _classThis = _classDescriptor.value;
104
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
105
- __runInitializers(_classThis, _classExtraInitializers);
106
- })();
107
- return PropertyRepository = _classThis;
108
- })();
109
- exports.PropertyRepository = PropertyRepository;
@@ -1,8 +0,0 @@
1
- export declare class LocalPropertyService {
2
- private readonly propertyRepository;
3
- constructor();
4
- getPropertyPreferences(propertyId: string, keys?: string[]): Promise<import("./IProperty").IPropertySettings | null>;
5
- getProperty(propertyId: string): Promise<import("./IProperty").IProperty | null>;
6
- getPropertyTimeZone(propertyId: string): Promise<string>;
7
- getAllProperties(): Promise<any[]>;
8
- }
@@ -1,124 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
19
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
20
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
21
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
22
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
23
- var _, done = false;
24
- for (var i = decorators.length - 1; i >= 0; i--) {
25
- var context = {};
26
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
27
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
28
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
29
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
30
- if (kind === "accessor") {
31
- if (result === void 0) continue;
32
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
33
- if (_ = accept(result.get)) descriptor.get = _;
34
- if (_ = accept(result.set)) descriptor.set = _;
35
- if (_ = accept(result.init)) initializers.unshift(_);
36
- }
37
- else if (_ = accept(result)) {
38
- if (kind === "field") initializers.unshift(_);
39
- else descriptor[key] = _;
40
- }
41
- }
42
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
43
- done = true;
44
- };
45
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
46
- var useValue = arguments.length > 2;
47
- for (var i = 0; i < initializers.length; i++) {
48
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
49
- }
50
- return useValue ? value : void 0;
51
- };
52
- var __importStar = (this && this.__importStar) || (function () {
53
- var ownKeys = function(o) {
54
- ownKeys = Object.getOwnPropertyNames || function (o) {
55
- var ar = [];
56
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
57
- return ar;
58
- };
59
- return ownKeys(o);
60
- };
61
- return function (mod) {
62
- if (mod && mod.__esModule) return mod;
63
- var result = {};
64
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
65
- __setModuleDefault(result, mod);
66
- return result;
67
- };
68
- })();
69
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
70
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
71
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
72
- };
73
- Object.defineProperty(exports, "__esModule", { value: true });
74
- exports.LocalPropertyService = void 0;
75
- const Property_repository_1 = require("./Property.repository");
76
- const typedi_1 = __importStar(require("typedi"));
77
- let LocalPropertyService = (() => {
78
- let _classDecorators = [(0, typedi_1.Service)()];
79
- let _classDescriptor;
80
- let _classExtraInitializers = [];
81
- let _classThis;
82
- var LocalPropertyService = _classThis = class {
83
- constructor() {
84
- // Use dependency injection instead of creating new instance
85
- this.propertyRepository = typedi_1.default.get(Property_repository_1.PropertyRepository);
86
- }
87
- async getPropertyPreferences(propertyId, keys) {
88
- if (!propertyId) {
89
- throw new Error("Property ID is required");
90
- }
91
- return await this.propertyRepository.getPropertyPreferences(propertyId, keys);
92
- }
93
- async getProperty(propertyId) {
94
- if (!propertyId) {
95
- throw new Error("Property ID is required");
96
- }
97
- return await this.propertyRepository.getProperty(propertyId);
98
- }
99
- async getPropertyTimeZone(propertyId) {
100
- if (!propertyId) {
101
- throw new Error("Property ID is required");
102
- }
103
- const property = await this.propertyRepository.getProperty(propertyId);
104
- if (!property) {
105
- throw new Error("Property not found");
106
- }
107
- return property.timezone;
108
- }
109
- async getAllProperties() {
110
- const properties = await this.propertyRepository.getAllProperties();
111
- return properties;
112
- }
113
- };
114
- __setFunctionName(_classThis, "LocalPropertyService");
115
- (() => {
116
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
117
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
118
- LocalPropertyService = _classThis = _classDescriptor.value;
119
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
120
- __runInitializers(_classThis, _classExtraInitializers);
121
- })();
122
- return LocalPropertyService = _classThis;
123
- })();
124
- exports.LocalPropertyService = LocalPropertyService;
@@ -1,2 +0,0 @@
1
- export * from "./IProperty";
2
- export * from "./Property.service";
@@ -1,9 +0,0 @@
1
- import { HttpCallOption } from "../types/http.types";
2
- export interface IHttpRequestJob {
3
- connectionId: string;
4
- provider: string;
5
- url: string;
6
- method: string;
7
- options: HttpCallOption;
8
- timestamp: number;
9
- }
@@ -1,57 +0,0 @@
1
- import { EntityType } from "./issue.types";
2
- export declare enum AlertCategory {
3
- READINESS = "READINESS",
4
- OPERATIONS = "OPERATIONS",
5
- SECURITY = "SECURITY",
6
- ENERGY = "ENERGY",
7
- OTHER = "OTHER"
8
- }
9
- export declare enum AlertSeverity {
10
- INFO = "INFO",
11
- LOW = "LOW",
12
- MEDIUM = "MEDIUM",
13
- HIGH = "HIGH",
14
- CRITICAL = "CRITICAL"
15
- }
16
- export interface AlertDocument {
17
- _id: string;
18
- category: AlertCategory;
19
- propertyId: string;
20
- title: string;
21
- description: string;
22
- entityId?: string;
23
- entityType: EntityType;
24
- severity: AlertSeverity;
25
- isRead: boolean;
26
- isActive: boolean;
27
- isDeleted: boolean;
28
- snoozeUntil?: Date;
29
- createdBy?: string;
30
- updatedBy?: string;
31
- createdAt: Date;
32
- updatedAt: Date;
33
- }
34
- export interface CreateAlertData {
35
- category: AlertCategory;
36
- propertyId: string;
37
- title: string;
38
- description: string;
39
- entityId?: string;
40
- entityType: EntityType;
41
- severity?: AlertSeverity;
42
- createdBy?: string;
43
- snoozeUntil?: Date;
44
- }
45
- export interface UpdateAlertData {
46
- category?: AlertCategory;
47
- title?: string;
48
- description?: string;
49
- entityId?: string;
50
- entityType?: EntityType;
51
- severity?: AlertSeverity;
52
- isRead?: boolean;
53
- isActive?: boolean;
54
- snoozeUntil?: Date;
55
- updatedBy?: string;
56
- }
57
- export { EntityType } from "./issue.types";
@@ -1,19 +0,0 @@
1
- import { IInternalEvent } from "../events/interfaces/IInternalEvent";
2
- export interface ILogger {
3
- info(message: string, ...args: any[]): void;
4
- warn(message: string, ...args: any[]): void;
5
- error(message: string, ...args: any[]): void;
6
- }
7
- type AllowedSource = "ACCESS_SERVICE" | "ADMIN_SERVICE" | "ENERGY_SERVICE";
8
- export type DeviceConfig = {
9
- SOURCE: AllowedSource;
10
- SQS_QUEUE_URL: string;
11
- DEVICE_SERVICE?: string;
12
- ADMIN_SERVICE?: string;
13
- ACCESS_SERVICE?: string;
14
- ENERGY_SERVICE?: string;
15
- INTERNAL_EVENT_HANDLER: IInternalEvent;
16
- LOGGER: ILogger;
17
- [key: string]: any;
18
- };
19
- export {};
@@ -1,3 +0,0 @@
1
- export * from "./config.types";
2
- export * from "./issue.types";
3
- export * from "./alert.types";
@@ -1,90 +0,0 @@
1
- export declare enum IssuesCategory {
2
- READINESS = "READINESS",
3
- OPERATIONS = "OPERATIONS",
4
- SECURITY = "SECURITY",
5
- ENERGY = "ENERGY",
6
- OTHER = "OTHER"
7
- }
8
- export declare enum EntityType {
9
- DEVICE = "DEVICE",
10
- COLLECTION = "COLLECTION",
11
- USER = "USER",
12
- INTEGRATION = "INTEGRATION",
13
- PROPERTY = "PROPERTY",
14
- HUB = "HUB",
15
- SCHEDULE = "SCHEDULE",
16
- ALERT = "ALERT",
17
- OTHER = "OTHER"
18
- }
19
- export declare enum IssueStatus {
20
- PENDING = "PENDING",
21
- IN_PROGRESS = "IN_PROGRESS",
22
- RESOLVED = "RESOLVED",
23
- CLOSED = "CLOSED",
24
- CANCELLED = "CANCELLED",
25
- ON_HOLD = "ON_HOLD"
26
- }
27
- export declare enum IssuePriority {
28
- LOW = "LOW",
29
- MEDIUM = "MEDIUM",
30
- HIGH = "HIGH",
31
- CRITICAL = "CRITICAL",
32
- URGENT = "URGENT"
33
- }
34
- export interface IssueComment {
35
- id: string;
36
- userId: string;
37
- content: string;
38
- createdAt: Date;
39
- updatedAt?: Date;
40
- }
41
- export interface IssueDocument {
42
- _id: string;
43
- category: IssuesCategory;
44
- propertyId: string;
45
- title: string;
46
- description: string;
47
- entityId?: string;
48
- entityType: EntityType;
49
- status: IssueStatus;
50
- priority: IssuePriority;
51
- assignedTo?: string;
52
- createdBy: string;
53
- updatedBy?: string;
54
- isDeleted: boolean;
55
- createdAt: Date;
56
- updatedAt: Date;
57
- resolvedAt?: Date;
58
- dueDate?: Date;
59
- comments?: IssueComment[];
60
- }
61
- export interface CreateIssueData {
62
- category: IssuesCategory;
63
- propertyId: string;
64
- title: string;
65
- description: string;
66
- entityId?: string;
67
- entityType: EntityType;
68
- priority?: IssuePriority;
69
- assignedTo?: string;
70
- createdBy: string;
71
- dueDate?: Date;
72
- }
73
- export interface UpdateIssueData {
74
- category?: IssuesCategory;
75
- title?: string;
76
- description?: string;
77
- entityId?: string;
78
- entityType?: EntityType;
79
- status?: IssueStatus;
80
- priority?: IssuePriority;
81
- assignedTo?: string;
82
- updatedBy: string;
83
- resolvedAt?: Date;
84
- dueDate?: Date;
85
- isDeleted?: boolean;
86
- }
87
- export interface AddCommentData {
88
- userId: string;
89
- content: string;
90
- }
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IssuePriority = exports.IssueStatus = exports.EntityType = exports.IssuesCategory = void 0;
4
- var IssuesCategory;
5
- (function (IssuesCategory) {
6
- IssuesCategory["READINESS"] = "READINESS";
7
- IssuesCategory["OPERATIONS"] = "OPERATIONS";
8
- IssuesCategory["SECURITY"] = "SECURITY";
9
- IssuesCategory["ENERGY"] = "ENERGY";
10
- IssuesCategory["OTHER"] = "OTHER";
11
- })(IssuesCategory || (exports.IssuesCategory = IssuesCategory = {}));
12
- var EntityType;
13
- (function (EntityType) {
14
- EntityType["DEVICE"] = "DEVICE";
15
- EntityType["COLLECTION"] = "COLLECTION";
16
- EntityType["USER"] = "USER";
17
- EntityType["INTEGRATION"] = "INTEGRATION";
18
- EntityType["PROPERTY"] = "PROPERTY";
19
- EntityType["HUB"] = "HUB";
20
- EntityType["SCHEDULE"] = "SCHEDULE";
21
- EntityType["ALERT"] = "ALERT";
22
- EntityType["OTHER"] = "OTHER";
23
- })(EntityType || (exports.EntityType = EntityType = {}));
24
- var IssueStatus;
25
- (function (IssueStatus) {
26
- IssueStatus["PENDING"] = "PENDING";
27
- IssueStatus["IN_PROGRESS"] = "IN_PROGRESS";
28
- IssueStatus["RESOLVED"] = "RESOLVED";
29
- IssueStatus["CLOSED"] = "CLOSED";
30
- IssueStatus["CANCELLED"] = "CANCELLED";
31
- IssueStatus["ON_HOLD"] = "ON_HOLD";
32
- })(IssueStatus || (exports.IssueStatus = IssueStatus = {}));
33
- var IssuePriority;
34
- (function (IssuePriority) {
35
- IssuePriority["LOW"] = "LOW";
36
- IssuePriority["MEDIUM"] = "MEDIUM";
37
- IssuePriority["HIGH"] = "HIGH";
38
- IssuePriority["CRITICAL"] = "CRITICAL";
39
- IssuePriority["URGENT"] = "URGENT";
40
- })(IssuePriority || (exports.IssuePriority = IssuePriority = {}));
@@ -1,13 +0,0 @@
1
- /**
2
- * Validates if a URL is properly formatted and accessible
3
- */
4
- export declare function validateServiceUrl(url: string): boolean;
5
- /**
6
- * Creates a properly configured axios instance with error handling
7
- */
8
- export declare function createAxiosInstance(baseURL?: string): import("axios").AxiosInstance;
9
- export declare function getDeviceServiceAxiosInstance(): any;
10
- /**
11
- * Retry function for failed HTTP requests
12
- */
13
- export declare function retryRequest<T>(requestFn: () => Promise<T>, maxRetries?: number, delay?: number): Promise<T>;