@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.
Files changed (96) hide show
  1. package/client/actions/notification-fcm.ts +1 -1
  2. package/client/bootstrap.ts +2 -1
  3. package/client/pages/notification/notification-list-page.ts +6 -5
  4. package/client/pages/notification-rule/notification-rule-importer.ts +5 -12
  5. package/client/pages/notification-rule/notification-rule-list-page.ts +6 -5
  6. package/client/viewparts/notification-badge.ts +15 -19
  7. package/client/viewparts/notification-item.ts +20 -17
  8. package/client/viewparts/notification-list.ts +23 -23
  9. package/client/viewparts/notification-sender.ts +53 -37
  10. package/client/viewparts/notification-setting-let.ts +44 -27
  11. package/dist-client/actions/notification-fcm.js.map +1 -1
  12. package/dist-client/bootstrap.js +1 -1
  13. package/dist-client/bootstrap.js.map +1 -1
  14. package/dist-client/pages/notification/notification-list-page.js +6 -5
  15. package/dist-client/pages/notification/notification-list-page.js.map +1 -1
  16. package/dist-client/pages/notification-rule/notification-rule-importer.d.ts +1 -0
  17. package/dist-client/pages/notification-rule/notification-rule-importer.js +5 -12
  18. package/dist-client/pages/notification-rule/notification-rule-importer.js.map +1 -1
  19. package/dist-client/pages/notification-rule/notification-rule-list-page.js +6 -5
  20. package/dist-client/pages/notification-rule/notification-rule-list-page.js.map +1 -1
  21. package/dist-client/reducers/notification.js.map +1 -1
  22. package/dist-client/route.js.map +1 -1
  23. package/dist-client/tsconfig.tsbuildinfo +1 -1
  24. package/dist-client/viewparts/notification-badge.d.ts +1 -0
  25. package/dist-client/viewparts/notification-badge.js +14 -19
  26. package/dist-client/viewparts/notification-badge.js.map +1 -1
  27. package/dist-client/viewparts/notification-item.d.ts +1 -1
  28. package/dist-client/viewparts/notification-item.js +19 -17
  29. package/dist-client/viewparts/notification-item.js.map +1 -1
  30. package/dist-client/viewparts/notification-list.d.ts +3 -2
  31. package/dist-client/viewparts/notification-list.js +20 -22
  32. package/dist-client/viewparts/notification-list.js.map +1 -1
  33. package/dist-client/viewparts/notification-sender.d.ts +3 -3
  34. package/dist-client/viewparts/notification-sender.js +51 -36
  35. package/dist-client/viewparts/notification-sender.js.map +1 -1
  36. package/dist-client/viewparts/notification-setting-let.d.ts +3 -4
  37. package/dist-client/viewparts/notification-setting-let.js +44 -22
  38. package/dist-client/viewparts/notification-setting-let.js.map +1 -1
  39. package/dist-server/controllers/fcm.d.ts +34 -0
  40. package/dist-server/controllers/fcm.js +5 -6
  41. package/dist-server/controllers/fcm.js.map +1 -1
  42. package/dist-server/controllers/index.d.ts +1 -0
  43. package/dist-server/index.d.ts +4 -0
  44. package/dist-server/middlewares/index.d.ts +1 -0
  45. package/dist-server/middlewares/index.js +1 -2
  46. package/dist-server/middlewares/index.js.map +1 -1
  47. package/dist-server/middlewares/notification-middleware.d.ts +1 -0
  48. package/dist-server/middlewares/notification-middleware.js +1 -2
  49. package/dist-server/middlewares/notification-middleware.js.map +1 -1
  50. package/dist-server/routers/notification-router.d.ts +1 -0
  51. package/dist-server/routes.d.ts +1 -0
  52. package/dist-server/service/index.d.ts +13 -0
  53. package/dist-server/service/notification/directive-notification.d.ts +3 -0
  54. package/dist-server/service/notification/directive-notification.js.map +1 -1
  55. package/dist-server/service/notification/index.d.ts +12 -0
  56. package/dist-server/service/notification/notification-mutation.d.ts +9 -0
  57. package/dist-server/service/notification/notification-mutation.js +2 -2
  58. package/dist-server/service/notification/notification-mutation.js.map +1 -1
  59. package/dist-server/service/notification/notification-query.d.ts +13 -0
  60. package/dist-server/service/notification/notification-query.js +4 -4
  61. package/dist-server/service/notification/notification-query.js.map +1 -1
  62. package/dist-server/service/notification/notification-subscription.d.ts +6 -0
  63. package/dist-server/service/notification/notification-subscription.js +2 -2
  64. package/dist-server/service/notification/notification-subscription.js.map +1 -1
  65. package/dist-server/service/notification/notification-type.d.ts +21 -0
  66. package/dist-server/service/notification/notification-type.js +6 -6
  67. package/dist-server/service/notification/notification-type.js.map +1 -1
  68. package/dist-server/service/notification/notification.d.ts +28 -0
  69. package/dist-server/service/notification/notification.js +4 -4
  70. package/dist-server/service/notification/notification.js.map +1 -1
  71. package/dist-server/service/notification-rule/event-subscriber.d.ts +7 -0
  72. package/dist-server/service/notification-rule/event-subscriber.js +2 -2
  73. package/dist-server/service/notification-rule/event-subscriber.js.map +1 -1
  74. package/dist-server/service/notification-rule/index.d.ts +7 -0
  75. package/dist-server/service/notification-rule/notification-rule-history.d.ts +28 -0
  76. package/dist-server/service/notification-rule/notification-rule-history.js +5 -5
  77. package/dist-server/service/notification-rule/notification-rule-history.js.map +1 -1
  78. package/dist-server/service/notification-rule/notification-rule-mutation.d.ts +10 -0
  79. package/dist-server/service/notification-rule/notification-rule-mutation.js +2 -2
  80. package/dist-server/service/notification-rule/notification-rule-mutation.js.map +1 -1
  81. package/dist-server/service/notification-rule/notification-rule-query.d.ts +12 -0
  82. package/dist-server/service/notification-rule/notification-rule-query.js +3 -3
  83. package/dist-server/service/notification-rule/notification-rule-query.js.map +1 -1
  84. package/dist-server/service/notification-rule/notification-rule-type.d.ts +27 -0
  85. package/dist-server/service/notification-rule/notification-rule-type.js +6 -6
  86. package/dist-server/service/notification-rule/notification-rule-type.js.map +1 -1
  87. package/dist-server/service/notification-rule/notification-rule.d.ts +34 -0
  88. package/dist-server/service/notification-rule/notification-rule.js +8 -9
  89. package/dist-server/service/notification-rule/notification-rule.js.map +1 -1
  90. package/dist-server/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +10 -12
  92. package/server/service/notification/notification-query.ts +8 -2
  93. package/server/service/notification/notification.ts +1 -1
  94. package/server/service/notification-rule/notification-rule-history.ts +5 -5
  95. package/server/service/notification-rule/notification-rule-query.ts +4 -1
  96. package/server/service/notification-rule/notification-rule.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/notification",
