@builder6/rooms 0.10.7 → 0.11.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 (112) hide show
  1. package/dist/emails/UnreadMention.d.ts +9 -0
  2. package/dist/emails/UnreadMention.js +54 -0
  3. package/dist/emails/UnreadMention.js.map +1 -0
  4. package/dist/emails/UnreadReplies.d.ts +9 -0
  5. package/dist/emails/UnreadReplies.js +68 -0
  6. package/dist/emails/UnreadReplies.js.map +1 -0
  7. package/dist/emails/_components/comment.d.ts +1 -0
  8. package/dist/emails/_components/comment.js +32 -0
  9. package/dist/emails/_components/comment.js.map +1 -0
  10. package/dist/emails/_components/header.d.ts +2 -0
  11. package/dist/emails/_components/header.js +15 -0
  12. package/dist/emails/_components/header.js.map +1 -0
  13. package/dist/emails/_components/headline.d.ts +5 -0
  14. package/dist/emails/_components/headline.js +17 -0
  15. package/dist/emails/_components/headline.js.map +1 -0
  16. package/dist/emails/_components/layout.d.ts +5 -0
  17. package/dist/emails/_components/layout.js +24 -0
  18. package/dist/emails/_components/layout.js.map +1 -0
  19. package/dist/emails/_lib/types.d.ts +9 -0
  20. package/dist/emails/_lib/types.js +3 -0
  21. package/dist/emails/_lib/types.js.map +1 -0
  22. package/dist/emails/_styles/colors.d.ts +2 -0
  23. package/dist/emails/_styles/colors.js +7 -0
  24. package/dist/emails/_styles/colors.js.map +1 -0
  25. package/dist/emails/_utils/cn.d.ts +2 -0
  26. package/dist/emails/_utils/cn.js +10 -0
  27. package/dist/emails/_utils/cn.js.map +1 -0
  28. package/dist/emails/_utils/comments.d.ts +7 -0
  29. package/dist/emails/_utils/comments.js +29 -0
  30. package/dist/emails/_utils/comments.js.map +1 -0
  31. package/dist/emails/_utils/getProps.d.ts +1 -0
  32. package/dist/emails/_utils/getProps.js +11 -0
  33. package/dist/emails/_utils/getProps.js.map +1 -0
  34. package/dist/rooms/app.controller.d.ts +3 -1
  35. package/dist/rooms/app.controller.js +61 -46
  36. package/dist/rooms/app.controller.js.map +1 -1
  37. package/dist/rooms/emailNotification.service.d.ts +17 -0
  38. package/dist/rooms/emailNotification.service.js +113 -0
  39. package/dist/rooms/emailNotification.service.js.map +1 -0
  40. package/dist/rooms/emails/comment-body.d.ts +44 -0
  41. package/dist/rooms/emails/comment-body.js +138 -0
  42. package/dist/rooms/emails/comment-body.js.map +1 -0
  43. package/dist/rooms/emails/comment-with-body.d.ts +6 -0
  44. package/dist/rooms/emails/comment-with-body.js +17 -0
  45. package/dist/rooms/emails/comment-with-body.js.map +1 -0
  46. package/dist/rooms/emails/index.d.ts +4 -0
  47. package/dist/rooms/emails/index.js +7 -0
  48. package/dist/rooms/emails/index.js.map +1 -0
  49. package/dist/rooms/emails/lib/batch-users-resolver.d.ts +9 -0
  50. package/dist/rooms/emails/lib/batch-users-resolver.js +67 -0
  51. package/dist/rooms/emails/lib/batch-users-resolver.js.map +1 -0
  52. package/dist/rooms/emails/lib/css-properties.d.ts +3 -0
  53. package/dist/rooms/emails/lib/css-properties.js +96 -0
  54. package/dist/rooms/emails/lib/css-properties.js.map +1 -0
  55. package/dist/rooms/emails/lib/warning.d.ts +1 -0
  56. package/dist/rooms/emails/lib/warning.js +20 -0
  57. package/dist/rooms/emails/lib/warning.js.map +1 -0
  58. package/dist/rooms/emails/thread-notification.d.ts +90 -0
  59. package/dist/rooms/emails/thread-notification.js +297 -0
  60. package/dist/rooms/emails/thread-notification.js.map +1 -0
  61. package/dist/rooms/globals/augmentation.d.ts +0 -5
  62. package/dist/rooms/lib/utils.js +21 -10
  63. package/dist/rooms/lib/utils.js.map +1 -1
  64. package/dist/rooms/liveblocks.service.d.ts +16 -0
  65. package/dist/rooms/liveblocks.service.js +54 -0
  66. package/dist/rooms/liveblocks.service.js.map +1 -0
  67. package/dist/rooms/notifications.service.d.ts +4 -0
  68. package/dist/rooms/notifications.service.js +107 -80
  69. package/dist/rooms/notifications.service.js.map +1 -1
  70. package/dist/rooms/rooms.controller.d.ts +6 -4
  71. package/dist/rooms/rooms.controller.js +323 -244
  72. package/dist/rooms/rooms.controller.js.map +1 -1
  73. package/dist/rooms/rooms.gateway.js +132 -109
  74. package/dist/rooms/rooms.gateway.js.map +1 -1
  75. package/dist/rooms/rooms.guard.js +31 -19
  76. package/dist/rooms/rooms.guard.js.map +1 -1
  77. package/dist/rooms/rooms.module.js +12 -3
  78. package/dist/rooms/rooms.module.js.map +1 -1
  79. package/dist/rooms/rooms.moleculer.js +85 -66
  80. package/dist/rooms/rooms.moleculer.js.map +1 -1
  81. package/dist/rooms/rooms.service.d.ts +17 -4
  82. package/dist/rooms/rooms.service.js +408 -340
  83. package/dist/rooms/rooms.service.js.map +1 -1
  84. package/package.json +18 -6
  85. package/src/emails/UnreadMention.tsx +76 -0
  86. package/src/emails/UnreadReplies.tsx +106 -0
  87. package/src/emails/_components/comment.tsx +70 -0
  88. package/src/emails/_components/header.tsx +27 -0
  89. package/src/emails/_components/headline.tsx +20 -0
  90. package/src/emails/_components/layout.tsx +45 -0
  91. package/src/emails/_lib/types.ts +10 -0
  92. package/src/emails/_styles/colors.ts +7 -0
  93. package/src/emails/_utils/cn.ts +6 -0
  94. package/src/emails/_utils/comments.ts +61 -0
  95. package/src/emails/_utils/getProps.ts +7 -0
  96. package/src/rooms/app.controller.ts +7 -2
  97. package/src/rooms/emailNotification.service.tsx +152 -0
  98. package/src/rooms/emails/comment-body.tsx +342 -0
  99. package/src/rooms/emails/comment-with-body.ts +24 -0
  100. package/src/rooms/emails/index.ts +25 -0
  101. package/src/rooms/emails/lib/batch-users-resolver.ts +120 -0
  102. package/src/rooms/emails/lib/css-properties.ts +123 -0
  103. package/src/rooms/emails/lib/warning.ts +25 -0
  104. package/src/rooms/emails/thread-notification.tsx +583 -0
  105. package/src/rooms/globals/augmentation.ts +8 -8
  106. package/src/rooms/liveblocks.service.ts +25 -0
  107. package/src/rooms/notifications.service.ts +22 -10
  108. package/src/rooms/rooms.controller.ts +24 -5
  109. package/src/rooms/rooms.module.ts +11 -2
  110. package/src/rooms/rooms.service.ts +35 -20
  111. package/tsconfig.json +2 -0
  112. package/yarn-error.log +17218 -0
