@messenger-box/platform-server 10.0.3-alpha.50 → 10.0.3-alpha.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/lib/containers/containers.js.map +1 -1
  2. package/lib/graphql/resolvers/channel-member.d.ts +2 -1
  3. package/lib/graphql/resolvers/channel-member.js +13 -3
  4. package/lib/graphql/resolvers/channel-member.js.map +1 -1
  5. package/lib/graphql/resolvers/channel.d.ts +2 -1
  6. package/lib/graphql/resolvers/channel.js +260 -126
  7. package/lib/graphql/resolvers/channel.js.map +1 -1
  8. package/lib/graphql/resolvers/extended-token-account.d.ts +2 -1
  9. package/lib/graphql/resolvers/extended-token-account.js +90 -23
  10. package/lib/graphql/resolvers/extended-token-account.js.map +1 -1
  11. package/lib/graphql/resolvers/post-thread.js +285 -179
  12. package/lib/graphql/resolvers/post-thread.js.map +1 -1
  13. package/lib/graphql/resolvers/post.js +669 -242
  14. package/lib/graphql/resolvers/post.js.map +1 -1
  15. package/lib/graphql/resolvers/reaction.d.ts +2 -1
  16. package/lib/graphql/resolvers/reaction.js +96 -14
  17. package/lib/graphql/resolvers/reaction.js.map +1 -1
  18. package/lib/graphql/schema/channel.graphql +331 -39
  19. package/lib/graphql/schema/channel.graphql.js +1 -1
  20. package/lib/graphql/schema/post-thread.graphql +157 -21
  21. package/lib/graphql/schema/post-thread.graphql.js +1 -1
  22. package/lib/graphql/schema/post.graphql +265 -40
  23. package/lib/graphql/schema/post.graphql.js +1 -1
  24. package/lib/graphql/schema/reaction.graphql +71 -13
  25. package/lib/graphql/schema/reaction.graphql.js +1 -1
  26. package/lib/graphql/schema/users.graphql +76 -13
  27. package/lib/graphql/schema/users.graphql.js +1 -1
  28. package/lib/plugins/channel-moleculer-service.d.ts +21 -1
  29. package/lib/plugins/channel-moleculer-service.js +417 -115
  30. package/lib/plugins/channel-moleculer-service.js.map +1 -1
  31. package/lib/plugins/extended-token-account-moleculer-service.d.ts +25 -1
  32. package/lib/plugins/extended-token-account-moleculer-service.js +348 -22
  33. package/lib/plugins/extended-token-account-moleculer-service.js.map +1 -1
  34. package/lib/plugins/messenger-notification-moleculer-service.d.ts +26 -3
  35. package/lib/plugins/messenger-notification-moleculer-service.js +403 -57
  36. package/lib/plugins/messenger-notification-moleculer-service.js.map +1 -1
  37. package/lib/plugins/post-moleculer-service.d.ts +84 -20
  38. package/lib/plugins/post-moleculer-service.js +891 -259
  39. package/lib/plugins/post-moleculer-service.js.map +1 -1
  40. package/lib/plugins/post-thread-moleculer-service.d.ts +33 -1
  41. package/lib/plugins/post-thread-moleculer-service.js +320 -13
  42. package/lib/plugins/post-thread-moleculer-service.js.map +1 -1
  43. package/lib/services/channel-service.d.ts +185 -33
  44. package/lib/services/channel-service.js +767 -282
  45. package/lib/services/channel-service.js.map +1 -1
  46. package/lib/services/extended-token-account-service.d.ts +127 -14
  47. package/lib/services/extended-token-account-service.js +459 -52
  48. package/lib/services/extended-token-account-service.js.map +1 -1
  49. package/lib/services/messenger-notification-service.d.ts +106 -13
  50. package/lib/services/messenger-notification-service.js +824 -442
  51. package/lib/services/messenger-notification-service.js.map +1 -1
  52. package/lib/services/post-service.d.ts +176 -16
  53. package/lib/services/post-service.js +553 -119
  54. package/lib/services/post-service.js.map +1 -1
  55. package/lib/services/post-thread-service.d.ts +114 -6
  56. package/lib/services/post-thread-service.js +397 -18
  57. package/lib/services/post-thread-service.js.map +1 -1
  58. package/lib/services/proxy-services/channel-microservice.d.ts +4 -3
  59. package/lib/services/proxy-services/channel-microservice.js +12 -9
  60. package/lib/services/proxy-services/channel-microservice.js.map +1 -1
  61. package/lib/services/proxy-services/messenger-notification-microservice.d.ts +128 -8
  62. package/lib/services/proxy-services/messenger-notification-microservice.js +324 -29
  63. package/lib/services/proxy-services/messenger-notification-microservice.js.map +1 -1
  64. package/lib/services/proxy-services/post-microservice.d.ts +186 -13
  65. package/lib/services/proxy-services/post-microservice.js +543 -59
  66. package/lib/services/proxy-services/post-microservice.js.map +1 -1
  67. package/lib/services/proxy-services/post-thread-microservice.d.ts +134 -4
  68. package/lib/services/proxy-services/post-thread-microservice.js +387 -10
  69. package/lib/services/proxy-services/post-thread-microservice.js.map +1 -1
  70. package/lib/services/proxy-services/reaction-microservice.d.ts +161 -3
  71. package/lib/services/proxy-services/reaction-microservice.js +474 -2
  72. package/lib/services/proxy-services/reaction-microservice.js.map +1 -1
  73. package/lib/services/reaction-service.d.ts +124 -4
  74. package/lib/services/reaction-service.js +415 -3
  75. package/lib/services/reaction-service.js.map +1 -1
  76. package/lib/store/models/channel.d.ts +2 -3
  77. package/lib/store/models/channel.js +169 -71
  78. package/lib/store/models/channel.js.map +1 -1
  79. package/lib/store/models/post-thread.d.ts +3 -3
  80. package/lib/store/models/post-thread.js +96 -14
  81. package/lib/store/models/post-thread.js.map +1 -1
  82. package/lib/store/models/post.d.ts +2 -3
  83. package/lib/store/models/post.js +85 -18
  84. package/lib/store/models/post.js.map +1 -1
  85. package/lib/store/models/reaction.d.ts +2 -3
  86. package/lib/store/models/reaction.js +67 -8
  87. package/lib/store/models/reaction.js.map +1 -1
  88. package/lib/store/repositories/channel-repository.d.ts +6 -6
  89. package/lib/store/repositories/channel-repository.js +5 -2
  90. package/lib/store/repositories/channel-repository.js.map +1 -1
  91. package/lib/store/repositories/post-repository.d.ts +6 -6
  92. package/lib/store/repositories/post-repository.js +5 -2
  93. package/lib/store/repositories/post-repository.js.map +1 -1
  94. package/lib/store/repositories/post-thread-repository.d.ts +6 -6
  95. package/lib/store/repositories/post-thread-repository.js +5 -2
  96. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  97. package/lib/store/repositories/reaction-repository.d.ts +6 -6
  98. package/lib/store/repositories/reaction-repository.js +5 -2
  99. package/lib/store/repositories/reaction-repository.js.map +1 -1
  100. package/lib/templates/repositories/ChannelRepository.ts.template +3 -3
  101. package/lib/templates/repositories/PostRepository.ts.template +3 -3
  102. package/lib/templates/repositories/PostThreadRepository.ts.template +3 -3
  103. package/lib/templates/repositories/ReactionRepository.ts.template +3 -4
  104. package/lib/templates/services/ChannelService.ts.template +277 -38
  105. package/lib/templates/services/ExtendedTokenAccountService.ts.template +93 -8
  106. package/lib/templates/services/PostService.ts.template +182 -20
  107. package/lib/templates/services/PostThreadService.ts.template +100 -5
  108. package/lib/templates/services/ReactionService.ts.template +129 -2
  109. package/package.json +3 -3
  110. package/lib/store/models/common-options.js +0 -20
  111. 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
@@ -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
@@ -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
  });