@messenger-box/platform-server 0.0.1-alpha.133 → 0.0.1-alpha.136
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/lib/index.js +106 -38
- package/lib/index.js.map +1 -1
- package/lib/interfaces/post-service.d.ts +9 -2
- package/lib/plugins/post-moleculer-service.d.ts +1 -1
- package/lib/plugins/post-thread-moleculer-service.d.ts +1 -1
- package/lib/plugins/reaction-moleculer-service.d.ts +2 -2
- package/lib/services/post-service.d.ts +9 -4
- package/lib/services/proxy-services/post-microservice.d.ts +6 -5
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -645,33 +645,37 @@ const postResolvers = () => ({
|
|
|
645
645
|
async sendMessage(src, { channelId, messageInput }, { postService, userContext, fileInfoService }) {
|
|
646
646
|
const { content, files } = messageInput;
|
|
647
647
|
const { accountId } = userContext;
|
|
648
|
-
|
|
648
|
+
return postService.create({
|
|
649
649
|
channel: channelId,
|
|
650
650
|
message: content,
|
|
651
651
|
editedBy: accountId,
|
|
652
652
|
author: accountId,
|
|
653
|
-
files
|
|
654
|
-
});
|
|
655
|
-
const uploadedFiles = await Promise.all(files.map((file) => fileInfoService.create({
|
|
656
|
-
refType: core_2.IFileRefType.Post,
|
|
657
|
-
file,
|
|
658
|
-
createdBy: accountId,
|
|
659
|
-
ref: postRes.id,
|
|
660
|
-
})));
|
|
661
|
-
return postService.update(postRes.id, {
|
|
662
|
-
files: uploadedFiles,
|
|
653
|
+
files,
|
|
663
654
|
});
|
|
664
655
|
},
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
return res;
|
|
656
|
+
createMessageFileUploadLink(_, { postId, filename }, { postService, userContext }) {
|
|
657
|
+
return postService.createFileUploadLink(postId, filename, userContext.accountId);
|
|
658
|
+
},
|
|
659
|
+
attachUploadedFileToMessage(_, { postId, file }, { postService, userContext }) {
|
|
660
|
+
return postService.attachUploadedFile(postId, file, userContext.accountId);
|
|
661
|
+
},
|
|
662
|
+
deleteMessageFile(_, { url }, { postService }) {
|
|
663
|
+
return postService.deleteFile(url);
|
|
674
664
|
},
|
|
665
|
+
// uploadFile(src, { files, postId }, { fileInfoService, userContext }) {
|
|
666
|
+
// const res = [];
|
|
667
|
+
// files.map((file) =>
|
|
668
|
+
// res.push(
|
|
669
|
+
// fileInfoService.create({
|
|
670
|
+
// refType: IFileRefType.Post as never,
|
|
671
|
+
// file,
|
|
672
|
+
// createdBy: userContext.accountId,
|
|
673
|
+
// ref: postId,
|
|
674
|
+
// }),
|
|
675
|
+
// ),
|
|
676
|
+
// );
|
|
677
|
+
// return res;
|
|
678
|
+
// },
|
|
675
679
|
},
|
|
676
680
|
});
|
|
677
681
|
exports.postResolvers = postResolvers;
|
|
@@ -831,7 +835,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
831
835
|
|
|
832
836
|
"use strict";
|
|
833
837
|
__webpack_require__.r(__webpack_exports__);
|
|
834
|
-
/* harmony default export */ __webpack_exports__["default"] = ("type Post implements IBaseRepo & IFileRef {\n id: ID!\n author: UserAccount\n channel: Channel\n\n rootId: String\n parentId: String\n originalId: String\n\n \"\"\" Post sent by server e.g. User joined channel \"\"\"\n fromServer: Boolean\n\n message: String\n type: String\n props: AnyObject\n hashTags: String\n\n filenames: [String]\n fields: [String]\n reactions: [Reaction]\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\n editedBy: UserAccount\n deletedBy: UserAccount\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n\n propsConfiguration: MachineConfiguration\n}\n\ninput MessageInput {\n content: String!\n userRef: [String] #userId\n channelRef: [String] #channelId\n files: [
|
|
838
|
+
/* harmony default export */ __webpack_exports__["default"] = ("type Post implements IBaseRepo & IFileRef {\n id: ID!\n author: UserAccount\n channel: Channel\n\n rootId: String\n parentId: String\n originalId: String\n\n \"\"\" Post sent by server e.g. User joined channel \"\"\"\n fromServer: Boolean\n\n message: String\n type: String\n props: AnyObject\n hashTags: String\n\n filenames: [String]\n fields: [String]\n reactions: [Reaction]\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\n editedBy: UserAccount\n deletedBy: UserAccount\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n\n propsConfiguration: MachineConfiguration\n}\n\ninput MessageInput {\n content: String!\n userRef: [String] #userId\n channelRef: [String] #channelId\n files: [ID!]\n}\n\ninput MessageIdentifier {\n channelId: String!\n messageId: String!\n}\n\ntype PostsWithCursor {\n cursor: String\n channel: Channel\n posts: [Post]\n}\n\ntype Messages{\n totalCount: Int,\n data:[Post]\n}\n\n\nextend type Query {\n messages(\n channelId: ID,\n # channelName: String,\n # directTo: ID,\n limit: Int,\n skip: Int,\n # searchRegex: String,\n # excludeServer: Boolean\n ): Messages! @isAuthenticated @addAccountContext\n}\n\nextend type Mutation {\n deleteMessage(messageId: MessageIdentifier!): Boolean @isAuthenticated\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\n sendMessage(channelId: String!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\n \"\"\"\n Attach Post File\n \"\"\"\n createMessageFileUploadLink(postId:ID!, filename:String!): String! @isAuthenticated @addAccountContext\n attachUploadedFileToMessage(postId:ID!, file: UploadedFileInput!): FileInfo! @isAuthenticated @addAccountContext\n \"\"\"\n Detach Post File\n \"\"\"\n deleteMessageFile(url: String!): Boolean! @isAuthenticated @addAccountContext\n}\n\nextend type Subscription {\n chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n}\n");
|
|
835
839
|
|
|
836
840
|
/***/ }),
|
|
837
841
|
|
|
@@ -1022,7 +1026,7 @@ exports.default = new server_core_1.Feature({
|
|
|
1022
1026
|
plugins_1.ChannelMoleculerService,
|
|
1023
1027
|
plugins_1.PostMoleculerService,
|
|
1024
1028
|
plugins_1.PostThreadMoleculerService,
|
|
1025
|
-
plugins_1.
|
|
1029
|
+
plugins_1.ReactionMoleculerService,
|
|
1026
1030
|
],
|
|
1027
1031
|
createResolversFunc: graphql_1.messengerResolvers,
|
|
1028
1032
|
createServiceFunc: containers_1.contextServicesFromContainer,
|
|
@@ -1240,7 +1244,39 @@ class PostMoleculerService extends moleculer_1.Service {
|
|
|
1240
1244
|
serverUri: config_1.config.GRAPHQL_URL,
|
|
1241
1245
|
},
|
|
1242
1246
|
},
|
|
1243
|
-
actions: {
|
|
1247
|
+
actions: {
|
|
1248
|
+
attachUploadedFile: {
|
|
1249
|
+
params: {
|
|
1250
|
+
postId: 'string',
|
|
1251
|
+
createdBy: 'string',
|
|
1252
|
+
file: 'object',
|
|
1253
|
+
},
|
|
1254
|
+
handler(ctx) {
|
|
1255
|
+
const { postId, createdBy, file } = ctx.params;
|
|
1256
|
+
return this.postService.attachUploadedFile(postId, file, createdBy);
|
|
1257
|
+
},
|
|
1258
|
+
},
|
|
1259
|
+
createFileUploadLink: {
|
|
1260
|
+
params: {
|
|
1261
|
+
postId: 'string',
|
|
1262
|
+
filename: 'string',
|
|
1263
|
+
userId: 'string',
|
|
1264
|
+
},
|
|
1265
|
+
handler(ctx) {
|
|
1266
|
+
const { postId, filename, userId } = ctx.params;
|
|
1267
|
+
return this.postService.createFileUploadLink(postId, filename, userId);
|
|
1268
|
+
},
|
|
1269
|
+
},
|
|
1270
|
+
deleteFile: {
|
|
1271
|
+
params: {
|
|
1272
|
+
url: 'string',
|
|
1273
|
+
},
|
|
1274
|
+
handler(ctx) {
|
|
1275
|
+
const { url } = ctx.params;
|
|
1276
|
+
return this.postService.deleteFile(url);
|
|
1277
|
+
},
|
|
1278
|
+
},
|
|
1279
|
+
},
|
|
1244
1280
|
});
|
|
1245
1281
|
}
|
|
1246
1282
|
}
|
|
@@ -1272,16 +1308,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
1272
1308
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1273
1309
|
exports.PostThreadMoleculerService = void 0;
|
|
1274
1310
|
const moleculer_1 = __webpack_require__(/*! moleculer */ "moleculer");
|
|
1275
|
-
const platform_server_1 = __webpack_require__(/*! @adminide-stack/platform-server */ "@adminide-stack/platform-server");
|
|
1276
1311
|
const core_1 = __webpack_require__(/*! @messenger-box/core */ "@messenger-box/core");
|
|
1277
|
-
const
|
|
1312
|
+
const platform_server_1 = __webpack_require__(/*! @adminide-stack/platform-server */ "@adminide-stack/platform-server");
|
|
1278
1313
|
const constants_1 = __webpack_require__(/*! ../constants */ "./src/constants/index.ts");
|
|
1279
1314
|
const mixins_1 = __webpack_require__(/*! ../mixins */ "./src/mixins/index.ts");
|
|
1315
|
+
const config_1 = __webpack_require__(/*! ../config */ "./src/config/index.ts");
|
|
1280
1316
|
class PostThreadMoleculerService extends moleculer_1.Service {
|
|
1281
1317
|
constructor(broker, _a) {
|
|
1282
1318
|
var { container } = _a, settings = __rest(_a, ["container"]);
|
|
1283
1319
|
super(broker);
|
|
1284
|
-
const topic = core_1.IMoleculerTopics.
|
|
1320
|
+
const topic = core_1.IMoleculerTopics.PostThreadService;
|
|
1285
1321
|
this.postThreadService = container.get(constants_1.TYPES.PostThreadService);
|
|
1286
1322
|
this.parseServiceSchema({
|
|
1287
1323
|
name: topic,
|
|
@@ -1321,19 +1357,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
1321
1357
|
return t;
|
|
1322
1358
|
};
|
|
1323
1359
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1324
|
-
exports.
|
|
1360
|
+
exports.ReactionMoleculerService = void 0;
|
|
1325
1361
|
const moleculer_1 = __webpack_require__(/*! moleculer */ "moleculer");
|
|
1326
|
-
const platform_server_1 = __webpack_require__(/*! @adminide-stack/platform-server */ "@adminide-stack/platform-server");
|
|
1327
1362
|
const core_1 = __webpack_require__(/*! @messenger-box/core */ "@messenger-box/core");
|
|
1328
|
-
const
|
|
1363
|
+
const platform_server_1 = __webpack_require__(/*! @adminide-stack/platform-server */ "@adminide-stack/platform-server");
|
|
1329
1364
|
const constants_1 = __webpack_require__(/*! ../constants */ "./src/constants/index.ts");
|
|
1330
1365
|
const mixins_1 = __webpack_require__(/*! ../mixins */ "./src/mixins/index.ts");
|
|
1331
|
-
|
|
1366
|
+
const config_1 = __webpack_require__(/*! ../config */ "./src/config/index.ts");
|
|
1367
|
+
class ReactionMoleculerService extends moleculer_1.Service {
|
|
1332
1368
|
constructor(broker, _a) {
|
|
1333
1369
|
var { container } = _a, settings = __rest(_a, ["container"]);
|
|
1334
1370
|
super(broker);
|
|
1335
1371
|
const topic = core_1.IMoleculerTopics.ReactionService;
|
|
1336
|
-
this.
|
|
1372
|
+
this.reactionService = container.get(constants_1.TYPES.ReactionService);
|
|
1337
1373
|
this.parseServiceSchema({
|
|
1338
1374
|
name: topic,
|
|
1339
1375
|
mixins: [platform_server_1.ApolloClientMixin, mixins_1.BaseServiceMixin(this.reactionService)],
|
|
@@ -1346,7 +1382,7 @@ class ReactionService extends moleculer_1.Service {
|
|
|
1346
1382
|
});
|
|
1347
1383
|
}
|
|
1348
1384
|
}
|
|
1349
|
-
exports.
|
|
1385
|
+
exports.ReactionMoleculerService = ReactionMoleculerService;
|
|
1350
1386
|
|
|
1351
1387
|
|
|
1352
1388
|
/***/ }),
|
|
@@ -1751,15 +1787,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
1751
1787
|
exports.PostService = void 0;
|
|
1752
1788
|
/* eslint-disable no-useless-constructor */
|
|
1753
1789
|
const inversify_1 = __webpack_require__(/*! inversify */ "inversify");
|
|
1790
|
+
const core_1 = __webpack_require__(/*! @messenger-box/core */ "@messenger-box/core");
|
|
1791
|
+
const file_info_core_1 = __webpack_require__(/*! @container-stack/file-info-core */ "@container-stack/file-info-core");
|
|
1754
1792
|
const base_service_1 = __webpack_require__(/*! ./base-service */ "./src/services/base-service.ts");
|
|
1755
1793
|
const constants_1 = __webpack_require__(/*! ../constants */ "./src/constants/index.ts");
|
|
1756
1794
|
let PostService = class PostService extends base_service_1.BaseService {
|
|
1757
|
-
constructor(repository) {
|
|
1795
|
+
constructor(repository, fileInfoService) {
|
|
1758
1796
|
super(repository);
|
|
1797
|
+
this.fileInfoService = fileInfoService;
|
|
1798
|
+
}
|
|
1799
|
+
createFileUploadLink(postId, filename, userId) {
|
|
1800
|
+
return this.fileInfoService.uploadByUrl({
|
|
1801
|
+
filename,
|
|
1802
|
+
refType: core_1.IFileRefType.Post,
|
|
1803
|
+
ref: postId,
|
|
1804
|
+
userId,
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
attachUploadedFile(postId, file, createdBy) {
|
|
1808
|
+
return this.fileInfoService.createUploadedFile(Object.assign(Object.assign({}, file), { refType: core_1.IFileRefType.Post, ref: postId, createdBy }));
|
|
1809
|
+
}
|
|
1810
|
+
deleteFile(url) {
|
|
1811
|
+
return this.fileInfoService.deleteByUrl(url);
|
|
1759
1812
|
}
|
|
1760
1813
|
};
|
|
1761
1814
|
PostService = __decorate([
|
|
1762
|
-
__param(0, inversify_1.inject(constants_1.TYPES.PostRepository))
|
|
1815
|
+
__param(0, inversify_1.inject(constants_1.TYPES.PostRepository)),
|
|
1816
|
+
__param(1, inversify_1.inject(file_info_core_1.TYPES.FileInfoService))
|
|
1763
1817
|
], PostService);
|
|
1764
1818
|
exports.PostService = PostService;
|
|
1765
1819
|
|
|
@@ -2057,11 +2111,14 @@ let PostProxyService = class PostProxyService extends base_proxy_service_1.BaseP
|
|
|
2057
2111
|
this.topic = core_2.IMoleculerTopics.PostService;
|
|
2058
2112
|
this.logger = logger.child({ className: 'PostProxyService' });
|
|
2059
2113
|
}
|
|
2060
|
-
|
|
2061
|
-
|
|
2114
|
+
attachUploadedFile(postId, file, createdBy) {
|
|
2115
|
+
return this.callAction(core_2.IPostServiceCommands.attachUploadedFile, { file, createdBy, postId });
|
|
2116
|
+
}
|
|
2117
|
+
createFileUploadLink(postId, filename, userId) {
|
|
2118
|
+
return this.callAction(core_2.IPostServiceCommands.createFileUploadLink, { filename, userId, postId });
|
|
2062
2119
|
}
|
|
2063
|
-
|
|
2064
|
-
|
|
2120
|
+
deleteFile(url) {
|
|
2121
|
+
return this.callAction(core_2.IPostServiceCommands.deleteFile, { url });
|
|
2065
2122
|
}
|
|
2066
2123
|
};
|
|
2067
2124
|
PostProxyService = __decorate([
|
|
@@ -2829,6 +2886,17 @@ module.exports = require("@common-stack/server-core");
|
|
|
2829
2886
|
|
|
2830
2887
|
/***/ }),
|
|
2831
2888
|
|
|
2889
|
+
/***/ "@container-stack/file-info-core":
|
|
2890
|
+
/*!**************************************************!*\
|
|
2891
|
+
!*** external "@container-stack/file-info-core" ***!
|
|
2892
|
+
\**************************************************/
|
|
2893
|
+
/*! no static exports found */
|
|
2894
|
+
/***/ (function(module, exports) {
|
|
2895
|
+
|
|
2896
|
+
module.exports = require("@container-stack/file-info-core");
|
|
2897
|
+
|
|
2898
|
+
/***/ }),
|
|
2899
|
+
|
|
2832
2900
|
/***/ "@messenger-box/core":
|
|
2833
2901
|
/*!**************************************!*\
|
|
2834
2902
|
!*** external "@messenger-box/core" ***!
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/config/config.ts","webpack:///./src/config/index.ts","webpack:///./src/constants/default-notify-props.ts","webpack:///./src/constants/index.ts","webpack:///./src/constants/query.constants.ts","webpack:///./src/constants/types.ts","webpack:///./src/containers/containers.ts","webpack:///./src/containers/context-services-from-container.ts","webpack:///./src/containers/index.ts","webpack:///./src/graphql/index.ts","webpack:///./src/graphql/resolvers/channel-member.ts","webpack:///./src/graphql/resolvers/channel.ts","webpack:///./src/graphql/resolvers/index.ts","webpack:///./src/graphql/resolvers/post-thread.ts","webpack:///./src/graphql/resolvers/post.ts","webpack:///./src/graphql/resolvers/reaction.ts","webpack:///./src/graphql/schema/base.graphql","webpack:///./src/graphql/schema/channel-member.graphql","webpack:///./src/graphql/schema/channel.graphql","webpack:///./src/graphql/schema/extended.graphql","webpack:///./src/graphql/schema/index.ts","webpack:///./src/graphql/schema/post-thread.graphql","webpack:///./src/graphql/schema/post.graphql","webpack:///./src/graphql/schema/preferences.graphql","webpack:///./src/graphql/schema/reaction.graphql","webpack:///./src/graphql/schema/users.graphql","webpack:///./src/index.ts","webpack:///./src/mixins/base-service-mixin.ts","webpack:///./src/mixins/index.ts","webpack:///./src/module.ts","webpack:///./src/plugins/channel-moleculer-service.ts","webpack:///./src/plugins/index.ts","webpack:///./src/plugins/post-moleculer-service.ts","webpack:///./src/plugins/post-thread-moleculer-service.ts","webpack:///./src/plugins/reaction-moleculer-service.ts","webpack:///./src/services/base-service.ts","webpack:///./src/services/channel-service.ts","webpack:///./src/services/index.ts","webpack:///./src/services/post-service.ts","webpack:///./src/services/post-thread-service.ts","webpack:///./src/services/proxy-services/base-proxy-service.ts","webpack:///./src/services/proxy-services/channel-microservice.ts","webpack:///./src/services/proxy-services/index.ts","webpack:///./src/services/proxy-services/post-microservice.ts","webpack:///./src/services/proxy-services/post-thread-microservice.ts","webpack:///./src/services/proxy-services/reaction-microservice.ts","webpack:///./src/services/reaction-service.ts","webpack:///./src/store/index.ts","webpack:///./src/store/models/channel.ts","webpack:///./src/store/models/common-options.ts","webpack:///./src/store/models/index.ts","webpack:///./src/store/models/post-thread.ts","webpack:///./src/store/models/post.ts","webpack:///./src/store/models/reaction.ts","webpack:///./src/store/repositories/base-repository.ts","webpack:///./src/store/repositories/channel-repository.ts","webpack:///./src/store/repositories/index.ts","webpack:///./src/store/repositories/post-repository.ts","webpack:///./src/store/repositories/post-thread-repository.ts","webpack:///./src/store/repositories/reaction-repository.ts","webpack:///external \"@adminide-stack/core\"","webpack:///external \"@adminide-stack/platform-server\"","webpack:///external \"@common-stack/core\"","webpack:///external \"@common-stack/server-core\"","webpack:///external \"@messenger-box/core\"","webpack:///external \"envalid\"","webpack:///external \"inversify\"","webpack:///external \"lodash\"","webpack:///external \"moleculer\"","webpack:///external \"mongoose\""],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClFA,4EAAmC;AAEnC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAEhB,cAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE;IAChD,SAAS,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,gCAAgC,EAAE,CAAC;IACzE,WAAW,EAAE,GAAG,EAAE;CACrB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;ACPH,qFAAyB;;;;;;;;;;;;;;;;ACAZ,4BAAoB,GAAG;IAChC,iBAAiB,EAAE,IAAI;IACvB,oBAAoB,EAAE,IAAI;IAC1B,cAAc,EAAE,IAAI;IACpB,eAAe,EAAE,IAAI;IACrB,+BAA+B,EAAE,IAAI;CACxC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;ACNF,sFAAwB;AACxB,0GAAkC;AAClC,oHAAuC;;;;;;;;;;;;;;;;ACFvC,IAAY,kBAGX;AAHD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;;ACAA,sD;;;;;;;;;;;ACAA,gD;;;;;;;;;;;ACAA,oC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,qC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import * as envalid from 'envalid';\n\nconst { str, num } = envalid;\n\nexport const config = envalid.cleanEnv(process.env, {\n FILES_TTL: num({ default: 3600, desc: 'TTL for files cache in Seconds' }),\n GRAPHQL_URL: str(),\n});\n","export * from './config';\n","export const DEFAULT_NOTIFY_PROPS = {\n desktopNotifyProp: true,\n markUnreadNotifyProp: true,\n pushNotifyProp: true,\n emailNotifyProp: true,\n ignoreChannelMentionsNotifyProp: true,\n};\n","export * from './types';\nexport * from './query.constants';\nexport * from './default-notify-props';\n","export enum PAGINATION_OPTIONS {\n limit = 10,\n skip = 0,\n}\n\nexport const DEFAULT_SORTING = {\n id: 'asc',\n};\n","export const TYPES = {\n BaseRepository: Symbol('BaseRepository'),\n BaseService: Symbol('BaseService'),\n\n ChannelRepository: Symbol('ChannelRepository'),\n PostRepository: Symbol('PostRepository'),\n PostThreadRepository: Symbol('PostThreadRepository'),\n ReactionRepository: Symbol('ReactionRepository'),\n\n ChannelService: Symbol('ChannelService'),\n PostService: Symbol('PostService'),\n PostThreadService: Symbol('PostThreadService'),\n ReactionService: Symbol('ReactionService'),\n};\n","import { ContainerModule, interfaces } from 'inversify';\nimport { TaggedType } from '@common-stack/core';\nimport { ChannelService, PostService, PostThreadService, ReactionService } from '../services';\nimport { TYPES } from '../constants';\nimport {\n IChannelRepository,\n IChannelService,\n IPostRepository,\n IPostService,\n IPostThreadRepository,\n IPostThreadService,\n IReactionRepository,\n IReactionService,\n} from '../interfaces';\nimport { ChannelRepository, PostRepository, PostThreadRepository, ReactionRepository } from '../store';\nimport {\n ChannelProxyService,\n PostProxyService,\n PostThreadMicroservice,\n ReactionMicroservice,\n} from '../services/proxy-services';\n\n/**\n * Local services and exposed micro services to serve remote connections.\n * Operates within in the Gateway.\n *\n * @param settings Settings\n */\nexport const proxyServiceContainerModule: (settings) => interfaces.ContainerModule = (settings) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind<IChannelService>(TYPES.ChannelService)\n .to(ChannelProxyService)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n\n bind<IPostService>(TYPES.PostService)\n .to(PostProxyService)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n bind<IPostThreadService>(TYPES.PostThreadService)\n .to(PostThreadMicroservice)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n\n bind<IReactionService>(TYPES.ReactionService)\n .to(ReactionMicroservice)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n });\n\n/**\n * Operates external to the Gateway. Usually a broker listen to calls and invoke this service\n * local to the micro container.\n *\n * @param settings Settings\n */\nexport const serviceContainerModule: (settings) => interfaces.ContainerModule = (settings) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind<IChannelRepository>(TYPES.ChannelRepository)\n .to(ChannelRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n bind<IPostRepository>(TYPES.PostRepository).to(PostRepository).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostThreadRepository>(TYPES.PostThreadRepository)\n .to(PostThreadRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IReactionRepository>(TYPES.ReactionRepository)\n .to(ReactionRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IChannelService>(TYPES.ChannelService).to(ChannelService).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostService>(TYPES.PostService).to(PostService).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostThreadService>(TYPES.PostThreadService)\n .to(PostThreadService)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IReactionService>(TYPES.ReactionService).to(ReactionService).inSingletonScope().whenTargetIsDefault();\n });\n","import { interfaces } from 'inversify';\nimport { TaggedType } from '@common-stack/core';\nimport { IChannelService, IPostService, IPostThreadService, IReactionService, IServices } from '../interfaces';\nimport { TYPES } from '../constants';\n\nexport const contextServicesFromContainer = (container: interfaces.Container): IServices => ({\n channelService: container.getNamed<IChannelService>(TYPES.ChannelService, TaggedType.MICROSERVICE),\n postService: container.getNamed<IPostService>(TYPES.PostService, TaggedType.MICROSERVICE),\n postThreadService: container.getNamed<IPostThreadService>(TYPES.PostThreadService, TaggedType.MICROSERVICE),\n reactionService: container.getNamed<IReactionService>(TYPES.ReactionService, TaggedType.MICROSERVICE),\n});\n","export * from './containers';\nexport * from './context-services-from-container';\n","export * from './schema';\nexport * from './resolvers';\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const channelMemberResolvers = (): IResolvers<IContext> => ({\n Query: {},\n Mutation: {},\n});\n","import { IChannel, IResolvers, IRoomType } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const channelResolvers = (): IResolvers<IContext> => ({\n Query: {\n channelByName(src, { name }, { channelService, userContext }) {\n return channelService.getByName(userContext.teamId, name) as Promise<IChannel>;\n },\n channels(src, _, { channelService, userContext }) {\n const { accountId, teamId } = userContext;\n return channelService.getChannels(teamId, accountId, false, new Date().getTime()) as Promise<IChannel[]>;\n },\n channelsByUser(src, _, { channelService, userContext }) {\n const { accountId } = userContext;\n return channelService.getAll({\n criteria: {\n creator: accountId,\n },\n }) as Promise<IChannel[]>;\n },\n directChannel(src, { id }, { channelService, userContext }) {\n return channelService.get({\n criteria: {\n id,\n user: userContext.accountId,\n type: IRoomType.DIRECT,\n },\n }) as Promise<IChannel>;\n },\n },\n Mutation: {\n createChannel(src, { name, description }, { channelService, userContext }) {\n const { accountId, teamId } = userContext;\n return channelService.saveChannel({\n type: IRoomType.CHANNEL,\n creator: accountId,\n title: name,\n topic: name,\n team: teamId,\n description,\n }) as Promise<IChannel>;\n },\n\n addMemberToChannel(src, { channelId, memberId }, { channelService, userContext }) {\n return channelService.addMemberToChannel(channelId, memberId) as Promise<IChannel>;\n },\n\n createDirectChannel(src, { receiver, displayName }, { channelService, userContext }) {\n const { accountId } = userContext;\n return channelService.createDirectChannel({\n sender: accountId,\n receiver,\n displayName,\n }) as Promise<IChannel>;\n },\n hideChannel(src, { id }, { channelService }) {\n return channelService.hideChannel(id);\n },\n leaveChannel(src, { id }, { channelService }) {\n return channelService.leaveChannel(id);\n },\n deleteChannel(src, { id }, { channelService }) {\n return channelService.deleteChannel(id) as Promise<boolean>;\n },\n },\n});\n","import { channelResolvers } from './channel';\nimport { channelMemberResolvers } from './channel-member';\nimport { postResolvers } from './post';\nimport { postThreadResolvers } from './post-thread';\nimport { reactionResolvers } from './reaction';\n\nexport const messengerResolvers = [\n channelResolvers,\n channelMemberResolvers,\n postResolvers,\n postThreadResolvers,\n reactionResolvers,\n];\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const postThreadResolvers = (): IResolvers<IContext> => ({\n Query: {},\n Mutation: {},\n});\n","import { generateUri, IClientCacheTypeNames, IConfigurationModel } from '@adminide-stack/core';\nimport { IFileInfo, IFileRefType, IFilesInfo, IResolvers, ISortEnum } from '@messenger-box/core';\nimport { GetAllArgs, IContext } from '../../interfaces';\n\nexport const postResolvers = (): IResolvers<IContext> => ({\n // Temporary fix, until we have extension support in base module\n FileInfo: {\n extension(src) {\n return src.mimeType.split('/')[1];\n },\n },\n Post: {\n editedBy(src, args, { accountService }) {\n return accountService.findAccountById(src.editedBy.toString());\n },\n deletedBy(src, args, { accountService }) {\n return accountService.findAccountById(src?.deletedBy.toString());\n },\n author(src, args, { accountService }) {\n const author = src.author?.toString();\n if (author) {\n return accountService.findAccountById(author);\n }\n return accountService.findAccountById(src.editedBy.toString());\n },\n channel(src, args, { channelService }) {\n return channelService.get(src.channel.toString());\n },\n propsConfiguration(src, args, { configurationService }) {\n const resource = generateUri('posts' as any, { _id: src.id }, 'props');\n let data = '{}';\n try {\n data = JSON.stringify(src.props);\n } catch (err) {\n console.log('---Errr---', err);\n }\n const machineModel = configurationService.parser(resource.toString(), data) as IConfigurationModel;\n return {\n resource,\n contents: machineModel.contents,\n overrides: machineModel.overrides,\n keys: machineModel.keys,\n __typename: IClientCacheTypeNames.MachineConfiguration,\n };\n },\n files(src, args: GetAllArgs<IFileInfo>, { fileInfoService }) {\n return fileInfoService.getAllWithCount({\n ...args,\n criteria: {\n ...args.criteria,\n refType: 'Post',\n ref: src.id,\n } as unknown,\n }) as unknown as IFilesInfo;\n },\n },\n Query: {\n async messages(src, { channelId, limit, skip }, { postService, userContext }) {\n const { data, totalCount } = await postService.getAllWithCount({\n criteria: {\n channel: channelId,\n },\n limit,\n skip,\n sort: {\n key: 'createdAt',\n value: ISortEnum.ASC,\n },\n });\n\n return {\n totalCount,\n data,\n };\n },\n },\n Mutation: {\n deleteMessage(src, { messageId }, { postService }) {\n const { channelId, messageId: id } = messageId;\n return postService.delete({\n channel: channelId,\n id,\n });\n },\n editMessage(src, { messageId, messageInput }, { postService, userContext }) {\n return postService.update(messageId.messageId, {\n message: messageInput.content,\n editedBy: userContext.accountId,\n channel: messageId.channelId,\n files: messageInput.files,\n } as any);\n },\n async sendMessage(src, { channelId, messageInput }, { postService, userContext, fileInfoService }) {\n const { content, files } = messageInput;\n const { accountId } = userContext;\n const postRes: any = await postService.create({\n channel: channelId as any,\n message: content,\n editedBy: accountId as any,\n author: accountId as any,\n files: [] as never,\n });\n const uploadedFiles: any = await Promise.all(\n files.map((file) =>\n fileInfoService.create({\n refType: IFileRefType.Post as never,\n file,\n createdBy: accountId,\n ref: postRes.id,\n }),\n ),\n );\n return postService.update(postRes.id, {\n files: uploadedFiles,\n } as any);\n },\n uploadFile(src, { files, postId }, { fileInfoService, userContext }) {\n const res = [];\n files.map((file) =>\n res.push(\n fileInfoService.create({\n refType: IFileRefType.Post as never,\n file,\n createdBy: userContext.accountId,\n ref: postId,\n }),\n ),\n );\n return res;\n },\n },\n});\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const reactionResolvers = (): IResolvers<IContext> => ({\n Query: {\n getPostReactions(src, { message }, { reactionService, userContext }) {\n return reactionService.getAll({\n criteria: {\n post: message,\n user: userContext.accountId,\n },\n });\n },\n },\n Mutation: {\n addReactionToMessage(src, { reaction }, { reactionService, userContext }) {\n return reactionService.create({\n ...reaction,\n user: userContext.accountId,\n });\n },\n updateReactionToMessage(src, { reaction, id }, { reactionService }) {\n return reactionService.update(id, { reaction });\n },\n removeReactionFromMessage(src, { id }, { reactionService }) {\n return reactionService.delete(id);\n },\n },\n});\n","export default \"interface IBaseRepo {\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\n\";","export default \"type ChannelMember {\\n id: ID!\\n user: String!\\n roles: String\\n msgCount: Int\\n mentionCount: Int\\n mentionCountRoot: Int\\n msgCountRoot: Int\\n notifyProps: AnyObject\\n explicitRoles: String\\n schemeAdmin: Boolean\\n lastViewedAt: Int\\n updatedAt: DateTime,\\n CreatedAt: DateTime,\\n}\\n\\ninput ChannelMemberInput {\\n userId: String!\\n roles: String\\n notifyProps: AnyObject\\n schemeGuest: Boolean\\n schemeUser: Boolean\\n schemeAdmin: Boolean\\n explicitRoles: String\\n}\\n\";","export default \"type Channel implements IBaseRepo {\\n id: String!\\n title: String\\n topic: String\\n purpose: String\\n description: String\\n displayName: String\\n team: AccountTeam\\n lastPostAt: DateTime\\n totalMsgCount: Int\\n totalMsgCountRoot: Int\\n creator: UserAccount\\n members: [ChannelMember]\\n type: String\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\ntype ChannelUnread {\\n teamId: String\\n channelId: String\\n msgCount: Int\\n mentionCount: Int\\n mentionCountRoot: Int\\n msgCountRoot: Int\\n notifyProps: AnyObject\\n}\\n\\n\\ninput ChannelFilterInput {\\n nameFilter: String\\n privacy: ChannelPrivacy\\n joinedChannels: Boolean\\n storyBy: ChannelSort\\n}\\n\\ninput ChannelNameAndDirect {\\n name: String!\\n direct: Boolean!\\n}\\n\\nenum ChannelSort {\\n NAME\\n NUMBER_OF_MESSAGES\\n}\\n\\nenum ChannelPrivacy {\\n PRIVATE\\n PUBLIC\\n ALL\\n}\\n\\nenum RoomType {\\n CHANNEL\\n DIRECT\\n GROUP\\n PRIVATE\\n VISITOR\\n}\\n\\nextend type Query {\\n channelByName(name: String!): Channel @addAccountContext @isAuthenticated\\n channels(filter: ChannelFilterInput = {\\n privacy: ALL,\\n joinedChannels: false,\\n sortyBy: NAME\\n }): [Channel] @addAccountContext @isAuthenticated\\n channelsByUser: [Channel] @addAccountContext @isAuthenticated\\n directChannel(id: ID!): Channel @addAccountContext @isAuthenticated\\n}\\n\\nextend type Mutation {\\n createChannel(\\n name: String!,\\n description:String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n addMemberToChannel(\\n channelId: String!,\\n memberId: String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n createDirectChannel(\\n receiver: [ID]!\\n displayName: String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n hideChannel(id: ID!): Boolean @isAuthenticated\\n\\n leaveChannel(id: ID!): Boolean @isAuthenticated\\n\\n deleteChannel(id: ID!): Boolean @isAuthenticated\\n}\\n\";","export default \"interface IFileRef{\\n id:ID!\\n}\\n\\nextend enum FileRefType{\\n Post\\n}\\n\";","import extended from './extended.graphql';\nimport baseSchema from './base.graphql';\nimport channelSchema from './channel.graphql';\nimport channelMember from './channel-member.graphql';\nimport postSchema from './post.graphql';\nimport postThread from './post-thread.graphql';\nimport preferencesSchema from './preferences.graphql';\nimport usersSchema from './users.graphql';\nimport reactionSchema from './reaction.graphql';\n\nconst schema = [\n extended,\n baseSchema,\n channelSchema,\n channelMember,\n postSchema,\n postThread,\n preferencesSchema,\n usersSchema,\n reactionSchema,\n].join('\\n');\n\nexport { schema };\n","export default \"type PostThread{\\n post: Post,\\n channel: Channel,\\n replyCount: Int,\\n lastReplyAt: DateTime,\\n participants:[UserAccount]\\n}\\n\";","export default \"type Post implements IBaseRepo & IFileRef {\\n id: ID!\\n author: UserAccount\\n channel: Channel\\n\\n rootId: String\\n parentId: String\\n originalId: String\\n\\n \\\"\\\"\\\" Post sent by server e.g. User joined channel \\\"\\\"\\\"\\n fromServer: Boolean\\n\\n message: String\\n type: String\\n props: AnyObject\\n hashTags: String\\n\\n filenames: [String]\\n fields: [String]\\n reactions: [Reaction]\\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\\n editedBy: UserAccount\\n deletedBy: UserAccount\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n\\n propsConfiguration: MachineConfiguration\\n}\\n\\ninput MessageInput {\\n content: String!\\n userRef: [String] #userId\\n channelRef: [String] #channelId\\n files: [Upload!]\\n}\\n\\ninput MessageIdentifier {\\n channelId: String!\\n messageId: String!\\n}\\n\\ntype PostsWithCursor {\\n cursor: String\\n channel: Channel\\n posts: [Post]\\n}\\n\\ntype Messages{\\n totalCount: Int,\\n data:[Post]\\n}\\n\\n\\nextend type Query {\\n messages(\\n channelId: ID,\\n # channelName: String,\\n # directTo: ID,\\n limit: Int,\\n skip: Int,\\n # searchRegex: String,\\n # excludeServer: Boolean\\n ): Messages! @isAuthenticated @addAccountContext\\n}\\n\\nextend type Mutation {\\n deleteMessage(messageId: MessageIdentifier!): Boolean @isAuthenticated\\n\\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\\n\\n sendMessage(channelId: String!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\\n\\n uploadFile( files: [Upload], postId:String!): [String] @isAuthenticated @addAccountContext\\n deleteFile(url: String!): Boolean @isAuthenticated @addAccountContext\\n}\\n\\nextend type Subscription {\\n chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\\n}\\n\";","export default \"\\n\\ntype ChannelSettings {\\n disableNotification: Boolean\\n audio: String\\n desktop: String\\n duration: Int\\n mobile: String\\n mail: String\\n hideUnreadRoomStatus : Boolean\\n unreadTrayIconAlret: String\\n}\\n\\nextend type Preference_Account {\\n language: String\\n notificationDuration: Float\\n unreadTrayIconAlert: Boolean\\n useEmojis: Boolean\\n convertAsciiToEmoji: Boolean\\n autoLoadImages: Boolean\\n saveMobileBandwith: Boolean\\n collapseEmbeddedMeida: Boolean\\n unreadRoomsMode: Boolean\\n hideUserName: Boolean\\n hideRoles: Boolean\\n hideRightSideBarWithClick: Boolean\\n hideAvatars: Boolean\\n mergePrivateGroupsWithChannels: Boolean\\n enterKeyBehaviour: String\\n viewMode: String\\n offlineEmailNotifications: String\\n highlights: String\\n newRoomNotificationSound: String\\n newMessageNotificationSound: String\\n email: String\\n avatar: String\\n name: String\\n}\\n\\nextend type Preferences {\\n channel: ChannelSettings\\n}\\n\";","export default \"type Reaction{\\n id:ID!\\n reaction:String!,\\n user: UserAccount!,\\n post: Post!\\n}\\n\\ninput ReactionInput{\\n reaction:String!,\\n post: String!\\n}\\n\\nextend type Query{\\n getPostReactions(message:ID!):[Reaction] @isAuthenticated\\n}\\nextend type Mutation{\\n addReactionToMessage(reaction:ReactionInput):Reaction @isAuthenticated @addAccountContext\\n updateReactionToMessage(id:ID!, reaction:String!):Reaction @isAuthenticated @addAccountContext\\n removeReactionFromMessage(id:ID!):Boolean @isAuthenticated @addAccountContext\\n}\\n\";","export default \"enum MessengerUserStatus {\\n ONLINE\\n AWAY\\n BUSY\\n INVISIBLE\\n}\\n\\ntype MessengerUser implements IUser {\\n id: ID!\\n username: String\\n email: String\\n status: MessengerUserStatus\\n avatar: String\\n name: String\\n lastLogin: String\\n channels: [Channel]\\n directMessages: [Channel]\\n}\\n\\nextend type Query{\\n usersToChat(auth0Id:String!):[UserAccount] @isAuthenticated @addAccountContext\\n currentUser(auth0Id:String!):UserAccount @isAuthenticated @addAccountContext\\n}\\n\";","/* eslint-disable import/no-extraneous-dependencies */\nimport { Feature } from '@common-stack/server-core';\nimport MessengerModule from './module';\n\nexport * from './constants';\nexport default new Feature(MessengerModule);\n","import { IBaseServiceCommands as BaseServiceCommands } from '@messenger-box/core';\nimport { Context, ServiceSchema } from 'moleculer';\nimport { Document, FilterQuery } from 'mongoose';\nimport { GetAllArgs, IBaseService } from '../interfaces';\n\nexport const BaseServiceMixin = <T, C, U>(service: IBaseService<T, C, U>): Partial<ServiceSchema> => ({\n name: 'BaseServiceMixin',\n actions: {\n [BaseServiceCommands.get]: {\n params: {\n id: 'string',\n },\n handler: async (ctx: Context<{ conditions: string | FilterQuery<Document<T>> }>) =>\n service.get(ctx.params.conditions as never),\n },\n [BaseServiceCommands.count]: {\n params: {\n condition: { type: 'object', optional: true },\n },\n handler: async (ctx: Context<{ conditions?: FilterQuery<Document<T>> }>) =>\n service.count(ctx.params.conditions),\n },\n [BaseServiceCommands.bulkCreate]: {\n params: {\n data: { type: 'array', items: 'object' },\n },\n handler: async (ctx: Context<{ data: never[] }>) => service.bulkCreate(ctx.params.data),\n },\n [BaseServiceCommands.create]: {\n params: {\n data: 'object',\n },\n handler: async (ctx: Context<{ data: never }>) => service.create(ctx.params.data),\n },\n [BaseServiceCommands.delete]: {\n params: {\n id: 'string',\n },\n handler: async (ctx: Context<{ id: string | FilterQuery<Document<T>> }>) =>\n service.delete(ctx.params.id as never),\n },\n [BaseServiceCommands.getAll]: {\n params: {\n options: 'object',\n },\n handler: async (ctx: Context<{ options: GetAllArgs<Document<T>> }>) => service.getAll(ctx.params.options),\n },\n [BaseServiceCommands.getAllWithCount]: {\n params: {\n options: 'object',\n },\n handler: async (ctx: Context<{ options: GetAllArgs<Document<T>> }>) =>\n service.getAllWithCount(ctx.params.options),\n },\n [BaseServiceCommands.insert]: {\n params: {\n data: 'object',\n overwrite: 'boolean|optional',\n },\n handler: async (ctx: Context<{ data: never & { id?: string }; overwrite: boolean }>) =>\n service.insert(ctx.params.data, ctx.params.overwrite),\n },\n [BaseServiceCommands.update]: {\n params: {\n id: 'string',\n data: 'object',\n overwrite: 'boolean|optional',\n },\n handler: async (ctx: Context<{ id: string; data: never; overwrite: boolean }>) =>\n service.update(ctx.params.id, ctx.params.data, ctx.params.overwrite),\n },\n },\n});\n","export { BaseServiceMixin } from './base-service-mixin';\n","import { Feature } from '@common-stack/server-core';\nimport { schema, messengerResolvers } from './graphql';\nimport { serviceContainerModule, proxyServiceContainerModule, contextServicesFromContainer } from './containers';\nimport { ChannelMoleculerService, PostMoleculerService, PostThreadMoleculerService, ReactionService } from './plugins';\n\nexport default new Feature({\n schema,\n addBrokerClientServiceClass: [\n ChannelMoleculerService,\n PostMoleculerService,\n PostThreadMoleculerService,\n ReactionService,\n ],\n createResolversFunc: messengerResolvers,\n createServiceFunc: contextServicesFromContainer,\n createContainerFunc: [proxyServiceContainerModule],\n createHemeraContainerFunc: [serviceContainerModule],\n addBrokerMainServiceClass: [],\n});\n","import { Context, Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport {\n IChannelServiceCommands as ChannelServiceCommands,\n IMoleculerTopics as MoleculerTopics,\n IUserAccount,\n Maybe,\n Scalars,\n} from '@messenger-box/core';\nimport { IChannelService, ISaveChannelParams, ISaveDirectChannelParams } from '../interfaces';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\n\nexport class ChannelMoleculerService extends Service {\n private channelService: IChannelService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.ChannelService;\n this.channelService = container.get<IChannelService>(TYPES.ChannelService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.channelService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {\n [ChannelServiceCommands.addMemberToChannel]: {\n handler: async (ctx: Context<{ channelId: string; memberId: string }>) =>\n this.channelService.addMemberToChannel(ctx.params.channelId, ctx.params.memberId),\n },\n [ChannelServiceCommands.createDirectChannel]: {\n handler: async (\n ctx: Context<{\n data: {\n receiver: Array<Maybe<Scalars['ID']>>;\n sender: string;\n displayName: string;\n };\n }>,\n ) => this.channelService.createDirectChannel(ctx.params.data),\n },\n [ChannelServiceCommands.deleteChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.deleteChannel(ctx.params.id),\n },\n [ChannelServiceCommands.hideChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.hideChannel(ctx.params.id),\n },\n [ChannelServiceCommands.getChannelCounts]: {\n handler: async (ctx: Context<{ teamId: string; userId: string }>) =>\n this.channelService.getChannelCounts(ctx.params.teamId, ctx.params.userId),\n },\n [ChannelServiceCommands.getByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getByNameIncludeDeleted]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getByNameIncludeDeleted(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getByNames]: {\n handler: async (ctx: Context<{ teamId: string; names: string[] }>) =>\n this.channelService.getByNames(ctx.params.teamId, ctx.params.names),\n },\n [ChannelServiceCommands.getChannels]: {\n handler: async (\n ctx: Context<{ teamId: string; userId: string; includeDeleted: boolean; lastDeleteAt: number }>,\n ) =>\n this.channelService.getChannels(\n ctx.params.teamId,\n ctx.params.userId,\n ctx.params.includeDeleted,\n ctx.params.lastDeleteAt,\n ),\n },\n [ChannelServiceCommands.getChannelUnread]: {\n handler: async (ctx: Context<{ channelId: string; userId: string }>) =>\n this.channelService.getChannelUnread(ctx.params.channelId, ctx.params.userId),\n },\n [ChannelServiceCommands.getDeleted]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number; userId: string }>) =>\n this.channelService.getDeleted(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ctx.params.userId,\n ),\n },\n [ChannelServiceCommands.getDeletedByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getDeletedByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.saveDirectChannel]: {\n handler: async (ctx: Context<{ channel: ISaveDirectChannelParams }>) =>\n this.channelService.saveDirectChannel(ctx.params.channel),\n },\n [ChannelServiceCommands.saveChannel]: {\n handler: async (ctx: Context<{ data: ISaveChannelParams }>) =>\n this.channelService.saveChannel(ctx.params.data),\n },\n [ChannelServiceCommands.invalidateChannelByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.invalidateChannelByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getPinnedPosts]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.getPinnedPosts(ctx.params.channelId),\n },\n [ChannelServiceCommands.getFromMaster]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.getFromMaster(ctx.params.id),\n },\n [ChannelServiceCommands.restore]: {\n handler: async (ctx: Context<{ channelId: string; time: Date }>) =>\n this.channelService.restore(ctx.params.channelId, ctx.params.time),\n },\n [ChannelServiceCommands.permanentDeleteByTeam]: {\n handler: async (ctx: Context<{ teamId: string }>) =>\n this.channelService.permanentDeleteByTeam(ctx.params.teamId),\n },\n [ChannelServiceCommands.permanentDelete]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.permanentDelete(ctx.params.channelId),\n },\n [ChannelServiceCommands.permanentDeleteMembersByChannel]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.permanentDeleteMembersByChannel(ctx.params.channelId),\n },\n [ChannelServiceCommands.getPrivateChannelsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number }>) =>\n this.channelService.getPrivateChannelsForTeam(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ),\n },\n [ChannelServiceCommands.getPublicChannelsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number }>) =>\n this.channelService.getPublicChannelsForTeam(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ),\n },\n [ChannelServiceCommands.getPublicChannelsByIdsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; channelsIds: string[] }>) =>\n this.channelService.getPublicChannelsByIdsForTeam(ctx.params.teamId, ctx.params.channelsIds),\n },\n [ChannelServiceCommands.getTeamChannels]: {\n handler: async (ctx: Context<{ teamId: string }>) =>\n this.channelService.getTeamChannels(ctx.params.teamId),\n },\n [ChannelServiceCommands.saveMultipleMembers]: {\n handler: async (ctx: Context<{ members: IUserAccount[] }>) =>\n this.channelService.saveMultipleMembers(ctx.params.members),\n },\n [ChannelServiceCommands.leaveChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.leaveChannel(ctx.params.id),\n },\n [ChannelServiceCommands.deleteChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.deleteChannel(ctx.params.id),\n },\n },\n });\n }\n}\n","export * from './channel-moleculer-service';\nexport * from './post-moleculer-service';\nexport * from './post-thread-moleculer-service';\nexport * from './reaction-moleculer-service';\n","import { Context, Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\nimport { IPostService } from '../interfaces';\n\nexport class PostMoleculerService extends Service {\n private postService: IPostService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.PostService;\n this.postService = container.get<IPostService>(TYPES.PostService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.postService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {},\n });\n }\n}\n","import { Context, Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\nimport { IPostThreadService } from '../interfaces';\n\nexport class PostThreadMoleculerService extends Service {\n private postThreadService: IPostThreadService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.ChannelService;\n this.postThreadService = container.get<IPostThreadService>(TYPES.PostThreadService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.postThreadService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {},\n });\n }\n}\n","import { Context, Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\nimport { IReactionService } from '../interfaces';\n\nexport class ReactionService extends Service {\n private reactionService: IReactionService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.ReactionService;\n this.postService = container.get<IReactionService>(TYPES.ReactionService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.reactionService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {},\n });\n }\n}\n","import { Document, FilterQuery } from 'mongoose';\nimport { injectable } from 'inversify';\nimport { GetAllArgs, IBaseRepository, IBaseService } from '../interfaces';\n\n@injectable()\nexport class BaseService<T, C = T, U = T> implements IBaseService<T, C, U> {\n constructor(protected repository: IBaseRepository<T>) {\n this.repository = repository;\n }\n\n async getAllWithCount(options: GetAllArgs<Document<T>>): Promise<{ data: T[]; totalCount: number }> {\n const totalCount = await this.count(options.criteria);\n const data = await this.getAll(options);\n return {\n totalCount,\n data,\n };\n }\n\n count(conditions?: FilterQuery<Document<T>>): Promise<number> {\n return this.repository.count(conditions);\n }\n\n get(conditions: string | FilterQuery<Document<T>>): Promise<T> {\n if (typeof conditions === 'string') {\n return this.repository.get({ id: conditions });\n }\n return this.repository.get(conditions);\n }\n\n getName(name: string): Promise<T> {\n return this.repository.get({ name });\n }\n\n getAll(options: GetAllArgs<Document<T>>): Promise<T[]> {\n return this.repository.getAll(options);\n }\n\n create(data: C): Promise<T> {\n return this.repository.create<C>(data);\n }\n\n bulkCreate(data: C[]): Promise<T[]> {\n return this.repository.bulkCreate<C>(data);\n }\n\n async update(id: string, data: U, overwrite = true): Promise<T> {\n return this.repository.update<U>({ id }, data, { overwrite });\n }\n\n insert(data: (C | U) & { id?: string }, overwrite = true): Promise<T> {\n const { id, ...rest } = data;\n if (id) {\n const existing = this.repository.get({ id });\n if (existing) {\n return this.update(id, rest as U, overwrite);\n }\n }\n return this.create(rest as C);\n }\n\n delete(id: string | FilterQuery<Document<T>>): Promise<boolean> {\n if (typeof id === 'string') {\n return this.repository.delete({ id });\n }\n return this.repository.delete(id);\n }\n}\n","import { inject } from 'inversify';\nimport { IChannel, IChannelUnread, IPost, IRoomType, ISortEnum, IUserAccount } from '@messenger-box/core';\nimport { BaseService } from './base-service';\nimport { DEFAULT_NOTIFY_PROPS, TYPES } from '../constants';\nimport {\n IChannelRepository,\n IChannelService,\n ICreateDirectChannelParams,\n INotificationProps,\n IPostService,\n ISaveChannelParams,\n ISaveDirectChannelParams,\n} from '../interfaces';\n\nexport class ChannelService extends BaseService<IChannel, Omit<IChannel, 'id'>> implements IChannelService {\n constructor(\n @inject(TYPES.ChannelRepository)\n readonly repository: IChannelRepository,\n @inject(TYPES.PostService)\n private readonly postService: IPostService,\n ) {\n super(repository);\n }\n\n private static getDmNameFromIds(senderId: string, receiverId: string) {\n return `${senderId}__${receiverId}`;\n }\n\n private static get defaultNotifyProps(): INotificationProps {\n // #Todo: To be moved to settings\n return DEFAULT_NOTIFY_PROPS;\n }\n\n private static getMaxChannelsPerTeam(teamId: string): Promise<number> {\n // #Todo: Get Max Channel per team from Team settings\n return Promise.resolve(10);\n }\n\n private async getCurrentChannelCountPerTeam(team: string): Promise<number> {\n return this.repository.count({\n team,\n type: IRoomType.CHANNEL,\n });\n }\n\n async createDirectChannel(data: ICreateDirectChannelParams): Promise<IChannel | Error> {\n const { sender, receiver, displayName } = data;\n const chlMember = [\n {\n user: sender,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n },\n ];\n receiver.forEach((re) => {\n chlMember.push({\n user: re,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n });\n });\n const channelPayload: ISaveDirectChannelParams = {\n title: sender.split('').reverse().join(''),\n type: IRoomType.DIRECT,\n creator: sender,\n members: chlMember,\n displayName,\n };\n return this.saveDirectChannel(channelPayload);\n }\n\n async saveDirectChannel(channel: ISaveDirectChannelParams): Promise<IChannel | Error> {\n const { type, deletedAt } = channel;\n if (deletedAt) {\n return new Error('Deleted Channel can not be saved');\n }\n if (type !== IRoomType.DIRECT) {\n return new Error('Only direct channels are allowed');\n }\n return this.repository.create(channel);\n }\n\n async addMemberToChannel(channelId, memberId): Promise<IChannel | Error> {\n // const { channelId, memberId } = data;\n // console.log('==============================', channelId);\n const resData = await this.repository\n .get({ id: channelId })\n .then(async (res) => {\n const mebs = res.members;\n mebs.push({\n id: '',\n user: memberId,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n });\n const objToUpdate = res;\n objToUpdate.members = mebs;\n const finalResult = await this.repository\n .update({ id: channelId }, objToUpdate, { overwrite: true })\n .then((response) => response)\n .catch((error) => error);\n return finalResult;\n })\n .catch((err) => err);\n return resData;\n }\n\n async saveChannel(data: ISaveChannelParams): Promise<IChannel | Error> {\n const { type, team, creator } = data;\n if (type !== IRoomType.CHANNEL) {\n return new Error('Invalid Channel Type');\n }\n const maxChannels = await ChannelService.getMaxChannelsPerTeam(team);\n const currentChannels = await this.getCurrentChannelCountPerTeam(team);\n const canAddNewChannel = currentChannels < maxChannels;\n if (!canAddNewChannel) {\n return Error(`Only max of ${maxChannels} allowed`);\n }\n const channelPayload = {\n ...data,\n members: [\n {\n user: creator,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n },\n ],\n };\n return this.repository.create(channelPayload);\n }\n\n async getChannelUnread(channelId: string, userId: string): Promise<IChannelUnread | Error> {\n const channel: IChannel = await this.repository.get({\n id: channelId,\n members: { user: userId },\n });\n const { members, team, id } = channel;\n const member = members.find((i) => i.user === userId);\n const msgCount = channel.totalMsgCount - member.msgCount;\n const msgCountRoot = channel.totalMsgCountRoot - member.msgCountRoot;\n const { notifyProps, mentionCountRoot, mentionCount } = member;\n\n return {\n channelId: id,\n teamId: team.toString(),\n msgCount,\n msgCountRoot,\n mentionCount,\n notifyProps,\n mentionCountRoot,\n };\n }\n\n async getPinnedPosts(channelId: string): Promise<IPost[] | Error> {\n const posts = await this.postService.getAll({\n criteria: {\n channelId,\n isPinned: true,\n },\n sort: {\n key: 'CreatAt',\n value: ISortEnum.ASC,\n },\n });\n const replyCounts = await Promise.all(\n posts.map((post) => this.postService.count({ rootId: post.rootId || post.id })),\n );\n return posts.reduce((acc, curr, index) => [...acc, { ...curr, replyCount: replyCounts[index] }], []);\n }\n\n restore(channelId: string, time: Date): Promise<IChannel> {\n return this.repository.update(\n { id: channelId },\n {\n deletedAt: time,\n },\n );\n }\n\n getByName(team: string, title: string): Promise<IChannel | Error> {\n return this.get({\n team,\n title,\n });\n }\n\n getByNameIncludeDeleted(team: string, title: string): Promise<IChannel | Error> {\n return this.get({\n team,\n title,\n deletedAt: true,\n });\n }\n\n getByNames(team: string, titles: string[]): Promise<IChannel[] | Error> {\n return this.getAll({\n criteria: {\n team,\n title: { $in: titles },\n },\n });\n }\n\n getChannelCounts(team: string, user: string): Promise<any> {\n return this.count({\n team,\n members: { user },\n });\n }\n\n getChannels(\n team: string,\n user: string,\n includeDeleted: boolean,\n lastDeleteAt: number,\n ): Promise<IChannel[] | Error> {\n return this.repository.getAll({\n // criteria: {\n // team,\n // members: { user },\n // },\n });\n }\n\n deleteChannel(id: string): Promise<boolean | Error> {\n return this.repository.delete({ id });\n }\n\n getDeleted(teamId: string, offset: number, limit: number, userId: string): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getDeletedByName(teamId: string, name: string): Promise<IChannel | Error> {\n return Promise.resolve(undefined);\n }\n\n getFromMaster(id: string): Promise<IChannel | Error> {\n return Promise.resolve(undefined);\n }\n\n getMoreChannels(teamId: string, userId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPrivateChannelsForTeam(teamId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPublicChannelsByIdsForTeam(teamId: string, channelsIds: string[]): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPublicChannelsForTeam(teamId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getTeamChannels(teamId: string): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n hideChannel(id: string): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n invalidateChannelByName(teamId: string, name: string): Promise<void> {\n return Promise.resolve();\n }\n\n leaveChannel(id: string): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n permanentDelete(channelId: string): void | Error {\n return undefined;\n }\n\n permanentDeleteByTeam(teamId: string): void | Error {\n return undefined;\n }\n\n permanentDeleteMembersByChannel(channelId: string): void | Error {\n return undefined;\n }\n\n saveMultipleMembers(members: IUserAccount[]): Promise<IUserAccount[] | Error> {\n return Promise.resolve(undefined);\n }\n}\n","export * from './channel-service';\nexport * from './post-service';\nexport * from './post-thread-service';\nexport * from './reaction-service';\nexport * from './base-service';\n","/* eslint-disable no-useless-constructor */\nimport { inject } from 'inversify';\nimport { IPost } from '@messenger-box/core';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { PostRepository } from '../store';\nimport { IPostService } from '../interfaces';\n\nexport class PostService extends BaseService<IPost, Omit<IPost, 'id'>> implements IPostService {\n constructor(\n @inject(TYPES.PostRepository)\n repository: PostRepository,\n ) {\n super(repository);\n }\n}\n","import { IPostThread } from '@messenger-box/core';\nimport { injectable, inject } from 'inversify';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { IPostThreadRepository, IPostThreadService } from '../interfaces';\n\n@injectable()\nexport class PostThreadService extends BaseService<IPostThread> implements IPostThreadService {\n constructor(\n @inject(TYPES.PostThreadRepository)\n readonly repository: IPostThreadRepository,\n ) {\n super(repository);\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport { FilterQuery } from 'mongoose';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IBaseServiceCommands as BaseServiceCommands, IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { GetAllArgs, IBaseService } from '../../interfaces';\n\ntype MethodsNames<T, C, U> = keyof IBaseService<T, C, U>;\ntype MethodResponse<T, C, U, M extends MethodsNames<T, C, U>> = ReturnType<IBaseService<T, C, U>[M]>;\n\n@injectable()\nexport class BaseProxyService<T, C = T, U = T> implements IBaseService<T, C, U> {\n protected logger: Logger;\n\n protected topic = MoleculerTopics.BaseService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n private readonly broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n this.logger = logger.child({ className: 'BaseProxyService' });\n }\n\n bulkCreate(data: C[]): MethodResponse<T, C, U, 'bulkCreate'> {\n return this.callAction<T[], { data: C[] }>(BaseServiceCommands.bulkCreate, { data });\n }\n\n count(conditions?: FilterQuery<Document>): MethodResponse<T, C, U, 'count'> {\n return this.callAction(BaseServiceCommands.count, { conditions });\n }\n\n create(data: C): MethodResponse<T, C, U, 'create'> {\n return this.callAction(BaseServiceCommands.create, { data });\n }\n\n delete(id: string | FilterQuery<Document>): MethodResponse<T, C, U, 'delete'> {\n return this.callAction(BaseServiceCommands.delete, { id });\n }\n\n get(id?: string | FilterQuery<Document>): MethodResponse<T, C, U, 'get'> {\n return this.callAction(BaseServiceCommands.get, { id });\n }\n\n getAll(options?: GetAllArgs<Document>): MethodResponse<T, C, U, 'getAll'> {\n return this.callAction(BaseServiceCommands.getAll, { options });\n }\n\n getAllWithCount(options: GetAllArgs<Document>): MethodResponse<T, C, U, 'getAllWithCount'> {\n return this.callAction(BaseServiceCommands.getAllWithCount, { options });\n }\n\n insert(data: C | U, overwrite?: boolean): MethodResponse<T, C, U, 'insert'> {\n return this.callAction(BaseServiceCommands.insert, { data, overwrite });\n }\n\n update(id: string, data: U, overwrite?: boolean): MethodResponse<T, C, U, 'update'> {\n return this.callAction<T>(BaseServiceCommands.update, { id, data, overwrite });\n }\n\n protected async callAction<T, P = unknown>(command: string, params?: P): Promise<T> {\n return this.broker.call<T, P>(`${this.topic}.${command}`, params);\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport {\n IChannel,\n IChannelServiceCommands as ChannelServiceCommands,\n IMoleculerTopics as MoleculerTopics,\n IUserAccount,\n Maybe,\n Scalars,\n} from '@messenger-box/core';\nimport { IChannelService, ISaveChannelParams, ISaveDirectChannelParams } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\ntype MethodsNames = keyof IChannelService;\ntype MethodResponse<T extends MethodsNames> = ReturnType<IChannelService[T]>;\n\n@injectable()\nexport class ChannelProxyService extends BaseProxyService<IChannel, Omit<IChannel, 'id'>> implements IChannelService {\n topic = MoleculerTopics.ChannelService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'ChannelProxyService' });\n }\n\n addMemberToChannel(channelId: string, memberId: string): MethodResponse<'addMemberToChannel'> {\n return this.callAction(ChannelServiceCommands.addMemberToChannel, { channelId, memberId });\n }\n\n createDirectChannel(data: {\n receiver: Array<Maybe<Scalars['ID']>>;\n sender: string;\n displayName: string;\n }): MethodResponse<'createDirectChannel'> {\n return this.callAction(ChannelServiceCommands.createDirectChannel, { data });\n }\n\n deleteChannel(id: string): MethodResponse<'deleteChannel'> {\n return this.callAction(ChannelServiceCommands.deleteChannel, { id });\n }\n\n getByName(teamId: string, name: string): MethodResponse<'getByName'> {\n return this.callAction(ChannelServiceCommands.getByName, { teamId, name });\n }\n\n getByNameIncludeDeleted(teamId: string, name: string): MethodResponse<'getByNameIncludeDeleted'> {\n return this.callAction(ChannelServiceCommands.getByNameIncludeDeleted, { teamId, name });\n }\n\n getByNames(teamId: string, names: string[]): MethodResponse<'getByNames'> {\n return this.callAction(ChannelServiceCommands.getByNames, { teamId, names });\n }\n\n getChannelCounts(teamId: string, userId: string): MethodResponse<'getChannelCounts'> {\n return this.callAction(ChannelServiceCommands.getChannelCounts, { teamId, userId });\n }\n\n getChannelUnread(channelId: string, userId: string): MethodResponse<'getChannelUnread'> {\n return this.callAction(ChannelServiceCommands.getChannelUnread, { channelId, userId });\n }\n\n getChannels(\n teamId: string,\n userId: string,\n includeDeleted: boolean,\n lastDeleteAt: number,\n ): MethodResponse<'getChannels'> {\n return this.callAction(ChannelServiceCommands.getChannels, { teamId, userId, includeDeleted, lastDeleteAt });\n }\n\n getDeleted(teamId: string, offset: number, limit: number, userId: string): MethodResponse<'getDeleted'> {\n return this.callAction(ChannelServiceCommands.getDeleted, { teamId, offset, limit, userId });\n }\n\n getDeletedByName(teamId: string, name: string): MethodResponse<'getDeletedByName'> {\n return this.callAction(ChannelServiceCommands.getDeletedByName, { teamId, name });\n }\n\n getFromMaster(id: string): MethodResponse<'getFromMaster'> {\n return this.callAction(ChannelServiceCommands.getFromMaster, { id });\n }\n\n getMoreChannels(teamId: string, userId: string, offset: number, limit: number): MethodResponse<'getMoreChannels'> {\n return this.callAction(ChannelServiceCommands.getMoreChannels, { teamId, userId, offset, limit });\n }\n\n getPinnedPosts(channelId: string): MethodResponse<'getPinnedPosts'> {\n return this.callAction(ChannelServiceCommands.getPinnedPosts, { channelId });\n }\n\n getPrivateChannelsForTeam(\n teamId: string,\n offset: number,\n limit: number,\n ): MethodResponse<'getPrivateChannelsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPrivateChannelsForTeam, { teamId, offset, limit });\n }\n\n getPublicChannelsByIdsForTeam(\n teamId: string,\n channelsIds: string[],\n ): MethodResponse<'getPublicChannelsByIdsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPublicChannelsByIdsForTeam, { teamId, channelsIds });\n }\n\n getPublicChannelsForTeam(\n teamId: string,\n offset: number,\n limit: number,\n ): MethodResponse<'getPublicChannelsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPublicChannelsForTeam, { teamId, offset, limit });\n }\n\n getTeamChannels(teamId: string): MethodResponse<'getTeamChannels'> {\n return this.callAction(ChannelServiceCommands.getTeamChannels, { teamId });\n }\n\n hideChannel(id: string): MethodResponse<'hideChannel'> {\n return this.callAction(ChannelServiceCommands.hideChannel, { id });\n }\n\n invalidateChannelByName(teamId: string, name: string): MethodResponse<'invalidateChannelByName'> {\n return this.callAction(ChannelServiceCommands.invalidateChannelByName, { teamId, name });\n }\n\n leaveChannel(id: string): MethodResponse<'leaveChannel'> {\n return this.callAction(ChannelServiceCommands.leaveChannel, { id });\n }\n\n permanentDelete(channelId: string): MethodResponse<'permanentDelete'> {\n this.callAction(ChannelServiceCommands.permanentDelete, { channelId });\n }\n\n permanentDeleteByTeam(teamId: string): MethodResponse<'permanentDeleteByTeam'> {\n this.callAction(ChannelServiceCommands.permanentDeleteByTeam, { teamId });\n }\n\n permanentDeleteMembersByChannel(channelId: string): MethodResponse<'permanentDeleteMembersByChannel'> {\n this.callAction(ChannelServiceCommands.permanentDeleteMembersByChannel, { channelId });\n }\n\n restore(channelId: string, time: Date): MethodResponse<'restore'> {\n return this.callAction(ChannelServiceCommands.restore, { channelId, time });\n }\n\n saveChannel(data: ISaveChannelParams): MethodResponse<'saveChannel'> {\n return this.callAction(ChannelServiceCommands.saveChannel, { data });\n }\n\n saveDirectChannel(channel: ISaveDirectChannelParams): MethodResponse<'saveDirectChannel'> {\n return this.callAction(ChannelServiceCommands.saveDirectChannel, { channel });\n }\n\n saveMultipleMembers(members: IUserAccount[]): MethodResponse<'saveMultipleMembers'> {\n return this.callAction(ChannelServiceCommands.saveMultipleMembers, { members });\n }\n}\n","export * from './channel-microservice';\nexport * from './post-thread-microservice';\nexport * from './post-microservice';\nexport * from './reaction-microservice';\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IMoleculerTopics as MoleculerTopics, IPost } from '@messenger-box/core';\nimport { IPostService } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class PostProxyService extends BaseProxyService<IPost, Omit<IPost, 'id'>> implements IPostService {\n topic = MoleculerTopics.PostService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'PostProxyService' });\n }\n\n uploadImg(file: any, userId: string, postId: string): Promise<string> {\n throw new Error('Method not implemented.');\n }\n\n createPost(channelId: any, messageInput: any, userContext: any): Promise<IPost> {\n throw new Error('Method not implemented.');\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IMoleculerTopics as MoleculerTopics, IPostThread } from '@messenger-box/core';\nimport { IPostThreadService } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class PostThreadMicroservice\n extends BaseProxyService<IPostThread, Omit<IPostThread, 'id'>>\n implements IPostThreadService\n{\n topic = MoleculerTopics.PostThreadService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'PostThreadMicroservice' });\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IMoleculerTopics as MoleculerTopics, IReaction, IReactionInput } from '@messenger-box/core';\nimport { IReactionService, IReactionServiceInput } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class ReactionMicroservice\n extends BaseProxyService<IReaction, IReactionServiceInput, Partial<IReactionInput>>\n implements IReactionService\n{\n topic = MoleculerTopics.ReactionService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'ReactionMicroservice' });\n }\n}\n","import { IReaction, IReactionInput } from '@messenger-box/core';\nimport { inject, injectable } from 'inversify';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { IReactionRepository, IReactionService, IReactionServiceInput } from '../interfaces';\n\n@injectable()\nexport class ReactionService\n extends BaseService<IReaction, IReactionServiceInput, Partial<IReactionInput>>\n implements IReactionService\n{\n constructor(\n @inject(TYPES.ReactionRepository)\n readonly reactionRepository: IReactionRepository,\n ) {\n super(reactionRepository);\n }\n}\n","export * from './repositories';\n","import { Connection, Document, Model, Schema } from 'mongoose';\nimport { IChannel, IRoomType } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IChannelModel = Document<IChannel>;\n\nconst channelModelSchema = new Schema(\n {\n type: {\n type: Schema.Types.String,\n enum: [IRoomType.CHANNEL, IRoomType.DIRECT, IRoomType.GROUP, IRoomType.PRIVATE, IRoomType.VISITOR],\n required: true,\n },\n members: [\n new Schema(\n {\n user: { type: Schema.Types.ObjectId, ref: 'accounts' },\n roles: { type: Schema.Types.String },\n msgCount: { type: Schema.Types.Number },\n mentionCount: { type: Schema.Types.Number },\n mentionCountRoot: { type: Schema.Types.Number },\n msgCountRoot: { type: Schema.Types.Number },\n notifyProps: { type: Schema.Types.Mixed },\n explicitRoles: { type: Schema.Types.String },\n schemeAdmin: { type: Schema.Types.String },\n lastViewedAt: { type: Schema.Types.Date },\n deletedAt: { type: Schema.Types.Date },\n },\n commonModeSchemaOptions,\n ),\n ],\n deletedAt: { type: Schema.Types.Date },\n lastPostAt: { type: Schema.Types.Date },\n totalMsgCount: { type: Schema.Types.Number },\n totalMsgCountRoot: { type: Schema.Types.Number },\n team: { type: Schema.Types.ObjectId, ref: 'team' },\n title: { type: Schema.Types.String },\n displayName: { type: Schema.Types.String },\n description: { type: Schema.Types.String },\n purpose: { type: Schema.Types.String },\n creator: { type: Schema.Types.ObjectId, ref: 'accounts' },\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(channelModelSchema);\n\nexport type ChannelModelType = Model<IChannelModel>;\nexport const ChannelModelFunc: (db: Connection) => ChannelModelType = (db) =>\n db.model<IChannelModel>('channel', channelModelSchema);\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { Schema } from 'mongoose';\n\nexport const commonModeSchemaOptions = {\n timestamps: true,\n toJSON: {\n virtuals: true,\n },\n toObject: {\n virtuals: true,\n getters: true,\n transform(doc, ret) {\n delete ret.__v;\n delete ret._id;\n },\n },\n};\n\nexport const addIdVirtualFields = (schema: Schema) => {\n schema.set('toJSON', {\n virtuals: true,\n });\n return schema;\n};\n","export * from './channel';\nexport * from './post';\nexport * from './post-thread';\nexport * from './reaction';\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IPostThread } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IThreadsModel = Document<IPostThread>;\n\nconst postThreadModelSchema = new Schema(\n {\n post: { type: Schema.Types.ObjectId, ref: 'posts' },\n channel: { type: Schema.Types.ObjectId, ref: 'channels' },\n replyCount: { type: Schema.Types.Number },\n lastReplyAt: { type: Schema.Types.Date },\n participants: [{ type: Schema.Types.ObjectId, ref: 'accounts' }],\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(postThreadModelSchema);\n\nexport type PostThreadModelType = Model<IThreadsModel>;\nexport const PostThreadModelFunc: (db: Connection) => PostThreadModelType = (db) =>\n db.model<IThreadsModel>('post-threads', postThreadModelSchema);\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IPost } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IPostModel = Document<IPost>;\n\nconst postModelSchema = new Schema(\n {\n createdAt: { type: Schema.Types.Date },\n editedAt: { type: Schema.Types.Date },\n deletedAt: { type: Schema.Types.Date },\n editedBy: { type: Schema.Types.ObjectId, ref: 'accounts' },\n deletedBy: { type: Schema.Types.ObjectId, ref: 'accounts' },\n channel: { type: Schema.Types.ObjectId, ref: 'channels' },\n rootId: { type: Schema.Types.String },\n parentId: { type: Schema.Types.String },\n originalId: { type: Schema.Types.String },\n message: { type: Schema.Types.String },\n type: { type: Schema.Types.String },\n props: { type: Schema.Types.Mixed },\n hashtags: { type: Schema.Types.Mixed },\n filenames: { type: Schema.Types.Mixed },\n fields: { type: Schema.Types.String },\n files: [{ type: Schema.Types.ObjectId }],\n hasReactions: { type: Schema.Types.Boolean },\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(postModelSchema);\n\nexport type PostModelType = Model<IPostModel>;\nexport const PostModelFunc: (db: Connection) => PostModelType = (db) => db.model<IPostModel>('posts', postModelSchema);\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IReaction } from '@messenger-box/core';\nimport { addIdVirtualFields } from './common-options';\n\nexport type IReactionModel = Document<IReaction>;\n\nconst reactionModelSchema = new Schema({\n createdAt: { type: Schema.Types.Date },\n reaction: { type: Schema.Types.String },\n user: { type: Schema.Types.ObjectId, ref: 'accounts' },\n post: { type: Schema.Types.ObjectId, ref: 'posts' },\n});\n\naddIdVirtualFields(reactionModelSchema);\n\nexport type ReactionModelType = Model<IReactionModel>;\nexport const ReactionModelFunc: (db: Connection) => ReactionModelType = (db) =>\n db.model<IReactionModel>('reactions', reactionModelSchema);\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { mergeWith, isObject } from 'lodash';\nimport { logger as Logger } from '@cdm-logger/server';\n// eslint-disable-next-line import/no-unresolved\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { Connection, Document, FilterQuery, Model } from 'mongoose';\nimport { injectable, unmanaged } from 'inversify';\nimport { GetAllArgs, IBaseRepository } from '../../interfaces';\nimport { DEFAULT_SORTING, PAGINATION_OPTIONS } from '../../constants';\n\n@injectable()\nexport class BaseRepository<T, D = Document<T>> implements IBaseRepository<T, D> {\n private options: IMongoOptions;\n\n private logger: typeof Logger;\n\n private model: Model<D>;\n\n constructor(\n @unmanaged()\n modelFunc: (db: Connection) => Model<D>,\n @unmanaged()\n db: Connection,\n @unmanaged()\n logger: typeof Logger,\n @unmanaged()\n options?: IMongoOptions,\n ) {\n this.model = modelFunc(db);\n this.options = options;\n this.logger = logger.child({ className: BaseRepository.name });\n }\n\n public async getAll(options: GetAllArgs<D>): Promise<T[]> {\n try {\n const { criteria, selectedFields, sort, limit, skip } = options;\n // map id to mongoose _id\n const { id, ...rest } = criteria || { id: undefined };\n const response = await this.model\n .find({ ...rest, ...(id ? { _id: id } : {}) }, selectedFields)\n .limit(limit || PAGINATION_OPTIONS.limit)\n .skip(skip || PAGINATION_OPTIONS.skip)\n .sort(isObject(sort) ? { [sort?.key]: sort.value } : DEFAULT_SORTING)\n .exec();\n return response.map((i) => i?.toObject()) as T[];\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(options)}`);\n throw e;\n }\n }\n\n public async count(conditions?: FilterQuery<D>): Promise<number> {\n return this.model.count(conditions).exec();\n }\n\n public async get(conditions?: FilterQuery<D>, selectedFields?: string): Promise<T> {\n try {\n const response = await this.model.findOne(this.mapConditions(conditions), selectedFields).exec();\n return response?.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(conditions)}`);\n throw e;\n }\n }\n\n public async find(conditions: Partial<FilterQuery<D>>, selectedFields?: string): Promise<T> {\n try {\n const response = await this.model.findOne(this.mapConditions(conditions), selectedFields).exec();\n return response?.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(conditions)}`);\n throw e;\n }\n }\n\n public async create<I>(data: I): Promise<T> {\n try {\n const response = await this.model.create(data);\n return response.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to create Model with data ${JSON.stringify(data)} due to ${e?.message}`);\n throw e;\n }\n }\n\n public async bulkCreate<I>(data: I[]): Promise<T[]> {\n try {\n const response = await this.model.insertMany(data, {\n lean: true,\n ordered: true,\n });\n return response as unknown as T[];\n } catch (e) {\n this.logger.error(`Unable to bulk create due to error`, e.message);\n }\n }\n\n public async upsert<I>(conditions: FilterQuery<D>, update: I, options?: Record<string, unknown>): Promise<T> {\n return this.update<I>(conditions, update, {\n upsert: true,\n ...options,\n });\n }\n\n public async update<I>(criteria: FilterQuery<D>, update: I, options: Record<string, unknown>): Promise<T> {\n try {\n const { overWrite, ...remaining } = options;\n let old = {};\n if (!overWrite) {\n old = await this.get(criteria);\n if (!old) {\n throw Error(\n `(update) No existing record found for update with criteria ${JSON.stringify(criteria)}`,\n );\n }\n }\n return this.model.findOneAndUpdate(\n this.mapConditions(criteria),\n mergeWith(old, update, (obj, src) => {\n if (Array.isArray(src) && Array.isArray(obj)) {\n return src;\n }\n }),\n { new: true, useFindAndModify: false, ...remaining },\n ) as unknown as Promise<T>;\n } catch (e) {\n this.logger.error(`Unable to Update with criteria ${criteria} and data ${update}`);\n throw e;\n }\n }\n\n public async delete(criteria: FilterQuery<D>): Promise<boolean> {\n try {\n const deleted = await this.model.findOneAndDelete(this.mapConditions(criteria));\n return !!deleted;\n } catch (e) {\n this.logger.error(`Unable to delete the model with criteria ${criteria}`);\n throw e;\n }\n }\n\n public async bulkDelete(criteria: FilterQuery<D>): Promise<number> {\n try {\n const deleted = await this.model.deleteMany(this.mapConditions(criteria));\n return deleted?.deletedCount || 0;\n } catch (e) {\n this.logger.error(`Unable to delete the model with criteria ${criteria}`);\n throw e;\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private mapConditions(conditions: FilterQuery<D>): FilterQuery<D> {\n const { id: _id, ...remaining } = conditions;\n return {\n ...(_id ? { _id } : {}),\n ...remaining,\n };\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\n// @ts-ignore\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IChannel } from '@messenger-box/core';\nimport { ChannelModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class ChannelRepository extends BaseRepository<IChannel> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(ChannelModelFunc, db, logger, options);\n }\n}\n","export * from './channel-repository';\nexport * from './post-repository';\nexport * from './post-thread-repository';\nexport * from './reaction-repository';\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IPost } from '@messenger-box/core';\nimport { PostModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class PostRepository extends BaseRepository<IPost> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(PostModelFunc, db, logger, options);\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IPostThread } from '@messenger-box/core';\nimport { PostThreadModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class PostThreadRepository extends BaseRepository<IPostThread> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(PostThreadModelFunc, db, logger, options);\n }\n}\n","import { IReaction } from '@messenger-box/core';\nimport { inject, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { ReactionModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\nimport { IReactionRepository } from '../../interfaces';\n\nexport class ReactionRepository extends BaseRepository<IReaction> implements IReactionRepository {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(ReactionModelFunc, db, logger, options);\n }\n}\n","module.exports = require(\"@adminide-stack/core\");","module.exports = require(\"@adminide-stack/platform-server\");","module.exports = require(\"@common-stack/core\");","module.exports = require(\"@common-stack/server-core\");","module.exports = require(\"@messenger-box/core\");","module.exports = require(\"envalid\");","module.exports = require(\"inversify\");","module.exports = require(\"lodash\");","module.exports = require(\"moleculer\");","module.exports = require(\"mongoose\");"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/config/config.ts","webpack:///./src/config/index.ts","webpack:///./src/constants/default-notify-props.ts","webpack:///./src/constants/index.ts","webpack:///./src/constants/query.constants.ts","webpack:///./src/constants/types.ts","webpack:///./src/containers/containers.ts","webpack:///./src/containers/context-services-from-container.ts","webpack:///./src/containers/index.ts","webpack:///./src/graphql/index.ts","webpack:///./src/graphql/resolvers/channel-member.ts","webpack:///./src/graphql/resolvers/channel.ts","webpack:///./src/graphql/resolvers/index.ts","webpack:///./src/graphql/resolvers/post-thread.ts","webpack:///./src/graphql/resolvers/post.ts","webpack:///./src/graphql/resolvers/reaction.ts","webpack:///./src/graphql/schema/base.graphql","webpack:///./src/graphql/schema/channel-member.graphql","webpack:///./src/graphql/schema/channel.graphql","webpack:///./src/graphql/schema/extended.graphql","webpack:///./src/graphql/schema/index.ts","webpack:///./src/graphql/schema/post-thread.graphql","webpack:///./src/graphql/schema/post.graphql","webpack:///./src/graphql/schema/preferences.graphql","webpack:///./src/graphql/schema/reaction.graphql","webpack:///./src/graphql/schema/users.graphql","webpack:///./src/index.ts","webpack:///./src/mixins/base-service-mixin.ts","webpack:///./src/mixins/index.ts","webpack:///./src/module.ts","webpack:///./src/plugins/channel-moleculer-service.ts","webpack:///./src/plugins/index.ts","webpack:///./src/plugins/post-moleculer-service.ts","webpack:///./src/plugins/post-thread-moleculer-service.ts","webpack:///./src/plugins/reaction-moleculer-service.ts","webpack:///./src/services/base-service.ts","webpack:///./src/services/channel-service.ts","webpack:///./src/services/index.ts","webpack:///./src/services/post-service.ts","webpack:///./src/services/post-thread-service.ts","webpack:///./src/services/proxy-services/base-proxy-service.ts","webpack:///./src/services/proxy-services/channel-microservice.ts","webpack:///./src/services/proxy-services/index.ts","webpack:///./src/services/proxy-services/post-microservice.ts","webpack:///./src/services/proxy-services/post-thread-microservice.ts","webpack:///./src/services/proxy-services/reaction-microservice.ts","webpack:///./src/services/reaction-service.ts","webpack:///./src/store/index.ts","webpack:///./src/store/models/channel.ts","webpack:///./src/store/models/common-options.ts","webpack:///./src/store/models/index.ts","webpack:///./src/store/models/post-thread.ts","webpack:///./src/store/models/post.ts","webpack:///./src/store/models/reaction.ts","webpack:///./src/store/repositories/base-repository.ts","webpack:///./src/store/repositories/channel-repository.ts","webpack:///./src/store/repositories/index.ts","webpack:///./src/store/repositories/post-repository.ts","webpack:///./src/store/repositories/post-thread-repository.ts","webpack:///./src/store/repositories/reaction-repository.ts","webpack:///external \"@adminide-stack/core\"","webpack:///external \"@adminide-stack/platform-server\"","webpack:///external \"@common-stack/core\"","webpack:///external \"@common-stack/server-core\"","webpack:///external \"@container-stack/file-info-core\"","webpack:///external \"@messenger-box/core\"","webpack:///external \"envalid\"","webpack:///external \"inversify\"","webpack:///external \"lodash\"","webpack:///external \"moleculer\"","webpack:///external \"mongoose\""],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;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;;;;ACAA,sD;;;;;;;;;;;ACAA,4D;;;;;;;;;;;ACAA,gD;;;;;;;;;;;ACAA,oC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,qC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import * as envalid from 'envalid';\n\nconst { str, num } = envalid;\n\nexport const config = envalid.cleanEnv(process.env, {\n FILES_TTL: num({ default: 3600, desc: 'TTL for files cache in Seconds' }),\n GRAPHQL_URL: str(),\n});\n","export * from './config';\n","export const DEFAULT_NOTIFY_PROPS = {\n desktopNotifyProp: true,\n markUnreadNotifyProp: true,\n pushNotifyProp: true,\n emailNotifyProp: true,\n ignoreChannelMentionsNotifyProp: true,\n};\n","export * from './types';\nexport * from './query.constants';\nexport * from './default-notify-props';\n","export enum PAGINATION_OPTIONS {\n limit = 10,\n skip = 0,\n}\n\nexport const DEFAULT_SORTING = {\n id: 'asc',\n};\n","export const TYPES = {\n BaseRepository: Symbol('BaseRepository'),\n BaseService: Symbol('BaseService'),\n\n ChannelRepository: Symbol('ChannelRepository'),\n PostRepository: Symbol('PostRepository'),\n PostThreadRepository: Symbol('PostThreadRepository'),\n ReactionRepository: Symbol('ReactionRepository'),\n\n ChannelService: Symbol('ChannelService'),\n PostService: Symbol('PostService'),\n PostThreadService: Symbol('PostThreadService'),\n ReactionService: Symbol('ReactionService'),\n};\n","import { ContainerModule, interfaces } from 'inversify';\nimport { TaggedType } from '@common-stack/core';\nimport { ChannelService, PostService, PostThreadService, ReactionService } from '../services';\nimport { TYPES } from '../constants';\nimport {\n IChannelRepository,\n IChannelService,\n IPostRepository,\n IPostService,\n IPostThreadRepository,\n IPostThreadService,\n IReactionRepository,\n IReactionService,\n} from '../interfaces';\nimport { ChannelRepository, PostRepository, PostThreadRepository, ReactionRepository } from '../store';\nimport {\n ChannelProxyService,\n PostProxyService,\n PostThreadMicroservice,\n ReactionMicroservice,\n} from '../services/proxy-services';\n\n/**\n * Local services and exposed micro services to serve remote connections.\n * Operates within in the Gateway.\n *\n * @param settings Settings\n */\nexport const proxyServiceContainerModule: (settings) => interfaces.ContainerModule = (settings) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind<IChannelService>(TYPES.ChannelService)\n .to(ChannelProxyService)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n\n bind<IPostService>(TYPES.PostService)\n .to(PostProxyService)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n bind<IPostThreadService>(TYPES.PostThreadService)\n .to(PostThreadMicroservice)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n\n bind<IReactionService>(TYPES.ReactionService)\n .to(ReactionMicroservice)\n .inSingletonScope()\n .whenTargetNamed(TaggedType.MICROSERVICE);\n });\n\n/**\n * Operates external to the Gateway. Usually a broker listen to calls and invoke this service\n * local to the micro container.\n *\n * @param settings Settings\n */\nexport const serviceContainerModule: (settings) => interfaces.ContainerModule = (settings) =>\n new ContainerModule((bind: interfaces.Bind) => {\n bind<IChannelRepository>(TYPES.ChannelRepository)\n .to(ChannelRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n bind<IPostRepository>(TYPES.PostRepository).to(PostRepository).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostThreadRepository>(TYPES.PostThreadRepository)\n .to(PostThreadRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IReactionRepository>(TYPES.ReactionRepository)\n .to(ReactionRepository)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IChannelService>(TYPES.ChannelService).to(ChannelService).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostService>(TYPES.PostService).to(PostService).inSingletonScope().whenTargetIsDefault();\n\n bind<IPostThreadService>(TYPES.PostThreadService)\n .to(PostThreadService)\n .inSingletonScope()\n .whenTargetIsDefault();\n\n bind<IReactionService>(TYPES.ReactionService).to(ReactionService).inSingletonScope().whenTargetIsDefault();\n });\n","import { interfaces } from 'inversify';\nimport { TaggedType } from '@common-stack/core';\nimport { IChannelService, IPostService, IPostThreadService, IReactionService, IServices } from '../interfaces';\nimport { TYPES } from '../constants';\n\nexport const contextServicesFromContainer = (container: interfaces.Container): IServices => ({\n channelService: container.getNamed<IChannelService>(TYPES.ChannelService, TaggedType.MICROSERVICE),\n postService: container.getNamed<IPostService>(TYPES.PostService, TaggedType.MICROSERVICE),\n postThreadService: container.getNamed<IPostThreadService>(TYPES.PostThreadService, TaggedType.MICROSERVICE),\n reactionService: container.getNamed<IReactionService>(TYPES.ReactionService, TaggedType.MICROSERVICE),\n});\n","export * from './containers';\nexport * from './context-services-from-container';\n","export * from './schema';\nexport * from './resolvers';\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const channelMemberResolvers = (): IResolvers<IContext> => ({\n Query: {},\n Mutation: {},\n});\n","import { IChannel, IResolvers, IRoomType } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const channelResolvers = (): IResolvers<IContext> => ({\n Query: {\n channelByName(src, { name }, { channelService, userContext }) {\n return channelService.getByName(userContext.teamId, name) as Promise<IChannel>;\n },\n channels(src, _, { channelService, userContext }) {\n const { accountId, teamId } = userContext;\n return channelService.getChannels(teamId, accountId, false, new Date().getTime()) as Promise<IChannel[]>;\n },\n channelsByUser(src, _, { channelService, userContext }) {\n const { accountId } = userContext;\n return channelService.getAll({\n criteria: {\n creator: accountId,\n },\n }) as Promise<IChannel[]>;\n },\n directChannel(src, { id }, { channelService, userContext }) {\n return channelService.get({\n criteria: {\n id,\n user: userContext.accountId,\n type: IRoomType.DIRECT,\n },\n }) as Promise<IChannel>;\n },\n },\n Mutation: {\n createChannel(src, { name, description }, { channelService, userContext }) {\n const { accountId, teamId } = userContext;\n return channelService.saveChannel({\n type: IRoomType.CHANNEL,\n creator: accountId,\n title: name,\n topic: name,\n team: teamId,\n description,\n }) as Promise<IChannel>;\n },\n\n addMemberToChannel(src, { channelId, memberId }, { channelService, userContext }) {\n return channelService.addMemberToChannel(channelId, memberId) as Promise<IChannel>;\n },\n\n createDirectChannel(src, { receiver, displayName }, { channelService, userContext }) {\n const { accountId } = userContext;\n return channelService.createDirectChannel({\n sender: accountId,\n receiver,\n displayName,\n }) as Promise<IChannel>;\n },\n hideChannel(src, { id }, { channelService }) {\n return channelService.hideChannel(id);\n },\n leaveChannel(src, { id }, { channelService }) {\n return channelService.leaveChannel(id);\n },\n deleteChannel(src, { id }, { channelService }) {\n return channelService.deleteChannel(id) as Promise<boolean>;\n },\n },\n});\n","import { channelResolvers } from './channel';\nimport { channelMemberResolvers } from './channel-member';\nimport { postResolvers } from './post';\nimport { postThreadResolvers } from './post-thread';\nimport { reactionResolvers } from './reaction';\n\nexport const messengerResolvers = [\n channelResolvers,\n channelMemberResolvers,\n postResolvers,\n postThreadResolvers,\n reactionResolvers,\n];\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const postThreadResolvers = (): IResolvers<IContext> => ({\n Query: {},\n Mutation: {},\n});\n","import { generateUri, IClientCacheTypeNames, IConfigurationModel } from '@adminide-stack/core';\nimport { IFileInfo, IFilesInfo, IResolvers, ISortEnum } from '@messenger-box/core';\nimport { GetAllArgs, IContext } from '../../interfaces';\n\nexport const postResolvers = (): IResolvers<IContext> => ({\n // Temporary fix, until we have extension support in base module\n FileInfo: {\n extension(src) {\n return src.mimeType.split('/')[1];\n },\n },\n Post: {\n editedBy(src, args, { accountService }) {\n return accountService.findAccountById(src.editedBy.toString());\n },\n deletedBy(src, args, { accountService }) {\n return accountService.findAccountById(src?.deletedBy.toString());\n },\n author(src, args, { accountService }) {\n const author = src.author?.toString();\n if (author) {\n return accountService.findAccountById(author);\n }\n return accountService.findAccountById(src.editedBy.toString());\n },\n channel(src, args, { channelService }) {\n return channelService.get(src.channel.toString());\n },\n propsConfiguration(src, args, { configurationService }) {\n const resource = generateUri('posts' as any, { _id: src.id }, 'props');\n let data = '{}';\n try {\n data = JSON.stringify(src.props);\n } catch (err) {\n console.log('---Errr---', err);\n }\n const machineModel = configurationService.parser(resource.toString(), data) as IConfigurationModel;\n return {\n resource,\n contents: machineModel.contents,\n overrides: machineModel.overrides,\n keys: machineModel.keys,\n __typename: IClientCacheTypeNames.MachineConfiguration,\n };\n },\n files(src, args: GetAllArgs<IFileInfo>, { fileInfoService }) {\n return fileInfoService.getAllWithCount({\n ...args,\n criteria: {\n ...args.criteria,\n refType: 'Post',\n ref: src.id,\n } as unknown,\n }) as unknown as IFilesInfo;\n },\n },\n Query: {\n async messages(src, { channelId, limit, skip }, { postService, userContext }) {\n const { data, totalCount } = await postService.getAllWithCount({\n criteria: {\n channel: channelId,\n },\n limit,\n skip,\n sort: {\n key: 'createdAt',\n value: ISortEnum.ASC,\n },\n });\n\n return {\n totalCount,\n data,\n };\n },\n },\n Mutation: {\n deleteMessage(src, { messageId }, { postService }) {\n const { channelId, messageId: id } = messageId;\n return postService.delete({\n channel: channelId,\n id,\n });\n },\n editMessage(src, { messageId, messageInput }, { postService, userContext }) {\n return postService.update(messageId.messageId, {\n message: messageInput.content,\n editedBy: userContext.accountId,\n channel: messageId.channelId,\n files: messageInput.files,\n } as any);\n },\n async sendMessage(src, { channelId, messageInput }, { postService, userContext, fileInfoService }) {\n const { content, files } = messageInput;\n const { accountId } = userContext;\n return postService.create({\n channel: channelId as any,\n message: content,\n editedBy: accountId as any,\n author: accountId as any,\n files,\n });\n },\n createMessageFileUploadLink(_, { postId, filename }, { postService, userContext }) {\n return postService.createFileUploadLink(postId, filename, userContext.accountId);\n },\n attachUploadedFileToMessage(_, { postId, file }, { postService, userContext }) {\n return postService.attachUploadedFile(postId, file, userContext.accountId);\n },\n deleteMessageFile(_, { url }, { postService }) {\n return postService.deleteFile(url);\n },\n // uploadFile(src, { files, postId }, { fileInfoService, userContext }) {\n // const res = [];\n // files.map((file) =>\n // res.push(\n // fileInfoService.create({\n // refType: IFileRefType.Post as never,\n // file,\n // createdBy: userContext.accountId,\n // ref: postId,\n // }),\n // ),\n // );\n // return res;\n // },\n },\n});\n","import { IResolvers } from '@messenger-box/core';\nimport { IContext } from '../../interfaces';\n\nexport const reactionResolvers = (): IResolvers<IContext> => ({\n Query: {\n getPostReactions(src, { message }, { reactionService, userContext }) {\n return reactionService.getAll({\n criteria: {\n post: message,\n user: userContext.accountId,\n },\n });\n },\n },\n Mutation: {\n addReactionToMessage(src, { reaction }, { reactionService, userContext }) {\n return reactionService.create({\n ...reaction,\n user: userContext.accountId,\n });\n },\n updateReactionToMessage(src, { reaction, id }, { reactionService }) {\n return reactionService.update(id, { reaction });\n },\n removeReactionFromMessage(src, { id }, { reactionService }) {\n return reactionService.delete(id);\n },\n },\n});\n","export default \"interface IBaseRepo {\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\n\";","export default \"type ChannelMember {\\n id: ID!\\n user: String!\\n roles: String\\n msgCount: Int\\n mentionCount: Int\\n mentionCountRoot: Int\\n msgCountRoot: Int\\n notifyProps: AnyObject\\n explicitRoles: String\\n schemeAdmin: Boolean\\n lastViewedAt: Int\\n updatedAt: DateTime,\\n CreatedAt: DateTime,\\n}\\n\\ninput ChannelMemberInput {\\n userId: String!\\n roles: String\\n notifyProps: AnyObject\\n schemeGuest: Boolean\\n schemeUser: Boolean\\n schemeAdmin: Boolean\\n explicitRoles: String\\n}\\n\";","export default \"type Channel implements IBaseRepo {\\n id: String!\\n title: String\\n topic: String\\n purpose: String\\n description: String\\n displayName: String\\n team: AccountTeam\\n lastPostAt: DateTime\\n totalMsgCount: Int\\n totalMsgCountRoot: Int\\n creator: UserAccount\\n members: [ChannelMember]\\n type: String\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\ntype ChannelUnread {\\n teamId: String\\n channelId: String\\n msgCount: Int\\n mentionCount: Int\\n mentionCountRoot: Int\\n msgCountRoot: Int\\n notifyProps: AnyObject\\n}\\n\\n\\ninput ChannelFilterInput {\\n nameFilter: String\\n privacy: ChannelPrivacy\\n joinedChannels: Boolean\\n storyBy: ChannelSort\\n}\\n\\ninput ChannelNameAndDirect {\\n name: String!\\n direct: Boolean!\\n}\\n\\nenum ChannelSort {\\n NAME\\n NUMBER_OF_MESSAGES\\n}\\n\\nenum ChannelPrivacy {\\n PRIVATE\\n PUBLIC\\n ALL\\n}\\n\\nenum RoomType {\\n CHANNEL\\n DIRECT\\n GROUP\\n PRIVATE\\n VISITOR\\n}\\n\\nextend type Query {\\n channelByName(name: String!): Channel @addAccountContext @isAuthenticated\\n channels(filter: ChannelFilterInput = {\\n privacy: ALL,\\n joinedChannels: false,\\n sortyBy: NAME\\n }): [Channel] @addAccountContext @isAuthenticated\\n channelsByUser: [Channel] @addAccountContext @isAuthenticated\\n directChannel(id: ID!): Channel @addAccountContext @isAuthenticated\\n}\\n\\nextend type Mutation {\\n createChannel(\\n name: String!,\\n description:String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n addMemberToChannel(\\n channelId: String!,\\n memberId: String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n createDirectChannel(\\n receiver: [ID]!\\n displayName: String!\\n ): Channel @addAccountContext @isAuthenticated\\n\\n hideChannel(id: ID!): Boolean @isAuthenticated\\n\\n leaveChannel(id: ID!): Boolean @isAuthenticated\\n\\n deleteChannel(id: ID!): Boolean @isAuthenticated\\n}\\n\";","export default \"interface IFileRef{\\n id:ID!\\n}\\n\\nextend enum FileRefType{\\n Post\\n}\\n\";","import extended from './extended.graphql';\nimport baseSchema from './base.graphql';\nimport channelSchema from './channel.graphql';\nimport channelMember from './channel-member.graphql';\nimport postSchema from './post.graphql';\nimport postThread from './post-thread.graphql';\nimport preferencesSchema from './preferences.graphql';\nimport usersSchema from './users.graphql';\nimport reactionSchema from './reaction.graphql';\n\nconst schema = [\n extended,\n baseSchema,\n channelSchema,\n channelMember,\n postSchema,\n postThread,\n preferencesSchema,\n usersSchema,\n reactionSchema,\n].join('\\n');\n\nexport { schema };\n","export default \"type PostThread{\\n post: Post,\\n channel: Channel,\\n replyCount: Int,\\n lastReplyAt: DateTime,\\n participants:[UserAccount]\\n}\\n\";","export default \"type Post implements IBaseRepo & IFileRef {\\n id: ID!\\n author: UserAccount\\n channel: Channel\\n\\n rootId: String\\n parentId: String\\n originalId: String\\n\\n \\\"\\\"\\\" Post sent by server e.g. User joined channel \\\"\\\"\\\"\\n fromServer: Boolean\\n\\n message: String\\n type: String\\n props: AnyObject\\n hashTags: String\\n\\n filenames: [String]\\n fields: [String]\\n reactions: [Reaction]\\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\\n editedBy: UserAccount\\n deletedBy: UserAccount\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n\\n propsConfiguration: MachineConfiguration\\n}\\n\\ninput MessageInput {\\n content: String!\\n userRef: [String] #userId\\n channelRef: [String] #channelId\\n files: [ID!]\\n}\\n\\ninput MessageIdentifier {\\n channelId: String!\\n messageId: String!\\n}\\n\\ntype PostsWithCursor {\\n cursor: String\\n channel: Channel\\n posts: [Post]\\n}\\n\\ntype Messages{\\n totalCount: Int,\\n data:[Post]\\n}\\n\\n\\nextend type Query {\\n messages(\\n channelId: ID,\\n # channelName: String,\\n # directTo: ID,\\n limit: Int,\\n skip: Int,\\n # searchRegex: String,\\n # excludeServer: Boolean\\n ): Messages! @isAuthenticated @addAccountContext\\n}\\n\\nextend type Mutation {\\n deleteMessage(messageId: MessageIdentifier!): Boolean @isAuthenticated\\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\\n sendMessage(channelId: String!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\\n \\\"\\\"\\\"\\n Attach Post File\\n \\\"\\\"\\\"\\n createMessageFileUploadLink(postId:ID!, filename:String!): String! @isAuthenticated @addAccountContext\\n attachUploadedFileToMessage(postId:ID!, file: UploadedFileInput!): FileInfo! @isAuthenticated @addAccountContext\\n \\\"\\\"\\\"\\n Detach Post File\\n \\\"\\\"\\\"\\n deleteMessageFile(url: String!): Boolean! @isAuthenticated @addAccountContext\\n}\\n\\nextend type Subscription {\\n chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\\n}\\n\";","export default \"\\n\\ntype ChannelSettings {\\n disableNotification: Boolean\\n audio: String\\n desktop: String\\n duration: Int\\n mobile: String\\n mail: String\\n hideUnreadRoomStatus : Boolean\\n unreadTrayIconAlret: String\\n}\\n\\nextend type Preference_Account {\\n language: String\\n notificationDuration: Float\\n unreadTrayIconAlert: Boolean\\n useEmojis: Boolean\\n convertAsciiToEmoji: Boolean\\n autoLoadImages: Boolean\\n saveMobileBandwith: Boolean\\n collapseEmbeddedMeida: Boolean\\n unreadRoomsMode: Boolean\\n hideUserName: Boolean\\n hideRoles: Boolean\\n hideRightSideBarWithClick: Boolean\\n hideAvatars: Boolean\\n mergePrivateGroupsWithChannels: Boolean\\n enterKeyBehaviour: String\\n viewMode: String\\n offlineEmailNotifications: String\\n highlights: String\\n newRoomNotificationSound: String\\n newMessageNotificationSound: String\\n email: String\\n avatar: String\\n name: String\\n}\\n\\nextend type Preferences {\\n channel: ChannelSettings\\n}\\n\";","export default \"type Reaction{\\n id:ID!\\n reaction:String!,\\n user: UserAccount!,\\n post: Post!\\n}\\n\\ninput ReactionInput{\\n reaction:String!,\\n post: String!\\n}\\n\\nextend type Query{\\n getPostReactions(message:ID!):[Reaction] @isAuthenticated\\n}\\nextend type Mutation{\\n addReactionToMessage(reaction:ReactionInput):Reaction @isAuthenticated @addAccountContext\\n updateReactionToMessage(id:ID!, reaction:String!):Reaction @isAuthenticated @addAccountContext\\n removeReactionFromMessage(id:ID!):Boolean @isAuthenticated @addAccountContext\\n}\\n\";","export default \"enum MessengerUserStatus {\\n ONLINE\\n AWAY\\n BUSY\\n INVISIBLE\\n}\\n\\ntype MessengerUser implements IUser {\\n id: ID!\\n username: String\\n email: String\\n status: MessengerUserStatus\\n avatar: String\\n name: String\\n lastLogin: String\\n channels: [Channel]\\n directMessages: [Channel]\\n}\\n\\nextend type Query{\\n usersToChat(auth0Id:String!):[UserAccount] @isAuthenticated @addAccountContext\\n currentUser(auth0Id:String!):UserAccount @isAuthenticated @addAccountContext\\n}\\n\";","/* eslint-disable import/no-extraneous-dependencies */\nimport { Feature } from '@common-stack/server-core';\nimport MessengerModule from './module';\n\nexport * from './constants';\nexport default new Feature(MessengerModule);\n","import { IBaseServiceCommands as BaseServiceCommands } from '@messenger-box/core';\nimport { Context, ServiceSchema } from 'moleculer';\nimport { Document, FilterQuery } from 'mongoose';\nimport { GetAllArgs, IBaseService } from '../interfaces';\n\nexport const BaseServiceMixin = <T, C, U>(service: IBaseService<T, C, U>): Partial<ServiceSchema> => ({\n name: 'BaseServiceMixin',\n actions: {\n [BaseServiceCommands.get]: {\n params: {\n id: 'string',\n },\n handler: async (ctx: Context<{ conditions: string | FilterQuery<Document<T>> }>) =>\n service.get(ctx.params.conditions as never),\n },\n [BaseServiceCommands.count]: {\n params: {\n condition: { type: 'object', optional: true },\n },\n handler: async (ctx: Context<{ conditions?: FilterQuery<Document<T>> }>) =>\n service.count(ctx.params.conditions),\n },\n [BaseServiceCommands.bulkCreate]: {\n params: {\n data: { type: 'array', items: 'object' },\n },\n handler: async (ctx: Context<{ data: never[] }>) => service.bulkCreate(ctx.params.data),\n },\n [BaseServiceCommands.create]: {\n params: {\n data: 'object',\n },\n handler: async (ctx: Context<{ data: never }>) => service.create(ctx.params.data),\n },\n [BaseServiceCommands.delete]: {\n params: {\n id: 'string',\n },\n handler: async (ctx: Context<{ id: string | FilterQuery<Document<T>> }>) =>\n service.delete(ctx.params.id as never),\n },\n [BaseServiceCommands.getAll]: {\n params: {\n options: 'object',\n },\n handler: async (ctx: Context<{ options: GetAllArgs<Document<T>> }>) => service.getAll(ctx.params.options),\n },\n [BaseServiceCommands.getAllWithCount]: {\n params: {\n options: 'object',\n },\n handler: async (ctx: Context<{ options: GetAllArgs<Document<T>> }>) =>\n service.getAllWithCount(ctx.params.options),\n },\n [BaseServiceCommands.insert]: {\n params: {\n data: 'object',\n overwrite: 'boolean|optional',\n },\n handler: async (ctx: Context<{ data: never & { id?: string }; overwrite: boolean }>) =>\n service.insert(ctx.params.data, ctx.params.overwrite),\n },\n [BaseServiceCommands.update]: {\n params: {\n id: 'string',\n data: 'object',\n overwrite: 'boolean|optional',\n },\n handler: async (ctx: Context<{ id: string; data: never; overwrite: boolean }>) =>\n service.update(ctx.params.id, ctx.params.data, ctx.params.overwrite),\n },\n },\n});\n","export { BaseServiceMixin } from './base-service-mixin';\n","import { Feature } from '@common-stack/server-core';\nimport { schema, messengerResolvers } from './graphql';\nimport { serviceContainerModule, proxyServiceContainerModule, contextServicesFromContainer } from './containers';\nimport { ChannelMoleculerService, PostMoleculerService, PostThreadMoleculerService, ReactionMoleculerService } from './plugins';\n\nexport default new Feature({\n schema,\n addBrokerClientServiceClass: [\n ChannelMoleculerService,\n PostMoleculerService,\n PostThreadMoleculerService,\n ReactionMoleculerService,\n ],\n createResolversFunc: messengerResolvers,\n createServiceFunc: contextServicesFromContainer,\n createContainerFunc: [proxyServiceContainerModule],\n createHemeraContainerFunc: [serviceContainerModule],\n addBrokerMainServiceClass: [],\n});\n","import { Context, Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport {\n IChannelServiceCommands as ChannelServiceCommands,\n IMoleculerTopics as MoleculerTopics,\n IUserAccount,\n Maybe,\n Scalars,\n} from '@messenger-box/core';\nimport { IChannelService, ISaveChannelParams, ISaveDirectChannelParams } from '../interfaces';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\n\nexport class ChannelMoleculerService extends Service {\n private channelService: IChannelService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.ChannelService;\n this.channelService = container.get<IChannelService>(TYPES.ChannelService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.channelService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {\n [ChannelServiceCommands.addMemberToChannel]: {\n handler: async (ctx: Context<{ channelId: string; memberId: string }>) =>\n this.channelService.addMemberToChannel(ctx.params.channelId, ctx.params.memberId),\n },\n [ChannelServiceCommands.createDirectChannel]: {\n handler: async (\n ctx: Context<{\n data: {\n receiver: Array<Maybe<Scalars['ID']>>;\n sender: string;\n displayName: string;\n };\n }>,\n ) => this.channelService.createDirectChannel(ctx.params.data),\n },\n [ChannelServiceCommands.deleteChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.deleteChannel(ctx.params.id),\n },\n [ChannelServiceCommands.hideChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.hideChannel(ctx.params.id),\n },\n [ChannelServiceCommands.getChannelCounts]: {\n handler: async (ctx: Context<{ teamId: string; userId: string }>) =>\n this.channelService.getChannelCounts(ctx.params.teamId, ctx.params.userId),\n },\n [ChannelServiceCommands.getByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getByNameIncludeDeleted]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getByNameIncludeDeleted(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getByNames]: {\n handler: async (ctx: Context<{ teamId: string; names: string[] }>) =>\n this.channelService.getByNames(ctx.params.teamId, ctx.params.names),\n },\n [ChannelServiceCommands.getChannels]: {\n handler: async (\n ctx: Context<{ teamId: string; userId: string; includeDeleted: boolean; lastDeleteAt: number }>,\n ) =>\n this.channelService.getChannels(\n ctx.params.teamId,\n ctx.params.userId,\n ctx.params.includeDeleted,\n ctx.params.lastDeleteAt,\n ),\n },\n [ChannelServiceCommands.getChannelUnread]: {\n handler: async (ctx: Context<{ channelId: string; userId: string }>) =>\n this.channelService.getChannelUnread(ctx.params.channelId, ctx.params.userId),\n },\n [ChannelServiceCommands.getDeleted]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number; userId: string }>) =>\n this.channelService.getDeleted(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ctx.params.userId,\n ),\n },\n [ChannelServiceCommands.getDeletedByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.getDeletedByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.saveDirectChannel]: {\n handler: async (ctx: Context<{ channel: ISaveDirectChannelParams }>) =>\n this.channelService.saveDirectChannel(ctx.params.channel),\n },\n [ChannelServiceCommands.saveChannel]: {\n handler: async (ctx: Context<{ data: ISaveChannelParams }>) =>\n this.channelService.saveChannel(ctx.params.data),\n },\n [ChannelServiceCommands.invalidateChannelByName]: {\n handler: async (ctx: Context<{ teamId: string; name: string }>) =>\n this.channelService.invalidateChannelByName(ctx.params.teamId, ctx.params.name),\n },\n [ChannelServiceCommands.getPinnedPosts]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.getPinnedPosts(ctx.params.channelId),\n },\n [ChannelServiceCommands.getFromMaster]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.getFromMaster(ctx.params.id),\n },\n [ChannelServiceCommands.restore]: {\n handler: async (ctx: Context<{ channelId: string; time: Date }>) =>\n this.channelService.restore(ctx.params.channelId, ctx.params.time),\n },\n [ChannelServiceCommands.permanentDeleteByTeam]: {\n handler: async (ctx: Context<{ teamId: string }>) =>\n this.channelService.permanentDeleteByTeam(ctx.params.teamId),\n },\n [ChannelServiceCommands.permanentDelete]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.permanentDelete(ctx.params.channelId),\n },\n [ChannelServiceCommands.permanentDeleteMembersByChannel]: {\n handler: async (ctx: Context<{ channelId: string }>) =>\n this.channelService.permanentDeleteMembersByChannel(ctx.params.channelId),\n },\n [ChannelServiceCommands.getPrivateChannelsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number }>) =>\n this.channelService.getPrivateChannelsForTeam(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ),\n },\n [ChannelServiceCommands.getPublicChannelsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; offset: number; limit: number }>) =>\n this.channelService.getPublicChannelsForTeam(\n ctx.params.teamId,\n ctx.params.offset,\n ctx.params.limit,\n ),\n },\n [ChannelServiceCommands.getPublicChannelsByIdsForTeam]: {\n handler: async (ctx: Context<{ teamId: string; channelsIds: string[] }>) =>\n this.channelService.getPublicChannelsByIdsForTeam(ctx.params.teamId, ctx.params.channelsIds),\n },\n [ChannelServiceCommands.getTeamChannels]: {\n handler: async (ctx: Context<{ teamId: string }>) =>\n this.channelService.getTeamChannels(ctx.params.teamId),\n },\n [ChannelServiceCommands.saveMultipleMembers]: {\n handler: async (ctx: Context<{ members: IUserAccount[] }>) =>\n this.channelService.saveMultipleMembers(ctx.params.members),\n },\n [ChannelServiceCommands.leaveChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.leaveChannel(ctx.params.id),\n },\n [ChannelServiceCommands.deleteChannel]: {\n handler: async (ctx: Context<{ id: string }>) => this.channelService.deleteChannel(ctx.params.id),\n },\n },\n });\n }\n}\n","export * from './channel-moleculer-service';\nexport * from './post-moleculer-service';\nexport * from './post-thread-moleculer-service';\nexport * from './reaction-moleculer-service';\n","import { Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { config } from '../config';\nimport { TYPES } from '../constants';\nimport { BaseServiceMixin } from '../mixins';\nimport { IPostService } from '../interfaces';\n\nexport class PostMoleculerService extends Service {\n private readonly postService: IPostService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.PostService;\n this.postService = container.get<IPostService>(TYPES.PostService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.postService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {\n attachUploadedFile: {\n params: {\n postId: 'string',\n createdBy: 'string',\n file: 'object',\n },\n handler(ctx) {\n const { postId, createdBy, file } = ctx.params;\n return this.postService.attachUploadedFile(postId, file, createdBy);\n },\n },\n createFileUploadLink: {\n params: {\n postId: 'string',\n filename: 'string',\n userId: 'string',\n },\n handler(ctx) {\n const { postId, filename, userId } = ctx.params;\n return this.postService.createFileUploadLink(postId, filename, userId);\n },\n },\n deleteFile: {\n params: {\n url: 'string',\n },\n handler(ctx) {\n const { url } = ctx.params;\n return this.postService.deleteFile(url);\n },\n },\n },\n });\n }\n}\n","import { Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { TYPES } from '../constants';\nimport { IPostThreadService } from '../interfaces';\nimport { BaseServiceMixin } from '../mixins';\nimport { config } from '../config';\n\nexport class PostThreadMoleculerService extends Service {\n private readonly postThreadService: IPostThreadService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.PostThreadService;\n this.postThreadService = container.get<IPostThreadService>(TYPES.PostThreadService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.postThreadService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {},\n });\n }\n}\n","import { Service, ServiceBroker } from 'moleculer';\nimport { Container } from 'inversify';\nimport { IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { ApolloClientMixin } from '@adminide-stack/platform-server';\nimport { TYPES } from '../constants';\nimport { IReactionService } from '../interfaces';\nimport { BaseServiceMixin } from '../mixins';\nimport { config } from '../config';\n\nexport class ReactionMoleculerService extends Service {\n private readonly reactionService: IReactionService;\n\n constructor(broker: ServiceBroker, { container, ...settings }: { container: Container }) {\n super(broker);\n const topic = MoleculerTopics.ReactionService;\n this.reactionService = container.get<IReactionService>(TYPES.ReactionService);\n\n this.parseServiceSchema({\n name: topic,\n mixins: [ApolloClientMixin, BaseServiceMixin(this.reactionService)],\n settings: {\n apolloClient: {\n serverUri: config.GRAPHQL_URL,\n },\n },\n actions: {},\n });\n }\n}\n","import { Document, FilterQuery } from 'mongoose';\nimport { injectable } from 'inversify';\nimport { GetAllArgs, IBaseRepository, IBaseService } from '../interfaces';\n\n@injectable()\nexport class BaseService<T, C = T, U = T> implements IBaseService<T, C, U> {\n constructor(protected repository: IBaseRepository<T>) {\n this.repository = repository;\n }\n\n async getAllWithCount(options: GetAllArgs<Document<T>>): Promise<{ data: T[]; totalCount: number }> {\n const totalCount = await this.count(options.criteria);\n const data = await this.getAll(options);\n return {\n totalCount,\n data,\n };\n }\n\n count(conditions?: FilterQuery<Document<T>>): Promise<number> {\n return this.repository.count(conditions);\n }\n\n get(conditions: string | FilterQuery<Document<T>>): Promise<T> {\n if (typeof conditions === 'string') {\n return this.repository.get({ id: conditions });\n }\n return this.repository.get(conditions);\n }\n\n getName(name: string): Promise<T> {\n return this.repository.get({ name });\n }\n\n getAll(options: GetAllArgs<Document<T>>): Promise<T[]> {\n return this.repository.getAll(options);\n }\n\n create(data: C): Promise<T> {\n return this.repository.create<C>(data);\n }\n\n bulkCreate(data: C[]): Promise<T[]> {\n return this.repository.bulkCreate<C>(data);\n }\n\n async update(id: string, data: U, overwrite = true): Promise<T> {\n return this.repository.update<U>({ id }, data, { overwrite });\n }\n\n insert(data: (C | U) & { id?: string }, overwrite = true): Promise<T> {\n const { id, ...rest } = data;\n if (id) {\n const existing = this.repository.get({ id });\n if (existing) {\n return this.update(id, rest as U, overwrite);\n }\n }\n return this.create(rest as C);\n }\n\n delete(id: string | FilterQuery<Document<T>>): Promise<boolean> {\n if (typeof id === 'string') {\n return this.repository.delete({ id });\n }\n return this.repository.delete(id);\n }\n}\n","import { inject } from 'inversify';\nimport { IChannel, IChannelUnread, IPost, IRoomType, ISortEnum, IUserAccount } from '@messenger-box/core';\nimport { BaseService } from './base-service';\nimport { DEFAULT_NOTIFY_PROPS, TYPES } from '../constants';\nimport {\n IChannelRepository,\n IChannelService,\n ICreateDirectChannelParams,\n INotificationProps,\n IPostService,\n ISaveChannelParams,\n ISaveDirectChannelParams,\n} from '../interfaces';\n\nexport class ChannelService extends BaseService<IChannel, Omit<IChannel, 'id'>> implements IChannelService {\n constructor(\n @inject(TYPES.ChannelRepository)\n readonly repository: IChannelRepository,\n @inject(TYPES.PostService)\n private readonly postService: IPostService,\n ) {\n super(repository);\n }\n\n private static getDmNameFromIds(senderId: string, receiverId: string) {\n return `${senderId}__${receiverId}`;\n }\n\n private static get defaultNotifyProps(): INotificationProps {\n // #Todo: To be moved to settings\n return DEFAULT_NOTIFY_PROPS;\n }\n\n private static getMaxChannelsPerTeam(teamId: string): Promise<number> {\n // #Todo: Get Max Channel per team from Team settings\n return Promise.resolve(10);\n }\n\n private async getCurrentChannelCountPerTeam(team: string): Promise<number> {\n return this.repository.count({\n team,\n type: IRoomType.CHANNEL,\n });\n }\n\n async createDirectChannel(data: ICreateDirectChannelParams): Promise<IChannel | Error> {\n const { sender, receiver, displayName } = data;\n const chlMember = [\n {\n user: sender,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n },\n ];\n receiver.forEach((re) => {\n chlMember.push({\n user: re,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n });\n });\n const channelPayload: ISaveDirectChannelParams = {\n title: sender.split('').reverse().join(''),\n type: IRoomType.DIRECT,\n creator: sender,\n members: chlMember,\n displayName,\n };\n return this.saveDirectChannel(channelPayload);\n }\n\n async saveDirectChannel(channel: ISaveDirectChannelParams): Promise<IChannel | Error> {\n const { type, deletedAt } = channel;\n if (deletedAt) {\n return new Error('Deleted Channel can not be saved');\n }\n if (type !== IRoomType.DIRECT) {\n return new Error('Only direct channels are allowed');\n }\n return this.repository.create(channel);\n }\n\n async addMemberToChannel(channelId, memberId): Promise<IChannel | Error> {\n // const { channelId, memberId } = data;\n // console.log('==============================', channelId);\n const resData = await this.repository\n .get({ id: channelId })\n .then(async (res) => {\n const mebs = res.members;\n mebs.push({\n id: '',\n user: memberId,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n });\n const objToUpdate = res;\n objToUpdate.members = mebs;\n const finalResult = await this.repository\n .update({ id: channelId }, objToUpdate, { overwrite: true })\n .then((response) => response)\n .catch((error) => error);\n return finalResult;\n })\n .catch((err) => err);\n return resData;\n }\n\n async saveChannel(data: ISaveChannelParams): Promise<IChannel | Error> {\n const { type, team, creator } = data;\n if (type !== IRoomType.CHANNEL) {\n return new Error('Invalid Channel Type');\n }\n const maxChannels = await ChannelService.getMaxChannelsPerTeam(team);\n const currentChannels = await this.getCurrentChannelCountPerTeam(team);\n const canAddNewChannel = currentChannels < maxChannels;\n if (!canAddNewChannel) {\n return Error(`Only max of ${maxChannels} allowed`);\n }\n const channelPayload = {\n ...data,\n members: [\n {\n user: creator,\n schemeAdmin: false,\n notifyProps: ChannelService.defaultNotifyProps,\n },\n ],\n };\n return this.repository.create(channelPayload);\n }\n\n async getChannelUnread(channelId: string, userId: string): Promise<IChannelUnread | Error> {\n const channel: IChannel = await this.repository.get({\n id: channelId,\n members: { user: userId },\n });\n const { members, team, id } = channel;\n const member = members.find((i) => i.user === userId);\n const msgCount = channel.totalMsgCount - member.msgCount;\n const msgCountRoot = channel.totalMsgCountRoot - member.msgCountRoot;\n const { notifyProps, mentionCountRoot, mentionCount } = member;\n\n return {\n channelId: id,\n teamId: team.toString(),\n msgCount,\n msgCountRoot,\n mentionCount,\n notifyProps,\n mentionCountRoot,\n };\n }\n\n async getPinnedPosts(channelId: string): Promise<IPost[] | Error> {\n const posts = await this.postService.getAll({\n criteria: {\n channelId,\n isPinned: true,\n },\n sort: {\n key: 'CreatAt',\n value: ISortEnum.ASC,\n },\n });\n const replyCounts = await Promise.all(\n posts.map((post) => this.postService.count({ rootId: post.rootId || post.id })),\n );\n return posts.reduce((acc, curr, index) => [...acc, { ...curr, replyCount: replyCounts[index] }], []);\n }\n\n restore(channelId: string, time: Date): Promise<IChannel> {\n return this.repository.update(\n { id: channelId },\n {\n deletedAt: time,\n },\n );\n }\n\n getByName(team: string, title: string): Promise<IChannel | Error> {\n return this.get({\n team,\n title,\n });\n }\n\n getByNameIncludeDeleted(team: string, title: string): Promise<IChannel | Error> {\n return this.get({\n team,\n title,\n deletedAt: true,\n });\n }\n\n getByNames(team: string, titles: string[]): Promise<IChannel[] | Error> {\n return this.getAll({\n criteria: {\n team,\n title: { $in: titles },\n },\n });\n }\n\n getChannelCounts(team: string, user: string): Promise<any> {\n return this.count({\n team,\n members: { user },\n });\n }\n\n getChannels(\n team: string,\n user: string,\n includeDeleted: boolean,\n lastDeleteAt: number,\n ): Promise<IChannel[] | Error> {\n return this.repository.getAll({\n // criteria: {\n // team,\n // members: { user },\n // },\n });\n }\n\n deleteChannel(id: string): Promise<boolean | Error> {\n return this.repository.delete({ id });\n }\n\n getDeleted(teamId: string, offset: number, limit: number, userId: string): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getDeletedByName(teamId: string, name: string): Promise<IChannel | Error> {\n return Promise.resolve(undefined);\n }\n\n getFromMaster(id: string): Promise<IChannel | Error> {\n return Promise.resolve(undefined);\n }\n\n getMoreChannels(teamId: string, userId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPrivateChannelsForTeam(teamId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPublicChannelsByIdsForTeam(teamId: string, channelsIds: string[]): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getPublicChannelsForTeam(teamId: string, offset: number, limit: number): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n getTeamChannels(teamId: string): Promise<IChannel[] | Error> {\n return Promise.resolve(undefined);\n }\n\n hideChannel(id: string): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n invalidateChannelByName(teamId: string, name: string): Promise<void> {\n return Promise.resolve();\n }\n\n leaveChannel(id: string): Promise<boolean> {\n return Promise.resolve(false);\n }\n\n permanentDelete(channelId: string): void | Error {\n return undefined;\n }\n\n permanentDeleteByTeam(teamId: string): void | Error {\n return undefined;\n }\n\n permanentDeleteMembersByChannel(channelId: string): void | Error {\n return undefined;\n }\n\n saveMultipleMembers(members: IUserAccount[]): Promise<IUserAccount[] | Error> {\n return Promise.resolve(undefined);\n }\n}\n","export * from './channel-service';\nexport * from './post-service';\nexport * from './post-thread-service';\nexport * from './reaction-service';\nexport * from './base-service';\n","/* eslint-disable no-useless-constructor */\nimport { inject } from 'inversify';\nimport { IPost, IUploadedFileInput, IFileRefType, IFileInfo } from '@messenger-box/core';\nimport { IFileInfoService, TYPES as FileUploadTypes } from '@container-stack/file-info-core';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { PostRepository } from '../store';\nimport { IPostService, IPostServiceInput } from '../interfaces';\n\nexport class PostService extends BaseService<IPost, IPostServiceInput> implements IPostService {\n constructor(\n @inject(TYPES.PostRepository)\n repository: PostRepository,\n @inject(FileUploadTypes.FileInfoService)\n private readonly fileInfoService: IFileInfoService,\n ) {\n super(repository);\n }\n\n createFileUploadLink(postId: string, filename: string, userId: string): Promise<string> {\n return this.fileInfoService.uploadByUrl({\n filename,\n refType: IFileRefType.Post as never,\n ref: postId,\n userId,\n });\n }\n\n attachUploadedFile(postId: string, file: IUploadedFileInput, createdBy: string): Promise<IFileInfo> {\n return this.fileInfoService.createUploadedFile({\n ...file,\n refType: IFileRefType.Post as never,\n ref: postId,\n createdBy,\n });\n }\n\n deleteFile(url: string): Promise<boolean> {\n return this.fileInfoService.deleteByUrl(url);\n }\n}\n","import { IPostThread } from '@messenger-box/core';\nimport { injectable, inject } from 'inversify';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { IPostThreadRepository, IPostThreadService } from '../interfaces';\n\n@injectable()\nexport class PostThreadService extends BaseService<IPostThread> implements IPostThreadService {\n constructor(\n @inject(TYPES.PostThreadRepository)\n readonly repository: IPostThreadRepository,\n ) {\n super(repository);\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport { FilterQuery } from 'mongoose';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IBaseServiceCommands as BaseServiceCommands, IMoleculerTopics as MoleculerTopics } from '@messenger-box/core';\nimport { GetAllArgs, IBaseService } from '../../interfaces';\n\ntype MethodsNames<T, C, U> = keyof IBaseService<T, C, U>;\ntype MethodResponse<T, C, U, M extends MethodsNames<T, C, U>> = ReturnType<IBaseService<T, C, U>[M]>;\n\n@injectable()\nexport class BaseProxyService<T, C = T, U = T> implements IBaseService<T, C, U> {\n protected logger: Logger;\n\n protected topic = MoleculerTopics.BaseService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n private readonly broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n this.logger = logger.child({ className: 'BaseProxyService' });\n }\n\n bulkCreate(data: C[]): MethodResponse<T, C, U, 'bulkCreate'> {\n return this.callAction<T[], { data: C[] }>(BaseServiceCommands.bulkCreate, { data });\n }\n\n count(conditions?: FilterQuery<Document>): MethodResponse<T, C, U, 'count'> {\n return this.callAction(BaseServiceCommands.count, { conditions });\n }\n\n create(data: C): MethodResponse<T, C, U, 'create'> {\n return this.callAction(BaseServiceCommands.create, { data });\n }\n\n delete(id: string | FilterQuery<Document>): MethodResponse<T, C, U, 'delete'> {\n return this.callAction(BaseServiceCommands.delete, { id });\n }\n\n get(id?: string | FilterQuery<Document>): MethodResponse<T, C, U, 'get'> {\n return this.callAction(BaseServiceCommands.get, { id });\n }\n\n getAll(options?: GetAllArgs<Document>): MethodResponse<T, C, U, 'getAll'> {\n return this.callAction(BaseServiceCommands.getAll, { options });\n }\n\n getAllWithCount(options: GetAllArgs<Document>): MethodResponse<T, C, U, 'getAllWithCount'> {\n return this.callAction(BaseServiceCommands.getAllWithCount, { options });\n }\n\n insert(data: C | U, overwrite?: boolean): MethodResponse<T, C, U, 'insert'> {\n return this.callAction(BaseServiceCommands.insert, { data, overwrite });\n }\n\n update(id: string, data: U, overwrite?: boolean): MethodResponse<T, C, U, 'update'> {\n return this.callAction<T>(BaseServiceCommands.update, { id, data, overwrite });\n }\n\n protected async callAction<T, P = unknown>(command: string, params?: P): Promise<T> {\n return this.broker.call<T, P>(`${this.topic}.${command}`, params);\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport {\n IChannel,\n IChannelServiceCommands as ChannelServiceCommands,\n IMoleculerTopics as MoleculerTopics,\n IUserAccount,\n Maybe,\n Scalars,\n} from '@messenger-box/core';\nimport { IChannelService, ISaveChannelParams, ISaveDirectChannelParams } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\ntype MethodsNames = keyof IChannelService;\ntype MethodResponse<T extends MethodsNames> = ReturnType<IChannelService[T]>;\n\n@injectable()\nexport class ChannelProxyService extends BaseProxyService<IChannel, Omit<IChannel, 'id'>> implements IChannelService {\n topic = MoleculerTopics.ChannelService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'ChannelProxyService' });\n }\n\n addMemberToChannel(channelId: string, memberId: string): MethodResponse<'addMemberToChannel'> {\n return this.callAction(ChannelServiceCommands.addMemberToChannel, { channelId, memberId });\n }\n\n createDirectChannel(data: {\n receiver: Array<Maybe<Scalars['ID']>>;\n sender: string;\n displayName: string;\n }): MethodResponse<'createDirectChannel'> {\n return this.callAction(ChannelServiceCommands.createDirectChannel, { data });\n }\n\n deleteChannel(id: string): MethodResponse<'deleteChannel'> {\n return this.callAction(ChannelServiceCommands.deleteChannel, { id });\n }\n\n getByName(teamId: string, name: string): MethodResponse<'getByName'> {\n return this.callAction(ChannelServiceCommands.getByName, { teamId, name });\n }\n\n getByNameIncludeDeleted(teamId: string, name: string): MethodResponse<'getByNameIncludeDeleted'> {\n return this.callAction(ChannelServiceCommands.getByNameIncludeDeleted, { teamId, name });\n }\n\n getByNames(teamId: string, names: string[]): MethodResponse<'getByNames'> {\n return this.callAction(ChannelServiceCommands.getByNames, { teamId, names });\n }\n\n getChannelCounts(teamId: string, userId: string): MethodResponse<'getChannelCounts'> {\n return this.callAction(ChannelServiceCommands.getChannelCounts, { teamId, userId });\n }\n\n getChannelUnread(channelId: string, userId: string): MethodResponse<'getChannelUnread'> {\n return this.callAction(ChannelServiceCommands.getChannelUnread, { channelId, userId });\n }\n\n getChannels(\n teamId: string,\n userId: string,\n includeDeleted: boolean,\n lastDeleteAt: number,\n ): MethodResponse<'getChannels'> {\n return this.callAction(ChannelServiceCommands.getChannels, { teamId, userId, includeDeleted, lastDeleteAt });\n }\n\n getDeleted(teamId: string, offset: number, limit: number, userId: string): MethodResponse<'getDeleted'> {\n return this.callAction(ChannelServiceCommands.getDeleted, { teamId, offset, limit, userId });\n }\n\n getDeletedByName(teamId: string, name: string): MethodResponse<'getDeletedByName'> {\n return this.callAction(ChannelServiceCommands.getDeletedByName, { teamId, name });\n }\n\n getFromMaster(id: string): MethodResponse<'getFromMaster'> {\n return this.callAction(ChannelServiceCommands.getFromMaster, { id });\n }\n\n getMoreChannels(teamId: string, userId: string, offset: number, limit: number): MethodResponse<'getMoreChannels'> {\n return this.callAction(ChannelServiceCommands.getMoreChannels, { teamId, userId, offset, limit });\n }\n\n getPinnedPosts(channelId: string): MethodResponse<'getPinnedPosts'> {\n return this.callAction(ChannelServiceCommands.getPinnedPosts, { channelId });\n }\n\n getPrivateChannelsForTeam(\n teamId: string,\n offset: number,\n limit: number,\n ): MethodResponse<'getPrivateChannelsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPrivateChannelsForTeam, { teamId, offset, limit });\n }\n\n getPublicChannelsByIdsForTeam(\n teamId: string,\n channelsIds: string[],\n ): MethodResponse<'getPublicChannelsByIdsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPublicChannelsByIdsForTeam, { teamId, channelsIds });\n }\n\n getPublicChannelsForTeam(\n teamId: string,\n offset: number,\n limit: number,\n ): MethodResponse<'getPublicChannelsForTeam'> {\n return this.callAction(ChannelServiceCommands.getPublicChannelsForTeam, { teamId, offset, limit });\n }\n\n getTeamChannels(teamId: string): MethodResponse<'getTeamChannels'> {\n return this.callAction(ChannelServiceCommands.getTeamChannels, { teamId });\n }\n\n hideChannel(id: string): MethodResponse<'hideChannel'> {\n return this.callAction(ChannelServiceCommands.hideChannel, { id });\n }\n\n invalidateChannelByName(teamId: string, name: string): MethodResponse<'invalidateChannelByName'> {\n return this.callAction(ChannelServiceCommands.invalidateChannelByName, { teamId, name });\n }\n\n leaveChannel(id: string): MethodResponse<'leaveChannel'> {\n return this.callAction(ChannelServiceCommands.leaveChannel, { id });\n }\n\n permanentDelete(channelId: string): MethodResponse<'permanentDelete'> {\n this.callAction(ChannelServiceCommands.permanentDelete, { channelId });\n }\n\n permanentDeleteByTeam(teamId: string): MethodResponse<'permanentDeleteByTeam'> {\n this.callAction(ChannelServiceCommands.permanentDeleteByTeam, { teamId });\n }\n\n permanentDeleteMembersByChannel(channelId: string): MethodResponse<'permanentDeleteMembersByChannel'> {\n this.callAction(ChannelServiceCommands.permanentDeleteMembersByChannel, { channelId });\n }\n\n restore(channelId: string, time: Date): MethodResponse<'restore'> {\n return this.callAction(ChannelServiceCommands.restore, { channelId, time });\n }\n\n saveChannel(data: ISaveChannelParams): MethodResponse<'saveChannel'> {\n return this.callAction(ChannelServiceCommands.saveChannel, { data });\n }\n\n saveDirectChannel(channel: ISaveDirectChannelParams): MethodResponse<'saveDirectChannel'> {\n return this.callAction(ChannelServiceCommands.saveDirectChannel, { channel });\n }\n\n saveMultipleMembers(members: IUserAccount[]): MethodResponse<'saveMultipleMembers'> {\n return this.callAction(ChannelServiceCommands.saveMultipleMembers, { members });\n }\n}\n","export * from './channel-microservice';\nexport * from './post-thread-microservice';\nexport * from './post-microservice';\nexport * from './reaction-microservice';\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport {\n IMoleculerTopics as MoleculerTopics,\n IPost,\n IPostServiceCommands,\n IUploadedFileInput,\n IFileInfo,\n} from '@messenger-box/core';\nimport { IPostService, IPostServiceInput } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class PostProxyService extends BaseProxyService<IPost, IPostServiceInput> implements IPostService {\n topic = MoleculerTopics.PostService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'PostProxyService' });\n }\n\n attachUploadedFile(postId: string, file: IUploadedFileInput, createdBy: string): Promise<IFileInfo> {\n return this.callAction(IPostServiceCommands.attachUploadedFile, { file, createdBy, postId });\n }\n\n createFileUploadLink(postId: string, filename: string, userId: string): Promise<string> {\n return this.callAction(IPostServiceCommands.createFileUploadLink, { filename, userId, postId });\n }\n\n deleteFile(url: string): Promise<boolean> {\n return this.callAction(IPostServiceCommands.deleteFile, { url });\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IMoleculerTopics as MoleculerTopics, IPostThread } from '@messenger-box/core';\nimport { IPostThreadService } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class PostThreadMicroservice\n extends BaseProxyService<IPostThread, Omit<IPostThread, 'id'>>\n implements IPostThreadService\n{\n topic = MoleculerTopics.PostThreadService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'PostThreadMicroservice' });\n }\n}\n","import { inject, injectable } from 'inversify';\nimport { ServiceBroker } from 'moleculer';\nimport * as Logger from 'bunyan';\nimport { CommonType } from '@common-stack/core';\nimport { IMoleculerTopics as MoleculerTopics, IReaction, IReactionInput } from '@messenger-box/core';\nimport { IReactionService, IReactionServiceInput } from '../../interfaces';\nimport { BaseProxyService } from './base-proxy-service';\n\n@injectable()\nexport class ReactionMicroservice\n extends BaseProxyService<IReaction, IReactionServiceInput, Partial<IReactionInput>>\n implements IReactionService\n{\n topic = MoleculerTopics.ReactionService;\n\n constructor(\n @inject(CommonType.MOLECULER_BROKER)\n broker: ServiceBroker,\n @inject('Logger')\n logger: Logger,\n ) {\n super(broker, logger);\n this.logger = logger.child({ className: 'ReactionMicroservice' });\n }\n}\n","import { IReaction, IReactionInput } from '@messenger-box/core';\nimport { inject, injectable } from 'inversify';\nimport { BaseService } from './base-service';\nimport { TYPES } from '../constants';\nimport { IReactionRepository, IReactionService, IReactionServiceInput } from '../interfaces';\n\n@injectable()\nexport class ReactionService\n extends BaseService<IReaction, IReactionServiceInput, Partial<IReactionInput>>\n implements IReactionService\n{\n constructor(\n @inject(TYPES.ReactionRepository)\n readonly reactionRepository: IReactionRepository,\n ) {\n super(reactionRepository);\n }\n}\n","export * from './repositories';\n","import { Connection, Document, Model, Schema } from 'mongoose';\nimport { IChannel, IRoomType } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IChannelModel = Document<IChannel>;\n\nconst channelModelSchema = new Schema(\n {\n type: {\n type: Schema.Types.String,\n enum: [IRoomType.CHANNEL, IRoomType.DIRECT, IRoomType.GROUP, IRoomType.PRIVATE, IRoomType.VISITOR],\n required: true,\n },\n members: [\n new Schema(\n {\n user: { type: Schema.Types.ObjectId, ref: 'accounts' },\n roles: { type: Schema.Types.String },\n msgCount: { type: Schema.Types.Number },\n mentionCount: { type: Schema.Types.Number },\n mentionCountRoot: { type: Schema.Types.Number },\n msgCountRoot: { type: Schema.Types.Number },\n notifyProps: { type: Schema.Types.Mixed },\n explicitRoles: { type: Schema.Types.String },\n schemeAdmin: { type: Schema.Types.String },\n lastViewedAt: { type: Schema.Types.Date },\n deletedAt: { type: Schema.Types.Date },\n },\n commonModeSchemaOptions,\n ),\n ],\n deletedAt: { type: Schema.Types.Date },\n lastPostAt: { type: Schema.Types.Date },\n totalMsgCount: { type: Schema.Types.Number },\n totalMsgCountRoot: { type: Schema.Types.Number },\n team: { type: Schema.Types.ObjectId, ref: 'team' },\n title: { type: Schema.Types.String },\n displayName: { type: Schema.Types.String },\n description: { type: Schema.Types.String },\n purpose: { type: Schema.Types.String },\n creator: { type: Schema.Types.ObjectId, ref: 'accounts' },\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(channelModelSchema);\n\nexport type ChannelModelType = Model<IChannelModel>;\nexport const ChannelModelFunc: (db: Connection) => ChannelModelType = (db) =>\n db.model<IChannelModel>('channel', channelModelSchema);\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { Schema } from 'mongoose';\n\nexport const commonModeSchemaOptions = {\n timestamps: true,\n toJSON: {\n virtuals: true,\n },\n toObject: {\n virtuals: true,\n getters: true,\n transform(doc, ret) {\n delete ret.__v;\n delete ret._id;\n },\n },\n};\n\nexport const addIdVirtualFields = (schema: Schema) => {\n schema.set('toJSON', {\n virtuals: true,\n });\n return schema;\n};\n","export * from './channel';\nexport * from './post';\nexport * from './post-thread';\nexport * from './reaction';\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IPostThread } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IThreadsModel = Document<IPostThread>;\n\nconst postThreadModelSchema = new Schema(\n {\n post: { type: Schema.Types.ObjectId, ref: 'posts' },\n channel: { type: Schema.Types.ObjectId, ref: 'channels' },\n replyCount: { type: Schema.Types.Number },\n lastReplyAt: { type: Schema.Types.Date },\n participants: [{ type: Schema.Types.ObjectId, ref: 'accounts' }],\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(postThreadModelSchema);\n\nexport type PostThreadModelType = Model<IThreadsModel>;\nexport const PostThreadModelFunc: (db: Connection) => PostThreadModelType = (db) =>\n db.model<IThreadsModel>('post-threads', postThreadModelSchema);\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IPost } from '@messenger-box/core';\nimport { addIdVirtualFields, commonModeSchemaOptions } from './common-options';\n\nexport type IPostModel = Document<IPost>;\n\nconst postModelSchema = new Schema(\n {\n createdAt: { type: Schema.Types.Date },\n editedAt: { type: Schema.Types.Date },\n deletedAt: { type: Schema.Types.Date },\n editedBy: { type: Schema.Types.ObjectId, ref: 'accounts' },\n deletedBy: { type: Schema.Types.ObjectId, ref: 'accounts' },\n channel: { type: Schema.Types.ObjectId, ref: 'channels' },\n rootId: { type: Schema.Types.String },\n parentId: { type: Schema.Types.String },\n originalId: { type: Schema.Types.String },\n message: { type: Schema.Types.String },\n type: { type: Schema.Types.String },\n props: { type: Schema.Types.Mixed },\n hashtags: { type: Schema.Types.Mixed },\n filenames: { type: Schema.Types.Mixed },\n fields: { type: Schema.Types.String },\n files: [{ type: Schema.Types.ObjectId }],\n hasReactions: { type: Schema.Types.Boolean },\n },\n commonModeSchemaOptions,\n);\n\naddIdVirtualFields(postModelSchema);\n\nexport type PostModelType = Model<IPostModel>;\nexport const PostModelFunc: (db: Connection) => PostModelType = (db) => db.model<IPostModel>('posts', postModelSchema);\n","import { Document, Schema, Model, Connection } from 'mongoose';\nimport { IReaction } from '@messenger-box/core';\nimport { addIdVirtualFields } from './common-options';\n\nexport type IReactionModel = Document<IReaction>;\n\nconst reactionModelSchema = new Schema({\n createdAt: { type: Schema.Types.Date },\n reaction: { type: Schema.Types.String },\n user: { type: Schema.Types.ObjectId, ref: 'accounts' },\n post: { type: Schema.Types.ObjectId, ref: 'posts' },\n});\n\naddIdVirtualFields(reactionModelSchema);\n\nexport type ReactionModelType = Model<IReactionModel>;\nexport const ReactionModelFunc: (db: Connection) => ReactionModelType = (db) =>\n db.model<IReactionModel>('reactions', reactionModelSchema);\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { mergeWith, isObject } from 'lodash';\nimport { logger as Logger } from '@cdm-logger/server';\n// eslint-disable-next-line import/no-unresolved\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { Connection, Document, FilterQuery, Model } from 'mongoose';\nimport { injectable, unmanaged } from 'inversify';\nimport { GetAllArgs, IBaseRepository } from '../../interfaces';\nimport { DEFAULT_SORTING, PAGINATION_OPTIONS } from '../../constants';\n\n@injectable()\nexport class BaseRepository<T, D = Document<T>> implements IBaseRepository<T, D> {\n private options: IMongoOptions;\n\n private logger: typeof Logger;\n\n private model: Model<D>;\n\n constructor(\n @unmanaged()\n modelFunc: (db: Connection) => Model<D>,\n @unmanaged()\n db: Connection,\n @unmanaged()\n logger: typeof Logger,\n @unmanaged()\n options?: IMongoOptions,\n ) {\n this.model = modelFunc(db);\n this.options = options;\n this.logger = logger.child({ className: BaseRepository.name });\n }\n\n public async getAll(options: GetAllArgs<D>): Promise<T[]> {\n try {\n const { criteria, selectedFields, sort, limit, skip } = options;\n // map id to mongoose _id\n const { id, ...rest } = criteria || { id: undefined };\n const response = await this.model\n .find({ ...rest, ...(id ? { _id: id } : {}) }, selectedFields)\n .limit(limit || PAGINATION_OPTIONS.limit)\n .skip(skip || PAGINATION_OPTIONS.skip)\n .sort(isObject(sort) ? { [sort?.key]: sort.value } : DEFAULT_SORTING)\n .exec();\n return response.map((i) => i?.toObject()) as T[];\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(options)}`);\n throw e;\n }\n }\n\n public async count(conditions?: FilterQuery<D>): Promise<number> {\n return this.model.count(conditions).exec();\n }\n\n public async get(conditions?: FilterQuery<D>, selectedFields?: string): Promise<T> {\n try {\n const response = await this.model.findOne(this.mapConditions(conditions), selectedFields).exec();\n return response?.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(conditions)}`);\n throw e;\n }\n }\n\n public async find(conditions: Partial<FilterQuery<D>>, selectedFields?: string): Promise<T> {\n try {\n const response = await this.model.findOne(this.mapConditions(conditions), selectedFields).exec();\n return response?.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to retrieve Model with criteria ${JSON.stringify(conditions)}`);\n throw e;\n }\n }\n\n public async create<I>(data: I): Promise<T> {\n try {\n const response = await this.model.create(data);\n return response.toObject() as T;\n } catch (e) {\n this.logger.error(`Unable to create Model with data ${JSON.stringify(data)} due to ${e?.message}`);\n throw e;\n }\n }\n\n public async bulkCreate<I>(data: I[]): Promise<T[]> {\n try {\n const response = await this.model.insertMany(data, {\n lean: true,\n ordered: true,\n });\n return response as unknown as T[];\n } catch (e) {\n this.logger.error(`Unable to bulk create due to error`, e.message);\n }\n }\n\n public async upsert<I>(conditions: FilterQuery<D>, update: I, options?: Record<string, unknown>): Promise<T> {\n return this.update<I>(conditions, update, {\n upsert: true,\n ...options,\n });\n }\n\n public async update<I>(criteria: FilterQuery<D>, update: I, options: Record<string, unknown>): Promise<T> {\n try {\n const { overWrite, ...remaining } = options;\n let old = {};\n if (!overWrite) {\n old = await this.get(criteria);\n if (!old) {\n throw Error(\n `(update) No existing record found for update with criteria ${JSON.stringify(criteria)}`,\n );\n }\n }\n return this.model.findOneAndUpdate(\n this.mapConditions(criteria),\n mergeWith(old, update, (obj, src) => {\n if (Array.isArray(src) && Array.isArray(obj)) {\n return src;\n }\n }),\n { new: true, useFindAndModify: false, ...remaining },\n ) as unknown as Promise<T>;\n } catch (e) {\n this.logger.error(`Unable to Update with criteria ${criteria} and data ${update}`);\n throw e;\n }\n }\n\n public async delete(criteria: FilterQuery<D>): Promise<boolean> {\n try {\n const deleted = await this.model.findOneAndDelete(this.mapConditions(criteria));\n return !!deleted;\n } catch (e) {\n this.logger.error(`Unable to delete the model with criteria ${criteria}`);\n throw e;\n }\n }\n\n public async bulkDelete(criteria: FilterQuery<D>): Promise<number> {\n try {\n const deleted = await this.model.deleteMany(this.mapConditions(criteria));\n return deleted?.deletedCount || 0;\n } catch (e) {\n this.logger.error(`Unable to delete the model with criteria ${criteria}`);\n throw e;\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n private mapConditions(conditions: FilterQuery<D>): FilterQuery<D> {\n const { id: _id, ...remaining } = conditions;\n return {\n ...(_id ? { _id } : {}),\n ...remaining,\n };\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\n// @ts-ignore\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IChannel } from '@messenger-box/core';\nimport { ChannelModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class ChannelRepository extends BaseRepository<IChannel> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(ChannelModelFunc, db, logger, options);\n }\n}\n","export * from './channel-repository';\nexport * from './post-repository';\nexport * from './post-thread-repository';\nexport * from './reaction-repository';\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IPost } from '@messenger-box/core';\nimport { PostModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class PostRepository extends BaseRepository<IPost> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(PostModelFunc, db, logger, options);\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nimport { inject, injectable, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server/lib/logger';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { IPostThread } from '@messenger-box/core';\nimport { PostThreadModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\n\n@injectable()\nexport class PostThreadRepository extends BaseRepository<IPostThread> {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(PostThreadModelFunc, db, logger, options);\n }\n}\n","import { IReaction } from '@messenger-box/core';\nimport { inject, optional } from 'inversify';\nimport { Connection } from 'mongoose';\nimport { logger as Logger } from '@cdm-logger/server';\nimport { IMongoOptions } from '@common-stack/store-mongo';\nimport { ReactionModelFunc } from '../models';\nimport { BaseRepository } from './base-repository';\nimport { IReactionRepository } from '../../interfaces';\n\nexport class ReactionRepository extends BaseRepository<IReaction> implements IReactionRepository {\n constructor(\n @inject('MongoDBConnection')\n db: Connection,\n @inject('Logger')\n logger: typeof Logger,\n @inject('IMongoOptions')\n @optional()\n options?: IMongoOptions,\n ) {\n super(ReactionModelFunc, db, logger, options);\n }\n}\n","module.exports = require(\"@adminide-stack/core\");","module.exports = require(\"@adminide-stack/platform-server\");","module.exports = require(\"@common-stack/core\");","module.exports = require(\"@common-stack/server-core\");","module.exports = require(\"@container-stack/file-info-core\");","module.exports = require(\"@messenger-box/core\");","module.exports = require(\"envalid\");","module.exports = require(\"inversify\");","module.exports = require(\"lodash\");","module.exports = require(\"moleculer\");","module.exports = require(\"mongoose\");"],"sourceRoot":""}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import { IPost } from '@messenger-box/core';
|
|
1
|
+
import { IFileInfo, IPost, IUploadedFileInput } from '@messenger-box/core';
|
|
2
2
|
import { IBaseService } from './base-service';
|
|
3
|
-
export
|
|
3
|
+
export interface IPostServiceInput extends Omit<IPost, 'id' | 'files'> {
|
|
4
|
+
files: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface IPostService extends IBaseService<IPost, IPostServiceInput> {
|
|
7
|
+
createFileUploadLink(postId: string, filename: string, userId: string): Promise<string>;
|
|
8
|
+
attachUploadedFile(postId: string, file: IUploadedFileInput, createdBy: string): Promise<IFileInfo>;
|
|
9
|
+
deleteFile(url: string): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Service, ServiceBroker } from 'moleculer';
|
|
2
2
|
import { Container } from 'inversify';
|
|
3
3
|
export declare class PostMoleculerService extends Service {
|
|
4
|
-
private postService;
|
|
4
|
+
private readonly postService;
|
|
5
5
|
constructor(broker: ServiceBroker, { container, ...settings }: {
|
|
6
6
|
container: Container;
|
|
7
7
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Service, ServiceBroker } from 'moleculer';
|
|
2
2
|
import { Container } from 'inversify';
|
|
3
3
|
export declare class PostThreadMoleculerService extends Service {
|
|
4
|
-
private postThreadService;
|
|
4
|
+
private readonly postThreadService;
|
|
5
5
|
constructor(broker: ServiceBroker, { container, ...settings }: {
|
|
6
6
|
container: Container;
|
|
7
7
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Service, ServiceBroker } from 'moleculer';
|
|
2
2
|
import { Container } from 'inversify';
|
|
3
|
-
export declare class
|
|
4
|
-
private reactionService;
|
|
3
|
+
export declare class ReactionMoleculerService extends Service {
|
|
4
|
+
private readonly reactionService;
|
|
5
5
|
constructor(broker: ServiceBroker, { container, ...settings }: {
|
|
6
6
|
container: Container;
|
|
7
7
|
});
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { IPost } from '@messenger-box/core';
|
|
1
|
+
import { IPost, IUploadedFileInput, IFileInfo } from '@messenger-box/core';
|
|
2
|
+
import { IFileInfoService } from '@container-stack/file-info-core';
|
|
2
3
|
import { BaseService } from './base-service';
|
|
3
4
|
import { PostRepository } from '../store';
|
|
4
|
-
import { IPostService } from '../interfaces';
|
|
5
|
-
export declare class PostService extends BaseService<IPost,
|
|
6
|
-
|
|
5
|
+
import { IPostService, IPostServiceInput } from '../interfaces';
|
|
6
|
+
export declare class PostService extends BaseService<IPost, IPostServiceInput> implements IPostService {
|
|
7
|
+
private readonly fileInfoService;
|
|
8
|
+
constructor(repository: PostRepository, fileInfoService: IFileInfoService);
|
|
9
|
+
createFileUploadLink(postId: string, filename: string, userId: string): Promise<string>;
|
|
10
|
+
attachUploadedFile(postId: string, file: IUploadedFileInput, createdBy: string): Promise<IFileInfo>;
|
|
11
|
+
deleteFile(url: string): Promise<boolean>;
|
|
7
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ServiceBroker } from 'moleculer';
|
|
2
2
|
import * as Logger from 'bunyan';
|
|
3
|
-
import { IMoleculerTopics as MoleculerTopics, IPost } from '@messenger-box/core';
|
|
4
|
-
import { IPostService } from '../../interfaces';
|
|
3
|
+
import { IMoleculerTopics as MoleculerTopics, IPost, IUploadedFileInput, IFileInfo } from '@messenger-box/core';
|
|
4
|
+
import { IPostService, IPostServiceInput } from '../../interfaces';
|
|
5
5
|
import { BaseProxyService } from './base-proxy-service';
|
|
6
|
-
export declare class PostProxyService extends BaseProxyService<IPost,
|
|
6
|
+
export declare class PostProxyService extends BaseProxyService<IPost, IPostServiceInput> implements IPostService {
|
|
7
7
|
topic: MoleculerTopics;
|
|
8
8
|
constructor(broker: ServiceBroker, logger: Logger);
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
attachUploadedFile(postId: string, file: IUploadedFileInput, createdBy: string): Promise<IFileInfo>;
|
|
10
|
+
createFileUploadLink(postId: string, filename: string, userId: string): Promise<string>;
|
|
11
|
+
deleteFile(url: string): Promise<boolean>;
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/platform-server",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.136",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adminide-stack/account-api-server": "1.1.1-alpha.300",
|
|
42
|
-
"@messenger-box/core": "0.0.1-alpha.
|
|
42
|
+
"@messenger-box/core": "0.0.1-alpha.136"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@adminide-stack/core": "*",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"typescript": {
|
|
62
62
|
"definition": "lib/index.d.ts"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "61863a9dcf100c127b6ae6e2de27e2e0ca101f14"
|
|
65
65
|
}
|