@@ -11,6 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
14
23
  var NotificationsService_1;
15
24
  Object.defineProperty(exports, "__esModule", { value: true });
16
25
  exports.NotificationsService = void 0;
@@ -25,93 +34,111 @@ let NotificationsService = NotificationsService_1 = class NotificationsService {
25
34
  this.broker = broker;
26
35
  this.logger = new common_1.Logger(NotificationsService_1.name);
27
36
  }
28
- async createRoomMention({ roomId, userId, fromUserId, }) {
29
- if (roomId && roomId.split(':').length === 3) {
30
- const [objects, objectName, recordId] = roomId.split(':');
31
- if (objects === 'objects') {
32
- this.logger.log(`Emitting ${objectName}.mentioned, recordId:${recordId} userId:${userId}`);
33
- this.broker.emit(`${objectName}.mentioned`, {
34
- recordId,
35
- userId,
36
- fromUserId,
37
- });
38
- const record = await this.mongodbService.findOne(objectName, {
39
- _id: recordId,
40
- }, {
41
- projection: {
42
- name: 1,
43
- space: 1,
44
- owner: 1,
45
- },
46
- });
47
- await this.createNotification({
48
- name: record.name,
49
- body: `You were mentioned`,
50
- related_to: {
51
- o: objectName,
52
- ids: [recordId],
53
- },
54
- related_name: record.name,
55
- from: fromUserId,
56
- space: record.space,
57
- owner: userId,
58
- is_read: false,
59
- });
37
+ createRoomMention({ roomId, userId, fromUserId, }) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (roomId && roomId.split(':').length === 3) {
40
+ const [objects, objectName, recordId] = roomId.split(':');
41
+ if (objects === 'objects') {
42
+ this.logger.log(`Emitting ${objectName}.mentioned, recordId:${recordId} userId:${userId}`);
43
+ this.broker.emit(`${objectName}.mentioned`, {
44
+ recordId,
45
+ userId,
46
+ fromUserId,
47
+ });
48
+ const record = yield this.mongodbService.findOne(objectName, {
49
+ _id: recordId,
50
+ }, {
51
+ projection: {
52
+ name: 1,
53
+ space: 1,
54
+ owner: 1,
55
+ },
56
+ });
57
+ yield this.createNotification({
58
+ name: record.name,
59
+ body: `You were mentioned`,
60
+ related_to: {
61
+ o: objectName,
62
+ ids: [recordId],
63
+ },
64
+ related_name: record.name,
65
+ from: fromUserId,
66
+ space: record.space,
67
+ owner: userId,
68
+ is_read: false,
69
+ });
70
+ }
60
71
  }
61
- }
72
+ });
62
73
  }
