@things-factory/notification 7.0.0-alpha.9 → 7.0.0
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/client/actions/notification-fcm.ts +1 -1
- package/client/bootstrap.ts +2 -1
- package/client/pages/notification/notification-list-page.ts +6 -5
- package/client/pages/notification-rule/notification-rule-importer.ts +5 -12
- package/client/pages/notification-rule/notification-rule-list-page.ts +6 -5
- package/client/viewparts/notification-badge.ts +15 -19
- package/client/viewparts/notification-item.ts +20 -17
- package/client/viewparts/notification-list.ts +23 -23
- package/client/viewparts/notification-sender.ts +53 -37
- package/client/viewparts/notification-setting-let.ts +44 -27
- package/dist-client/actions/notification-fcm.js.map +1 -1
- package/dist-client/bootstrap.js +1 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/pages/notification/notification-list-page.js +6 -5
- package/dist-client/pages/notification/notification-list-page.js.map +1 -1
- package/dist-client/pages/notification-rule/notification-rule-importer.d.ts +1 -0
- package/dist-client/pages/notification-rule/notification-rule-importer.js +5 -12
- package/dist-client/pages/notification-rule/notification-rule-importer.js.map +1 -1
- package/dist-client/pages/notification-rule/notification-rule-list-page.js +6 -5
- package/dist-client/pages/notification-rule/notification-rule-list-page.js.map +1 -1
- package/dist-client/reducers/notification.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/notification-badge.d.ts +1 -0
- package/dist-client/viewparts/notification-badge.js +14 -19
- package/dist-client/viewparts/notification-badge.js.map +1 -1
- package/dist-client/viewparts/notification-item.d.ts +1 -1
- package/dist-client/viewparts/notification-item.js +19 -17
- package/dist-client/viewparts/notification-item.js.map +1 -1
- package/dist-client/viewparts/notification-list.d.ts +3 -2
- package/dist-client/viewparts/notification-list.js +20 -22
- package/dist-client/viewparts/notification-list.js.map +1 -1
- package/dist-client/viewparts/notification-sender.d.ts +3 -3
- package/dist-client/viewparts/notification-sender.js +51 -36
- package/dist-client/viewparts/notification-sender.js.map +1 -1
- package/dist-client/viewparts/notification-setting-let.d.ts +3 -4
- package/dist-client/viewparts/notification-setting-let.js +44 -22
- package/dist-client/viewparts/notification-setting-let.js.map +1 -1
- package/dist-server/controllers/fcm.d.ts +34 -0
- package/dist-server/controllers/fcm.js +5 -6
- package/dist-server/controllers/fcm.js.map +1 -1
- package/dist-server/controllers/index.d.ts +1 -0
- package/dist-server/index.d.ts +4 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/middlewares/notification-middleware.d.ts +1 -0
- package/dist-server/middlewares/notification-middleware.js +1 -2
- package/dist-server/middlewares/notification-middleware.js.map +1 -1
- package/dist-server/routers/notification-router.d.ts +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/service/index.d.ts +13 -0
- package/dist-server/service/notification/directive-notification.d.ts +3 -0
- package/dist-server/service/notification/directive-notification.js.map +1 -1
- package/dist-server/service/notification/index.d.ts +12 -0
- package/dist-server/service/notification/notification-mutation.d.ts +9 -0
- package/dist-server/service/notification/notification-mutation.js +2 -2
- package/dist-server/service/notification/notification-mutation.js.map +1 -1
- package/dist-server/service/notification/notification-query.d.ts +13 -0
- package/dist-server/service/notification/notification-query.js +4 -4
- package/dist-server/service/notification/notification-query.js.map +1 -1
- package/dist-server/service/notification/notification-subscription.d.ts +6 -0
- package/dist-server/service/notification/notification-subscription.js +2 -2
- package/dist-server/service/notification/notification-subscription.js.map +1 -1
- package/dist-server/service/notification/notification-type.d.ts +21 -0
- package/dist-server/service/notification/notification-type.js +6 -6
- package/dist-server/service/notification/notification-type.js.map +1 -1
- package/dist-server/service/notification/notification.d.ts +28 -0
- package/dist-server/service/notification/notification.js +4 -4
- package/dist-server/service/notification/notification.js.map +1 -1
- package/dist-server/service/notification-rule/event-subscriber.d.ts +7 -0
- package/dist-server/service/notification-rule/event-subscriber.js +2 -2
- package/dist-server/service/notification-rule/event-subscriber.js.map +1 -1
- package/dist-server/service/notification-rule/index.d.ts +7 -0
- package/dist-server/service/notification-rule/notification-rule-history.d.ts +28 -0
- package/dist-server/service/notification-rule/notification-rule-history.js +5 -5
- package/dist-server/service/notification-rule/notification-rule-history.js.map +1 -1
- package/dist-server/service/notification-rule/notification-rule-mutation.d.ts +10 -0
- package/dist-server/service/notification-rule/notification-rule-mutation.js +2 -2
- package/dist-server/service/notification-rule/notification-rule-mutation.js.map +1 -1
- package/dist-server/service/notification-rule/notification-rule-query.d.ts +12 -0
- package/dist-server/service/notification-rule/notification-rule-query.js +3 -3
- package/dist-server/service/notification-rule/notification-rule-query.js.map +1 -1
- package/dist-server/service/notification-rule/notification-rule-type.d.ts +27 -0
- package/dist-server/service/notification-rule/notification-rule-type.js +6 -6
- package/dist-server/service/notification-rule/notification-rule-type.js.map +1 -1
- package/dist-server/service/notification-rule/notification-rule.d.ts +34 -0
- package/dist-server/service/notification-rule/notification-rule.js +8 -9
- package/dist-server/service/notification-rule/notification-rule.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -12
- package/server/service/notification/notification-query.ts +8 -2
- package/server/service/notification/notification.ts +1 -1
- package/server/service/notification-rule/notification-rule-history.ts +5 -5
- package/server/service/notification-rule/notification-rule-query.ts +4 -1
- package/server/service/notification-rule/notification-rule.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-rule-type.js","sourceRoot":"","sources":["../../../server/service/notification-rule/notification-rule-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,2DAA8E;AAGvE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAwB/B,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-rule-type.js","sourceRoot":"","sources":["../../../server/service/notification-rule/notification-rule-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,2DAA8E;AAGvE,IAAM,mBAAmB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AAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACd;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACf;AAGX;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAC3B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;gCA1BJ,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CA2BjC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAMhC,CAAA;AANY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,oCAAgB,CAAC,CAAC;;mDACT;AAGzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;mDACN;+BALF,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAMhC","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\n\nimport { NotificationRule, NotificationRuleStatus } from './notification-rule'\n\n@InputType()\nexport class NewNotificationRule {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => NotificationRuleStatus, { nullable: true })\n state?: NotificationRuleStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n title: string\n\n @Field({ nullable: true })\n body: string\n\n @Field({ nullable: true })\n url: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class NotificationRulePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => NotificationRuleStatus, { nullable: true })\n state?: NotificationRuleStatus\n\n @Field({ nullable: true })\n title: string\n\n @Field({ nullable: true })\n body: string\n\n @Field({ nullable: true })\n url: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class NotificationRuleList {\n @Field(type => [NotificationRule])\n items: NotificationRule[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { OrgMemberTargetType, OrgMemberTarget } from '@things-factory/organization';
|
|
4
|
+
export declare enum NotificationRuleStatus {
|
|
5
|
+
DRAFT = "DRAFT",
|
|
6
|
+
RELEASED = "RELEASED"
|
|
7
|
+
}
|
|
8
|
+
export declare class RecipientItem {
|
|
9
|
+
type?: OrgMemberTargetType;
|
|
10
|
+
value?: string;
|
|
11
|
+
recipient?: OrgMemberTarget;
|
|
12
|
+
}
|
|
13
|
+
export declare class NotificationRule {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
version?: number;
|
|
16
|
+
domain?: Domain;
|
|
17
|
+
domainId?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
state?: NotificationRuleStatus;
|
|
21
|
+
title: string;
|
|
22
|
+
body: string;
|
|
23
|
+
url: string;
|
|
24
|
+
thumbnail: string;
|
|
25
|
+
channels: string;
|
|
26
|
+
recipients: string;
|
|
27
|
+
createdAt?: Date;
|
|
28
|
+
updatedAt?: Date;
|
|
29
|
+
deletedAt?: Date;
|
|
30
|
+
creator?: User;
|
|
31
|
+
creatorId?: string;
|
|
32
|
+
updater?: User;
|
|
33
|
+
updaterId?: string;
|
|
34
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a, _b;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.NotificationRule = exports.RecipientItem = exports.NotificationRuleStatus = void 0;
|
|
5
4
|
const tslib_1 = require("tslib");
|
|
@@ -12,16 +11,17 @@ var NotificationRuleStatus;
|
|
|
12
11
|
(function (NotificationRuleStatus) {
|
|
13
12
|
NotificationRuleStatus["DRAFT"] = "DRAFT";
|
|
14
13
|
NotificationRuleStatus["RELEASED"] = "RELEASED";
|
|
15
|
-
})(NotificationRuleStatus
|
|
14
|
+
})(NotificationRuleStatus || (exports.NotificationRuleStatus = NotificationRuleStatus = {}));
|
|
16
15
|
(0, type_graphql_1.registerEnumType)(NotificationRuleStatus, {
|
|
17
16
|
name: 'NotificationRuleStatus',
|
|
18
17
|
description: 'state enumeration of a notificationRule'
|
|
19
18
|
});
|
|
20
19
|
let RecipientItem = class RecipientItem {
|
|
21
20
|
};
|
|
21
|
+
exports.RecipientItem = RecipientItem;
|
|
22
22
|
tslib_1.__decorate([
|
|
23
23
|
(0, type_graphql_1.Field)(type => organization_1.OrgMemberTargetType, { nullable: true }),
|
|
24
|
-
tslib_1.__metadata("design:type",
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
25
|
], RecipientItem.prototype, "type", void 0);
|
|
26
26
|
tslib_1.__decorate([
|
|
27
27
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -29,17 +29,17 @@ tslib_1.__decorate([
|
|
|
29
29
|
], RecipientItem.prototype, "value", void 0);
|
|
30
30
|
tslib_1.__decorate([
|
|
31
31
|
(0, type_graphql_1.Field)(type => organization_1.OrgMemberTarget, { nullable: true }),
|
|
32
|
-
tslib_1.__metadata("design:type",
|
|
32
|
+
tslib_1.__metadata("design:type", organization_1.OrgMemberTarget)
|
|
33
33
|
], RecipientItem.prototype, "recipient", void 0);
|
|
34
|
-
RecipientItem = tslib_1.__decorate([
|
|
34
|
+
exports.RecipientItem = RecipientItem = tslib_1.__decorate([
|
|
35
35
|
(0, type_graphql_1.ObjectType)()
|
|
36
36
|
], RecipientItem);
|
|
37
|
-
exports.RecipientItem = RecipientItem;
|
|
38
37
|
let NotificationRule = class NotificationRule {
|
|
39
38
|
constructor() {
|
|
40
39
|
this.version = 1;
|
|
41
40
|
}
|
|
42
41
|
};
|
|
42
|
+
exports.NotificationRule = NotificationRule;
|
|
43
43
|
tslib_1.__decorate([
|
|
44
44
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
45
45
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -52,7 +52,7 @@ tslib_1.__decorate([
|
|
|
52
52
|
], NotificationRule.prototype, "version", void 0);
|
|
53
53
|
tslib_1.__decorate([
|
|
54
54
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
55
|
-
(0, type_graphql_1.Field)(
|
|
55
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
56
56
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
57
57
|
], NotificationRule.prototype, "domain", void 0);
|
|
58
58
|
tslib_1.__decorate([
|
|
@@ -137,10 +137,9 @@ tslib_1.__decorate([
|
|
|
137
137
|
(0, typeorm_1.RelationId)((notificationRule) => notificationRule.updater),
|
|
138
138
|
tslib_1.__metadata("design:type", String)
|
|
139
139
|
], NotificationRule.prototype, "updaterId", void 0);
|
|
140
|
-
NotificationRule = tslib_1.__decorate([
|
|
140
|
+
exports.NotificationRule = NotificationRule = tslib_1.__decorate([
|
|
141
141
|
(0, typeorm_1.Entity)(),
|
|
142
142
|
(0, typeorm_1.Index)('ix_notification_rule_0', (notificationRule) => [notificationRule.domain, notificationRule.name, notificationRule.deletedAt], { unique: true }),
|
|
143
143
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for NotificationRule' })
|
|
144
144
|
], NotificationRule);
|
|
145
|
-
exports.NotificationRule = NotificationRule;
|
|
146
145
|
//# sourceMappingURL=notification-rule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-rule.js","sourceRoot":"","sources":["../../../server/service/notification-rule/notification-rule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-rule.js","sourceRoot":"","sources":["../../../server/service/notification-rule/notification-rule.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,+DAAmF;AAEnF,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yCAAe,CAAA;IACf,+CAAqB,CAAA;AACvB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAED,IAAA,+BAAgB,EAAC,sBAAsB,EAAE;IACvC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,yCAAyC;CACvD,CAAC,CAAA;AAGK,IAAM,aAAa,GAAnB,MAAM,aAAa;CASzB,CAAA;AATY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kCAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC7B;AAG1B;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACvC,8BAAe;gDAAA;wBARhB,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CASzB;AASM,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAOL,YAAO,GAAY,CAAC,CAAA;IAsEtB,CAAC;CAAA,CAAA;AA7EY,4CAAgB;AAGlB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;4CACC;AAInB;IAFC,IAA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,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;iDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,gBAAkC,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC;;mDAC3D;2BA5EP,gBAAgB;IAP5B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,wBAAwB,EACxB,CAAC,gBAAkC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,EACpH,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;GAC9C,gBAAgB,CA6E5B","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { OrgMemberTargetType, OrgMemberTarget } from '@things-factory/organization'\n\nexport enum NotificationRuleStatus {\n DRAFT = 'DRAFT',\n RELEASED = 'RELEASED'\n}\n\nregisterEnumType(NotificationRuleStatus, {\n name: 'NotificationRuleStatus',\n description: 'state enumeration of a notificationRule'\n})\n\n@ObjectType()\nexport class RecipientItem {\n @Field(type => OrgMemberTargetType, { nullable: true })\n type?: OrgMemberTargetType\n\n @Field({ nullable: true })\n value?: string\n\n @Field(type => OrgMemberTarget, { nullable: true })\n recipient?: OrgMemberTarget\n}\n\n@Entity()\n@Index(\n 'ix_notification_rule_0',\n (notificationRule: NotificationRule) => [notificationRule.domain, notificationRule.name, notificationRule.deletedAt],\n { unique: true }\n)\n@ObjectType({ description: 'Entity for NotificationRule' })\nexport class NotificationRule {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((notificationRule: NotificationRule) => notificationRule.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: NotificationRuleStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n title: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n body: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n url: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n thumbnail: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n channels: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [RecipientItem], { nullable: true, description: 'notification recipients.' })\n recipients: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((notificationRule: NotificationRule) => notificationRule.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((notificationRule: NotificationRule) => notificationRule.updater)\n updaterId?: string\n}\n"]}
|