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.
Files changed (38) hide show
  1. package/dist/esm2022/notification/entities/index.mjs +2 -1
  2. package/dist/esm2022/notification/entities/notification-action.entity.mjs +20 -0
  3. package/dist/esm2022/notification/entities/notification.entity.mjs +13 -9
  4. package/dist/esm2022/notification/enums/action-type.enum.mjs +7 -0
  5. package/dist/esm2022/notification/enums/category.enum.mjs +12 -0
  6. package/dist/esm2022/notification/enums/index.mjs +5 -0
  7. package/dist/esm2022/notification/enums/priority.enum.mjs +8 -0
  8. package/dist/esm2022/notification/enums/status.enum.mjs +7 -0
  9. package/dist/esm2022/notification/index.mjs +2 -1
  10. package/dist/esm2022/notification/interfaces/i-notification-action.mjs +2 -0
  11. package/dist/esm2022/notification/interfaces/i-notification.mjs +1 -1
  12. package/dist/esm2022/notification/interfaces/index.mjs +1 -1
  13. package/dist/fesm2022/cecon-interfaces.mjs +64 -9
  14. package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
  15. package/dist/notification/entities/index.d.ts +1 -0
  16. package/dist/notification/entities/index.js +3 -1
  17. package/dist/notification/entities/notification-action.entity.d.ts +9 -0
  18. package/dist/notification/entities/notification-action.entity.js +24 -0
  19. package/dist/notification/entities/notification.entity.d.ts +10 -8
  20. package/dist/notification/entities/notification.entity.js +12 -8
  21. package/dist/notification/enums/action-type.enum.d.ts +5 -0
  22. package/dist/notification/enums/action-type.enum.js +9 -0
  23. package/dist/notification/enums/category.enum.d.ts +10 -0
  24. package/dist/notification/enums/category.enum.js +14 -0
  25. package/dist/notification/enums/index.d.ts +4 -0
  26. package/dist/notification/enums/index.js +11 -0
  27. package/dist/notification/enums/priority.enum.d.ts +6 -0
  28. package/dist/notification/enums/priority.enum.js +10 -0
  29. package/dist/notification/enums/status.enum.d.ts +5 -0
  30. package/dist/notification/enums/status.enum.js +9 -0
  31. package/dist/notification/index.d.ts +1 -0
  32. package/dist/notification/index.js +1 -0
  33. package/dist/notification/interfaces/i-notification-action.d.ts +7 -0
  34. package/dist/notification/interfaces/i-notification-action.js +2 -0
  35. package/dist/notification/interfaces/i-notification.d.ts +10 -8
  36. package/dist/notification/interfaces/index.d.ts +1 -0
  37. package/dist/package.json +1 -1
  38. package/package.json +1 -1
@@ -1 +1,2 @@
1
+ export { NotificationActionEntity } from './notification-action.entity';
1
2
  export { NotificationEntity } from './notification.entity';
@@ -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
- deliveryAttempts?: number;
5
- expiryDate?: Date;
8
+ data: string;
9
+ expirationTime: number;
6
10
  id: string;
7
- isDelivered: boolean;
8
- isRead: boolean;
9
- metadata?: {
10
- [key: string]: any;
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 (9)
7
+ // #endregion Properties (11)
6
8
  // #region Constructors (1)
7
9
  function NotificationEntity(data) {
8
- // #region Properties (9)
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.deliveryAttempts = 0;
11
- this.expiryDate = new Date();
14
+ this.data = '';
15
+ this.expirationTime = 3600;
12
16
  this.id = '';
13
- this.isDelivered = false;
14
- this.isRead = false;
15
- this.metadata = {};
16
- this.payload = {};
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,5 @@
1
+ export declare enum NotificationActionTypeEnum {
2
+ URL = "url",
3
+ FUNCTION = "function",
4
+ CUSTOM = "custom"
5
+ }
@@ -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,10 @@
1
+ export declare enum NotificationCategoryEnum {
2
+ INVITE = "invite",
3
+ DEVICE = "device",
4
+ LEAD = "lead",
5
+ TASK = "task",
6
+ MEETING = "meeting",
7
+ ALERT = "alert",
8
+ UPDATE = "update",
9
+ OTHER = "other"
10
+ }
@@ -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,4 @@
1
+ export { NotificationActionTypeEnum } from './action-type.enum';
2
+ export { NotificationCategoryEnum } from './category.enum';
3
+ export { NotificationPriorityEnum } from './priority.enum';
4
+ export { NotificationStatusEnum } from './status.enum';
@@ -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,6 @@
1
+ export declare enum NotificationPriorityEnum {
2
+ LOW = "low",
3
+ MEDIUM = "medium",
4
+ HIGH = "high",
5
+ URGENT = "urgent"
6
+ }
@@ -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,5 @@
1
+ export declare enum NotificationStatusEnum {
2
+ DELIVERED = "delivered",
3
+ READ = "read",
4
+ FAILED = "failed"
5
+ }
@@ -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 = {}));
@@ -1,2 +1,3 @@
1
1
  export * from './entities';
2
+ export * from './enums';
2
3
  export * from './interfaces';
@@ -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);
@@ -0,0 +1,7 @@
1
+ import { NotificationActionTypeEnum } from '../enums';
2
+ export interface INotificationAction {
3
+ icon?: string;
4
+ label: string;
5
+ type: NotificationActionTypeEnum;
6
+ value: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- deliveryAttempts?: number;
4
- expiryDate?: Date;
8
+ expirationTime: number;
9
+ status: NotificationStatusEnum;
10
+ imageURL: string;
11
+ sound: boolean;
5
12
  id: string;
6
- isDelivered: boolean;
7
- isRead: boolean;
8
- metadata?: {
9
- [key: string]: any;
10
- };
11
- payload: any;
13
+ data: string;
12
14
  topicName: string;
13
15
  }
@@ -1 +1,2 @@
1
1
  export { INotification } from './i-notification';
2
+ export { INotificationAction } from './i-notification-action';
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "dependencies": {
6
6
  "tslib": "^2.3.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cecon-interfaces",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "Interfaces de Projetos Cecon",
5
5
  "dependencies": {},
6
6
  "peerDependencies": {},