dt-common-device 11.0.0 → 11.0.1
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/dist/alerts/alert.types.d.ts +1 -2
- package/dist/alerts/alert.types.js +0 -1
- package/dist/audit/Audit.service.d.ts +43 -0
- package/dist/audit/Audit.service.js +130 -0
- package/dist/audit/ExcludeAudits.js +3 -0
- package/dist/audit/PushAudit.js +4 -10
- package/dist/audit/index.d.ts +1 -0
- package/dist/audit/index.js +1 -0
- package/dist/config/config.js +13 -17
- package/dist/entities/admin/Admin.repository.js +22 -20
- package/dist/issues/Issue.repository.js +1 -1
- package/dist/issues/issue.types.d.ts +8 -3
- package/dist/issues/issue.types.js +8 -2
- package/package.json +1 -1
|
@@ -25,8 +25,7 @@ export declare enum AlertType {
|
|
|
25
25
|
GUEST_LOCK_FIRST_ACCESS = "GUEST_LOCK_FIRST_ACCESS",
|
|
26
26
|
DEVICE_ONLINE = "DEVICE_ONLINE",
|
|
27
27
|
ZONE_NOT_MAPPED_TO_ACCESS_GROUP = "ZONE_NOT_MAPPED_TO_ACCESS_GROUP",
|
|
28
|
-
INCORRECT_CODE_USED = "INCORRECT_CODE_USED"
|
|
29
|
-
LOW_GUEST_CODES = "LOW_GUEST_CODES"
|
|
28
|
+
INCORRECT_CODE_USED = "INCORRECT_CODE_USED"
|
|
30
29
|
}
|
|
31
30
|
export interface AlertDocument {
|
|
32
31
|
_id: string;
|
|
@@ -31,7 +31,6 @@ var AlertType;
|
|
|
31
31
|
AlertType["DEVICE_ONLINE"] = "DEVICE_ONLINE";
|
|
32
32
|
AlertType["ZONE_NOT_MAPPED_TO_ACCESS_GROUP"] = "ZONE_NOT_MAPPED_TO_ACCESS_GROUP";
|
|
33
33
|
AlertType["INCORRECT_CODE_USED"] = "INCORRECT_CODE_USED";
|
|
34
|
-
AlertType["LOW_GUEST_CODES"] = "LOW_GUEST_CODES";
|
|
35
34
|
})(AlertType || (exports.AlertType = AlertType = {}));
|
|
36
35
|
// Re-export EntityType from issue.types.ts to avoid duplication
|
|
37
36
|
var issue_types_1 = require("../issues/issue.types");
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare class AuditService {
|
|
2
|
+
private readonly logger;
|
|
3
|
+
/**
|
|
4
|
+
* Execute a dynamic query on the audit events table
|
|
5
|
+
* @param query - SQL query string to execute on the events table
|
|
6
|
+
* @returns Query result as JSON
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Query all events
|
|
10
|
+
* const result = await auditService.query("SELECT * FROM events LIMIT 10");
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Query with JSON extraction
|
|
14
|
+
* const result = await auditService.query(
|
|
15
|
+
* "SELECT * FROM events WHERE JSONExtractString(properties, 'status', 'liveStatus') = 'ONLINE' LIMIT 10"
|
|
16
|
+
* );
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Query by event type
|
|
20
|
+
* const result = await auditService.query("SELECT * FROM events WHERE event = 'device.status.online' LIMIT 10");
|
|
21
|
+
*/
|
|
22
|
+
query(query: string): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Convenience function to query audit data
|
|
26
|
+
* @param query - SQL query string to execute on the events table
|
|
27
|
+
* @returns Query result as JSON
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Query all events
|
|
31
|
+
* const result = await queryAudit("SELECT * FROM events LIMIT 10");
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // Query with JSON extraction
|
|
35
|
+
* const result = await queryAudit(
|
|
36
|
+
* "SELECT * FROM events WHERE JSONExtractString(properties, 'status', 'liveStatus') = 'ONLINE' LIMIT 10"
|
|
37
|
+
* );
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Query by event type
|
|
41
|
+
* const result = await queryAudit("SELECT * FROM events WHERE event = 'device.status.online' LIMIT 10");
|
|
42
|
+
*/
|
|
43
|
+
export declare function queryAudit(query: string): Promise<any>;
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.AuditService = void 0;
|
|
45
|
+
exports.queryAudit = queryAudit;
|
|
46
|
+
const typedi_1 = require("typedi");
|
|
47
|
+
const typedi_2 = __importDefault(require("typedi"));
|
|
48
|
+
const config_1 = require("../config/config");
|
|
49
|
+
// Import from the internal path since it's not exported in the published package
|
|
50
|
+
const clickhouseClient_1 = require("dt-audit-library/dist/utils/clickhouseClient");
|
|
51
|
+
let AuditService = (() => {
|
|
52
|
+
let _classDecorators = [(0, typedi_1.Service)()];
|
|
53
|
+
let _classDescriptor;
|
|
54
|
+
let _classExtraInitializers = [];
|
|
55
|
+
let _classThis;
|
|
56
|
+
var AuditService = _classThis = class {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.logger = (0, config_1.getLogger)();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Execute a dynamic query on the audit events table
|
|
62
|
+
* @param query - SQL query string to execute on the events table
|
|
63
|
+
* @returns Query result as JSON
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // Query all events
|
|
67
|
+
* const result = await auditService.query("SELECT * FROM events LIMIT 10");
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* // Query with JSON extraction
|
|
71
|
+
* const result = await auditService.query(
|
|
72
|
+
* "SELECT * FROM events WHERE JSONExtractString(properties, 'status', 'liveStatus') = 'ONLINE' LIMIT 10"
|
|
73
|
+
* );
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* // Query by event type
|
|
77
|
+
* const result = await auditService.query("SELECT * FROM events WHERE event = 'device.status.online' LIMIT 10");
|
|
78
|
+
*/
|
|
79
|
+
async query(query) {
|
|
80
|
+
try {
|
|
81
|
+
if (!query || typeof query !== "string") {
|
|
82
|
+
throw new Error("Query must be a non-empty string");
|
|
83
|
+
}
|
|
84
|
+
this.logger.info(`Executing audit query: ${query}`);
|
|
85
|
+
const clickhouseClient = (0, clickhouseClient_1.getClickHouseClient)();
|
|
86
|
+
// Execute the query
|
|
87
|
+
const result = await clickhouseClient.query({ query });
|
|
88
|
+
const data = await result.json();
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
this.logger.error(`Error executing audit query: ${error instanceof Error ? error.message : String(error)}`, { error, query });
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
__setFunctionName(_classThis, "AuditService");
|
|
98
|
+
(() => {
|
|
99
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
100
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
101
|
+
AuditService = _classThis = _classDescriptor.value;
|
|
102
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
103
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
104
|
+
})();
|
|
105
|
+
return AuditService = _classThis;
|
|
106
|
+
})();
|
|
107
|
+
exports.AuditService = AuditService;
|
|
108
|
+
/**
|
|
109
|
+
* Convenience function to query audit data
|
|
110
|
+
* @param query - SQL query string to execute on the events table
|
|
111
|
+
* @returns Query result as JSON
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* // Query all events
|
|
115
|
+
* const result = await queryAudit("SELECT * FROM events LIMIT 10");
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* // Query with JSON extraction
|
|
119
|
+
* const result = await queryAudit(
|
|
120
|
+
* "SELECT * FROM events WHERE JSONExtractString(properties, 'status', 'liveStatus') = 'ONLINE' LIMIT 10"
|
|
121
|
+
* );
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* // Query by event type
|
|
125
|
+
* const result = await queryAudit("SELECT * FROM events WHERE event = 'device.status.online' LIMIT 10");
|
|
126
|
+
*/
|
|
127
|
+
async function queryAudit(query) {
|
|
128
|
+
const auditService = typedi_2.default.get(AuditService);
|
|
129
|
+
return auditService.query(query);
|
|
130
|
+
}
|
|
@@ -13,7 +13,10 @@ exports.excludeEvents = [
|
|
|
13
13
|
"schedule.sendcode.initiate",
|
|
14
14
|
"schedule.sendcode.success",
|
|
15
15
|
"device.state.changed",
|
|
16
|
+
"lock.code.set.attempt",
|
|
16
17
|
"lock.code.set.success",
|
|
18
|
+
"lock.code.update.attempt",
|
|
19
|
+
"lock.code.delete.attempt",
|
|
17
20
|
"lock.unlocked_non_business_hour.alert",
|
|
18
21
|
"lock.left_unlocked.alert",
|
|
19
22
|
"network.connection.on",
|
package/dist/audit/PushAudit.js
CHANGED
|
@@ -7,16 +7,10 @@ exports.pushAudit = pushAudit;
|
|
|
7
7
|
const dt_audit_library_1 = require("dt-audit-library");
|
|
8
8
|
const AuditUtils_1 = require("./AuditUtils");
|
|
9
9
|
const typedi_1 = __importDefault(require("typedi"));
|
|
10
|
-
const ExcludeAudits_1 = require("./ExcludeAudits");
|
|
11
10
|
async function pushAudit(data) {
|
|
12
11
|
const audit = await typedi_1.default.get(AuditUtils_1.AuditUtils).buildAuditProperties(data.auditData);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
await (0, dt_audit_library_1.publishAudit)({
|
|
18
|
-
eventType: data.auditType,
|
|
19
|
-
properties: { ...audit, timestamp: new Date().toISOString() },
|
|
20
|
-
});
|
|
21
|
-
}
|
|
12
|
+
await (0, dt_audit_library_1.publishAudit)({
|
|
13
|
+
eventType: data.auditType,
|
|
14
|
+
properties: { ...audit, timestamp: new Date().toISOString() },
|
|
15
|
+
});
|
|
22
16
|
}
|
package/dist/audit/index.d.ts
CHANGED
package/dist/audit/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./PushAudit"), exports);
|
|
18
|
+
__exportStar(require("./Audit.service"), exports);
|
|
18
19
|
__exportStar(require("./IAuditProperties"), exports);
|
package/dist/config/config.js
CHANGED
|
@@ -208,25 +208,21 @@ function ensureAuditInitialized() {
|
|
|
208
208
|
return;
|
|
209
209
|
// const apiKey = process.env.POSTHOG_API_KEY;
|
|
210
210
|
// const host = process.env.POSTHOG_HOST;
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
if (!
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
!region ||
|
|
220
|
-
!secretAccessKey) {
|
|
221
|
-
getConfig().LOGGER.error("AWS_ACCESS_KEY_ID, AWS_REGION, AWS_SECRET_ACCESS_KEY, KEYSPACE_ENDPOINT, and KEYSPACE_NAME must be set in environment variables");
|
|
222
|
-
throw new Error("dt-common-device: AWS_ACCESS_KEY_ID, AWS_REGION, AWS_SECRET_ACCESS_KEY, KEYSPACE_ENDPOINT, and KEYSPACE_NAME must be set in environment variables");
|
|
211
|
+
const host = process.env.CLICKHOUSE_HOST;
|
|
212
|
+
const database = process.env.CLICKHOUSE_DATABASE;
|
|
213
|
+
const username = process.env.CLICKHOUSE_USERNAME;
|
|
214
|
+
const password = process.env.CLICKHOUSE_PASSWORD;
|
|
215
|
+
const env_type = process.env.NODE_ENV;
|
|
216
|
+
if (!host || !database || !username || !password || !env_type) {
|
|
217
|
+
getConfig().LOGGER.error("CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD, and NODE_ENV must be set in environment variables");
|
|
218
|
+
throw new Error("dt-common-device: CLICKHOUSE_HOST, CLICKHOUSE_DATABASE, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD, and NODE_ENV must be set in environment variables");
|
|
223
219
|
}
|
|
224
220
|
(0, dt_audit_library_1.initializeAudit)({
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
host,
|
|
222
|
+
database,
|
|
223
|
+
username,
|
|
224
|
+
password,
|
|
225
|
+
env_type,
|
|
230
226
|
});
|
|
231
227
|
auditInitialized = true;
|
|
232
228
|
}
|
|
@@ -212,36 +212,38 @@ let AdminRepository = (() => {
|
|
|
212
212
|
return collectionZoneDevices;
|
|
213
213
|
}
|
|
214
214
|
async getZonesByAccessGroups(accessGroupIds) {
|
|
215
|
-
// Fetch
|
|
215
|
+
// Fetch zone IDs associated with these access groups
|
|
216
216
|
const zonesIdsQuery = `
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
SELECT DISTINCT z."zoneId"
|
|
218
|
+
FROM dt_zones_collection_map z
|
|
219
|
+
WHERE z."collectionId" = ANY($1)
|
|
220
|
+
`;
|
|
221
221
|
const zonesIdsResult = await this.postgres.query(zonesIdsQuery, [
|
|
222
222
|
accessGroupIds,
|
|
223
223
|
]);
|
|
224
|
+
const zonesIds = zonesIdsResult.rows.map((row) => row.zoneId);
|
|
225
|
+
if (zonesIds.length === 0) {
|
|
226
|
+
return [];
|
|
227
|
+
}
|
|
228
|
+
// Fetch zone type IDs for guest rooms and rooms
|
|
224
229
|
const zoneTypesQuery = `
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
SELECT id
|
|
231
|
+
FROM "dt_zoneTypes"
|
|
232
|
+
WHERE name IN ('Guest Room', 'Room')
|
|
233
|
+
`;
|
|
229
234
|
const zoneTypes = await this.postgres.query(zoneTypesQuery);
|
|
230
|
-
const
|
|
231
|
-
|
|
235
|
+
const guestRoomZoneTypeIds = zoneTypes.rows.map((e) => e.id);
|
|
236
|
+
// Fetch zones matching both sets of IDs
|
|
232
237
|
const zonesQuery = `
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
SELECT id
|
|
239
|
+
FROM dt_zones
|
|
240
|
+
WHERE id = ANY($1) AND "zoneTypeId" = ANY($2)
|
|
241
|
+
`;
|
|
237
242
|
const zonesResult = await this.postgres.query(zonesQuery, [
|
|
238
243
|
zonesIds,
|
|
239
|
-
|
|
244
|
+
guestRoomZoneTypeIds,
|
|
240
245
|
]);
|
|
241
|
-
|
|
242
|
-
return zonesResult?.rows?.map((e) => e.id);
|
|
243
|
-
}
|
|
244
|
-
return [];
|
|
246
|
+
return zonesResult.rows.map((e) => e.id);
|
|
245
247
|
}
|
|
246
248
|
async getAccessGroup(accessGroupId) {
|
|
247
249
|
const query = `
|
|
@@ -141,7 +141,7 @@ let IssueRepository = (() => {
|
|
|
141
141
|
const query = this.buildQuery(filters);
|
|
142
142
|
const options = this.buildOptions(filters);
|
|
143
143
|
const results = await Issue_model_1.IssueModel.find(query, null, options);
|
|
144
|
-
return results
|
|
144
|
+
return results?.map((result) => result.toObject()) || [];
|
|
145
145
|
}
|
|
146
146
|
catch (error) {
|
|
147
147
|
throw new Error(`Failed to find issues: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
@@ -7,19 +7,22 @@ export declare enum IssuesCategory {
|
|
|
7
7
|
export declare enum EntityType {
|
|
8
8
|
ZONE = "ZONE",
|
|
9
9
|
DEVICE = "DEVICE",
|
|
10
|
-
|
|
10
|
+
ACCESS_GROUP = "ACCESS_GROUP",
|
|
11
11
|
USER = "USER",
|
|
12
12
|
INTEGRATION = "INTEGRATION",
|
|
13
13
|
PROPERTY = "PROPERTY",
|
|
14
14
|
HUB = "HUB",
|
|
15
15
|
SCHEDULE = "SCHEDULE",
|
|
16
|
-
ALERT = "ALERT",
|
|
17
16
|
OTHER = "OTHER",
|
|
18
17
|
CLOUD_DEVICE_ACCOUNT = "CLOUD_DEVICE_ACCOUNT",
|
|
19
18
|
CLOUD_PMS_ACCOUNT = "CLOUD_PMS_ACCOUNT"
|
|
20
19
|
}
|
|
21
20
|
export declare enum EntitySubType {
|
|
22
21
|
ZONE = "ZONE",
|
|
22
|
+
GUEST_CODE = "GUEST_CODE",
|
|
23
|
+
STAFF_CODE = "STAFF_CODE",
|
|
24
|
+
EMERGENCY_CODE = "EMERGENCY_CODE",
|
|
25
|
+
VENDOR_CODE = "VENDOR_CODE",
|
|
23
26
|
LOCK = "LOCK",
|
|
24
27
|
HUB = "HUB",
|
|
25
28
|
TV = "TV",
|
|
@@ -73,7 +76,9 @@ export declare enum IssueType {
|
|
|
73
76
|
DEVICE_MALFUNCTION = "DEVICE_MALFUNCTION",
|
|
74
77
|
NO_GUEST_CODES = "NO_GUEST_CODES",
|
|
75
78
|
JUST_ENOUGH_GUEST_CODES = "JUST_ENOUGH_GUEST_CODES",
|
|
76
|
-
|
|
79
|
+
LOW_GUEST_CODES = "LOW_GUEST_CODES",
|
|
80
|
+
PMS_CODE_NOT_DELIVERED = "PMS_CODE_NOT_DELIVERED",
|
|
81
|
+
SCHEDULE_CODE_NOT_ASSIGNED = "SCHEDULE_CODE_NOT_ASSIGNED"
|
|
77
82
|
}
|
|
78
83
|
export interface IssueDocument {
|
|
79
84
|
id: string;
|
|
@@ -12,13 +12,12 @@ var EntityType;
|
|
|
12
12
|
(function (EntityType) {
|
|
13
13
|
EntityType["ZONE"] = "ZONE";
|
|
14
14
|
EntityType["DEVICE"] = "DEVICE";
|
|
15
|
-
EntityType["
|
|
15
|
+
EntityType["ACCESS_GROUP"] = "ACCESS_GROUP";
|
|
16
16
|
EntityType["USER"] = "USER";
|
|
17
17
|
EntityType["INTEGRATION"] = "INTEGRATION";
|
|
18
18
|
EntityType["PROPERTY"] = "PROPERTY";
|
|
19
19
|
EntityType["HUB"] = "HUB";
|
|
20
20
|
EntityType["SCHEDULE"] = "SCHEDULE";
|
|
21
|
-
EntityType["ALERT"] = "ALERT";
|
|
22
21
|
EntityType["OTHER"] = "OTHER";
|
|
23
22
|
EntityType["CLOUD_DEVICE_ACCOUNT"] = "CLOUD_DEVICE_ACCOUNT";
|
|
24
23
|
EntityType["CLOUD_PMS_ACCOUNT"] = "CLOUD_PMS_ACCOUNT";
|
|
@@ -26,6 +25,11 @@ var EntityType;
|
|
|
26
25
|
var EntitySubType;
|
|
27
26
|
(function (EntitySubType) {
|
|
28
27
|
EntitySubType["ZONE"] = "ZONE";
|
|
28
|
+
// CODES
|
|
29
|
+
EntitySubType["GUEST_CODE"] = "GUEST_CODE";
|
|
30
|
+
EntitySubType["STAFF_CODE"] = "STAFF_CODE";
|
|
31
|
+
EntitySubType["EMERGENCY_CODE"] = "EMERGENCY_CODE";
|
|
32
|
+
EntitySubType["VENDOR_CODE"] = "VENDOR_CODE";
|
|
29
33
|
// DEVICE
|
|
30
34
|
EntitySubType["LOCK"] = "LOCK";
|
|
31
35
|
EntitySubType["HUB"] = "HUB";
|
|
@@ -78,5 +82,7 @@ var IssueType;
|
|
|
78
82
|
IssueType["DEVICE_MALFUNCTION"] = "DEVICE_MALFUNCTION";
|
|
79
83
|
IssueType["NO_GUEST_CODES"] = "NO_GUEST_CODES";
|
|
80
84
|
IssueType["JUST_ENOUGH_GUEST_CODES"] = "JUST_ENOUGH_GUEST_CODES";
|
|
85
|
+
IssueType["LOW_GUEST_CODES"] = "LOW_GUEST_CODES";
|
|
81
86
|
IssueType["PMS_CODE_NOT_DELIVERED"] = "PMS_CODE_NOT_DELIVERED";
|
|
87
|
+
IssueType["SCHEDULE_CODE_NOT_ASSIGNED"] = "SCHEDULE_CODE_NOT_ASSIGNED";
|
|
82
88
|
})(IssueType || (exports.IssueType = IssueType = {}));
|