clarion-shared-types 1.0.66 → 1.0.68

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.
Files changed (23) hide show
  1. package/dist/cjs/modules/incident/enums/incident-actions.enum.js +4 -1
  2. package/dist/cjs/modules/incident/enums/incident-actions.enum.js.map +1 -1
  3. package/dist/cjs/modules/web-notification/enums/notification-status.enum.js +15 -0
  4. package/dist/cjs/modules/web-notification/enums/notification-status.enum.js.map +1 -0
  5. package/dist/cjs/modules/web-notification/index.js +2 -0
  6. package/dist/cjs/modules/web-notification/index.js.map +1 -1
  7. package/dist/cjs/modules/web-notification/interfaces/notification-types.js +3 -0
  8. package/dist/cjs/modules/web-notification/interfaces/notification-types.js.map +1 -0
  9. package/dist/esm/modules/incident/enums/incident-actions.enum.js +4 -1
  10. package/dist/esm/modules/incident/enums/incident-actions.enum.js.map +1 -1
  11. package/dist/esm/modules/web-notification/enums/notification-status.enum.js +12 -0
  12. package/dist/esm/modules/web-notification/enums/notification-status.enum.js.map +1 -0
  13. package/dist/esm/modules/web-notification/index.js +2 -0
  14. package/dist/esm/modules/web-notification/index.js.map +1 -1
  15. package/dist/esm/modules/web-notification/interfaces/notification-types.js +2 -0
  16. package/dist/esm/modules/web-notification/interfaces/notification-types.js.map +1 -0
  17. package/dist/types/modules/common/interfaces/pagination.d.ts +3 -0
  18. package/dist/types/modules/incident/enums/incident-actions.enum.d.ts +4 -1
  19. package/dist/types/modules/web-notification/enums/notification-status.enum.d.ts +10 -0
  20. package/dist/types/modules/web-notification/index.d.ts +2 -0
  21. package/dist/types/modules/web-notification/interfaces/notification-types.d.ts +31 -0
  22. package/dist/types/modules/web-notification/interfaces/web-notification.d.ts +5 -2
  23. package/package.json +1 -1
@@ -4,8 +4,11 @@ exports.IncidentActions = void 0;
4
4
  var IncidentActions;
5
5
  (function (IncidentActions) {
6
6
  IncidentActions["CREATED"] = "Created";
7
- IncidentActions["STATUS_CHANGED"] = "Status Changed";
8
7
  IncidentActions["UPDATED"] = "Updated";
8
+ IncidentActions["STATUS_CHANGED"] = "Status Changed";
9
+ IncidentActions["ESCALATED"] = "Escalated";
10
+ IncidentActions["RESOLVED"] = "Resolved";
11
+ IncidentActions["ON_HOLD"] = "On Hold";
9
12
  IncidentActions["ASSIGNED"] = "Assigned";
10
13
  IncidentActions["RESPONSE_UNIT_ASSIGNED"] = "Response Unit Assigned";
11
14
  IncidentActions["REOPENED"] = "Reopened";
@@ -1 +1 @@
1
- {"version":3,"file":"incident-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAaX;AAbD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,oDAAiC,CAAA;IACjC,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,oEAAiD,CAAA;IACjD,wCAAqB,CAAA;IACrB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wDAAqC,CAAA;IACrC,gDAA6B,CAAA;IAC7B,iEAA8C,CAAA;IAC9C,0CAAuB,CAAA;AAC3B,CAAC,EAbW,eAAe,+BAAf,eAAe,QAa1B"}
1
+ {"version":3,"file":"incident-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAgBX;AAhBD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,oEAAiD,CAAA;IACjD,wCAAqB,CAAA;IACrB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wDAAqC,CAAA;IACrC,gDAA6B,CAAA;IAC7B,iEAA8C,CAAA;IAC9C,0CAAuB,CAAA;AAC3B,CAAC,EAhBW,eAAe,+BAAf,eAAe,QAgB1B"}
@@ -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":""}
@@ -1,8 +1,11 @@
1
1
  export var IncidentActions;
2
2
  (function (IncidentActions) {
3
3
  IncidentActions["CREATED"] = "Created";
4
- IncidentActions["STATUS_CHANGED"] = "Status Changed";
5
4
  IncidentActions["UPDATED"] = "Updated";
5
+ IncidentActions["STATUS_CHANGED"] = "Status Changed";
6
+ IncidentActions["ESCALATED"] = "Escalated";
7
+ IncidentActions["RESOLVED"] = "Resolved";
8
+ IncidentActions["ON_HOLD"] = "On Hold";
6
9
  IncidentActions["ASSIGNED"] = "Assigned";
7
10
  IncidentActions["RESPONSE_UNIT_ASSIGNED"] = "Response Unit Assigned";
8
11
  IncidentActions["REOPENED"] = "Reopened";
@@ -1 +1 @@
1
- {"version":3,"file":"incident-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAaX;AAbD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,oDAAiC,CAAA;IACjC,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,oEAAiD,CAAA;IACjD,wCAAqB,CAAA;IACrB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wDAAqC,CAAA;IACrC,gDAA6B,CAAA;IAC7B,iEAA8C,CAAA;IAC9C,0CAAuB,CAAA;AAC3B,CAAC,EAbW,eAAe,KAAf,eAAe,QAa1B"}
1
+ {"version":3,"file":"incident-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-actions.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAgBX;AAhBD,WAAY,eAAe;IACvB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,oEAAiD,CAAA;IACjD,wCAAqB,CAAA;IACrB,oDAAiC,CAAA;IACjC,0CAAuB,CAAA;IACvB,wDAAqC,CAAA;IACrC,gDAA6B,CAAA;IAC7B,iEAA8C,CAAA;IAC9C,0CAAuB,CAAA;AAC3B,CAAC,EAhBW,eAAe,KAAf,eAAe,QAgB1B"}
@@ -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
+ }
@@ -1,7 +1,10 @@
1
1
  export declare enum IncidentActions {
2
2
  CREATED = "Created",
3
- STATUS_CHANGED = "Status Changed",
4
3
  UPDATED = "Updated",
4
+ STATUS_CHANGED = "Status Changed",
5
+ ESCALATED = "Escalated",
6
+ RESOLVED = "Resolved",
7
+ ON_HOLD = "On Hold",
5
8
  ASSIGNED = "Assigned",
6
9
  RESPONSE_UNIT_ASSIGNED = "Response Unit Assigned",
7
10
  REOPENED = "Reopened",
@@ -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;
@@ -22,9 +24,10 @@ export interface WebNotification<TEntity = any> {
22
24
  clickAction?: string;
23
25
  userId: number;
24
26
  actorUserId?: number;
25
- controlCentreId?: string;
26
- organizationId: string;
27
+ controlCentreId?: number;
28
+ organizationId: number;
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.68",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",