63
- async createInboxNotification({ _id, userId, kind = 'thread', notifiedAt, readAt, roomId, threadId, }) {
64
- return this.mongodbService.insertOne('b6_inbox_notifications', {
65
- _id,
66
- id: _id,
67
- userId,
68
- kind,
69
- notifiedAt,
70
- readAt,
71
- roomId,
72
- threadId,
74
+ getInboxNotification({ inboxNotificationId, userId }) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ return this.mongodbService.findOne('b6_inbox_notifications', {
77
+ _id: inboxNotificationId,
78
+ });
73
79
  });
74
80
  }
75
- async findNotifications({ userId, unread, limit, sinceDate, roomId, threadId, }) {
76
- const queryOptions = { userId };
77
- if (unread)
78
- queryOptions.readAt = null;
79
- if (sinceDate) {
80
- queryOptions.notifiedAt = { $gt: sinceDate };
81
- }
82
- if (roomId)
83
- queryOptions.roomId = roomId;
84
- if (threadId)
85
- queryOptions.threadId = threadId;
86
- const collection = (await this.mongodbService.getCollection('b6_inbox_notifications'));
87
- const query = collection.find(queryOptions).sort({ notifiedAt: 1 });
88
- if (limit)
89
- query.limit(limit);
90
- return query.toArray();
81
+ createInboxNotification({ _id, userId, kind = 'thread', notifiedAt, readAt, roomId, threadId, }) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ const result = yield this.mongodbService.insertOne('b6_inbox_notifications', {
84
+ _id,
85
+ id: _id,
86
+ userId,
87
+ kind,
88
+ notifiedAt,
89
+ readAt,
90
+ roomId,
91
+ threadId,
92
+ });
93
+ return result;
94
+ });
91
95
  }
