grm-shared-library 1.1.147 → 1.1.149
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/cjs/modules/web-notification/dtos/create-web-notification.dto.js +15 -4
- package/dist/cjs/modules/web-notification/dtos/create-web-notification.dto.js.map +1 -1
- package/dist/cjs/modules/web-notification/enums/notification-status.enum.js +15 -0
- package/dist/cjs/modules/web-notification/enums/notification-status.enum.js.map +1 -0
- package/dist/cjs/modules/web-notification/index.js +2 -0
- package/dist/cjs/modules/web-notification/index.js.map +1 -1
- package/dist/cjs/modules/web-notification/interfaces/notification-types.js +3 -0
- package/dist/cjs/modules/web-notification/interfaces/notification-types.js.map +1 -0
- package/dist/esm/modules/web-notification/dtos/create-web-notification.dto.js +15 -4
- package/dist/esm/modules/web-notification/dtos/create-web-notification.dto.js.map +1 -1
- package/dist/esm/modules/web-notification/enums/notification-status.enum.js +12 -0
- package/dist/esm/modules/web-notification/enums/notification-status.enum.js.map +1 -0
- package/dist/esm/modules/web-notification/index.js +2 -0
- package/dist/esm/modules/web-notification/index.js.map +1 -1
- package/dist/esm/modules/web-notification/interfaces/notification-types.js +2 -0
- package/dist/esm/modules/web-notification/interfaces/notification-types.js.map +1 -0
- package/dist/types/modules/web-notification/dtos/create-web-notification.dto.d.ts +5 -2
- package/dist/types/modules/web-notification/enums/notification-status.enum.d.ts +10 -0
- package/dist/types/modules/web-notification/index.d.ts +2 -0
- package/dist/types/modules/web-notification/interfaces/notification-types.d.ts +31 -0
- package/dist/types/modules/web-notification/interfaces/web-notification.d.ts +5 -2
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ const web_notification_data_type_enum_1 = require("../enums/web-notification-dat
|
|
|
15
15
|
const notification_priority_enum_1 = require("../enums/notification-priority.enum");
|
|
16
16
|
const notification_type_enum_1 = require("../enums/notification-type.enum");
|
|
17
17
|
const notification_provider_enum_1 = require("../enums/notification-provider.enum");
|
|
18
|
+
const notification_status_enum_1 = require("../enums/notification-status.enum");
|
|
18
19
|
class CreateWebNotificationDto {
|
|
19
20
|
}
|
|
20
21
|
exports.CreateWebNotificationDto = CreateWebNotificationDto;
|
|
@@ -47,6 +48,11 @@ __decorate([
|
|
|
47
48
|
(0, class_validator_1.IsOptional)(),
|
|
48
49
|
__metadata("design:type", String)
|
|
49
50
|
], CreateWebNotificationDto.prototype, "type", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsEnum)(notification_status_enum_1.NotificationStatus),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], CreateWebNotificationDto.prototype, "status", void 0);
|
|
50
56
|
__decorate([
|
|
51
57
|
(0, class_validator_1.IsUrl)(),
|
|
52
58
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -102,18 +108,23 @@ __decorate([
|
|
|
102
108
|
__metadata("design:type", Number)
|
|
103
109
|
], CreateWebNotificationDto.prototype, "actorUserId", void 0);
|
|
104
110
|
__decorate([
|
|
105
|
-
(0, class_validator_1.
|
|
111
|
+
(0, class_validator_1.IsNumber)(),
|
|
106
112
|
(0, class_validator_1.IsOptional)(),
|
|
107
|
-
__metadata("design:type",
|
|
113
|
+
__metadata("design:type", Number)
|
|
108
114
|
], CreateWebNotificationDto.prototype, "controlCentreId", void 0);
|
|
109
115
|
__decorate([
|
|
110
|
-
(0, class_validator_1.
|
|
116
|
+
(0, class_validator_1.IsNumber)(),
|
|
111
117
|
(0, class_validator_1.IsNotEmpty)(),
|
|
112
|
-
__metadata("design:type",
|
|
118
|
+
__metadata("design:type", Number)
|
|
113
119
|
], CreateWebNotificationDto.prototype, "organizationId", void 0);
|
|
114
120
|
__decorate([
|
|
115
121
|
(0, class_validator_1.IsObject)(),
|
|
116
122
|
(0, class_validator_1.IsOptional)(),
|
|
117
123
|
__metadata("design:type", Object)
|
|
118
124
|
], CreateWebNotificationDto.prototype, "metadata", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsDateString)(),
|
|
127
|
+
(0, class_validator_1.IsOptional)(),
|
|
128
|
+
__metadata("design:type", String)
|
|
129
|
+
], CreateWebNotificationDto.prototype, "clickedAt", void 0);
|
|
119
130
|
//# sourceMappingURL=create-web-notification.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-web-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/dtos/create-web-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+H;AAE/H,8FAAmF;AACnF,oFAA2E;AAC3E,4EAAmE;AACnE,oFAA2E;
|
|
1
|
+
{"version":3,"file":"create-web-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/dtos/create-web-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+H;AAE/H,8FAAmF;AACnF,oFAA2E;AAC3E,4EAAmE;AACnE,oFAA2E;AAC3E,gFAAuE;AAEvE,MAAa,wBAAwB;CAsFpC;AAtFD,4DAsFC;AAnFG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACQ;AAIrB;IAFC,IAAA,wBAAM,EAAC,iDAAoB,CAAC;IAC5B,IAAA,4BAAU,GAAE;;0DACmB;AAIhC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACG;AAGhB;IADC,IAAA,4BAAU,GAAE;;sDACE;AAIf;IAFC,IAAA,wBAAM,EAAC,yDAAuB,CAAC;IAC/B,IAAA,4BAAU,GAAE;;0DACsB;AAInC;IAFC,IAAA,wBAAM,EAAC,yCAAgB,CAAC;IACxB,IAAA,4BAAU,GAAE;;sDACW;AAIxB;IAFC,IAAA,wBAAM,EAAC,6CAAkB,CAAC;IAC1B,IAAA,4BAAU,GAAE;;wDACe;AAI5B;IAFC,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;0DACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uDACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACC;AAId;IAFC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;2DACM;AAInB;IAFC,IAAA,wBAAM,EAAC,iDAAoB,CAAC;IAC5B,IAAA,4BAAU,GAAE;;0DACmB;AAGhC;IADC,IAAA,4BAAU,GAAE;;wDACqB;AAIlC;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;wDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACM;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACQ;AAIrB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iEACY;AAIzB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;gEACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACkB;AAI/B;IAFC,IAAA,8BAAY,GAAE;IACd,IAAA,4BAAU,GAAE;;2DACM"}
|
|
@@ -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,8 +19,10 @@ __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
|
// DTOs
|
|
25
27
|
__exportStar(require("./dtos/create-web-notification.dto"), exports);
|
|
26
28
|
__exportStar(require("./dtos/update-web-notification.dto"), exports);
|
|
@@ -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;
|
|
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;AAEhD,OAAO;AACP,qEAAmD;AACnD,qEAAmD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-types.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/interfaces/notification-types.ts"],"names":[],"mappings":""}
|
|
@@ -12,6 +12,7 @@ import { WebNotificationDataType } from "../enums/web-notification-data-type.enu
|
|
|
12
12
|
import { NotificationPriority } from "../enums/notification-priority.enum";
|
|
13
13
|
import { NotificationType } from "../enums/notification-type.enum";
|
|
14
14
|
import { NotificationProvider } from "../enums/notification-provider.enum";
|
|
15
|
+
import { NotificationStatus } from "../enums/notification-status.enum";
|
|
15
16
|
export class CreateWebNotificationDto {
|
|
16
17
|
}
|
|
17
18
|
__decorate([
|
|
@@ -43,6 +44,11 @@ __decorate([
|
|
|
43
44
|
IsOptional(),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], CreateWebNotificationDto.prototype, "type", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
IsEnum(NotificationStatus),
|
|
49
|
+
IsOptional(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CreateWebNotificationDto.prototype, "status", void 0);
|
|
46
52
|
__decorate([
|
|
47
53
|
IsUrl(),
|
|
48
54
|
IsOptional(),
|
|
@@ -98,18 +104,23 @@ __decorate([
|
|
|
98
104
|
__metadata("design:type", Number)
|
|
99
105
|
], CreateWebNotificationDto.prototype, "actorUserId", void 0);
|
|
100
106
|
__decorate([
|
|
101
|
-
|
|
107
|
+
IsNumber(),
|
|
102
108
|
IsOptional(),
|
|
103
|
-
__metadata("design:type",
|
|
109
|
+
__metadata("design:type", Number)
|
|
104
110
|
], CreateWebNotificationDto.prototype, "controlCentreId", void 0);
|
|
105
111
|
__decorate([
|
|
106
|
-
|
|
112
|
+
IsNumber(),
|
|
107
113
|
IsNotEmpty(),
|
|
108
|
-
__metadata("design:type",
|
|
114
|
+
__metadata("design:type", Number)
|
|
109
115
|
], CreateWebNotificationDto.prototype, "organizationId", void 0);
|
|
110
116
|
__decorate([
|
|
111
117
|
IsObject(),
|
|
112
118
|
IsOptional(),
|
|
113
119
|
__metadata("design:type", Object)
|
|
114
120
|
], CreateWebNotificationDto.prototype, "metadata", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
IsDateString(),
|
|
123
|
+
IsOptional(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], CreateWebNotificationDto.prototype, "clickedAt", void 0);
|
|
115
126
|
//# sourceMappingURL=create-web-notification.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-web-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/dtos/create-web-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE/H,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-web-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/dtos/create-web-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE/H,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,OAAO,wBAAwB;CAsFpC;AAnFG;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;6DACQ;AAIrB;IAFC,MAAM,CAAC,oBAAoB,CAAC;IAC5B,UAAU,EAAE;;0DACmB;AAIhC;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;wDACG;AAGhB;IADC,UAAU,EAAE;;sDACE;AAIf;IAFC,MAAM,CAAC,uBAAuB,CAAC;IAC/B,UAAU,EAAE;;0DACsB;AAInC;IAFC,MAAM,CAAC,gBAAgB,CAAC;IACxB,UAAU,EAAE;;sDACW;AAIxB;IAFC,MAAM,CAAC,kBAAkB,CAAC;IAC1B,UAAU,EAAE;;wDACe;AAI5B;IAFC,KAAK,EAAE;IACP,UAAU,EAAE;;0DACK;AAIlB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;uDACE;AAIf;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;sDACC;AAId;IAFC,YAAY,EAAE;IACd,UAAU,EAAE;;2DACM;AAInB;IAFC,MAAM,CAAC,oBAAoB,CAAC;IAC5B,UAAU,EAAE;;0DACmB;AAGhC;IADC,UAAU,EAAE;;wDACqB;AAIlC;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;wDACI;AAIjB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;2DACM;AAInB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;6DACQ;AAIrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;wDACG;AAIhB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;6DACQ;AAIrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;iEACY;AAIzB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;gEACW;AAIxB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;0DACkB;AAI/B;IAFC,YAAY,EAAE;IACd,UAAU,EAAE;;2DACM"}
|
|
@@ -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,8 +3,10 @@ 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
|
// DTOs
|
|
9
11
|
export * from './dtos/create-web-notification.dto';
|
|
10
12
|
export * from './dtos/update-web-notification.dto';
|
|
@@ -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;
|
|
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;AAEhD,OAAO;AACP,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-types.js","sourceRoot":"","sources":["../../../../../src/modules/web-notification/interfaces/notification-types.ts"],"names":[],"mappings":""}
|
|
@@ -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 declare class CreateWebNotificationDto<TEntity = any> {
|
|
7
8
|
deviceToken?: string;
|
|
8
9
|
provider?: NotificationProvider;
|
|
@@ -10,6 +11,7 @@ export declare class CreateWebNotificationDto<TEntity = any> {
|
|
|
10
11
|
data?: TEntity;
|
|
11
12
|
dataType?: WebNotificationDataType;
|
|
12
13
|
type?: NotificationType;
|
|
14
|
+
status?: NotificationStatus;
|
|
13
15
|
imageUrl?: string;
|
|
14
16
|
title: string;
|
|
15
17
|
body: string;
|
|
@@ -21,7 +23,8 @@ export declare class CreateWebNotificationDto<TEntity = any> {
|
|
|
21
23
|
clickAction?: string;
|
|
22
24
|
userId: number;
|
|
23
25
|
actorUserId?: number;
|
|
24
|
-
controlCentreId?:
|
|
25
|
-
organizationId:
|
|
26
|
+
controlCentreId?: number;
|
|
27
|
+
organizationId: number;
|
|
26
28
|
metadata?: Record<string, any>;
|
|
29
|
+
clickedAt?: string;
|
|
27
30
|
}
|
|
@@ -2,6 +2,8 @@ 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';
|
|
6
8
|
export * from './dtos/create-web-notification.dto';
|
|
7
9
|
export * from './dtos/update-web-notification.dto';
|
|
@@ -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?:
|
|
26
|
-
organizationId:
|
|
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
|
}
|