cecon-interfaces 1.0.58 → 1.0.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm2022/notification/entities/index.mjs +2 -1
- package/dist/esm2022/notification/entities/notification-action.entity.mjs +20 -0
- package/dist/esm2022/notification/entities/notification.entity.mjs +13 -9
- package/dist/esm2022/notification/enums/action-type.enum.mjs +7 -0
- package/dist/esm2022/notification/enums/category.enum.mjs +12 -0
- package/dist/esm2022/notification/enums/index.mjs +5 -0
- package/dist/esm2022/notification/enums/priority.enum.mjs +8 -0
- package/dist/esm2022/notification/enums/status.enum.mjs +7 -0
- package/dist/esm2022/notification/index.mjs +2 -1
- package/dist/esm2022/notification/interfaces/i-notification-action.mjs +2 -0
- package/dist/esm2022/notification/interfaces/i-notification.mjs +1 -1
- package/dist/esm2022/notification/interfaces/index.mjs +1 -1
- package/dist/fesm2022/cecon-interfaces.mjs +64 -9
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/notification/entities/index.d.ts +1 -0
- package/dist/notification/entities/index.js +3 -1
- package/dist/notification/entities/notification-action.entity.d.ts +9 -0
- package/dist/notification/entities/notification-action.entity.js +24 -0
- package/dist/notification/entities/notification.entity.d.ts +10 -8
- package/dist/notification/entities/notification.entity.js +12 -8
- package/dist/notification/enums/action-type.enum.d.ts +5 -0
- package/dist/notification/enums/action-type.enum.js +9 -0
- package/dist/notification/enums/category.enum.d.ts +10 -0
- package/dist/notification/enums/category.enum.js +14 -0
- package/dist/notification/enums/index.d.ts +4 -0
- package/dist/notification/enums/index.js +11 -0
- package/dist/notification/enums/priority.enum.d.ts +6 -0
- package/dist/notification/enums/priority.enum.js +10 -0
- package/dist/notification/enums/status.enum.d.ts +5 -0
- package/dist/notification/enums/status.enum.js +9 -0
- package/dist/notification/index.d.ts +1 -0
- package/dist/notification/index.js +1 -0
- package/dist/notification/interfaces/i-notification-action.d.ts +7 -0
- package/dist/notification/interfaces/i-notification-action.js +2 -0
- package/dist/notification/interfaces/i-notification.d.ts +10 -8
- package/dist/notification/interfaces/index.d.ts +1 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
@@ -1,5 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.NotificationEntity = void 0;
|
3
|
+
exports.NotificationEntity = exports.NotificationActionEntity = void 0;
|
4
|
+
var notification_action_entity_1 = require("./notification-action.entity");
|
5
|
+
Object.defineProperty(exports, "NotificationActionEntity", { enumerable: true, get: function () { return notification_action_entity_1.NotificationActionEntity; } });
|
4
6
|
var notification_entity_1 = require("./notification.entity");
|
5
7
|
Object.defineProperty(exports, "NotificationEntity", { enumerable: true, get: function () { return notification_entity_1.NotificationEntity; } });
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { NotificationActionTypeEnum } from '../enums';
|
2
|
+
import { INotificationAction } from '../interfaces/i-notification-action';
|
3
|
+
export declare class NotificationActionEntity implements INotificationAction {
|
4
|
+
icon?: string;
|
5
|
+
label: string;
|
6
|
+
type: NotificationActionTypeEnum;
|
7
|
+
value: string;
|
8
|
+
constructor(data?: Partial<NotificationActionEntity>);
|
9
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationActionEntity = void 0;
|
4
|
+
var enums_1 = require("../enums");
|
5
|
+
var NotificationActionEntity = /** @class */ (function () {
|
6
|
+
// #endregion Properties (4)
|
7
|
+
// #region Constructors (1)
|
8
|
+
function NotificationActionEntity(data) {
|
9
|
+
// #region Properties (4)
|
10
|
+
this.icon = '';
|
11
|
+
this.label = '';
|
12
|
+
this.type = enums_1.NotificationActionTypeEnum.URL;
|
13
|
+
this.value = '';
|
14
|
+
if (data) {
|
15
|
+
for (var key in data) {
|
16
|
+
if (data.hasOwnProperty(key) && key in this) {
|
17
|
+
this[key] = data[key];
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
return NotificationActionEntity;
|
23
|
+
}());
|
24
|
+
exports.NotificationActionEntity = NotificationActionEntity;
|
@@ -1,15 +1,17 @@
|
|
1
|
+
import { NotificationCategoryEnum, NotificationPriorityEnum, NotificationStatusEnum } from '../enums';
|
1
2
|
import { INotification } from '../interfaces';
|
3
|
+
import { NotificationActionEntity } from './notification-action.entity';
|
2
4
|
export declare class NotificationEntity implements INotification {
|
5
|
+
action: NotificationActionEntity;
|
6
|
+
category: NotificationCategoryEnum;
|
3
7
|
createdAt: Date;
|
4
|
-
|
5
|
-
|
8
|
+
data: string;
|
9
|
+
expirationTime: number;
|
6
10
|
id: string;
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
};
|
12
|
-
payload: any;
|
11
|
+
imageURL: string;
|
12
|
+
priority: NotificationPriorityEnum;
|
13
|
+
sound: boolean;
|
14
|
+
status: NotificationStatusEnum;
|
13
15
|
topicName: string;
|
14
16
|
constructor(data?: Partial<NotificationEntity>);
|
15
17
|
}
|
@@ -1,19 +1,23 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.NotificationEntity = void 0;
|
4
|
+
var enums_1 = require("../enums");
|
5
|
+
var notification_action_entity_1 = require("./notification-action.entity");
|
4
6
|
var NotificationEntity = /** @class */ (function () {
|
5
|
-
// #endregion Properties (
|
7
|
+
// #endregion Properties (11)
|
6
8
|
// #region Constructors (1)
|
7
9
|
function NotificationEntity(data) {
|
8
|
-
// #region Properties (
|
10
|
+
// #region Properties (11)
|
11
|
+
this.action = new notification_action_entity_1.NotificationActionEntity();
|
12
|
+
this.category = enums_1.NotificationCategoryEnum.ALERT;
|
9
13
|
this.createdAt = new Date();
|
10
|
-
this.
|
11
|
-
this.
|
14
|
+
this.data = '';
|
15
|
+
this.expirationTime = 3600;
|
12
16
|
this.id = '';
|
13
|
-
this.
|
14
|
-
this.
|
15
|
-
this.
|
16
|
-
this.
|
17
|
+
this.imageURL = '';
|
18
|
+
this.priority = enums_1.NotificationPriorityEnum.HIGH;
|
19
|
+
this.sound = true;
|
20
|
+
this.status = enums_1.NotificationStatusEnum.DELIVERED;
|
17
21
|
this.topicName = '';
|
18
22
|
if (data) {
|
19
23
|
for (var key in data) {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationActionTypeEnum = void 0;
|
4
|
+
var NotificationActionTypeEnum;
|
5
|
+
(function (NotificationActionTypeEnum) {
|
6
|
+
NotificationActionTypeEnum["URL"] = "url";
|
7
|
+
NotificationActionTypeEnum["FUNCTION"] = "function";
|
8
|
+
NotificationActionTypeEnum["CUSTOM"] = "custom";
|
9
|
+
})(NotificationActionTypeEnum || (exports.NotificationActionTypeEnum = NotificationActionTypeEnum = {}));
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationCategoryEnum = void 0;
|
4
|
+
var NotificationCategoryEnum;
|
5
|
+
(function (NotificationCategoryEnum) {
|
6
|
+
NotificationCategoryEnum["INVITE"] = "invite";
|
7
|
+
NotificationCategoryEnum["DEVICE"] = "device";
|
8
|
+
NotificationCategoryEnum["LEAD"] = "lead";
|
9
|
+
NotificationCategoryEnum["TASK"] = "task";
|
10
|
+
NotificationCategoryEnum["MEETING"] = "meeting";
|
11
|
+
NotificationCategoryEnum["ALERT"] = "alert";
|
12
|
+
NotificationCategoryEnum["UPDATE"] = "update";
|
13
|
+
NotificationCategoryEnum["OTHER"] = "other";
|
14
|
+
})(NotificationCategoryEnum || (exports.NotificationCategoryEnum = NotificationCategoryEnum = {}));
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationStatusEnum = exports.NotificationPriorityEnum = exports.NotificationCategoryEnum = exports.NotificationActionTypeEnum = void 0;
|
4
|
+
var action_type_enum_1 = require("./action-type.enum");
|
5
|
+
Object.defineProperty(exports, "NotificationActionTypeEnum", { enumerable: true, get: function () { return action_type_enum_1.NotificationActionTypeEnum; } });
|
6
|
+
var category_enum_1 = require("./category.enum");
|
7
|
+
Object.defineProperty(exports, "NotificationCategoryEnum", { enumerable: true, get: function () { return category_enum_1.NotificationCategoryEnum; } });
|
8
|
+
var priority_enum_1 = require("./priority.enum");
|
9
|
+
Object.defineProperty(exports, "NotificationPriorityEnum", { enumerable: true, get: function () { return priority_enum_1.NotificationPriorityEnum; } });
|
10
|
+
var status_enum_1 = require("./status.enum");
|
11
|
+
Object.defineProperty(exports, "NotificationStatusEnum", { enumerable: true, get: function () { return status_enum_1.NotificationStatusEnum; } });
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationPriorityEnum = void 0;
|
4
|
+
var NotificationPriorityEnum;
|
5
|
+
(function (NotificationPriorityEnum) {
|
6
|
+
NotificationPriorityEnum["LOW"] = "low";
|
7
|
+
NotificationPriorityEnum["MEDIUM"] = "medium";
|
8
|
+
NotificationPriorityEnum["HIGH"] = "high";
|
9
|
+
NotificationPriorityEnum["URGENT"] = "urgent";
|
10
|
+
})(NotificationPriorityEnum || (exports.NotificationPriorityEnum = NotificationPriorityEnum = {}));
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NotificationStatusEnum = void 0;
|
4
|
+
var NotificationStatusEnum;
|
5
|
+
(function (NotificationStatusEnum) {
|
6
|
+
NotificationStatusEnum["DELIVERED"] = "delivered";
|
7
|
+
NotificationStatusEnum["READ"] = "read";
|
8
|
+
NotificationStatusEnum["FAILED"] = "failed";
|
9
|
+
})(NotificationStatusEnum || (exports.NotificationStatusEnum = NotificationStatusEnum = {}));
|
@@ -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("./entities"), exports);
|
18
|
+
__exportStar(require("./enums"), exports);
|
18
19
|
__exportStar(require("./interfaces"), exports);
|
@@ -1,13 +1,15 @@
|
|
1
|
+
import { NotificationCategoryEnum, NotificationPriorityEnum, NotificationStatusEnum } from '../enums';
|
2
|
+
import { INotificationAction } from './i-notification-action';
|
1
3
|
export interface INotification {
|
4
|
+
action: INotificationAction;
|
5
|
+
priority: NotificationPriorityEnum;
|
6
|
+
category: NotificationCategoryEnum;
|
2
7
|
createdAt: Date;
|
3
|
-
|
4
|
-
|
8
|
+
expirationTime: number;
|
9
|
+
status: NotificationStatusEnum;
|
10
|
+
imageURL: string;
|
11
|
+
sound: boolean;
|
5
12
|
id: string;
|
6
|
-
|
7
|
-
isRead: boolean;
|
8
|
-
metadata?: {
|
9
|
-
[key: string]: any;
|
10
|
-
};
|
11
|
-
payload: any;
|
13
|
+
data: string;
|
12
14
|
topicName: string;
|
13
15
|
}
|
package/dist/package.json
CHANGED