@messenger-box/platform-server 10.0.3-alpha.7 → 10.0.3-alpha.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/lib/containers/containers.js +4 -1
  2. package/lib/containers/containers.js.map +1 -1
  3. package/lib/containers/context-services-from-container.d.ts +1 -1
  4. package/lib/containers/context-services-from-container.js +1 -1
  5. package/lib/containers/context-services-from-container.js.map +1 -1
  6. package/lib/graphql/resolvers/channel-member.d.ts +3 -2
  7. package/lib/graphql/resolvers/channel-member.js +30 -5
  8. package/lib/graphql/resolvers/channel-member.js.map +1 -1
  9. package/lib/graphql/resolvers/channel.d.ts +3 -2
  10. package/lib/graphql/resolvers/channel.js +279 -53
  11. package/lib/graphql/resolvers/channel.js.map +1 -1
  12. package/lib/graphql/resolvers/extended-token-account.d.ts +3 -2
  13. package/lib/graphql/resolvers/extended-token-account.js +90 -23
  14. package/lib/graphql/resolvers/extended-token-account.js.map +1 -1
  15. package/lib/graphql/resolvers/index.d.ts +1 -1
  16. package/lib/graphql/resolvers/post-thread.d.ts +1 -1
  17. package/lib/graphql/resolvers/post-thread.js +294 -132
  18. package/lib/graphql/resolvers/post-thread.js.map +1 -1
  19. package/lib/graphql/resolvers/post.d.ts +2 -3
  20. package/lib/graphql/resolvers/post.js +696 -234
  21. package/lib/graphql/resolvers/post.js.map +1 -1
  22. package/lib/graphql/resolvers/reaction.d.ts +3 -2
  23. package/lib/graphql/resolvers/reaction.js +96 -14
  24. package/lib/graphql/resolvers/reaction.js.map +1 -1
  25. package/lib/graphql/schema/channel-member.graphql +110 -21
  26. package/lib/graphql/schema/channel-member.graphql.js +1 -1
  27. package/lib/graphql/schema/channel.graphql +337 -38
  28. package/lib/graphql/schema/channel.graphql.js +1 -1
  29. package/lib/graphql/schema/post-thread.graphql +167 -21
  30. package/lib/graphql/schema/post-thread.graphql.js +1 -1
  31. package/lib/graphql/schema/post.graphql +284 -40
  32. package/lib/graphql/schema/post.graphql.js +1 -1
  33. package/lib/graphql/schema/reaction.graphql +71 -13
  34. package/lib/graphql/schema/reaction.graphql.js +1 -1
  35. package/lib/graphql/schema/services.graphql +2 -0
  36. package/lib/graphql/schema/users.graphql +76 -13
  37. package/lib/graphql/schema/users.graphql.js +1 -1
  38. package/lib/index.js +1 -1
  39. package/lib/index.js.map +1 -1
  40. package/lib/interfaces/index.d.ts +0 -1
  41. package/lib/interfaces/services.d.ts +1 -1
  42. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.d.ts +17 -0
  43. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js +44 -0
  44. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js.map +1 -0
  45. package/lib/migrations/dbMigrations/index.d.ts +1 -0
  46. package/lib/migrations/index.d.ts +1 -0
  47. package/lib/migrations/mail-template-migration.js +1 -1
  48. package/lib/migrations/message-notification-template-migration.d.ts +1 -1
  49. package/lib/migrations/message-notification-template-migration.js +1 -1
  50. package/lib/plugins/channel-moleculer-service.d.ts +21 -1
  51. package/lib/plugins/channel-moleculer-service.js +417 -115
  52. package/lib/plugins/channel-moleculer-service.js.map +1 -1
  53. package/lib/plugins/extended-token-account-moleculer-service.d.ts +25 -1
  54. package/lib/plugins/extended-token-account-moleculer-service.js +348 -22
  55. package/lib/plugins/extended-token-account-moleculer-service.js.map +1 -1
  56. package/lib/plugins/messenger-notification-moleculer-service.d.ts +27 -3
  57. package/lib/plugins/messenger-notification-moleculer-service.js +404 -58
  58. package/lib/plugins/messenger-notification-moleculer-service.js.map +1 -1
  59. package/lib/plugins/post-moleculer-service.d.ts +85 -21
  60. package/lib/plugins/post-moleculer-service.js +986 -256
  61. package/lib/plugins/post-moleculer-service.js.map +1 -1
  62. package/lib/plugins/post-thread-moleculer-service.d.ts +33 -1
  63. package/lib/plugins/post-thread-moleculer-service.js +326 -8
  64. package/lib/plugins/post-thread-moleculer-service.js.map +1 -1
  65. package/lib/plugins/reaction-moleculer-service.js +1 -1
  66. package/lib/plugins/reaction-moleculer-service.js.map +1 -1
  67. package/lib/preferences/settings/post-settings.d.ts +2 -0
  68. package/lib/preferences/settings/post-settings.js +47 -9
  69. package/lib/preferences/settings/post-settings.js.map +1 -1
  70. package/lib/services/channel-service.d.ts +179 -33
  71. package/lib/services/channel-service.js +821 -274
  72. package/lib/services/channel-service.js.map +1 -1
  73. package/lib/services/extended-token-account-service.d.ts +130 -14
  74. package/lib/services/extended-token-account-service.js +462 -52
  75. package/lib/services/extended-token-account-service.js.map +1 -1
  76. package/lib/services/index.d.ts +1 -0
  77. package/lib/services/messenger-notification-service.d.ts +106 -13
  78. package/lib/services/messenger-notification-service.js +824 -442
  79. package/lib/services/messenger-notification-service.js.map +1 -1
  80. package/lib/services/post-service.d.ts +182 -16
  81. package/lib/services/post-service.js +731 -115
  82. package/lib/services/post-service.js.map +1 -1
  83. package/lib/services/post-thread-service.d.ts +114 -5
  84. package/lib/services/post-thread-service.js +400 -13
  85. package/lib/services/post-thread-service.js.map +1 -1
  86. package/lib/services/proxy-services/channel-microservice.d.ts +5 -3
  87. package/lib/services/proxy-services/channel-microservice.js +19 -10
  88. package/lib/services/proxy-services/channel-microservice.js.map +1 -1
  89. package/lib/services/proxy-services/messenger-notification-microservice.d.ts +128 -8
  90. package/lib/services/proxy-services/messenger-notification-microservice.js +324 -29
  91. package/lib/services/proxy-services/messenger-notification-microservice.js.map +1 -1
  92. package/lib/services/proxy-services/post-microservice.d.ts +186 -12
  93. package/lib/services/proxy-services/post-microservice.js +543 -54
  94. package/lib/services/proxy-services/post-microservice.js.map +1 -1
  95. package/lib/services/proxy-services/post-thread-microservice.d.ts +134 -3
  96. package/lib/services/proxy-services/post-thread-microservice.js +388 -6
  97. package/lib/services/proxy-services/post-thread-microservice.js.map +1 -1
  98. package/lib/services/proxy-services/reaction-microservice.d.ts +161 -3
  99. package/lib/services/proxy-services/reaction-microservice.js +474 -2
  100. package/lib/services/proxy-services/reaction-microservice.js.map +1 -1
  101. package/lib/services/reaction-service.d.ts +124 -4
  102. package/lib/services/reaction-service.js +415 -3
  103. package/lib/services/reaction-service.js.map +1 -1
  104. package/lib/services/redis-cache-manager.d.ts +18 -0
  105. package/lib/services/redis-cache-manager.js +83 -0
  106. package/lib/services/redis-cache-manager.js.map +1 -0
  107. package/lib/store/models/account-token-store.d.ts +1 -1
  108. package/lib/store/models/account-token-store.js.map +1 -1
  109. package/lib/store/models/channel.d.ts +2 -3
  110. package/lib/store/models/channel.js +181 -72
  111. package/lib/store/models/channel.js.map +1 -1
  112. package/lib/store/models/post-thread.d.ts +3 -3
  113. package/lib/store/models/post-thread.js +96 -14
  114. package/lib/store/models/post-thread.js.map +1 -1
  115. package/lib/store/models/post.d.ts +2 -3
  116. package/lib/store/models/post.js +143 -23
  117. package/lib/store/models/post.js.map +1 -1
  118. package/lib/store/models/reaction.d.ts +2 -3
  119. package/lib/store/models/reaction.js +67 -8
  120. package/lib/store/models/reaction.js.map +1 -1
  121. package/lib/store/repositories/__tests__/__fixtures__/team-repository.d.ts +3 -3
  122. package/lib/store/repositories/channel-repository.d.ts +6 -6
  123. package/lib/store/repositories/channel-repository.js +5 -2
  124. package/lib/store/repositories/channel-repository.js.map +1 -1
  125. package/lib/store/repositories/post-repository.d.ts +6 -6
  126. package/lib/store/repositories/post-repository.js +5 -2
  127. package/lib/store/repositories/post-repository.js.map +1 -1
  128. package/lib/store/repositories/post-thread-repository.d.ts +6 -6
  129. package/lib/store/repositories/post-thread-repository.js +5 -2
  130. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  131. package/lib/store/repositories/reaction-repository.d.ts +6 -6
  132. package/lib/store/repositories/reaction-repository.js +5 -2
  133. package/lib/store/repositories/reaction-repository.js.map +1 -1
  134. package/lib/templates/constants/SERVER_TYPES.ts.template +0 -3
  135. package/lib/templates/repositories/ChannelRepository.ts.template +3 -3
  136. package/lib/templates/repositories/PostRepository.ts.template +3 -3
  137. package/lib/templates/repositories/PostThreadRepository.ts.template +3 -3
  138. package/lib/templates/repositories/ReactionRepository.ts.template +3 -4
  139. package/lib/templates/services/ChannelService.ts.template +280 -39
  140. package/lib/templates/services/ExtendedTokenAccountService.ts.template +104 -9
  141. package/lib/templates/services/MessengerNotificationService.ts.template +94 -19
  142. package/lib/templates/services/PostService.ts.template +184 -20
  143. package/lib/templates/services/PostThreadService.ts.template +151 -6
  144. package/lib/templates/services/ReactionService.ts.template +129 -3
  145. package/lib/templates/services/RedisCacheManager.ts.template +22 -0
  146. package/package.json +6 -5
  147. package/lib/interfaces/context.d.ts +0 -14
  148. package/lib/store/models/common-options.js +0 -20
  149. package/lib/store/models/common-options.js.map +0 -1
