clarion-shared-types 1.0.66 → 1.0.67

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.
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationStatus = void 0;
4
+ var NotificationStatus;
5
+ (function (NotificationStatus) {
6
+ NotificationStatus["PENDING"] = "PENDING";
7
+ NotificationStatus["SENT"] = "SENT";
8
+ NotificationStatus["DELIVERED"] = "DELIVERED";
9
+ NotificationStatus["FAILED"] = "FAILED";
10
+ NotificationStatus["CLICKED"] = "CLICKED";
11
+ NotificationStatus["DISMISSED"] = "DISMISSED";
12
+ NotificationStatus["EXPIRED"] = "EXPIRED";
13
+ NotificationStatus["CANCELLED"] = "CANCELLED";
14
+ })(NotificationStatus || (exports.NotificationStatus = NotificationStatus = {}));
15
+ //# sourceMappingURL=notification-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/enums/notification-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;AAC3B,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B"}
@@ -19,6 +19,8 @@ __exportStar(require("./enums/notification-priority.enum"), exports);
19
19
  __exportStar(require("./enums/web-notification-data-type.enum"), exports);
20
20
  __exportStar(require("./enums/notification-type.enum"), exports);
21
21
  __exportStar(require("./enums/notification-provider.enum"), exports);
22
+ __exportStar(require("./enums/notification-status.enum"), exports);
22
23
  // Interfaces
23
24
  __exportStar(require("./interfaces/web-notification"), exports);
25
+ __exportStar(require("./interfaces/notification-types"), exports);
24
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/web-notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,qEAAmD;AACnD,0EAAwD;AACxD,iEAA+C;AAC/C,qEAAmD;AAEnD,aAAa;AACb,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/web-notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,qEAAmD;AACnD,0EAAwD;AACxD,iEAA+C;AAC/C,qEAAmD;AACnD,mEAAiD;AAEjD,aAAa;AACb,gEAA8C;AAC9C,kEAAgD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=notification-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-types.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/interfaces/notification-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export var NotificationStatus;
2
+ (function (NotificationStatus) {
3
+ NotificationStatus["PENDING"] = "PENDING";
4
+ NotificationStatus["SENT"] = "SENT";
5
+ NotificationStatus["DELIVERED"] = "DELIVERED";
6
+ NotificationStatus["FAILED"] = "FAILED";
7
+ NotificationStatus["CLICKED"] = "CLICKED";
8
+ NotificationStatus["DISMISSED"] = "DISMISSED";
9
+ NotificationStatus["EXPIRED"] = "EXPIRED";
10
+ NotificationStatus["CANCELLED"] = "CANCELLED";
11
+ })(NotificationStatus || (NotificationStatus = {}));
12
+ //# sourceMappingURL=notification-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/enums/notification-status.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;AAC3B,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B"}
@@ -3,6 +3,8 @@ export * from './enums/notification-priority.enum';
3
3
  export * from './enums/web-notification-data-type.enum';
4
4
  export * from './enums/notification-type.enum';
5
5
  export * from './enums/notification-provider.enum';
6
+ export * from './enums/notification-status.enum';
6
7
  // Interfaces
7
8
  export * from './interfaces/web-notification';
9
+ export * from './interfaces/notification-types';
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/web-notification/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAEnD,aAAa;AACb,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/web-notification/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AAEjD,aAAa;AACb,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=notification-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-types.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/interfaces/notification-types.ts"],"names":[],"mappings":""}
@@ -4,6 +4,7 @@ import { Incident, IncidentReport } from "../../incident";
4
4
  import { Organization } from "../../organization";
5
5
  import { ResponseUnit } from "../../response-unit";
6
6
  import { User } from "../../user";
7
+ import { WebNotification } from "../../web-notification";
7
8
  export interface PaginationParams {
8
9
  page?: number;
9
10
  limit?: number;
@@ -36,3 +37,5 @@ export interface ResponseUnitList extends PaginatedResponse<ResponseUnit> {
36
37
  }
37
38
  export interface ZoneListResponse extends PaginatedResponse<Zone> {
38
39
  }
40
+ export interface NotificationList extends PaginatedResponse<WebNotification> {
41
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum NotificationStatus {
2
+ PENDING = "PENDING",
3
+ SENT = "SENT",
4
+ DELIVERED = "DELIVERED",
5
+ FAILED = "FAILED",
6
+ CLICKED = "CLICKED",
7
+ DISMISSED = "DISMISSED",
8
+ EXPIRED = "EXPIRED",
9
+ CANCELLED = "CANCELLED"
10
+ }
@@ -2,4 +2,6 @@ export * from './enums/notification-priority.enum';
2
2
  export * from './enums/web-notification-data-type.enum';
3
3
  export * from './enums/notification-type.enum';
4
4
  export * from './enums/notification-provider.enum';
5
+ export * from './enums/notification-status.enum';
5
6
  export * from './interfaces/web-notification';
7
+ export * from './interfaces/notification-types';
@@ -0,0 +1,31 @@
1
+ export interface NotificationStats {
2
+ total: number;
3
+ sent: number;
4
+ delivered: number;
5
+ failed: number;
6
+ clicked: number;
7
+ read: number;
8
+ unread: number;
9
+ byType: Record<string, number>;
10
+ byPriority: Record<string, number>;
11
+ byStatus: Record<string, number>;
12
+ byDataType: Record<string, number>;
13
+ }
14
+ export interface FindNotificationsOptions {
15
+ userId?: number;
16
+ organizationId?: string;
17
+ controlCentreId?: string;
18
+ isRead?: boolean;
19
+ dataType?: string;
20
+ type?: string;
21
+ priority?: string;
22
+ startDate?: Date;
23
+ endDate?: Date;
24
+ limit?: number;
25
+ offset?: number;
26
+ }
27
+ export interface NotificationStatsRequest {
28
+ userId?: number;
29
+ startDate?: Date;
30
+ endDate?: Date;
31
+ }
@@ -3,6 +3,7 @@ import { WebNotificationDataType } from "../enums/web-notification-data-type.enu
3
3
  import { NotificationPriority } from "../enums/notification-priority.enum";
4
4
  import { NotificationType } from "../enums/notification-type.enum";
5
5
  import { NotificationProvider } from "../enums/notification-provider.enum";
6
+ import { NotificationStatus } from "../enums/notification-status.enum";
6
7
  export interface WebNotification<TEntity = any> {
7
8
  id: number;
8
9
  deviceToken?: string;
@@ -11,6 +12,7 @@ export interface WebNotification<TEntity = any> {
11
12
  data?: TEntity;
12
13
  dataType?: WebNotificationDataType;
13
14
  type?: NotificationType;
15
+ status?: NotificationStatus;
14
16
  imageUrl?: string;
15
17
  title: string;
16
18
  body: string;
@@ -25,6 +27,7 @@ export interface WebNotification<TEntity = any> {
25
27
  controlCentreId?: string;
26
28
  organizationId: string;
27
29
  metadata?: Record<string, any>;
30
+ clickedAt?: string;
28
31
  createdAt: string;
29
32
  updatedAt: string;
30
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarion-shared-types",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",