@youjunhuang/entity-core 1.0.3 → 1.0.6
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/data_access/mongo/account-mongo.repository.d.ts +3 -1
- package/dist/data_access/mongo/account-mongo.repository.d.ts.map +1 -1
- package/dist/models/auth-credential.d.ts +6 -5
- package/dist/models/auth-credential.d.ts.map +1 -1
- package/dist/models/auth-credential.js +5 -6
- package/dist/models/auth-credential.js.map +1 -1
- package/dist/models/camera.d.ts +13 -11
- package/dist/models/camera.d.ts.map +1 -1
- package/dist/models/camera.js +14 -16
- package/dist/models/camera.js.map +1 -1
- package/dist/models/event.d.ts +33 -30
- package/dist/models/event.d.ts.map +1 -1
- package/dist/models/event.js +12 -25
- package/dist/models/event.js.map +1 -1
- package/dist/models/inform.d.ts +23 -20
- package/dist/models/inform.d.ts.map +1 -1
- package/dist/models/inform.js +18 -21
- package/dist/models/inform.js.map +1 -1
- package/dist/models/permission.d.ts +49 -42
- package/dist/models/permission.d.ts.map +1 -1
- package/dist/models/permission.js +48 -55
- package/dist/models/permission.js.map +1 -1
- package/dist/models/report.d.ts +41 -35
- package/dist/models/report.d.ts.map +1 -1
- package/dist/models/report.js +35 -41
- package/dist/models/report.js.map +1 -1
- package/dist/models/role.d.ts +14 -13
- package/dist/models/role.d.ts.map +1 -1
- package/dist/models/role.js +13 -14
- package/dist/models/role.js.map +1 -1
- package/dist/models/task.d.ts +7 -6
- package/dist/models/task.d.ts.map +1 -1
- package/dist/models/task.js +6 -7
- package/dist/models/task.js.map +1 -1
- package/dist/models/template.d.ts +46 -57
- package/dist/models/template.d.ts.map +1 -1
- package/dist/models/template.js +15 -24
- package/dist/models/template.js.map +1 -1
- package/dist/models/ui-item.d.ts +9 -8
- package/dist/models/ui-item.d.ts.map +1 -1
- package/dist/models/ui-item.js +8 -9
- package/dist/models/ui-item.js.map +1 -1
- package/dist/models/user.d.ts +8 -7
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/user.js +7 -8
- package/dist/models/user.js.map +1 -1
- package/dist/schemas/mongo/account-mongo.schema.d.ts +8 -8
- package/dist/schemas/mongo/account-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/attachment-mongo.schema.d.ts +63 -50
- package/dist/schemas/mongo/attachment-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/attachment-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/biometric-cred.schema.d.ts +8 -8
- package/dist/schemas/mongo/biometric-cred.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/camera-mongo.schema.d.ts +12 -6
- package/dist/schemas/mongo/camera-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/camera-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/camera-recording-mongo.schema.d.ts +12 -6
- package/dist/schemas/mongo/camera-recording-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/camera-recording-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/event-mongo.schema.d.ts +10 -8
- package/dist/schemas/mongo/event-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/event-mongo.schema.js +22 -21
- package/dist/schemas/mongo/event-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/event-template-mongo.schema.d.ts +9 -12
- package/dist/schemas/mongo/event-template-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/event-template-mongo.schema.js +17 -11
- package/dist/schemas/mongo/event-template-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/map-mongo.schema.d.ts +5 -5
- package/dist/schemas/mongo/map-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/map-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/password-cred.schema.d.ts +8 -8
- package/dist/schemas/mongo/password-cred.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/permission-mongo.schema.d.ts +5 -5
- package/dist/schemas/mongo/permission-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/permission-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/report-mongo.schema.d.ts +5 -5
- package/dist/schemas/mongo/report-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/report-mongo.schema.js +1 -1
- package/dist/schemas/mongo/report-mongo.schema.js.map +1 -1
- package/dist/schemas/mongo/role-mongo.schema.d.ts +11 -6
- package/dist/schemas/mongo/role-mongo.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/third-party-cred.schema.d.ts +8 -8
- package/dist/schemas/mongo/third-party-cred.schema.d.ts.map +1 -1
- package/dist/schemas/mongo/third-party-cred.schema.js.map +1 -1
- package/dist/schemas/mongo/user-mongo.schema.d.ts +14 -7
- package/dist/schemas/mongo/user-mongo.schema.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,9 @@ import { AccountDocument } from '../../schemas/mongo/account-mongo.schema';
|
|
|
4
4
|
export declare class AccountMongoRepository extends MongoBaseRepository<AccountDocument> {
|
|
5
5
|
private accountModel;
|
|
6
6
|
constructor(accountModel: Model<AccountDocument>);
|
|
7
|
-
findByEmail(email: string): Promise<(import("mongoose").Document<unknown, {}, AccountDocument, {}, {}> &
|
|
7
|
+
findByEmail(email: string): Promise<(import("mongoose").Document<unknown, {}, AccountDocument, {}, {}> & import("mongoose").Document<import("mongoose").Types.ObjectId, any, any, Record<string, any>, {}> & import("../..").Account & {
|
|
8
|
+
_user?: import("../..").UserProfileDocument;
|
|
9
|
+
} & Required<{
|
|
8
10
|
_id: import("mongoose").Types.ObjectId;
|
|
9
11
|
}> & {
|
|
10
12
|
__v: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-mongo.repository.d.ts","sourceRoot":"","sources":["../../../data_access/mongo/account-mongo.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAgB,eAAe,EAAE,MAAM,0CAA0C,CAAC;AACzF,qBACa,sBAAuB,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IAClC,OAAO,CAAC,YAAY;gBAAZ,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC;IAMlF,WAAW,CAAC,KAAK,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"account-mongo.repository.d.ts","sourceRoot":"","sources":["../../../data_access/mongo/account-mongo.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAgB,eAAe,EAAE,MAAM,0CAA0C,CAAC;AACzF,qBACa,sBAAuB,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IAClC,OAAO,CAAC,YAAY;gBAAZ,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC;IAMlF,WAAW,CAAC,KAAK,EAAE,MAAM;;;;;;;IAIzB,cAAc,CAAC,QAAQ,EAAE,MAAM;CAOtC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { User } from "./user";
|
|
2
2
|
import { Base } from "./utils";
|
|
3
|
-
export declare
|
|
4
|
-
Face
|
|
5
|
-
Voice
|
|
6
|
-
Fingerprint
|
|
7
|
-
}
|
|
3
|
+
export declare const BiometricType: {
|
|
4
|
+
readonly Face: "face";
|
|
5
|
+
readonly Voice: "voice";
|
|
6
|
+
readonly Fingerprint: "fingerprint";
|
|
7
|
+
};
|
|
8
|
+
export type BiometricType = typeof BiometricType[keyof typeof BiometricType];
|
|
8
9
|
export interface PasswordCredential extends Base {
|
|
9
10
|
/** 關聯的使用者 ID。 */
|
|
10
11
|
userId: User["id"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-credential.d.ts","sourceRoot":"","sources":["../../models/auth-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,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AAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BiometricType = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(BiometricType || (exports.BiometricType = BiometricType = {}));
|
|
4
|
+
exports.BiometricType = {
|
|
5
|
+
Face: "face",
|
|
6
|
+
Voice: "voice",
|
|
7
|
+
Fingerprint: "fingerprint",
|
|
8
|
+
};
|
|
10
9
|
//# sourceMappingURL=auth-credential.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-credential.js","sourceRoot":"","sources":["../../models/auth-credential.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"auth-credential.js","sourceRoot":"","sources":["../../models/auth-credential.ts"],"names":[],"mappings":";;;AAGa,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAC"}
|
package/dist/models/camera.d.ts
CHANGED
|
@@ -8,22 +8,24 @@ import { Map } from './map';
|
|
|
8
8
|
* - **`Offline`**:已開始串流,但物理/網路層無法連線
|
|
9
9
|
* - **`Online`**:攝影機正在串流
|
|
10
10
|
*/
|
|
11
|
-
export declare
|
|
12
|
-
Inactive
|
|
13
|
-
NoStream
|
|
14
|
-
Offline
|
|
15
|
-
Online
|
|
16
|
-
}
|
|
11
|
+
export declare const CameraStatus: {
|
|
12
|
+
readonly Inactive: "inactive";
|
|
13
|
+
readonly NoStream: "no_stream";
|
|
14
|
+
readonly Offline: "offline";
|
|
15
|
+
readonly Online: "online";
|
|
16
|
+
};
|
|
17
|
+
export type CameraStatus = typeof CameraStatus[keyof typeof CameraStatus];
|
|
17
18
|
export declare const CameraStatusMap: Record<string, CameraStatus>;
|
|
18
19
|
/**
|
|
19
20
|
* **攝影機類型 (CameraType)**
|
|
20
21
|
* - **`Shotgun`**:槍型攝影機
|
|
21
22
|
* - **`Panoramic`**:全景攝影機
|
|
22
23
|
*/
|
|
23
|
-
export declare
|
|
24
|
-
SHOTGUN
|
|
25
|
-
PANORAMIC
|
|
26
|
-
}
|
|
24
|
+
export declare const CameraType: {
|
|
25
|
+
readonly SHOTGUN: "shotgun";
|
|
26
|
+
readonly PANORAMIC: "panoramic";
|
|
27
|
+
};
|
|
28
|
+
export type CameraType = typeof CameraType[keyof typeof CameraType];
|
|
27
29
|
/**
|
|
28
30
|
* **攝影機 (Camera)**
|
|
29
31
|
*
|
|
@@ -87,7 +89,7 @@ export interface Camera extends Device {
|
|
|
87
89
|
* 攝影機的型號 (DeviceModel)
|
|
88
90
|
* @example "D-Link DCS-930L"
|
|
89
91
|
*/
|
|
90
|
-
deviceModel
|
|
92
|
+
deviceModel?: string;
|
|
91
93
|
/**
|
|
92
94
|
* 裝置/攝影機描述
|
|
93
95
|
* @example "監看大門人流,連接至 NVR-01"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../models/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;;GAMG;AACH,
|
|
1
|
+
{"version":3,"file":"camera.d.ts","sourceRoot":"","sources":["../../models/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,YAA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AAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,IAAI,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/models/camera.js
CHANGED
|
@@ -8,27 +8,25 @@ exports.CameraType = exports.CameraStatusMap = exports.CameraStatus = void 0;
|
|
|
8
8
|
* - **`Offline`**:已開始串流,但物理/網路層無法連線
|
|
9
9
|
* - **`Online`**:攝影機正在串流
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})(CameraStatus || (exports.CameraStatus = CameraStatus = {}));
|
|
11
|
+
exports.CameraStatus = {
|
|
12
|
+
Inactive: 'inactive',
|
|
13
|
+
NoStream: 'no_stream',
|
|
14
|
+
Offline: 'offline',
|
|
15
|
+
Online: 'online'
|
|
16
|
+
};
|
|
18
17
|
exports.CameraStatusMap = {
|
|
19
|
-
'在線': CameraStatus.Online,
|
|
20
|
-
'離線': CameraStatus.Offline,
|
|
21
|
-
'無串流': CameraStatus.NoStream,
|
|
22
|
-
'未啟用': CameraStatus.Inactive,
|
|
18
|
+
'在線': exports.CameraStatus.Online,
|
|
19
|
+
'離線': exports.CameraStatus.Offline,
|
|
20
|
+
'無串流': exports.CameraStatus.NoStream,
|
|
21
|
+
'未啟用': exports.CameraStatus.Inactive,
|
|
23
22
|
};
|
|
24
23
|
/**
|
|
25
24
|
* **攝影機類型 (CameraType)**
|
|
26
25
|
* - **`Shotgun`**:槍型攝影機
|
|
27
26
|
* - **`Panoramic`**:全景攝影機
|
|
28
27
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(CameraType || (exports.CameraType = CameraType = {}));
|
|
28
|
+
exports.CameraType = {
|
|
29
|
+
SHOTGUN: 'shotgun',
|
|
30
|
+
PANORAMIC: 'panoramic',
|
|
31
|
+
};
|
|
34
32
|
//# sourceMappingURL=camera.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../models/camera.ts"],"names":[],"mappings":";;;AAIA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"camera.js","sourceRoot":"","sources":["../../models/camera.ts"],"names":[],"mappings":";;;AAIA;;;;;;GAMG;AACU,QAAA,YAAY,GAAG;IAC1B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIE,QAAA,eAAe,GAAiC;IAC3D,IAAI,EAAE,oBAAY,CAAC,MAAM;IACzB,IAAI,EAAE,oBAAY,CAAC,OAAO;IAC1B,KAAK,EAAE,oBAAY,CAAC,QAAQ;IAC5B,KAAK,EAAE,oBAAY,CAAC,QAAQ;CAC7B,CAAC;AAEF;;;;GAIG;AACU,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACd,CAAC"}
|
package/dist/models/event.d.ts
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { EventCategory, EventType, EventTemplate } from './template';
|
|
2
2
|
import { Base } from './utils';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Completed = "completed"
|
|
3
|
+
export declare const EventStatus: {
|
|
4
|
+
readonly Unprocessed: "unprocessed";
|
|
5
|
+
readonly Notified: "notified";
|
|
6
|
+
readonly Processing: "processing";
|
|
7
|
+
readonly Completed: "completed";
|
|
8
|
+
};
|
|
9
|
+
export type EventStatus = typeof EventStatus[keyof typeof EventStatus];
|
|
10
|
+
export declare const SubjectType: {
|
|
11
|
+
readonly Camera: "camera";
|
|
12
|
+
readonly User: "user";
|
|
13
|
+
};
|
|
14
|
+
export type SubjectType = typeof SubjectType[keyof typeof SubjectType];
|
|
15
|
+
export interface ViolationPayload {
|
|
16
|
+
snapshotUrl: string;
|
|
17
|
+
reid: string;
|
|
19
18
|
}
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Device = "Device",
|
|
24
|
-
User = "User"
|
|
19
|
+
export interface ObservationPayload {
|
|
20
|
+
}
|
|
21
|
+
export interface TranscriptPayload {
|
|
25
22
|
}
|
|
26
23
|
export interface Event extends Base {
|
|
27
|
-
/**
|
|
24
|
+
/** 所屬的作業場景 ID (選填,因為可能是無場景的系統事件) */
|
|
25
|
+
readonly sceneId?: string | null;
|
|
28
26
|
readonly templateId: EventTemplate['id'];
|
|
27
|
+
/** 事件名稱 */
|
|
28
|
+
readonly name: string;
|
|
29
|
+
/** 事件代碼 */
|
|
30
|
+
readonly code: string;
|
|
29
31
|
/** 冗餘寫入,便於查詢(避免 Join/Lookup) */
|
|
30
32
|
readonly category: EventCategory;
|
|
31
33
|
readonly type: EventType;
|
|
32
|
-
/**
|
|
34
|
+
/** 主體類型 (誰產生的?) */
|
|
33
35
|
readonly subjectType: SubjectType;
|
|
34
36
|
readonly subjectId: string;
|
|
35
37
|
/** 嚴重度(可覆蓋 Template 預設;建議一經寫入不再改動) */
|
|
@@ -38,14 +40,15 @@ export interface Event extends Base {
|
|
|
38
40
|
readonly description?: string | null;
|
|
39
41
|
/** 事件實際發生時間(來源設備/AI 的時間) */
|
|
40
42
|
readonly occurredAt: Date;
|
|
41
|
-
/**
|
|
43
|
+
/** 事件群組 ID (例如:同一事故的連續 5 張截圖,可共用一個 groupId) */
|
|
42
44
|
readonly groupId?: string | null;
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
/** 去重指紋 (用於防止 AI 重複報警,例如 md5(code + subjectId + time_window)) */
|
|
46
|
+
readonly fingerprint?: string | null;
|
|
47
|
+
/** 標準化子型與自由標籤(若需要可加在 event_data.norm) */
|
|
48
|
+
/** * 結構化資料,根據 code 變化
|
|
49
|
+
* 包含: snapshotUrl, reId, batteryLevel, audioText 等等
|
|
50
|
+
*/
|
|
51
|
+
readonly data: ViolationPayload | ObservationPayload | TranscriptPayload;
|
|
49
52
|
}
|
|
50
53
|
export interface EventData {
|
|
51
54
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../models/event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../models/event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAGvE,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAGvE,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;CAElC;AAED,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AAO,CAAC,CAAC;QAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,CAAC;CACH"}
|
package/dist/models/event.js
CHANGED
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SubjectType = exports.EventStatus = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(function (EventStatus) {
|
|
17
|
-
EventStatus["Unprocessed"] = "unprocessed";
|
|
18
|
-
EventStatus["Notified"] = "notified";
|
|
19
|
-
EventStatus["Processing"] = "processing";
|
|
20
|
-
EventStatus["Completed"] = "completed";
|
|
21
|
-
})(EventStatus || (exports.EventStatus = EventStatus = {}));
|
|
22
|
-
var SubjectType;
|
|
23
|
-
(function (SubjectType) {
|
|
24
|
-
SubjectType["Entrance"] = "Entrance";
|
|
25
|
-
SubjectType["Camera"] = "Camera";
|
|
26
|
-
SubjectType["Device"] = "Device";
|
|
27
|
-
SubjectType["User"] = "User";
|
|
28
|
-
})(SubjectType || (exports.SubjectType = SubjectType = {}));
|
|
4
|
+
// 事件狀態
|
|
5
|
+
exports.EventStatus = {
|
|
6
|
+
Unprocessed: 'unprocessed', // 尚未處理
|
|
7
|
+
Notified: 'notified', // 已通知
|
|
8
|
+
Processing: 'processing', // 正在處理
|
|
9
|
+
Completed: 'completed', // 已完成
|
|
10
|
+
};
|
|
11
|
+
// 主體類型
|
|
12
|
+
exports.SubjectType = {
|
|
13
|
+
Camera: 'camera', // 摄像機
|
|
14
|
+
User: 'user', // 用戶
|
|
15
|
+
};
|
|
29
16
|
//# sourceMappingURL=event.js.map
|
package/dist/models/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../models/event.ts"],"names":[],"mappings":";;;AAIA
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../models/event.ts"],"names":[],"mappings":";;;AAIA,OAAO;AACM,QAAA,WAAW,GAAG;IACzB,WAAW,EAAE,aAAa,EAAI,OAAO;IACrC,QAAQ,EAAE,UAAU,EAAU,MAAM;IACpC,UAAU,EAAE,YAAY,EAAM,OAAO;IACrC,SAAS,EAAE,WAAW,EAAQ,MAAM;CAC5B,CAAC;AAIX,OAAO;AACM,QAAA,WAAW,GAAG;IACzB,MAAM,EAAE,QAAQ,EAAc,MAAM;IACpC,IAAI,EAAE,MAAM,EAAkB,KAAK;CAC3B,CAAC"}
|
package/dist/models/inform.d.ts
CHANGED
|
@@ -12,20 +12,21 @@ import { Base } from "./utils";
|
|
|
12
12
|
* - **`Web`**:透過通知 Web 。
|
|
13
13
|
* - **`Webhook`**:透過 Webhook 送達通知。
|
|
14
14
|
*/
|
|
15
|
-
export declare
|
|
15
|
+
export declare const InformChannel: {
|
|
16
16
|
/** 電子郵件 */
|
|
17
|
-
Email
|
|
17
|
+
readonly Email: "email";
|
|
18
18
|
/** 簡訊 (SMS) */
|
|
19
|
-
SMS
|
|
19
|
+
readonly SMS: "sms";
|
|
20
20
|
/** Firebase Cloud Messaging */
|
|
21
|
-
FCM
|
|
21
|
+
readonly FCM: "fcm";
|
|
22
22
|
/** Apple Push Inform Service */
|
|
23
|
-
APNs
|
|
23
|
+
readonly APNs: "apns";
|
|
24
24
|
/** Web */
|
|
25
|
-
Web
|
|
25
|
+
readonly Web: "web";
|
|
26
26
|
/** Webhook */
|
|
27
|
-
Webhook
|
|
28
|
-
}
|
|
27
|
+
readonly Webhook: "webhook";
|
|
28
|
+
};
|
|
29
|
+
export type InformChannel = typeof InformChannel[keyof typeof InformChannel];
|
|
29
30
|
/**
|
|
30
31
|
* **通知狀態**
|
|
31
32
|
*
|
|
@@ -35,16 +36,17 @@ export declare enum InformChannel {
|
|
|
35
36
|
* - **`Read`**:已讀取。
|
|
36
37
|
* - **`Failed`**:發送失敗。
|
|
37
38
|
*/
|
|
38
|
-
export declare
|
|
39
|
+
export declare const InformStatus: {
|
|
39
40
|
/** 通知已建立,尚未發送。 */
|
|
40
|
-
Pending
|
|
41
|
+
readonly Pending: "pending";
|
|
41
42
|
/** 通知已發送。 */
|
|
42
|
-
Sent
|
|
43
|
+
readonly Sent: "sent";
|
|
43
44
|
/** 通知已讀取。 */
|
|
44
|
-
Read
|
|
45
|
+
readonly Read: "read";
|
|
45
46
|
/** 通知發送失敗。 */
|
|
46
|
-
Failed
|
|
47
|
-
}
|
|
47
|
+
readonly Failed: "failed";
|
|
48
|
+
};
|
|
49
|
+
export type InformStatus = typeof InformStatus[keyof typeof InformStatus];
|
|
48
50
|
/**
|
|
49
51
|
* **通知主表**
|
|
50
52
|
*
|
|
@@ -98,10 +100,11 @@ export interface InformStatusRecord extends Base {
|
|
|
98
100
|
* - `Repeated`:持續通知 X 次,每次間隔 Y 分鐘,直到 Z 分鐘或者被 attachment 標記已處理。
|
|
99
101
|
* - `Difference`:當 event 的同一種類的子類型 T1 和 T0 出現差異時通知。
|
|
100
102
|
*/
|
|
101
|
-
export declare
|
|
102
|
-
Repeated
|
|
103
|
-
Difference
|
|
104
|
-
}
|
|
103
|
+
export declare const InformStrategyType: {
|
|
104
|
+
readonly Repeated: "repeated";
|
|
105
|
+
readonly Difference: "difference";
|
|
106
|
+
};
|
|
107
|
+
export type InformStrategyType = typeof InformStrategyType[keyof typeof InformStrategyType];
|
|
105
108
|
/**
|
|
106
109
|
* **持續通知策略**
|
|
107
110
|
*
|
|
@@ -113,7 +116,7 @@ export declare enum InformStrategyType {
|
|
|
113
116
|
* - `attachmentIdToResolve`:當特定附件標記已處理時停止通知。
|
|
114
117
|
*/
|
|
115
118
|
export interface RepeatedInformStrategy {
|
|
116
|
-
strategy: InformStrategyType.Repeated;
|
|
119
|
+
strategy: typeof InformStrategyType.Repeated;
|
|
117
120
|
/** 最大通知次數 (X) */
|
|
118
121
|
maxAttempts: number;
|
|
119
122
|
/** 每次通知的時間間隔 (Y)(分鐘) */
|
|
@@ -133,7 +136,7 @@ export interface RepeatedInformStrategy {
|
|
|
133
136
|
* - `currentSubType`:新的事件子類型 (T1)。
|
|
134
137
|
*/
|
|
135
138
|
export interface SubTypeDifferenceInformStrategy {
|
|
136
|
-
strategy: InformStrategyType.Difference;
|
|
139
|
+
strategy: typeof InformStrategyType.Difference;
|
|
137
140
|
/** 事件類別 (例如 `visual` 或 `system`) */
|
|
138
141
|
type: EventType;
|
|
139
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inform.d.ts","sourceRoot":"","sources":["../../models/inform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B;;;;;;;;;;GAUG;AACH,
|
|
1
|
+
{"version":3,"file":"inform.d.ts","sourceRoot":"","sources":["../../models/inform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;IACxB,WAAW;;IAGX,eAAe;;IAGf,+BAA+B;;IAG/B,gCAAgC;;IAGhC,UAAU;;IAGV,cAAc;;CAEN,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE7E;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;IACvB,kBAAkB;;IAGlB,aAAa;;IAGb,aAAa;;IAGb,cAAc;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AW,+BAA+B;IAC9C,QAAQ,EAAE,OAAO,kBAAkB,CAAC,UAAU,CAAC;IAE/C,oCAAoC;IACpC,IAAI,EAAE,SAAS,CAAC;CAOjB;AACD,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,GACvD,+BAA+B,CAAC"}
|
package/dist/models/inform.js
CHANGED
|
@@ -12,21 +12,20 @@ exports.InformStrategyType = exports.InformStatus = exports.InformChannel = void
|
|
|
12
12
|
* - **`Web`**:透過通知 Web 。
|
|
13
13
|
* - **`Webhook`**:透過 Webhook 送達通知。
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
(function (InformChannel) {
|
|
15
|
+
exports.InformChannel = {
|
|
17
16
|
/** 電子郵件 */
|
|
18
|
-
|
|
17
|
+
Email: 'email',
|
|
19
18
|
/** 簡訊 (SMS) */
|
|
20
|
-
|
|
19
|
+
SMS: 'sms',
|
|
21
20
|
/** Firebase Cloud Messaging */
|
|
22
|
-
|
|
21
|
+
FCM: 'fcm',
|
|
23
22
|
/** Apple Push Inform Service */
|
|
24
|
-
|
|
23
|
+
APNs: 'apns',
|
|
25
24
|
/** Web */
|
|
26
|
-
|
|
25
|
+
Web: 'web',
|
|
27
26
|
/** Webhook */
|
|
28
|
-
|
|
29
|
-
}
|
|
27
|
+
Webhook: 'webhook'
|
|
28
|
+
};
|
|
30
29
|
/**
|
|
31
30
|
* **通知狀態**
|
|
32
31
|
*
|
|
@@ -36,26 +35,24 @@ var InformChannel;
|
|
|
36
35
|
* - **`Read`**:已讀取。
|
|
37
36
|
* - **`Failed`**:發送失敗。
|
|
38
37
|
*/
|
|
39
|
-
|
|
40
|
-
(function (InformStatus) {
|
|
38
|
+
exports.InformStatus = {
|
|
41
39
|
/** 通知已建立,尚未發送。 */
|
|
42
|
-
|
|
40
|
+
Pending: 'pending',
|
|
43
41
|
/** 通知已發送。 */
|
|
44
|
-
|
|
42
|
+
Sent: 'sent',
|
|
45
43
|
/** 通知已讀取。 */
|
|
46
|
-
|
|
44
|
+
Read: 'read',
|
|
47
45
|
/** 通知發送失敗。 */
|
|
48
|
-
|
|
49
|
-
}
|
|
46
|
+
Failed: 'failed'
|
|
47
|
+
};
|
|
50
48
|
/**
|
|
51
49
|
* **通知策略類型**
|
|
52
50
|
*
|
|
53
51
|
* - `Repeated`:持續通知 X 次,每次間隔 Y 分鐘,直到 Z 分鐘或者被 attachment 標記已處理。
|
|
54
52
|
* - `Difference`:當 event 的同一種類的子類型 T1 和 T0 出現差異時通知。
|
|
55
53
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})(InformStrategyType || (exports.InformStrategyType = InformStrategyType = {}));
|
|
54
|
+
exports.InformStrategyType = {
|
|
55
|
+
Repeated: "repeated",
|
|
56
|
+
Difference: "difference"
|
|
57
|
+
};
|
|
61
58
|
//# sourceMappingURL=inform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inform.js","sourceRoot":"","sources":["../../models/inform.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"inform.js","sourceRoot":"","sources":["../../models/inform.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;GAUG;AACU,QAAA,aAAa,GAAG;IAC3B,WAAW;IACX,KAAK,EAAE,OAAO;IAEd,eAAe;IACf,GAAG,EAAE,KAAK;IAEV,+BAA+B;IAC/B,GAAG,EAAE,KAAK;IAEV,gCAAgC;IAChC,IAAI,EAAE,MAAM;IAEZ,UAAU;IACV,GAAG,EAAE,KAAK;IAEV,cAAc;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAIX;;;;;;;;GAQG;AACU,QAAA,YAAY,GAAG;IAC1B,kBAAkB;IAClB,OAAO,EAAE,SAAS;IAElB,aAAa;IACb,IAAI,EAAE,MAAM;IAEZ,aAAa;IACb,IAAI,EAAE,MAAM;IAEZ,cAAc;IACd,MAAM,EAAE,QAAQ;CACR,CAAC;AA6DX;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG;IAChC,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;CAChB,CAAC"}
|
|
@@ -6,56 +6,63 @@
|
|
|
6
6
|
* 例如:Chatroom, Inform, Event, Group, Server ...
|
|
7
7
|
* 未來若出現新功能,可在此擴充。
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare const PermissionCategory: {
|
|
10
10
|
/** 聊天室 */
|
|
11
|
-
Chatroom
|
|
12
|
-
Inform
|
|
13
|
-
Event
|
|
14
|
-
Report
|
|
15
|
-
Group
|
|
16
|
-
Server
|
|
17
|
-
}
|
|
11
|
+
readonly Chatroom: "chatroom";
|
|
12
|
+
readonly Inform: "inform";
|
|
13
|
+
readonly Event: "event";
|
|
14
|
+
readonly Report: "report";
|
|
15
|
+
readonly Group: "group";
|
|
16
|
+
readonly Server: "server";
|
|
17
|
+
};
|
|
18
|
+
export type PermissionCategory = typeof PermissionCategory[keyof typeof PermissionCategory];
|
|
18
19
|
/**
|
|
19
20
|
* **聊天室可用動作 (ChatroomPermissionAction)**
|
|
20
21
|
*/
|
|
21
|
-
export declare
|
|
22
|
+
export declare const ChatroomPermissionAction: {
|
|
22
23
|
/** 可讀取訊息 */
|
|
23
|
-
ReadMessage
|
|
24
|
+
readonly ReadMessage: "readMessage";
|
|
24
25
|
/** 可傳送訊息 */
|
|
25
|
-
SendMessage
|
|
26
|
+
readonly SendMessage: "sendMessage";
|
|
26
27
|
/** 可編輯/刪除他人訊息 */
|
|
27
|
-
ManageMessages
|
|
28
|
+
readonly ManageMessages: "manageMessages";
|
|
28
29
|
/** 可管理聊天室 (新增移除成員、修改設定) */
|
|
29
|
-
ManageChatroom
|
|
30
|
-
}
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
30
|
+
readonly ManageChatroom: "manageChatroom";
|
|
31
|
+
};
|
|
32
|
+
export type ChatroomPermissionAction = typeof ChatroomPermissionAction[keyof typeof ChatroomPermissionAction];
|
|
33
|
+
export declare const ServerPermissionAction: {
|
|
34
|
+
readonly RestartServer: "restartServer";
|
|
35
|
+
readonly ManageUsers: "manageUsers";
|
|
36
|
+
readonly ConfigureSettings: "configureSettings";
|
|
37
|
+
};
|
|
38
|
+
export type ServerPermissionAction = typeof ServerPermissionAction[keyof typeof ServerPermissionAction];
|
|
39
|
+
export declare const ReportPermissionAction: {
|
|
40
|
+
readonly ViewReport: "viewReport";
|
|
41
|
+
readonly GenerateReport: "generateReport";
|
|
42
|
+
};
|
|
43
|
+
export type ReportPermissionAction = typeof ReportPermissionAction[keyof typeof ReportPermissionAction];
|
|
44
|
+
export declare const GroupPermissionAction: {
|
|
45
|
+
readonly ViewGroup: "viewGroup";
|
|
46
|
+
readonly CreateGroup: "createGroup";
|
|
47
|
+
readonly EditGroup: "editGroup";
|
|
48
|
+
readonly DeleteGroup: "deleteGroup";
|
|
49
|
+
readonly ManageMembers: "manageMembers";
|
|
50
|
+
};
|
|
51
|
+
export type GroupPermissionAction = typeof GroupPermissionAction[keyof typeof GroupPermissionAction];
|
|
52
|
+
export declare const InformPermissionAction: {
|
|
53
|
+
readonly ViewNotifications: "viewNotifications";
|
|
54
|
+
readonly SendNotifications: "sendNotifications";
|
|
55
|
+
readonly ManageNotifications: "manageNotifications";
|
|
56
|
+
};
|
|
57
|
+
export type InformPermissionAction = typeof InformPermissionAction[keyof typeof InformPermissionAction];
|
|
58
|
+
export declare const EventPermissionAction: {
|
|
59
|
+
readonly ViewEvent: "viewEvent";
|
|
60
|
+
readonly CreateEvent: "createEvent";
|
|
61
|
+
readonly EditEvent: "editEvent";
|
|
62
|
+
readonly DeleteEvent: "deleteEvent";
|
|
63
|
+
readonly ManageParticipants: "manageParticipants";
|
|
64
|
+
};
|
|
65
|
+
export type EventPermissionAction = typeof EventPermissionAction[keyof typeof EventPermissionAction];
|
|
59
66
|
export type PermissionAction = ChatroomPermissionAction | ServerPermissionAction | ReportPermissionAction | GroupPermissionAction | InformPermissionAction | EventPermissionAction;
|
|
60
67
|
export declare const PermissionActionMap: Record<PermissionCategory, Record<string, string>>;
|
|
61
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../models/permission.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"permission.d.ts","sourceRoot":"","sources":["../../models/permission.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;IAC7B,UAAU;;;;;;;CASF,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAG5F;;GAEG;AACH,eAAO,MAAM,wBAAwB;IACnC,YAAY;;IAGZ,YAAY;;IAGZ,iBAAiB;;IAGjB,2BAA2B;;CAEnB,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE9G,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAExG,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAExG,eAAO,MAAM,qBAAqB;;;;;;CAMxB,CAAC;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