3
- "version": "7.0.0-alpha.9",
3
+ "version": "7.0.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -27,20 +27,18 @@
27
27
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
28
28
  },
29
29
  "dependencies": {
30
- "@material/mwc-button": "^0.27.0",
31
- "@material/mwc-formfield": "^0.27.0",
32
- "@material/mwc-switch": "^0.27.0",
33
- "@operato/layout": "^2.0.0-alpha.0",
34
- "@things-factory/auth-base": "^7.0.0-alpha.9",
35
- "@things-factory/codelingua": "^7.0.0-alpha.9",
36
- "@things-factory/i18n-base": "^7.0.0-alpha.9",
37
- "@things-factory/organization": "^7.0.0-alpha.9",
38
- "@things-factory/setting-base": "^7.0.0-alpha.9",
39
- "@things-factory/shell": "^7.0.0-alpha.9",
30
+ "@material/web": "^1.5.0",
31
+ "@operato/layout": "^7.0.0",
32
+ "@things-factory/auth-base": "^7.0.0",
33
+ "@things-factory/codelingua": "^7.0.0",
34
+ "@things-factory/i18n-base": "^7.0.0",
35
+ "@things-factory/organization": "^7.0.0",
36
+ "@things-factory/setting-base": "^7.0.0",
37
+ "@things-factory/shell": "^7.0.0",
40
38
  "clipboard": "^2.0.6",
41
39
  "firebase": "^9.14.0",
42
40
  "firebase-admin": "^11.3.0",
43
41
  "google": "^2.1.0"
44
42
  },
