@builder6/server 0.6.5 → 0.7.1

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 (111) hide show
  1. package/dist/app.express.js +0 -1
  2. package/dist/app.express.js.map +1 -1
  3. package/dist/app.module.js +12 -10
  4. package/dist/app.module.js.map +1 -1
  5. package/dist/b6.server.js +11 -134
  6. package/dist/b6.server.js.map +1 -1
  7. package/dist/oidc/oidc.service.js +1 -1
  8. package/dist/oidc/oidc.service.js.map +1 -1
  9. package/package.json +10 -8
  10. package/dist/app.config.d.ts +0 -2
  11. package/dist/app.config.js +0 -55
  12. package/dist/app.config.js.map +0 -1
  13. package/dist/b6.config.d.ts +0 -0
  14. package/dist/b6.config.js +0 -4
  15. package/dist/b6.config.js.map +0 -1
  16. package/dist/files/files.controller.d.ts +0 -11
  17. package/dist/files/files.controller.js +0 -148
  18. package/dist/files/files.controller.js.map +0 -1
  19. package/dist/files/files.module.d.ts +0 -2
  20. package/dist/files/files.module.js +0 -26
  21. package/dist/files/files.module.js.map +0 -1
  22. package/dist/files/files.moleculer.d.ts +0 -10
  23. package/dist/files/files.moleculer.js +0 -53
  24. package/dist/files/files.moleculer.js.map +0 -1
  25. package/dist/files/files.service.d.ts +0 -30
  26. package/dist/files/files.service.js +0 -207
  27. package/dist/files/files.service.js.map +0 -1
  28. package/dist/files/index.d.ts +0 -3
  29. package/dist/files/index.js +0 -20
  30. package/dist/files/index.js.map +0 -1
  31. package/dist/index.d.ts +0 -3
  32. package/dist/index.js +0 -26
  33. package/dist/index.js.map +0 -1
  34. package/dist/moleculer.config.d.ts +0 -2
  35. package/dist/moleculer.config.js +0 -74
  36. package/dist/moleculer.config.js.map +0 -1
  37. package/dist/plugin/moleculer.service.d.ts +0 -11
  38. package/dist/plugin/moleculer.service.js +0 -96
  39. package/dist/plugin/moleculer.service.js.map +0 -1
  40. package/dist/plugin/plugin.module.d.ts +0 -14
  41. package/dist/plugin/plugin.module.js +0 -72
  42. package/dist/plugin/plugin.module.js.map +0 -1
  43. package/dist/plugin/plugin.service.d.ts +0 -3
  44. package/dist/plugin/plugin.service.js +0 -21
  45. package/dist/plugin/plugin.service.js.map +0 -1
  46. package/dist/rooms/globals/augmentation.d.ts +0 -25
  47. package/dist/rooms/globals/augmentation.js +0 -3
  48. package/dist/rooms/globals/augmentation.js.map +0 -1
  49. package/dist/rooms/lib/DateToString.d.ts +0 -3
  50. package/dist/rooms/lib/DateToString.js +0 -3
  51. package/dist/rooms/lib/DateToString.js.map +0 -1
  52. package/dist/rooms/lib/Json.d.ts +0 -9
  53. package/dist/rooms/lib/Json.js +0 -18
  54. package/dist/rooms/lib/Json.js.map +0 -1
  55. package/dist/rooms/lib/utils.d.ts +0 -33
  56. package/dist/rooms/lib/utils.js +0 -122
  57. package/dist/rooms/lib/utils.js.map +0 -1
  58. package/dist/rooms/protocol/AuthToken.d.ts +0 -50
  59. package/dist/rooms/protocol/AuthToken.js +0 -49
  60. package/dist/rooms/protocol/AuthToken.js.map +0 -1
  61. package/dist/rooms/protocol/Authentication.d.ts +0 -22
  62. package/dist/rooms/protocol/Authentication.js +0 -3
  63. package/dist/rooms/protocol/Authentication.js.map +0 -1
  64. package/dist/rooms/protocol/BaseActivitiesData.d.ts +0 -4
  65. package/dist/rooms/protocol/BaseActivitiesData.js +0 -3
  66. package/dist/rooms/protocol/BaseActivitiesData.js.map +0 -1
  67. package/dist/rooms/protocol/BaseRoomInfo.d.ts +0 -6
  68. package/dist/rooms/protocol/BaseRoomInfo.js +0 -3
  69. package/dist/rooms/protocol/BaseRoomInfo.js.map +0 -1
  70. package/dist/rooms/protocol/BaseUserMeta.d.ts +0 -10
  71. package/dist/rooms/protocol/BaseUserMeta.js +0 -3
  72. package/dist/rooms/protocol/BaseUserMeta.js.map +0 -1
  73. package/dist/rooms/protocol/ClientMsg.d.ts +0 -41
  74. package/dist/rooms/protocol/ClientMsg.js +0 -13
  75. package/dist/rooms/protocol/ClientMsg.js.map +0 -1
  76. package/dist/rooms/protocol/Comments.d.ts +0 -146
  77. package/dist/rooms/protocol/Comments.js +0 -3
  78. package/dist/rooms/protocol/Comments.js.map +0 -1
  79. package/dist/rooms/protocol/InboxNotifications.d.ts +0 -49
  80. package/dist/rooms/protocol/InboxNotifications.js +0 -3
  81. package/dist/rooms/protocol/InboxNotifications.js.map +0 -1
  82. package/dist/rooms/protocol/Op.d.ts +0 -82
  83. package/dist/rooms/protocol/Op.js +0 -28
  84. package/dist/rooms/protocol/Op.js.map +0 -1
  85. package/dist/rooms/protocol/SerializedCrdt.d.ts +0 -40
  86. package/dist/rooms/protocol/SerializedCrdt.js +0 -19
  87. package/dist/rooms/protocol/SerializedCrdt.js.map +0 -1
  88. package/dist/rooms/protocol/ServerMsg.d.ts +0 -128
  89. package/dist/rooms/protocol/ServerMsg.js +0 -25
  90. package/dist/rooms/protocol/ServerMsg.js.map +0 -1
  91. package/dist/rooms/protocol/VersionHistory.d.ts +0 -9
  92. package/dist/rooms/protocol/VersionHistory.js +0 -3
  93. package/dist/rooms/protocol/VersionHistory.js.map +0 -1
  94. package/dist/rooms/rooms.controller.d.ts +0 -64
  95. package/dist/rooms/rooms.controller.js +0 -401
  96. package/dist/rooms/rooms.controller.js.map +0 -1
  97. package/dist/rooms/rooms.gateway.d.ts +0 -30
  98. package/dist/rooms/rooms.gateway.js +0 -188
  99. package/dist/rooms/rooms.gateway.js.map +0 -1
  100. package/dist/rooms/rooms.guard.d.ts +0 -9
  101. package/dist/rooms/rooms.guard.js +0 -48
  102. package/dist/rooms/rooms.guard.js.map +0 -1
  103. package/dist/rooms/rooms.module.d.ts +0 -2
  104. package/dist/rooms/rooms.module.js +0 -36
  105. package/dist/rooms/rooms.module.js.map +0 -1
  106. package/dist/rooms/rooms.service.d.ts +0 -51
  107. package/dist/rooms/rooms.service.js +0 -225
  108. package/dist/rooms/rooms.service.js.map +0 -1
  109. package/views/ag-grid/README.md +0 -15
  110. package/views/ag-grid/ag-grid.hbs +0 -1099
  111. package/views/devextreme/datagrid.hbs +0 -240