92
- async markAsRead({ roomId, userId, inboxNotificationIds, }) {
93
- const queryOptions = { userId };
94
- if (roomId)
95
- queryOptions.roomId = roomId;
96
- if ((0, lodash_1.isArray)(inboxNotificationIds)) {
97
- queryOptions._id = { $in: inboxNotificationIds };
98
- }
99
- const collection = (await this.mongodbService.getCollection('b6_inbox_notifications'));
100
- return collection.updateMany(queryOptions, {
101
- $set: { readAt: new Date() },
96
+ findNotifications({ userId, unread, limit, sinceDate, roomId, threadId, }) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ const queryOptions = { userId };
99
+ if (unread)
100
+ queryOptions.readAt = null;
101
+ if (sinceDate) {
102
+ queryOptions.notifiedAt = { $gt: sinceDate };
103
+ }
104
+ if (roomId)
105
+ queryOptions.roomId = roomId;
106
+ if (threadId)
107
+ queryOptions.threadId = threadId;
108
+ const collection = (yield this.mongodbService.getCollection('b6_inbox_notifications'));
109
+ const query = collection.find(queryOptions).sort({ notifiedAt: 1 });
110
+ if (limit)
111
+ query.limit(limit);
112
+ return query.toArray();
113
+ });
114
+ }
115
+ markAsRead({ roomId, userId, inboxNotificationIds, }) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ const queryOptions = { userId };
118
+ if (roomId)
119
+ queryOptions.roomId = roomId;
120
+ if ((0, lodash_1.isArray)(inboxNotificationIds)) {
121
+ queryOptions._id = { $in: inboxNotificationIds };
122
+ }
123
+ const collection = (yield this.mongodbService.getCollection('b6_inbox_notifications'));
124
+ return collection.updateMany(queryOptions, {
125
+ $set: { readAt: new Date() },
126
+ });
102
127
  });
103
128
  }
104
- async createNotification({ name, body, related_to, from, space, owner, is_read = false, }) {
105
- return await this.mongodbService.insertOne('notifications', {
106
- name,
107
- body,
108
- related_to,
109
- from,
110
- space,
111
- owner,
112
- is_read,
113
- created: new Date(),
114
- created_by: owner,
129
+ createNotification({ name, body, related_to, from, space, owner, is_read = false, }) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ return yield this.mongodbService.insertOne('notifications', {
132
+ name,
133
+ body,
134
+ related_to,
135
+ from,
136
+ space,
137
+ owner,
138
+ is_read,
139
+ created: new Date(),
140
+ created_by: owner,
141
+ });
115
142
  });
116
143
  }