45
- "gitHead": "99fc5aead211b3c82e3ebbf76e8d5d1db01b1ddc"
43
+ "gitHead": "00f3917ca132679e3571f3f4fd16f4caf84f488e"
46
44
  }
@@ -16,7 +16,10 @@ export class NotificationQuery {
16
16
  }
17
17
 
18
18
  @Query(returns => NotificationList, { description: 'To fetch multiple Notificationes' })
19
- async notificationes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<NotificationList> {
19
+ async notificationes(
20
+ @Args(type => ListParam) params: ListParam,
21
+ @Ctx() context: ResolverContext
22
+ ): Promise<NotificationList> {
20
23
  const { domain } = context.state
21
24
 
22
25
  const queryBuilder = getQueryBuilderFromListParams({
@@ -32,7 +35,10 @@ export class NotificationQuery {
32
35
  }
33
36
 
34
37
  @Query(returns => NotificationList, { description: 'To fetch my notifications' })
35
- async myNotifications(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<NotificationList> {
38
+ async myNotifications(
39
+ @Args(type => ListParam) params: ListParam,
40
+ @Ctx() context: ResolverContext
41
+ ): Promise<NotificationList> {
36
42
  const { domain, user } = context.state
37
43
 
38
44
  const queryBuilder = getQueryBuilderFromListParams({
@@ -32,7 +32,7 @@ export class Notification {
32
32
  readonly id: string
33
33
 
34
34
  @ManyToOne(type => Domain)
35
- @Field({ nullable: true })
35
+ @Field(type => Domain)
36
36
  domain?: Domain
37
37
 
38
38
  @RelationId((notification: Notification) => notification.domain)
@@ -45,7 +45,7 @@ export class NotificationRuleHistory implements HistoryEntityInterface<Notificat
45
45
  version?: number = 1
46
46
 
47
47
  @ManyToOne(type => Domain)
48
- @Field({ nullable: true })
48
+ @Field(type => Domain)
49
49
  domain?: Domain
50
50
 
51
51
  @RelationId((notificationRule: NotificationRule) => notificationRule.domain)
@@ -100,14 +100,14 @@ export class NotificationRuleHistory implements HistoryEntityInterface<Notificat
100
100
  deletedAt?: Date
101
101
 
102
102
  @ManyToOne(type => User, { nullable: true })
103
- @Field({ nullable: true })
103
+ @Field(type => User, { nullable: true })
104
104
  creator?: User
105
105
 
106
106
  @RelationId((notificationRule: NotificationRule) => notificationRule.creator)
107
107
  creatorId?: string
108
108
 
109
109
  @ManyToOne(type => User, { nullable: true })
110
- @Field({ nullable: true })
110
+ @Field(type => User, { nullable: true })
111
111
  updater?: User
112
112
 
113
113
  @RelationId((notificationRule: NotificationRule) => notificationRule.updater)
@@ -122,8 +122,8 @@ export class NotificationRuleHistory implements HistoryEntityInterface<Notificat
122
122
  DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
123
123
  ? 'enum'
124
124
  : DATABASE_TYPE == 'oracle'
125
- ? 'varchar2'
126
- : 'smallint',
125
+ ? 'varchar2'
126
+ : 'smallint',
127
127
  enum: HistoryActionType
128
128
  })
129
129
  public action!: HistoryActionType
@@ -17,7 +17,10 @@ export class NotificationRuleQuery {
17
17
  }
18
18
 
19
19
  @Query(returns => NotificationRuleList, { description: 'To fetch multiple NotificationRules' })
20
- async notificationRules(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<NotificationRuleList> {
20
+ async notificationRules(
21
+ @Args(type => ListParam) params: ListParam,
22
+ @Ctx() context: ResolverContext
23
+ ): Promise<NotificationRuleList> {
21
24
  const { domain } = context.state
22
25
 
23
26
  const queryBuilder = getQueryBuilderFromListParams({
@@ -55,7 +55,7 @@ export class NotificationRule {
55
55
  version?: number = 1
56
56
 
57
57
  @ManyToOne(type => Domain)
58
- @Field({ nullable: true })
58
+ @Field(type => Domain)
59
59
  domain?: Domain
60
60
 
61
61
  @RelationId((notificationRule: NotificationRule) => notificationRule.domain)