@@ -1,401 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.RoomsController = void 0;
16
- const core_1 = require("@builder6/core");
17
- const rooms_service_1 = require("./rooms.service");
18
- const common_1 = require("@nestjs/common");
19
- const jwt_1 = require("@nestjs/jwt");
20
- const rooms_guard_1 = require("./rooms.guard");
21
- const rawBody = require("raw-body");
22
- const files_service_1 = require("../files/files.service");
23
- const rooms_gateway_1 = require("./rooms.gateway");
24
- const ServerMsg_1 = require("./protocol/ServerMsg");
25
- let RoomsController = class RoomsController {
26
- constructor(roomsService, filesService, jwtService, roomsGateway) {
27
- this.roomsService = roomsService;
28
- this.filesService = filesService;
29
- this.jwtService = jwtService;
30
- this.roomsGateway = roomsGateway;
31
- }
32
- async getAuthToken(body, req) {
33
- const user = req['user'];
34
- const { room = 'undefined' } = body;
35
- const payload = {
36
- k: 'acc',
37
- pid: user.space,
38
- sid: user.space,
39
- uid: user.user,
40
- mcpr: 10,
41
- perms: {},
42
- jti: 'S4EMiESTDe6k',
43
- };
44
- payload.perms[room] = ['room:write', 'comments:write'];
45
- const token = await this.jwtService.signAsync(payload);
46
- return { token };
47
- }
48
- async getUsers(userIds) {
49
- const users = await this.roomsService.getUsers(userIds);
50
- return users;
51
- }
52
- async searchUsers(req, keyword, roomdId) {
53
- const spaceId = req['jwt'].sid;
54
- const users = await this.roomsService.searchUsers(spaceId, keyword, roomdId);
55
- return users;
56
- }
57
- async getThreads(roomId) {
58
- const threads = await this.roomsService.getThreads(roomId);
59
- return {
60
- data: threads,
61
- inboxNotifications: [],
62
- meta: {
63
- nextCursor: null,
64
- requestedAt: new Date().toISOString(),
65
- permissionHints: {
66
- [roomId]: ['room:write'],
67
- },
68
- },
69
- deletedThreads: [],
70
- deletedInboxNotifications: [],
71
- };
72
- }
73
- async getThreadsDelta(roomId, since) {
74
- const sinceDate = new Date(since);
75
- const threads = await this.roomsService.getThreads(roomId, sinceDate);
76
- return {
77
- data: threads,
78
- inboxNotifications: [],
79
- meta: {
80
- nextCursor: null,
81
- requestedAt: new Date().toISOString(),
82
- permissionHints: {
83
- [roomId]: ['room:write'],
84
- },
85
- },
86
- deletedThreads: [],
87
- deletedInboxNotifications: [],
88
- };
89
- }
90
- async createThread(req, roomId, record) {
91
- const userId = req['jwt'].uid;
92
- const newThread = await this.roomsService.createThread({
93
- id: record.id,
94
- comment: record.comment,
95
- roomId,
96
- userId,
97
- metadata: {},
98
- resolved: false,
99
- });
100
- this.roomsGateway.broadcastToRoom(roomId, {
101
- type: ServerMsg_1.ServerMsgCode.THREAD_CREATED,
102
- threadId: record.id,
103
- });
104
- this.roomsGateway.broadcastToRoom(roomId, {
105
- type: ServerMsg_1.ServerMsgCode.COMMENT_CREATED,
106
- threadId: record.id,
107
- commentId: record.comment.id,
108
- });
109
- return newThread;
110
- }
111
- async threadWithNotification(req, roomId, threadId) {
112
- const thread = await this.roomsService.getThread(roomId, threadId);
113
- return { thread };
114
- }
115
- async threadMarkasResolved(req, roomId, threadId) {
116
- const newThread = await this.roomsService.updateThread(threadId, {
117
- resolved: true,
118
- });
119
- this.roomsGateway.broadcastToRoom(roomId, {
120
- type: ServerMsg_1.ServerMsgCode.THREAD_UPDATED,
121
- threadId: threadId,
122
- });
123
- return newThread;
124
- }
125
- async threadMarkasUnResolved(req, roomId, threadId) {
126
- const newThread = await this.roomsService.updateThread(threadId, {
127
- resolved: false,
128
- });
129
- this.roomsGateway.broadcastToRoom(roomId, {
130
- type: ServerMsg_1.ServerMsgCode.THREAD_UPDATED,
131
- threadId: threadId,
132
- });
133
- return newThread;
134
- }
135
- async createComment(req, roomId, threadId, record) {
136
- const userId = req['jwt'].uid;
137
- const newComment = await this.roomsService.createComment({
138
- id: record.id,
139
- attachmentIds: record.attachmentIds,
140
- body: record.body,
141
- roomId,
142
- threadId: threadId,
143
- userId: userId,
144
- });
145
- await this.roomsService.updateThread(threadId);
146
- this.roomsGateway.broadcastToRoom(roomId, {
147
- type: ServerMsg_1.ServerMsgCode.COMMENT_CREATED,
148
- threadId: threadId,
149
- commentId: record.id,
150
- });
151
- return newComment;
152
- }
153
- async updateComment(req, roomId, threadId, commentId, record) {
154
- const userId = req['jwt'].uid;
155
- const newComment = await this.roomsService.updateComment(commentId, {
156
- attachmentIds: record.attachmentIds,
157
- body: record.body,
158
- userId,
159
- });
160
- await this.roomsService.updateThread(threadId);
161
- this.roomsGateway.broadcastToRoom(roomId, {
162
- type: ServerMsg_1.ServerMsgCode.COMMENT_EDITED,
163
- threadId: threadId,
164
- commentId: commentId,
165
- });
166
- return newComment;
167
- }
168
- async deleteComment(req, roomId, threadId, commentId) {
169
- await this.roomsService.deleteComment(commentId);
170
- await this.roomsService.updateThread(threadId);
171
- this.roomsGateway.broadcastToRoom(roomId, {
172
- type: ServerMsg_1.ServerMsgCode.COMMENT_DELETED,
173
- threadId: threadId,
174
- commentId: commentId,
175
- });
176
- return {};
177
- }
178
- async presignedUrls(attachmentIds) {
179
- const urls = await Promise.all(attachmentIds.map(async (attachmentId) => {
180
- return this.filesService.getPreSignedUrl('cfs.files.filerecord', attachmentId);
181
- }));
182
- return { urls };
183
- }
184
- async uploadFile(roomId, attachmentId, fileName, fileSize, req) {
185
- if (req.headers['content-type'] !== 'application/octet-stream') {
186
- throw new common_1.HttpException('Invalid content type', common_1.HttpStatus.BAD_REQUEST);
187
- }
188
- const fileBuffer = await rawBody(req);
189
- const file = {
190
- buffer: fileBuffer,
191
- originalname: fileName,
192
- size: fileSize,
193
- };
194
- const metadata = {
195
- _id: attachmentId,
196
- objectName: 'b6_rooms',
197
- recordId: roomId,
198
- };
199
- if (!file) {
200
- throw new Error('未找到上传的文件');
201
- }
202
- const fileRecord = await this.filesService.uploadFile('cfs.files.filerecord', file, metadata);
203
- return fileRecord;
204
- }
205
- async createReaction(req, roomId, threadId, commentId, emoji) {
206
- const userId = req['jwt'].uid;
207
- const newComment = await this.roomsService.createReaction(commentId, {
208
- userId: userId,
209
- emoji: emoji,
210
- });
211
- await this.roomsService.updateThread(threadId);
212
- this.roomsGateway.broadcastToRoom(roomId, {
213
- type: ServerMsg_1.ServerMsgCode.COMMENT_REACTION_ADDED,
214
- threadId: threadId,
215
- commentId: commentId,
216
- emoji: emoji,
217
- });
218
- return newComment;
219
- }
220
- async deleteReaction(req, roomId, threadId, commentId, emoji) {
221
- const userId = req['jwt'].uid;
222
- await this.roomsService.deleteReaction(commentId, { emoji, userId });
223
- await this.roomsService.updateThread(threadId);
224
- this.roomsGateway.broadcastToRoom(roomId, {
225
- type: ServerMsg_1.ServerMsgCode.COMMENT_REACTION_REMOVED,
226
- threadId: threadId,
227
- commentId: commentId,
228
- emoji: emoji,
229
- });
230
- return {};
231
- }
232
- };
233
- exports.RoomsController = RoomsController;
234
- __decorate([
235
- (0, common_1.UseGuards)(core_1.AuthGuard),
236
- (0, common_1.Post)('auth'),
237
- __param(0, (0, common_1.Body)()),
238
- __param(1, (0, common_1.Req)()),
239
- __metadata("design:type", Function),
240
- __metadata("design:paramtypes", [Object, Object]),
241
- __metadata("design:returntype", Promise)
242
- ], RoomsController.prototype, "getAuthToken", null);
243
- __decorate([
244
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
245
- (0, common_1.Get)('users'),
246
- __param(0, (0, common_1.Query)('userIds')),
247
- __metadata("design:type", Function),
248
- __metadata("design:paramtypes", [Object]),
249
- __metadata("design:returntype", Promise)
250
- ], RoomsController.prototype, "getUsers", null);
251
- __decorate([
252
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
253
- (0, common_1.Get)('users/search'),
254
- __param(0, (0, common_1.Req)()),
255
- __param(1, (0, common_1.Query)('keyword')),
256
- __param(2, (0, common_1.Query)('roomdId')),
257
- __metadata("design:type", Function),
258
- __metadata("design:paramtypes", [Object, String, String]),
259
- __metadata("design:returntype", Promise)
260
- ], RoomsController.prototype, "searchUsers", null);
261
- __decorate([
262
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
263
- (0, common_1.Get)('rooms/:roomId/threads'),
264
- __param(0, (0, common_1.Param)('roomId')),
265
- __metadata("design:type", Function),
266
- __metadata("design:paramtypes", [String]),
267
- __metadata("design:returntype", Promise)
268
- ], RoomsController.prototype, "getThreads", null);
269
- __decorate([
270
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
271
- (0, common_1.Get)('rooms/:roomId/threads/delta'),
272
- __param(0, (0, common_1.Param)('roomId')),
273
- __param(1, (0, common_1.Query)('since')),
274
- __metadata("design:type", Function),
275
- __metadata("design:paramtypes", [String, String]),
276
- __metadata("design:returntype", Promise)
277
- ], RoomsController.prototype, "getThreadsDelta", null);
278
- __decorate([
279
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
280
- (0, common_1.Post)('rooms/:roomId/threads'),
281
- __param(0, (0, common_1.Req)()),
282
- __param(1, (0, common_1.Param)('roomId')),
283
- __param(2, (0, common_1.Body)()),
284
- __metadata("design:type", Function),
285
- __metadata("design:paramtypes", [Object, String, Object]),
286
- __metadata("design:returntype", Promise)
287
- ], RoomsController.prototype, "createThread", null);
288
- __decorate([
289
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
290
- (0, common_1.Get)('rooms/:roomId/thread-with-notification/:threadId'),
291
- __param(0, (0, common_1.Req)()),
292
- __param(1, (0, common_1.Param)('roomId')),
293
- __param(2, (0, common_1.Param)('threadId')),
294
- __metadata("design:type", Function),
295
- __metadata("design:paramtypes", [Object, String, String]),
296
- __metadata("design:returntype", Promise)
297
- ], RoomsController.prototype, "threadWithNotification", null);
298
- __decorate([
299
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
300
- (0, common_1.Post)('rooms/:roomId/threads/:threadId/mark-as-resolved'),
301
- __param(0, (0, common_1.Req)()),
302
- __param(1, (0, common_1.Param)('roomId')),
303
- __param(2, (0, common_1.Param)('threadId')),
304
- __metadata("design:type", Function),
305
- __metadata("design:paramtypes", [Object, String, String]),
306
- __metadata("design:returntype", Promise)
307
- ], RoomsController.prototype, "threadMarkasResolved", null);
308
- __decorate([
309
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
310
- (0, common_1.Post)('rooms/:roomId/threads/:threadId/mark-as-unresolved'),
311
- __param(0, (0, common_1.Req)()),
312
- __param(1, (0, common_1.Param)('roomId')),
313
- __param(2, (0, common_1.Param)('threadId')),
314
- __metadata("design:type", Function),
315
- __metadata("design:paramtypes", [Object, String, String]),
316
- __metadata("design:returntype", Promise)
317
- ], RoomsController.prototype, "threadMarkasUnResolved", null);
318
- __decorate([
319
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
320
- (0, common_1.Post)('rooms/:roomId/threads/:threadId/comments'),
321
- __param(0, (0, common_1.Req)()),
322
- __param(1, (0, common_1.Param)('roomId')),
323
- __param(2, (0, common_1.Param)('threadId')),
324
- __param(3, (0, common_1.Body)()),
325
- __metadata("design:type", Function),
326
- __metadata("design:paramtypes", [Object, String, String, Object]),
327
- __metadata("design:returntype", Promise)
328
- ], RoomsController.prototype, "createComment", null);
329
- __decorate([
330
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
331
- (0, common_1.Post)('rooms/:roomId/threads/:threadId/comments/:commentId'),
332
- __param(0, (0, common_1.Req)()),
333
- __param(1, (0, common_1.Param)('roomId')),
334
- __param(2, (0, common_1.Param)('threadId')),
335
- __param(3, (0, common_1.Param)('commentId')),
336
- __param(4, (0, common_1.Body)()),
337
- __metadata("design:type", Function),
338
- __metadata("design:paramtypes", [Object, String, String, String, Object]),
339
- __metadata("design:returntype", Promise)
340
- ], RoomsController.prototype, "updateComment", null);
341
- __decorate([
342
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
343
- (0, common_1.Delete)('rooms/:roomId/threads/:threadId/comments/:commentId'),
344
- __param(0, (0, common_1.Req)()),
345
- __param(1, (0, common_1.Param)('roomId')),
346
- __param(2, (0, common_1.Param)('threadId')),
347
- __param(3, (0, common_1.Param)('commentId')),
348
- __metadata("design:type", Function),
349
- __metadata("design:paramtypes", [Object, String, String, String]),
350
- __metadata("design:returntype", Promise)
351
- ], RoomsController.prototype, "deleteComment", null);
352
- __decorate([
353
- (0, common_1.Post)('rooms/:roomId/attachments/presigned-urls'),
354
- __param(0, (0, common_1.Body)('attachmentIds')),
355
- __metadata("design:type", Function),
356
- __metadata("design:paramtypes", [Array]),
357
- __metadata("design:returntype", Promise)
358
- ], RoomsController.prototype, "presignedUrls", null);
359
- __decorate([
360
- (0, common_1.Put)('rooms/:roomId/attachments/:attachmentId/upload/:fileName'),
361
- __param(0, (0, common_1.Param)('roomId')),
362
- __param(1, (0, common_1.Param)('attachmentId')),
363
- __param(2, (0, common_1.Param)('fileName')),
364
- __param(3, (0, common_1.Query)('fileSize')),
365
- __param(4, (0, common_1.Req)()),
366
- __metadata("design:type", Function),
367
- __metadata("design:paramtypes", [String, String, String, Number, Object]),
368
- __metadata("design:returntype", Promise)
369
- ], RoomsController.prototype, "uploadFile", null);
370
- __decorate([
371
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
372
- (0, common_1.Post)('rooms/:roomId/threads/:threadId/comments/:commentId/reactions'),
373
- __param(0, (0, common_1.Req)()),
374
- __param(1, (0, common_1.Param)('roomId')),
375
- __param(2, (0, common_1.Param)('threadId')),
376
- __param(3, (0, common_1.Param)('commentId')),
377
- __param(4, (0, common_1.Body)('emoji')),
378
- __metadata("design:type", Function),
379
- __metadata("design:paramtypes", [Object, String, String, String, String]),
380
- __metadata("design:returntype", Promise)
381
- ], RoomsController.prototype, "createReaction", null);
382
- __decorate([
383
- (0, common_1.UseGuards)(rooms_guard_1.RoomsGuard),
384
- (0, common_1.Delete)('rooms/:roomId/threads/:threadId/comments/:commentId/reactions/:emoji'),
385
- __param(0, (0, common_1.Req)()),
386
- __param(1, (0, common_1.Param)('roomId')),
387
- __param(2, (0, common_1.Param)('threadId')),
388
- __param(3, (0, common_1.Param)('commentId')),
389
- __param(4, (0, common_1.Param)('emoji')),
390
- __metadata("design:type", Function),
391
- __metadata("design:paramtypes", [Object, String, String, String, String]),
392
- __metadata("design:returntype", Promise)
393
- ], RoomsController.prototype, "deleteReaction", null);
394
- exports.RoomsController = RoomsController = __decorate([
395
- (0, common_1.Controller)('v2/c/'),
396
- __metadata("design:paramtypes", [rooms_service_1.RoomsService,
397
- files_service_1.FilesService,
398
- jwt_1.JwtService,
399
- rooms_gateway_1.RoomsGateway])
400
- ], RoomsController);
401
- //# sourceMappingURL=rooms.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rooms.controller.js","sourceRoot":"","sources":["../../src/rooms/rooms.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAA2C;AAC3C,mDAA+C;AAC/C,2CAawB;AACxB,qCAAyC;AACzC,+CAA2C;AAC3C,oCAAoC;AAEpC,0DAAqD;AACrD,mDAA+C;AAC/C,oDAAqD;AAG9C,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YACU,YAA0B,EAC1B,YAA0B,EAC1B,UAAsB,EACtB,YAA0B;QAH1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAY;QAC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;IAEE,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;IAClB,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;;;;qDAahB;0BA1VU,eAAe;IAD3B,IAAA,mBAAU,EAAC,OAAO,CAAC;qCAGM,4BAAY;QACZ,4BAAY;QACd,gBAAU;QACR,4BAAY;GALzB,eAAe,CA2V3B"}
@@ -1,30 +0,0 @@
1
- import { OnGatewayConnection } from '@nestjs/websockets';
2
- import { WebSocket, Server } from 'ws';
3
- import { JwtService } from '@nestjs/jwt';
4
- export declare class RoomsGateway implements OnGatewayConnection {
5
- private jwtService;
6
- server: Server;
7
- private roomStates;
8
- private redis;
9
- private pubRedis;
10
- constructor(jwtService: JwtService);
11
- afterInit(): Promise<void>;
12
- handleConnection(client: WebSocket, req: any): Promise<void>;
13
- handleClientMessage(client: WebSocket, parsedMessage: any): Promise<void>;
14
- handleJoinRoom(client: WebSocket, payload: {
15
- roomId: string;
16
- userId: string;
17
- }): Promise<number>;
18
- handleLeaveRoom(client: WebSocket, payload: {
19
- roomId: string;
20
- userId: string;
21
- }): Promise<void>;
22
- handleUpdatePresence(client: WebSocket, payload: {
23
- roomId: string;
24
- connectionId: number;
25
- data: any;
26
- }): Promise<void>;
27
- broadcastToRoom(roomId: string, message: any): void;
28
- private handleBroadcastedMessage;
29
- getUserScopes(roomId: string, userId: string): Promise<string[]>;
30
- }
@@ -1,188 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RoomsGateway = void 0;
13
- const websockets_1 = require("@nestjs/websockets");
14
- const ws_1 = require("ws");
15
- const ioredis_1 = require("ioredis");
16
- const url = require("url");
17
- const uuid_1 = require("uuid");
18
- const ServerMsg_1 = require("./protocol/ServerMsg");
19
- const jwt_1 = require("@nestjs/jwt");
20
- let RoomsGateway = class RoomsGateway {
21
- constructor(jwtService) {
22
- this.jwtService = jwtService;
23
- this.roomStates = new Map();
24
- this.redis = new ioredis_1.default('redis://localhost:6379');
25
- this.pubRedis = new ioredis_1.default('redis://localhost:6379');
26
- }
27
- async afterInit() {
28
- console.log('Rooms Gateway Initialized with Redis');
29
- this.redis.subscribe('rooms_channel', (err) => {
30
- if (err) {
31
- console.error('Failed to subscribe: ', err);
32
- }
33
- });
34
- this.redis.on('message', (channel, message) => {
35
- if (channel === 'rooms_channel') {
36
- const parsedMessage = JSON.parse(message);
37
- this.handleBroadcastedMessage(parsedMessage);
38
- }
39
- });
40
- }
41
- async handleConnection(client, req) {
42
- const parsedUrl = url.parse(req.url, true);
43
- const roomId = parsedUrl.query['roomId'];
44
- const token = parsedUrl.query['tok'];
45
- const jwt = (await this.jwtService.decode(token));
46
- const userId = jwt.uid;
47
- if (userId && roomId) {
48
- client.on('message', (message) => {
49
- const messageStr = message.toString();
50
- console.log('Received message from client: ', messageStr);
51
- if (messageStr === 'ping') {
52
- client.send('pong');
53
- return;
54
- }
55
- const parsedMessage = JSON.parse(messageStr);
56
- if (Array.isArray(parsedMessage)) {
57
- parsedMessage.forEach((msg) => {
58
- this.handleClientMessage(client, msg);
59
- });
60
- }
61
- else if (typeof parsedMessage === 'object') {
62
- this.handleClientMessage(client, parsedMessage);
63
- }
64
- });
65
- client.on('close', () => {
66
- this.handleLeaveRoom(client, { roomId, userId });
67
- });
68
- await this.handleJoinRoom(client, { roomId, userId });
69
- }
70
- else {
71
- client.close();
72
- }
73
- }
74
- async handleClientMessage(client, parsedMessage) {
75
- console.log('Received message from client: ', parsedMessage);
76
- if (parsedMessage.type === ServerMsg_1.ServerMsgCode.UPDATE_PRESENCE) {
77
- this.handleUpdatePresence(client, parsedMessage);
78
- }
79
- }
80
- async handleJoinRoom(client, payload) {
81
- const { roomId, userId } = payload;
82
- let roomState = this.roomStates.get(roomId);
83
- if (!roomState) {
84
- roomState = { roomId, connections: {} };
85
- this.roomStates.set(roomId, roomState);
86
- }
87
- const connectionId = await this.pubRedis.incr(`room:${roomId}:connectionId`);
88
- const nonce = (0, uuid_1.v4)();
89
- roomState.connections[connectionId] = { userId, nonce, roomId, client };
90
- await this.pubRedis.hset(`room:${roomId}:connections`, connectionId.toString(), JSON.stringify({ userId, nonce, roomId }));
91
- client.connectionId = connectionId;
92
- const users = await Promise.all(Object.keys(roomState.connections).map(async (connId) => {
93
- const connection = roomState.connections[parseInt(connId)];
94
- const roomId = connection.roomId;
95
- const scopes = await this.getUserScopes(roomId, connection.userId);
96
- return {
97
- connectionId: parseInt(connId),
98
- userId: connection.userId,
99
- scopes,
100
- };
101
- }));
102
- const roomStateResponse = {
103
- type: ServerMsg_1.ServerMsgCode.ROOM_STATE,
104
- actor: connectionId,
105
- nonce: nonce,
106
- scopes: await this.getUserScopes(roomId, userId),
107
- users: users.reduce((acc, user) => {
108
- acc[user.connectionId] = {
109
- id: user.userId,
110
- scopes: user.scopes,
111
- };
112
- return acc;
113
- }, {}),
114
- };
115
- client.send(JSON.stringify(roomStateResponse));
116
- this.broadcastToRoom(roomId, {
117
- type: ServerMsg_1.ServerMsgCode.USER_JOINED,
118
- actor: connectionId,
119
- userId,
120
- });
121
- console.log(`User ${connectionId},${userId} has join room: ${roomId}`);
122
- return connectionId;
123
- }
124
- async handleLeaveRoom(client, payload) {
125
- const { roomId, userId } = payload;
126
- const connectionId = client.connectionId;
127
- const roomState = this.roomStates.get(roomId);
128
- if (roomState && roomState.connections[connectionId]) {
129
- delete roomState.connections[connectionId];
130
- await this.pubRedis.hdel(`room:${roomId}:connections`, connectionId.toString());
131
- if (Object.keys(roomState.connections).length === 0) {
132
- this.roomStates.delete(roomId);
133
- }
134
- this.broadcastToRoom(roomId, {
135
- type: ServerMsg_1.ServerMsgCode.USER_LEFT,
136
- actor: connectionId,
137
- });
138
- console.log(`User ${connectionId},${userId} has left room: ${roomId}`);
139
- }
140
- }
141
- async handleUpdatePresence(client, payload) {
142
- }
143
- broadcastToRoom(roomId, message) {
144
- this.pubRedis.publish('rooms_channel', JSON.stringify({ roomId, message }));
145
- }
146
- handleBroadcastedMessage(parsedMessage) {
147
- const { roomId, message } = parsedMessage;
148
- const roomState = this.roomStates.get(roomId);
149
- if (roomState) {
150
- Object.keys(roomState.connections).forEach((connectionId) => {
151
- const client = roomState.connections[connectionId].client;
152
- if (client.readyState === ws_1.WebSocket.OPEN) {
153
- client.send(JSON.stringify(message));
154
- }
155
- });
156
- }
157
- }
158
- async getUserScopes(roomId, userId) {
159
- return ['room:write', 'comments:write'];
160
- }
161
- };
162
- exports.RoomsGateway = RoomsGateway;
163
- __decorate([
164
- (0, websockets_1.WebSocketServer)(),
165
- __metadata("design:type", ws_1.Server)
166
- ], RoomsGateway.prototype, "server", void 0);
167
- __decorate([
168
- (0, websockets_1.SubscribeMessage)('leaveRoom'),
169
- __metadata("design:type", Function),
170
- __metadata("design:paramtypes", [ws_1.WebSocket, Object]),
171
- __metadata("design:returntype", Promise)
172
- ], RoomsGateway.prototype, "handleLeaveRoom", null);
173
- __decorate([
174
- (0, websockets_1.SubscribeMessage)('updatePresence'),
175
- __metadata("design:type", Function),
176
- __metadata("design:paramtypes", [ws_1.WebSocket, Object]),
177
- __metadata("design:returntype", Promise)
178
- ], RoomsGateway.prototype, "handleUpdatePresence", null);
179
- exports.RoomsGateway = RoomsGateway = __decorate([
180
- (0, websockets_1.WebSocketGateway)({
181
- path: '/v7',
182
- cors: {
183
- origin: '*',
184
- },
185
- }),
186
- __metadata("design:paramtypes", [jwt_1.JwtService])
187
- ], RoomsGateway);
188
- //# sourceMappingURL=rooms.gateway.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rooms.gateway.js","sourceRoot":"","sources":["../../src/rooms/rooms.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAK4B;AAC5B,2BAAuC;AACvC,qCAA4B;AAC5B,2BAA2B;AAC3B,+BAAoC;AACpC,oDAAgE;AAChE,qCAAyC;AAoBlC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAOvB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QAJlC,eAAU,GAA2B,IAAI,GAAG,EAAE,CAAC;QAKrD,IAAI,CAAC,KAAK,GAAG,IAAI,iBAAK,CAAC,wBAAwB,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAK,CAAC,wBAAwB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QAGpD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC,GAAG,EAAE,EAAE;YAC5C,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YAC5C,IAAI,OAAO,KAAK,eAAe,EAAE,CAAC;gBAChC,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC1C,IAAI,CAAC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U,YAAY;IANxB,IAAA,6BAAgB,EAAC;QAChB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE;YACJ,MAAM,EAAE,GAAG;SACZ;KACF,CAAC;qCAQgC,gBAAU;GAP/B,YAAY,CA+NxB"}
@@ -1,9 +0,0 @@
1
- import { CanActivate, ExecutionContext } from '@nestjs/common';
2
- import { RoomsService } from './rooms.service';
3
- import { JwtService } from '@nestjs/jwt';
4
- export declare class RoomsGuard implements CanActivate {
5
- private roomsService;
6
- private jwtService;
7
- constructor(roomsService: RoomsService, jwtService: JwtService);
8
- canActivate(context: ExecutionContext): Promise<boolean>;
9
- }