117
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.service.js","sourceRoot":"","sources":["../../src/rooms/notifications.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAgD;AAChD,mDAAmD;AACnD,2CAAoD;AACpD,yCAA0C;AAE1C,mCAAiC;AAI1B,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAE/B,YACU,cAA8B,EACL,MAAqB;QAD9C,mBAAc,GAAd,cAAc,CAAgB;QACL,WAAM,GAAN,MAAM,CAAe;QAHvC,WAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAI7D,CAAC;IAEJ,KAAK,CAAC,iBAAiB,CAAC,EACtB,MAAM,EACN,MAAM,EACN,UAAU,GAKX;QAEC,IAAI,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1D,IAAI,OAAO,KAAK,SAAS,EAAE;gBACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,YAAY,UAAU,wBAAwB,QAAQ,WAAW,MAAM,EAAE,CAC1E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AK,EACL,KAAK,EACL,OAAO,GAAG,KAAK,GACC;QAChB,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,eAAe,EAAE;YAC1D,IAAI;YACJ,IAAI;YACJ,UAAU;YACV,IAAI;YACJ,KAAK;YACL,KAAK;YACL,OAAO;YACP,OAAO,EAAE,IAAI,IAAI,EAAE;YACnB,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AApKY,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,wBAAY,GAAE,CAAA;qCADS,qBAAc;QACG,yBAAa;GAJ7C,oBAAoB,CAoKhC;AApKY,oDAAoB"}
1
+ {"version":3,"file":"notifications.service.js","sourceRoot":"","sources":["../../src/rooms/notifications.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAgD;AAChD,mDAAmD;AACnD,2CAAoD;AACpD,yCAA0C;AAE1C,mCAAiC;AAI1B,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAE/B,YACU,cAA8B,EACL,MAAqB;QAD9C,mBAAc,GAAd,cAAc,CAAgB;QACL,WAAM,GAAN,MAAM,CAAe;QAHvC,WAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAI7D,CAAC;IAEE,iBAAiB,CAAC,EACtB,MAAM,EACN,MAAM,EACN,UAAU,GAKX;;YAEC,IAAI,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC1D,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,YAAY,UAAU,wBAAwB,QAAQ,WAAW,MAAM,EAAE,CAC1E,CAAC;o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V,OAAO,UAAU,CAAC,UAAU,CAAC,YAAY,EAAE;gBACzC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,EAAE;aAC7B,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,kBAAkB,CAAC,EACvB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,GAAG,KAAK,GACC;;YAChB,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,eAAe,EAAE;gBAC1D,IAAI;gBACJ,IAAI;gBACJ,UAAU;gBACV,IAAI;gBACJ,KAAK;gBACL,KAAK;gBACL,OAAO;gBACP,OAAO,EAAE,IAAI,IAAI,EAAE;gBACnB,UAAU,EAAE,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAA;AAhLY,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,wBAAY,GAAE,CAAA;qCADS,qBAAc;QACG,yBAAa;GAJ7C,oBAAoB,CAgLhC;AAhLY,oDAAoB"}
@@ -1,17 +1,18 @@
1
- /// <reference types="lodash" />
2
- import { FilesService } from '@builder6/core';
1
+ import { FilesService } from '@builder6/files';
3
2
  import { RoomsService } from './rooms.service';
4
3
  import { JwtService } from '@nestjs/jwt';
5
4
  import { Request } from 'express';
6
5
  import { RoomsGateway } from './rooms.gateway';
7
6
  import { NotificationsService } from './notifications.service';
7
+ import { EmailNotificationService } from './emailNotification.service';
8
8
  export declare class RoomsController {
9
9
  private roomsService;
10
10
  private filesService;
11
11
  private jwtService;
12
12
  private roomsGateway;
13
13
  private notificationsService;
14
- constructor(roomsService: RoomsService, filesService: FilesService, jwtService: JwtService, roomsGateway: RoomsGateway, notificationsService: NotificationsService);
14
+ private emailNotificationService;
15
+ constructor(roomsService: RoomsService, filesService: FilesService, jwtService: JwtService, roomsGateway: RoomsGateway, notificationsService: NotificationsService, emailNotificationService: EmailNotificationService);
15
16
  getToken(body: {
16
17
  room: string;
17
18
  permission: string;
@@ -50,7 +51,7 @@ export declare class RoomsController {
50
51
  createThread(req: Request, roomId: string, record: Record<string, any>): Promise<any>;
51
52
  threadWithNotification(req: Request, roomId: string, threadId: string): Promise<{
52
53
  thread: any;
53
- inboxNotification: import("lodash").Omit<any, "_id" | "userId">;
54
+ inboxNotification: import("lodash").Omit<any, "userId" | "_id">;
54
55
  }>;
55
56
  threadMarkasResolved(req: Request, roomId: string, threadId: string): Promise<any>;
56
57
  threadMarkasUnResolved(req: Request, roomId: string, threadId: string): Promise<any>;
@@ -92,4 +93,5 @@ export declare class RoomsController {
92
93
  userId: string;
93
94
  }>;
94
95
  deleteReaction(req: Request, roomId: string, threadId: string, commentId: string, emoji: string): Promise<{}>;
96
+ sendEmail(body: object): Promise<void>;
95
97
  }