@@ -1,20 +1,78 @@
1
- type Reaction{
2
- id:ID!
3
- reaction:String!,
4
- user: UserAccount!,
5
- post: Post!
1
+ """
2
+ Reaction: A user reaction to a post (emoji, like, etc.)
3
+ """
4
+ type Reaction @entity {
5
+ """
6
+ Unique identifier for the reaction
7
+ """
8
+ id: ID! @id
9
+
10
+ """
11
+ Reaction content (emoji, text, etc.)
12
+ """
13
+ reaction: String! @column
14
+
15
+ """
16
+ User who made the reaction
17
+ """
18
+ user: UserAccount! @column(overrideType: "ObjectId")
19
+
20
+ """
21
+ Post that was reacted to
22
+ """
23
+ post: Post! @column(overrideType: "ObjectId")
24
+
25
+ """
26
+ Creation timestamp
27
+ """
28
+ createdAt: DateTime @column(overrideType: "Date")
29
+
30
+ """
31
+ Last update timestamp
32
+ """
33
+ updatedAt: DateTime @column(overrideType: "Date")
34
+
35
+ """
36
+ Deletion timestamp
37
+ """
38
+ deletedAt: DateTime @column(overrideType: "Date")
6
39
  }
7
40
 
8
- input ReactionInput{
9
- reaction:String!,
41
+ """
42
+ Reaction input for creating reactions
43
+ """
44
+ input ReactionInput {
45
+ """
46
+ Reaction content
47
+ """
48
+ reaction: String!
49
+
50
+ """
51
+ Post identifier to react to
52
+ """
10
53
  post: String!
11
54
  }
12
55
 
13
- extend type Query{
14
- getPostReactions(message:ID!):[Reaction] @isAuthenticated
56
+ extend type Query {
57
+ """
58
+ Get all reactions for a specific post
59
+ """
60
+ getPostReactions(message: ID!): [Reaction] @isAuthenticated
15
61
  }
16
- extend type Mutation{
17
- addReactionToMessage(reaction:ReactionInput):Reaction @isAuthenticated @addAccountContext
18
- updateReactionToMessage(id:ID!, reaction:String!):Reaction @isAuthenticated @addAccountContext
19
- removeReactionFromMessage(id:ID!):Boolean @isAuthenticated @addAccountContext
62
+
63
+ extend type Mutation {
64
+ """
65
+ Add a reaction to a message
66
+ """
67
+ addReactionToMessage(reaction: ReactionInput): Reaction @isAuthenticated @addAccountContext
68
+
69
+ """
70
+ Update an existing reaction
71
+ """
72
+ updateReactionToMessage(id: ID!, reaction: String!): Reaction @isAuthenticated @addAccountContext
73
+
74
+ """
75
+ Remove a reaction from a message
76
+ """
77
+ removeReactionFromMessage(id: ID!): Boolean @isAuthenticated @addAccountContext
20
78
  }
@@ -1 +1 @@
1
- var reactionSchema = "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{reactionSchema as default};//# sourceMappingURL=reaction.graphql.js.map
1
+ var reactionSchema = "\"\"\"\nReaction: A user reaction to a post (emoji, like, etc.)\n\"\"\"\ntype Reaction @entity {\n \"\"\"\n Unique identifier for the reaction\n \"\"\"\n id: ID! @id\n \n \"\"\"\n Reaction content (emoji, text, etc.)\n \"\"\"\n reaction: String! @column\n \n \"\"\"\n User who made the reaction\n \"\"\"\n user: UserAccount! @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Post that was reacted to\n \"\"\"\n post: Post! @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Creation timestamp\n \"\"\"\n createdAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Last update timestamp\n \"\"\"\n updatedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Deletion timestamp\n \"\"\"\n deletedAt: DateTime @column(overrideType: \"Date\")\n}\n\n\"\"\"\nReaction input for creating reactions\n\"\"\"\ninput ReactionInput {\n \"\"\"\n Reaction content\n \"\"\"\n reaction: String!\n \n \"\"\"\n Post identifier to react to\n \"\"\"\n post: String!\n}\n\nextend type Query {\n \"\"\"\n Get all reactions for a specific post\n \"\"\"\n getPostReactions(message: ID!): [Reaction] @isAuthenticated\n}\n\nextend type Mutation {\n \"\"\"\n Add a reaction to a message\n \"\"\"\n addReactionToMessage(reaction: ReactionInput): Reaction @isAuthenticated @addAccountContext\n \n \"\"\"\n Update an existing reaction\n \"\"\"\n updateReactionToMessage(id: ID!, reaction: String!): Reaction @isAuthenticated @addAccountContext\n \n \"\"\"\n Remove a reaction from a message\n \"\"\"\n removeReactionFromMessage(id: ID!): Boolean @isAuthenticated @addAccountContext\n}\n";export{reactionSchema as default};//# sourceMappingURL=reaction.graphql.js.map
@@ -53,8 +53,10 @@ enum PostServiceCommands {
53
53
  deliverMessage
54
54
  createWithoutSubscription
55
55
  createPostWithPostThread
56
+ getLastMessage
56
57
  }
57
58
 
58
59
  enum PostThreadServiceCommands {
59
60
  getPostThread
61
+ getPostThreadCount
60
62
  }
@@ -1,23 +1,86 @@
1
+ """
2
+ Messenger user status enumeration
3
+ """
1
4
  enum MessengerUserStatus {
5
+ """
6
+ User is online and available
7
+ """
2
8
  ONLINE
9
+
10
+ """
11
+ User is away
12
+ """
3
13
  AWAY
14
+
15
+ """
16
+ User is busy
17
+ """
4
18
  BUSY
19
+
20
+ """
21
+ User is invisible/offline
22
+ """
5
23
  INVISIBLE
6
24
  }
7
25
 
8
- type MessengerUser implements IUser {
9
- id: ID!
10
- username: String
11
- email: String
12
- status: MessengerUserStatus
13
- avatar: String
14
- name: String
15
- lastLogin: String
16
- channels: [Channel]
17
- directMessages: [Channel]
26
+ """
27
+ Messenger user: A user within the messenger system
28
+ """
29
+ type MessengerUser implements IUser @entity {
30
+ """
31
+ Unique identifier for the user
32
+ """
33
+ id: ID! @id
34
+
35
+ """
36
+ User's username
37
+ """
38
+ username: String @column
39
+
40
+ """
41
+ User's email address
42
+ """
43
+ email: String @column
44
+
45
+ """
46
+ User's current status
47
+ """
48
+ status: MessengerUserStatus @column
49
+
50
+ """
51
+ User's avatar URL
52
+ """
53
+ avatar: String @column
54
+
55
+ """
56
+ User's display name
57
+ """
58
+ name: String @column
59
+
60
+ """
61
+ Last login timestamp
62
+ """
63
+ lastLogin: String @column(overrideType: "Date")
64
+
65
+ """
66
+ Channels user is a member of
67
+ """
68
+ channels: [Channel] @column(overrideType: "ObjectId[]")
69
+
70
+ """
71
+ Direct message channels
72
+ """
73
+ directMessages: [Channel] @column(overrideType: "ObjectId[]")
18
74
  }
19
75
 
20
- extend type Query{
21
- usersToChat(auth0Id:String!):[UserAccount] @isAuthenticated @addAccountContext
22
- currentUser(auth0Id:String!):UserAccount @isAuthenticated @addAccountContext
76
+ extend type Query {
77
+ """
78
+ Get users available for chat
79
+ """
80
+ usersToChat(auth0Id: String!): [UserAccount] @isAuthenticated @addAccountContext
81
+
82
+ """
83
+ Get current user information
84
+ """
85
+ currentUser(auth0Id: String!): UserAccount @isAuthenticated @addAccountContext
23
86
  }
@@ -1 +1 @@
1
- var usersSchema = "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";export{usersSchema as default};//# sourceMappingURL=users.graphql.js.map
1
+ var usersSchema = "\"\"\"\nMessenger user status enumeration\n\"\"\"\nenum MessengerUserStatus {\n \"\"\"\n User is online and available\n \"\"\"\n ONLINE\n \n \"\"\"\n User is away\n \"\"\"\n AWAY\n \n \"\"\"\n User is busy\n \"\"\"\n BUSY\n \n \"\"\"\n User is invisible/offline\n \"\"\"\n INVISIBLE\n}\n\n\"\"\"\nMessenger user: A user within the messenger system\n\"\"\"\ntype MessengerUser implements IUser @entity {\n \"\"\"\n Unique identifier for the user\n \"\"\"\n id: ID! @id\n \n \"\"\"\n User's username\n \"\"\"\n username: String @column\n \n \"\"\"\n User's email address\n \"\"\"\n email: String @column\n \n \"\"\"\n User's current status\n \"\"\"\n status: MessengerUserStatus @column\n \n \"\"\"\n User's avatar URL\n \"\"\"\n avatar: String @column\n \n \"\"\"\n User's display name\n \"\"\"\n name: String @column\n \n \"\"\"\n Last login timestamp\n \"\"\"\n lastLogin: String @column(overrideType: \"Date\")\n \n \"\"\"\n Channels user is a member of\n \"\"\"\n channels: [Channel] @column(overrideType: \"ObjectId[]\")\n \n \"\"\"\n Direct message channels\n \"\"\"\n directMessages: [Channel] @column(overrideType: \"ObjectId[]\")\n}\n\nextend type Query {\n \"\"\"\n Get users available for chat\n \"\"\"\n usersToChat(auth0Id: String!): [UserAccount] @isAuthenticated @addAccountContext\n \n \"\"\"\n Get current user information\n \"\"\"\n currentUser(auth0Id: String!): UserAccount @isAuthenticated @addAccountContext\n}\n";export{usersSchema as default};//# sourceMappingURL=users.graphql.js.map
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {Feature}from'@common-stack/server-core';import MessengerModule from'./module.js';export{DEFAULT_SORTING,PAGINATION_OPTIONS}from'./constants/query.constants.js';export{DEFAULT_NOTIFY_PROPS}from'./constants/default-notify-props.js';export{PostTypes}from'./preferences/settings/post-settings.js';import'./preferences/permissions/inbox-permission-contribution.js';import'./preferences/permissions/inbox-roles-permission-overwrite.js';import'./migrations/message-notification-template-migration.js';export{MailTemplateMigration}from'./migrations/mail-template-migration.js';/* eslint-disable import/no-extraneous-dependencies */
1
+ import {Feature}from'@common-stack/server-core';import MessengerModule from'./module.js';export{DEFAULT_SORTING,PAGINATION_OPTIONS}from'./constants/query.constants.js';export{DEFAULT_NOTIFY_PROPS}from'./constants/default-notify-props.js';export{PostTypes}from'./preferences/settings/post-settings.js';import'./preferences/permissions/inbox-permission-contribution.js';import'./preferences/permissions/inbox-roles-permission-overwrite.js';import'./migrations/message-notification-template-migration.js';export{MailTemplateMigration}from'./migrations/mail-template-migration.js';import'./migrations/dbMigrations/AddPostsConfigurationsMigration.js';/* eslint-disable import/no-extraneous-dependencies */
2
2
  var index = new Feature(MessengerModule);export{index as default};//# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"ikBAAA;AAKA,YAAe,IAAI,OAAO,CAAC,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"soBAAA;AAKA,YAAe,IAAI,OAAO,CAAC,eAAe,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export { GetAllArgs } from '@common-stack/store-mongo';
2
2
  export * from './services';
3
- export * from './context';
@@ -1,5 +1,5 @@
1
1
  import { PubSub } from 'graphql-subscriptions';
2
- import { IPostThreadService, IReactionService, IMessengerNotificationService, IExtendedTokenAccountService, IPostService, IChannelService, IFileInfoService } from 'common';
2
+ import { IPostThreadService, IReactionService, IMessengerNotificationService, IExtendedTokenAccountService, IPostService, IChannelService, IFileInfoService } from 'common/server';
3
3
  export interface IServices {
4
4
  pubsub?: PubSub;
5
5
  channelService: IChannelService;
@@ -0,0 +1,17 @@
1
+ import { IConfigurationRegistry } from '@adminide-stack/core';
2
+ import type { Connection } from 'mongoose';
3
+ import { CdmLogger } from '@cdm-logger/core';
4
+ import { IRedisCacheManager } from 'common/server';
5
+ import { BaseConfigurationsMigration } from '@adminide-stack/platform-server';
6
+ export declare class AddPostsConfigurationsMigration extends BaseConfigurationsMigration {
7
+ name: string;
8
+ constructor(db: Connection, configurationRegistry: IConfigurationRegistry, logger: CdmLogger.ILogger, redisCacheManager: IRedisCacheManager);
9
+ get id(): string;
10
+ get policies(): {};
11
+ get roles(): {};
12
+ get permissions(): {};
13
+ get settings(): {
14
+ [path: string]: import("@adminide-stack/core").IConfigurationPropertySchema;
15
+ };
16
+ get permissionsOverride(): {};
17
+ }
@@ -0,0 +1,44 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import'@cdm-logger/core';import {SERVER_TYPES}from'common/server';import {PostSettings}from'../../preferences/settings/post-settings.js';import'../../preferences/permissions/inbox-permission-contribution.js';import'../../preferences/permissions/inbox-roles-permission-overwrite.js';import {BaseConfigurationsMigration}from'@adminide-stack/platform-server';var AddPostsConfigurationsMigration_1;
2
+ let AddPostsConfigurationsMigration = AddPostsConfigurationsMigration_1 = class AddPostsConfigurationsMigration extends BaseConfigurationsMigration {
3
+ name = 'posts';
4
+ constructor(db, configurationRegistry, logger, redisCacheManager) {
5
+ super(db, configurationRegistry, redisCacheManager, logger);
6
+ }
7
+ get id() {
8
+ return `${AddPostsConfigurationsMigration_1.name}_20250520`;
9
+ }
10
+ get policies() {
11
+ return {};
12
+ // return Policie
13
+ // sContribution.reduce(
14
+ // (acc, curr) => ({
15
+ // ...acc,
16
+ // ...curr,
17
+ // }),
18
+ // {},
19
+ // );
20
+ }
21
+ get roles() {
22
+ return {};
23
+ // return AccountRolesContribution;
24
+ }
25
+ get permissions() {
26
+ return {};
27
+ // return AccountPermissionsContribution;
28
+ }
29
+ get settings() {
30
+ return PostSettings;
31
+ // return PostSettings.reduce(
32
+ // (acc, curr) => ({
33
+ // ...acc,
34
+ // ...curr,
35
+ // }),
36
+ // {},
37
+ // );
38
+ }
39
+ get permissionsOverride() {
40
+ return {};
41
+ // return AccountRolesPermissionOverwrite;
42
+ }
43
+ };
44
+ AddPostsConfigurationsMigration = AddPostsConfigurationsMigration_1 = __decorate([injectable(), __param(0, inject('MongoDBConnection')), __param(1, inject(SERVER_TYPES.IConfigurationRegistry)), __param(2, inject('Logger')), __param(3, inject(SERVER_TYPES.IRedisCacheManager)), __metadata("design:paramtypes", [Function, Object, Object, Object])], AddPostsConfigurationsMigration);export{AddPostsConfigurationsMigration};//# sourceMappingURL=AddPostsConfigurationsMigration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddPostsConfigurationsMigration.js","sources":["../../../src/migrations/dbMigrations/AddPostsConfigurationsMigration.ts"],"sourcesContent":[null],"names":[],"mappings":";AASO,IAAM,+BAA+B,GAAA,iCAAA,GAArC,MAAM,+BAAgC,SAAQ,2BAA2B,CAAA;MACxE,GAAA;AAEJ,EAAA,WAAA,CAAA,EACiC,EAAc,qBACE,EAA6C,MAE1F,EAAyB,iBAEY,EAAA;SAEhC,CAAA,EAAA,EAAC,qBAAI,EAAA,iBAAwC,EAAA,MAAQ,CAAA;;AAG9D,EAAA,IAAA,EAAI,GAAE;AACF,IAAA,OAAA,CAAA,EAAA,iCAAU,CAAA,IAAgC,CAAA;;AAG9C,EAAA,IAAA,QAAY,GAAA;AACR,IAAA,OAAA,EAAA;;;;;;;;;;AAWJ,EAAA,IAAA,KAAS,GAAA;AACL,IAAA,OAAA,EAAA;;;AAIJ,EAAA,IAAA,WAAe,GAAA;AACX,IAAA,OAAA,EAAA;;;AAIJ,EAAA,IAAA,QAAY,GAAA;AACR,IAAA,OAAA;;;;;;;;;AAUJ,EAAA,IAAA,mBAAuB,GAAA;AACnB,IAAA,OAAA,EAAA;;;;AApDK,+BAA+B,GAAA,iCAAA,GAAA,UAAA,CAAA,CAAA,UAAA,EAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,mBAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,YAAA,CAAA,kBAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,+BAAA,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './AddPostsConfigurationsMigration';
@@ -1,2 +1,3 @@
1
1
  export { MessageNotificationTemplateMigration } from './message-notification-template-migration';
2
2
  export { MailTemplateMigration } from './mail-template-migration';
3
+ export * from './dbMigrations';
@@ -1,4 +1,4 @@
1
- import {__decorate,__param,__metadata}from'tslib';import {injectable,inject,tagged}from'inversify';import {MailServiceAction,MoleculerServiceName}from'common';import ejsLint from'ejs-lint';import {CommonType,TaggedType}from'@common-stack/core';import {ServiceBroker}from'moleculer';import'@cdm-logger/core';import {config}from'../config/env-config.js';var MailTemplateMigration_1;
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject,tagged}from'inversify';import {MailServiceAction,MoleculerServiceName}from'common/server';import ejsLint from'ejs-lint';import {CommonType,TaggedType}from'@common-stack/core';import {ServiceBroker}from'moleculer';import'@cdm-logger/core';import {config}from'../config/env-config.js';var MailTemplateMigration_1;
2
2
  let MailTemplateMigration = MailTemplateMigration_1 = class MailTemplateMigration {
3
3
  logger;
4
4
  broker;
@@ -2,7 +2,7 @@ import { CdmLogger } from '@cdm-logger/core';
2
2
  import { Connection } from 'mongoose';
3
3
  import { IDatabaseMigration, IIResourceUtilizationSettings } from '@adminide-stack/core';
4
4
  import { ServiceBroker } from 'moleculer';
5
- import { MailTemplateId } from 'common';
5
+ import { MailTemplateId } from 'common/server';
6
6
  export declare class MessageNotificationTemplateMigration implements IDatabaseMigration {
7
7
  private logger;
8
8
  private db;
@@ -1,4 +1,4 @@
1
- import {__decorate,__param,__metadata}from'tslib';import'@cdm-logger/core';import {Connection}from'mongoose';import {MailTemplateId,MailServiceAction,MoleculerServiceName}from'common';import {injectable,inject,tagged}from'inversify';import {CommonType,TaggedType}from'@common-stack/core';import {ServiceBroker}from'moleculer';import {config}from'../config/env-config.js';var MessageNotificationTemplateMigration_1;
1
+ import {__decorate,__param,__metadata}from'tslib';import'@cdm-logger/core';import {Connection}from'mongoose';import {MailTemplateId,MailServiceAction,MoleculerServiceName}from'common/server';import {injectable,inject,tagged}from'inversify';import {CommonType,TaggedType}from'@common-stack/core';import {ServiceBroker}from'moleculer';import {config}from'../config/env-config.js';var MessageNotificationTemplateMigration_1;
2
2
  let MessageNotificationTemplateMigration = MessageNotificationTemplateMigration_1 = class MessageNotificationTemplateMigration {
3
3
  logger;
4
4
  db;
@@ -1,7 +1,27 @@
1
1
  import { Service, ServiceBroker } from 'moleculer';
2
2
  import { Container } from 'inversify';
3
+ /**
4
+ * Channel Moleculer Service
5
+ *
6
+ * This service exposes channel management functionality through the Moleculer microservice framework,
7
+ * providing distributed access to channel operations across the messenger platform.
8
+ *
9
+ * Key capabilities:
10
+ * - Channel lifecycle management (creation, updates, deletion)
11
+ * - Member management (adding, removing, role assignment)
12
+ * - Direct and public channel handling
13
+ * - Message and post management within channels
14
+ * - Channel visibility and access control
15
+ * - Notification and unread message tracking
16
+ * - Team-based channel organization
17
+ * - Channel discovery and filtering
18
+ * - Event-driven architecture for channel changes
19
+ * - Comprehensive error handling and logging
20
+ * - Service integration through Apollo GraphQL
21
+ */
3
22
  export declare class ChannelMoleculerService extends Service {
4
- private channelService;
23
+ private readonly channelService;
24
+ private readonly container;
5
25
  constructor(broker: ServiceBroker, { container, ...settings }: {
6
26
  container: Container;
7
27
  });