@messenger-box/platform-server 10.0.3-alpha.2 → 10.0.3-alpha.201

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 (303) hide show
  1. package/lib/channels/ack-reactions.d.ts +46 -0
  2. package/lib/channels/ack-reactions.js +48 -0
  3. package/lib/channels/ack-reactions.js.map +1 -0
  4. package/lib/channels/allowlist-match.d.ts +38 -0
  5. package/lib/channels/allowlist-match.js +67 -0
  6. package/lib/channels/allowlist-match.js.map +1 -0
  7. package/lib/channels/channel-config.d.ts +46 -0
  8. package/lib/channels/channel-config.js +63 -0
  9. package/lib/channels/channel-config.js.map +1 -0
  10. package/lib/channels/command-gating.d.ts +47 -0
  11. package/lib/channels/command-gating.js +52 -0
  12. package/lib/channels/command-gating.js.map +1 -0
  13. package/lib/channels/conversation-label.d.ts +23 -0
  14. package/lib/channels/conversation-label.js +43 -0
  15. package/lib/channels/conversation-label.js.map +1 -0
  16. package/lib/channels/index.d.ts +18 -0
  17. package/lib/channels/mention-gating.d.ts +50 -0
  18. package/lib/channels/mention-gating.js +72 -0
  19. package/lib/channels/mention-gating.js.map +1 -0
  20. package/lib/channels/registry.d.ts +23 -0
  21. package/lib/channels/registry.js +282 -0
  22. package/lib/channels/registry.js.map +1 -0
  23. package/lib/channels/sender-identity.d.ts +11 -0
  24. package/lib/channels/sender-identity.js +48 -0
  25. package/lib/channels/sender-identity.js.map +1 -0
  26. package/lib/channels/session.d.ts +63 -0
  27. package/lib/channels/session.js +29 -0
  28. package/lib/channels/session.js.map +1 -0
  29. package/lib/channels/types.d.ts +147 -0
  30. package/lib/channels/types.js +28 -0
  31. package/lib/channels/types.js.map +1 -0
  32. package/lib/channels/typing.d.ts +62 -0
  33. package/lib/channels/typing.js +37 -0
  34. package/lib/channels/typing.js.map +1 -0
  35. package/lib/channels/typing.test.d.ts +1 -0
  36. package/lib/config/env-config.d.ts +7 -0
  37. package/lib/config/env-config.js +21 -1
  38. package/lib/config/env-config.js.map +1 -1
  39. package/lib/constants/default-channel-props.d.ts +11 -0
  40. package/lib/constants/default-channel-props.js +32 -0
  41. package/lib/constants/default-channel-props.js.map +1 -0
  42. package/lib/constants/default-notify-props.js.map +1 -1
  43. package/lib/constants/index.d.ts +1 -0
  44. package/lib/constants/query.constants.js.map +1 -1
  45. package/lib/containers/containers.js +13 -7
  46. package/lib/containers/containers.js.map +1 -1
  47. package/lib/containers/context-services-from-container.d.ts +2 -2
  48. package/lib/containers/context-services-from-container.js +7 -7
  49. package/lib/containers/context-services-from-container.js.map +1 -1
  50. package/lib/gateway/channel-registry.d.ts +10 -0
  51. package/lib/gateway/gateway-service.d.ts +23 -0
  52. package/lib/gateway/index.d.ts +4 -0
  53. package/lib/gateway/message-router.d.ts +20 -0
  54. package/lib/gateway/types.d.ts +270 -0
  55. package/lib/graphql/resolvers/channel-capabilities.d.ts +13 -0
  56. package/lib/graphql/resolvers/channel-capabilities.js +179 -0
  57. package/lib/graphql/resolvers/channel-capabilities.js.map +1 -0
  58. package/lib/graphql/resolvers/channel-member.d.ts +3 -3
  59. package/lib/graphql/resolvers/channel-member.js +30 -5
  60. package/lib/graphql/resolvers/channel-member.js.map +1 -1
  61. package/lib/graphql/resolvers/channel.d.ts +3 -3
  62. package/lib/graphql/resolvers/channel.js +348 -55
  63. package/lib/graphql/resolvers/channel.js.map +1 -1
  64. package/lib/graphql/resolvers/chat-configuration.d.ts +59 -0
  65. package/lib/graphql/resolvers/chat-configuration.js +89 -0
  66. package/lib/graphql/resolvers/chat-configuration.js.map +1 -0
  67. package/lib/graphql/resolvers/extended-token-account.d.ts +3 -32
  68. package/lib/graphql/resolvers/extended-token-account.js +90 -23
  69. package/lib/graphql/resolvers/extended-token-account.js.map +1 -1
  70. package/lib/graphql/resolvers/gateway.d.ts +18 -0
  71. package/lib/graphql/resolvers/index.d.ts +47 -26
  72. package/lib/graphql/resolvers/index.js +1 -1
  73. package/lib/graphql/resolvers/index.js.map +1 -1
  74. package/lib/graphql/resolvers/post-thread.d.ts +2 -3
  75. package/lib/graphql/resolvers/post-thread.js +294 -132
  76. package/lib/graphql/resolvers/post-thread.js.map +1 -1
  77. package/lib/graphql/resolvers/post.d.ts +2 -3
  78. package/lib/graphql/resolvers/post.js +764 -237
  79. package/lib/graphql/resolvers/post.js.map +1 -1
  80. package/lib/graphql/resolvers/reaction.d.ts +3 -3
  81. package/lib/graphql/resolvers/reaction.js +96 -14
  82. package/lib/graphql/resolvers/reaction.js.map +1 -1
  83. package/lib/graphql/resolvers/streaming.d.ts +20 -0
  84. package/lib/graphql/resolvers/streaming.js +147 -0
  85. package/lib/graphql/resolvers/streaming.js.map +1 -0
  86. package/lib/graphql/schema/channel-capabilities.graphql +492 -0
  87. package/lib/graphql/schema/channel-capabilities.graphql.js +1 -0
  88. package/lib/graphql/schema/channel-capabilities.graphql.js.map +1 -0
  89. package/lib/graphql/schema/channel-member.graphql +110 -21
  90. package/lib/graphql/schema/channel-member.graphql.js +1 -1
  91. package/lib/graphql/schema/channel.graphql +465 -24
  92. package/lib/graphql/schema/channel.graphql.js +1 -1
  93. package/lib/graphql/schema/chat-configuration.graphql +77 -0
  94. package/lib/graphql/schema/chat-configuration.graphql.js +1 -0
  95. package/lib/graphql/schema/chat-configuration.graphql.js.map +1 -0
  96. package/lib/graphql/schema/gateway.graphql +363 -0
  97. package/lib/graphql/schema/index.js +2 -2
  98. package/lib/graphql/schema/index.js.map +1 -1
  99. package/lib/graphql/schema/post-thread.graphql +167 -21
  100. package/lib/graphql/schema/post-thread.graphql.js +1 -1
  101. package/lib/graphql/schema/post.graphql +433 -36
  102. package/lib/graphql/schema/post.graphql.js +1 -1
  103. package/lib/graphql/schema/preferences.graphql +190 -3
  104. package/lib/graphql/schema/preferences.graphql.js +1 -1
  105. package/lib/graphql/schema/reaction.graphql +71 -13
  106. package/lib/graphql/schema/reaction.graphql.js +1 -1
  107. package/lib/graphql/schema/services.graphql +18 -0
  108. package/lib/graphql/schema/streaming.graphql +224 -0
  109. package/lib/graphql/schema/streaming.graphql.js +1 -0
  110. package/lib/graphql/schema/streaming.graphql.js.map +1 -0
  111. package/lib/graphql/schema/users.graphql +76 -13
  112. package/lib/graphql/schema/users.graphql.js +1 -1
  113. package/lib/graphql/schema/workflow-service.graphql +82 -0
  114. package/lib/index.d.ts +3 -1
  115. package/lib/index.js +1 -1
  116. package/lib/index.js.map +1 -1
  117. package/lib/interfaces/index.d.ts +0 -2
  118. package/lib/interfaces/services.d.ts +1 -3
  119. package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.d.ts +42 -0
  120. package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.js +60 -0
  121. package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.js.map +1 -0
  122. package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.d.ts +21 -0
  123. package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.js +30 -0
  124. package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.js.map +1 -0
  125. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.d.ts +17 -0
  126. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js +44 -0
  127. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js.map +1 -0
  128. package/lib/migrations/dbMigrations/index.d.ts +3 -0
  129. package/lib/migrations/index.d.ts +1 -0
  130. package/lib/migrations/mail-template-migration.d.ts +3 -6
  131. package/lib/migrations/mail-template-migration.js +8 -21
  132. package/lib/migrations/mail-template-migration.js.map +1 -1
  133. package/lib/migrations/message-notification-template-migration.d.ts +4 -7
  134. package/lib/migrations/message-notification-template-migration.js +8 -25
  135. package/lib/migrations/message-notification-template-migration.js.map +1 -1
  136. package/lib/module.d.ts +1 -1
  137. package/lib/module.js +3 -10
  138. package/lib/module.js.map +1 -1
  139. package/lib/plugins/ChannelMoleculerService.d.ts +39 -0
  140. package/lib/plugins/ChannelMoleculerService.js +58 -0
  141. package/lib/plugins/ChannelMoleculerService.js.map +1 -0
  142. package/lib/plugins/ExtendedTokenAccountMoleculerService.d.ts +65 -0
  143. package/lib/plugins/ExtendedTokenAccountMoleculerService.js +88 -0
  144. package/lib/plugins/ExtendedTokenAccountMoleculerService.js.map +1 -0
  145. package/lib/plugins/MessengerNotificationMoleculerService.d.ts +52 -0
  146. package/lib/plugins/MessengerNotificationMoleculerService.js +84 -0
  147. package/lib/plugins/MessengerNotificationMoleculerService.js.map +1 -0
  148. package/lib/plugins/PostMoleculerService.d.ts +65 -0
  149. package/lib/plugins/PostMoleculerService.js +87 -0
  150. package/lib/plugins/PostMoleculerService.js.map +1 -0
  151. package/lib/plugins/PostThreadMoleculerService.d.ts +40 -0
  152. package/lib/plugins/PostThreadMoleculerService.js +59 -0
  153. package/lib/plugins/PostThreadMoleculerService.js.map +1 -0
  154. package/lib/plugins/ReactionMoleculerService.d.ts +37 -0
  155. package/lib/plugins/ReactionMoleculerService.js +56 -0
  156. package/lib/plugins/ReactionMoleculerService.js.map +1 -0
  157. package/lib/plugins/index.d.ts +18 -6
  158. package/lib/preferences/permissions/inbox-permission-contribution.js +58 -97
  159. package/lib/preferences/permissions/inbox-permission-contribution.js.map +1 -1
  160. package/lib/preferences/permissions/inbox-roles-permission-overwrite.js +144 -144
  161. package/lib/preferences/permissions/inbox-roles-permission-overwrite.js.map +1 -1
  162. package/lib/preferences/settings/channel-settings.d.ts +39 -0
  163. package/lib/preferences/settings/channel-settings.js +180 -0
  164. package/lib/preferences/settings/channel-settings.js.map +1 -0
  165. package/lib/preferences/settings/chat-settings.d.ts +248 -0
  166. package/lib/preferences/settings/chat-settings.js +1152 -0
  167. package/lib/preferences/settings/chat-settings.js.map +1 -0
  168. package/lib/preferences/settings/index.d.ts +3 -0
  169. package/lib/preferences/settings/messenger-channels-contribution.d.ts +39 -0
  170. package/lib/preferences/settings/messenger-channels-contribution.js +355 -0
  171. package/lib/preferences/settings/messenger-channels-contribution.js.map +1 -0
  172. package/lib/preferences/settings/post-settings.d.ts +16 -0
  173. package/lib/preferences/settings/post-settings.js +75 -3
  174. package/lib/preferences/settings/post-settings.js.map +1 -1
  175. package/lib/services/channel-service.d.ts +215 -34
  176. package/lib/services/channel-service.js +1058 -273
  177. package/lib/services/channel-service.js.map +1 -1
  178. package/lib/services/extended-token-account-service.d.ts +175 -20
  179. package/lib/services/extended-token-account-service.js +636 -56
  180. package/lib/services/extended-token-account-service.js.map +1 -1
  181. package/lib/services/messenger-notification-service.d.ts +177 -17
  182. package/lib/services/messenger-notification-service.js +975 -421
  183. package/lib/services/messenger-notification-service.js.map +1 -1
  184. package/lib/services/post-service.d.ts +245 -18
  185. package/lib/services/post-service.js +1027 -113
  186. package/lib/services/post-service.js.map +1 -1
  187. package/lib/services/post-thread-service.d.ts +153 -6
  188. package/lib/services/post-thread-service.js +475 -9
  189. package/lib/services/post-thread-service.js.map +1 -1
  190. package/lib/services/proxy-services/ChannelProxyService.d.ts +27 -0
  191. package/lib/services/proxy-services/ChannelProxyService.js +31 -0
  192. package/lib/services/proxy-services/ChannelProxyService.js.map +1 -0
  193. package/lib/services/proxy-services/ExtendedTokenAccountProxyService.d.ts +42 -0
  194. package/lib/services/proxy-services/ExtendedTokenAccountProxyService.js +46 -0
  195. package/lib/services/proxy-services/ExtendedTokenAccountProxyService.js.map +1 -0
  196. package/lib/services/proxy-services/MessengerNotificationProxyService.d.ts +44 -0
  197. package/lib/services/proxy-services/MessengerNotificationProxyService.js +54 -0
  198. package/lib/services/proxy-services/MessengerNotificationProxyService.js.map +1 -0
  199. package/lib/services/proxy-services/PostProxyService.d.ts +42 -0
  200. package/lib/services/proxy-services/PostProxyService.js +46 -0
  201. package/lib/services/proxy-services/PostProxyService.js.map +1 -0
  202. package/lib/services/proxy-services/PostThreadProxyService.d.ts +32 -0
  203. package/lib/services/proxy-services/PostThreadProxyService.js +36 -0
  204. package/lib/services/proxy-services/PostThreadProxyService.js.map +1 -0
  205. package/lib/services/proxy-services/ReactionProxyService.d.ts +41 -0
  206. package/lib/services/proxy-services/ReactionProxyService.js +45 -0
  207. package/lib/services/proxy-services/ReactionProxyService.js.map +1 -0
  208. package/lib/services/proxy-services/index.d.ts +17 -5
  209. package/lib/services/reaction-service.d.ts +124 -4
  210. package/lib/services/reaction-service.js +413 -3
  211. package/lib/services/reaction-service.js.map +1 -1
  212. package/lib/store/models/account-token-store.d.ts +1 -1
  213. package/lib/store/models/account-token-store.js.map +1 -1
  214. package/lib/store/models/channel.d.ts +2 -3
  215. package/lib/store/models/channel.js +216 -70
  216. package/lib/store/models/channel.js.map +1 -1
  217. package/lib/store/models/post-thread.d.ts +3 -3
  218. package/lib/store/models/post-thread.js +96 -14
  219. package/lib/store/models/post-thread.js.map +1 -1
  220. package/lib/store/models/post.d.ts +2 -3
  221. package/lib/store/models/post.js +143 -23
  222. package/lib/store/models/post.js.map +1 -1
  223. package/lib/store/models/reaction.d.ts +2 -3
  224. package/lib/store/models/reaction.js +67 -8
  225. package/lib/store/models/reaction.js.map +1 -1
  226. package/lib/store/repositories/__tests__/__fixtures__/team-repository.d.ts +3 -3
  227. package/lib/store/repositories/channel-repository.d.ts +6 -6
  228. package/lib/store/repositories/channel-repository.js +5 -2
  229. package/lib/store/repositories/channel-repository.js.map +1 -1
  230. package/lib/store/repositories/post-repository.d.ts +6 -6
  231. package/lib/store/repositories/post-repository.js +5 -2
  232. package/lib/store/repositories/post-repository.js.map +1 -1
  233. package/lib/store/repositories/post-thread-repository.d.ts +6 -6
  234. package/lib/store/repositories/post-thread-repository.js +5 -2
  235. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  236. package/lib/store/repositories/reaction-repository.d.ts +6 -6
  237. package/lib/store/repositories/reaction-repository.js +5 -2
  238. package/lib/store/repositories/reaction-repository.js.map +1 -1
  239. package/lib/streaming/block-chunker.d.ts +40 -0
  240. package/lib/streaming/block-chunker.js +103 -0
  241. package/lib/streaming/block-chunker.js.map +1 -0
  242. package/lib/streaming/block-chunker.test.d.ts +1 -0
  243. package/lib/streaming/index.d.ts +4 -0
  244. package/lib/streaming/stream-service.d.ts +71 -0
  245. package/lib/streaming/stream-service.js +325 -0
  246. package/lib/streaming/stream-service.js.map +1 -0
  247. package/lib/streaming/stream-service.test.d.ts +16 -0
  248. package/lib/streaming/streaming-post.integration.test.d.ts +10 -0
  249. package/lib/streaming/types.d.ts +33 -0
  250. package/lib/streaming/types.js +37 -0
  251. package/lib/streaming/types.js.map +1 -0
  252. package/lib/templates/constants/CONTRIBUTION_POINTS.ts.template +78 -0
  253. package/lib/templates/constants/SERVER_TYPES.ts.template +1 -4
  254. package/lib/templates/constants/WorkflowNamespace.ts.template +10 -0
  255. package/lib/templates/repositories/ChannelRepository.ts.template +3 -3
  256. package/lib/templates/repositories/PostRepository.ts.template +3 -3
  257. package/lib/templates/repositories/PostThreadRepository.ts.template +3 -3
  258. package/lib/templates/repositories/ReactionRepository.ts.template +3 -4
  259. package/lib/templates/services/ChannelService.ts.template +290 -39
  260. package/lib/templates/services/ExtendedTokenAccountService.ts.template +107 -3
  261. package/lib/templates/services/MessengerNotificationService.ts.template +94 -19
  262. package/lib/templates/services/MessengerStreamService.ts.template +131 -0
  263. package/lib/templates/services/PostService.ts.template +228 -20
  264. package/lib/templates/services/PostThreadService.ts.template +151 -6
  265. package/lib/templates/services/ReactionService.ts.template +129 -3
  266. package/lib/templates/services/RedisCacheManager.ts.template +22 -0
  267. package/package.json +10 -6
  268. package/lib/interfaces/context.d.ts +0 -14
  269. package/lib/plugins/channel-moleculer-service.d.ts +0 -8
  270. package/lib/plugins/channel-moleculer-service.js +0 -129
  271. package/lib/plugins/channel-moleculer-service.js.map +0 -1
  272. package/lib/plugins/extended-token-account-moleculer-service.d.ts +0 -8
  273. package/lib/plugins/extended-token-account-moleculer-service.js +0 -47
  274. package/lib/plugins/extended-token-account-moleculer-service.js.map +0 -1
  275. package/lib/plugins/messenger-notification-moleculer-service.d.ts +0 -9
  276. package/lib/plugins/messenger-notification-moleculer-service.js +0 -116
  277. package/lib/plugins/messenger-notification-moleculer-service.js.map +0 -1
  278. package/lib/plugins/post-moleculer-service.d.ts +0 -35
  279. package/lib/plugins/post-moleculer-service.js +0 -393
  280. package/lib/plugins/post-moleculer-service.js.map +0 -1
  281. package/lib/plugins/post-thread-moleculer-service.d.ts +0 -8
  282. package/lib/plugins/post-thread-moleculer-service.js +0 -33
  283. package/lib/plugins/post-thread-moleculer-service.js.map +0 -1
  284. package/lib/plugins/reaction-moleculer-service.d.ts +0 -8
  285. package/lib/plugins/reaction-moleculer-service.js +0 -20
  286. package/lib/plugins/reaction-moleculer-service.js.map +0 -1
  287. package/lib/services/proxy-services/channel-microservice.d.ts +0 -44
  288. package/lib/services/proxy-services/channel-microservice.js +0 -199
  289. package/lib/services/proxy-services/channel-microservice.js.map +0 -1
  290. package/lib/services/proxy-services/messenger-notification-microservice.d.ts +0 -16
  291. package/lib/services/proxy-services/messenger-notification-microservice.js +0 -54
  292. package/lib/services/proxy-services/messenger-notification-microservice.js.map +0 -1
  293. package/lib/services/proxy-services/post-microservice.d.ts +0 -22
  294. package/lib/services/proxy-services/post-microservice.js +0 -64
  295. package/lib/services/proxy-services/post-microservice.js.map +0 -1
  296. package/lib/services/proxy-services/post-thread-microservice.d.ts +0 -10
  297. package/lib/services/proxy-services/post-thread-microservice.js +0 -15
  298. package/lib/services/proxy-services/post-thread-microservice.js.map +0 -1
  299. package/lib/services/proxy-services/reaction-microservice.d.ts +0 -9
  300. package/lib/services/proxy-services/reaction-microservice.js +0 -10
  301. package/lib/services/proxy-services/reaction-microservice.js.map +0 -1
  302. package/lib/store/models/common-options.js +0 -20
  303. package/lib/store/models/common-options.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExtendedTokenAccountProxyService.js","sources":["../../../src/services/proxy-services/ExtendedTokenAccountProxyService.ts"],"sourcesContent":[null],"names":[],"mappings":"0SAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AAGI,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC,CAAA;aACzC,CAAA,MAEI,EAAqB,MAErB,EAAyB;AAEzB,IAAA,MAAA,WAAM,GAAA,MAAc,CAAA,KAAO,CAAA;eAC3B,EAAA;;;IAQP,oBAAA,CAAA,IAAA,EAAA,kCAAA,EAAA,MAAA,EAAA,WAAA,CAAA;AAhBY,EAAA;AAFZ;gCACD,GAAA,UAAA,CAAA,CAAA,UAAA;;AAGS,EAAA,OAAA,CAAA,CAAA,EAAA,iBAAO,CAAA,gBAAW,CAAA,CAAgB,EAAC,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,aAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,gCAAA,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { ServiceBroker } from 'moleculer';
2
+ import type { CdmLogger } from '@cdm-logger/core';
3
+ import type { IMessengerNotificationService } from 'common/server';
4
+ /**
5
+ * Client-side proxy for MessengerNotification operations using AUTO-GENERATION.
6
+ *
7
+ * 🎉 FULLY AUTOMATIC: All IMessengerNotificationService methods auto-generated!
8
+ *
9
+ * ✅ ZERO BOILERPLATE: No manual method definitions
10
+ * ✅ TYPE-SAFE: Full TypeScript inference from IMessengerNotificationService
11
+ * ✅ VALIDATED: Zod schemas for parameter validation
12
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
13
+ *
14
+ * This microservice handles comprehensive notification management within the messenger platform,
15
+ * providing operations for sending various types of notifications including email, SMS,
16
+ * push notifications, and Expo notifications across different messaging contexts through
17
+ * service broker delegation.
18
+ *
19
+ * Key capabilities:
20
+ * - Multi-channel notification delivery (email, SMS, push, Expo)
21
+ * - Unread message notification scheduling and management
22
+ * - User preference-based notification filtering
23
+ * - Support service notification handling
24
+ * - Alert message notification broadcasting
25
+ * - Thread-based notification management
26
+ * - Real-time push notification integration
27
+ * - Template-based notification customization
28
+ * - Channel and post-based notification routing
29
+ * - User aggregation and preference management
30
+ *
31
+ * Pattern:
32
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
33
+ * - All IMessengerNotificationService methods are automatically generated as Moleculer action calls
34
+ * - Parameters are validated using MessengerNotificationServiceSchemas
35
+ * - Topic is automatically extracted from schemas
36
+ *
37
+ * @see MessengerNotificationService for actual implementation
38
+ * @see MessengerNotificationMoleculerService for Moleculer service layer
39
+ */
40
+ export declare class MessengerNotificationProxyService {
41
+ constructor(broker: ServiceBroker, logger: CdmLogger.ILogger);
42
+ }
43
+ export interface MessengerNotificationProxyService extends IMessengerNotificationService {
44
+ }
@@ -0,0 +1,54 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {ServiceBroker}from'moleculer';import {CommonType}from'@common-stack/core';import {generateProxyMethods}from'@common-stack/codegen-zod';/**
2
+ * Local schemas - topic follows convention: IMessengerNotificationService → MessengerNotificationService
3
+ */
4
+ const MessengerNotificationServiceSchemas = {
5
+ topic: 'MessengerNotificationService'
6
+ };
7
+ /**
8
+ * Client-side proxy for MessengerNotification operations using AUTO-GENERATION.
9
+ *
10
+ * 🎉 FULLY AUTOMATIC: All IMessengerNotificationService methods auto-generated!
11
+ *
12
+ * ✅ ZERO BOILERPLATE: No manual method definitions
13
+ * ✅ TYPE-SAFE: Full TypeScript inference from IMessengerNotificationService
14
+ * ✅ VALIDATED: Zod schemas for parameter validation
15
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
16
+ *
17
+ * This microservice handles comprehensive notification management within the messenger platform,
18
+ * providing operations for sending various types of notifications including email, SMS,
19
+ * push notifications, and Expo notifications across different messaging contexts through
20
+ * service broker delegation.
21
+ *
22
+ * Key capabilities:
23
+ * - Multi-channel notification delivery (email, SMS, push, Expo)
24
+ * - Unread message notification scheduling and management
25
+ * - User preference-based notification filtering
26
+ * - Support service notification handling
27
+ * - Alert message notification broadcasting
28
+ * - Thread-based notification management
29
+ * - Real-time push notification integration
30
+ * - Template-based notification customization
31
+ * - Channel and post-based notification routing
32
+ * - User aggregation and preference management
33
+ *
34
+ * Pattern:
35
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
36
+ * - All IMessengerNotificationService methods are automatically generated as Moleculer action calls
37
+ * - Parameters are validated using MessengerNotificationServiceSchemas
38
+ * - Topic is automatically extracted from schemas
39
+ *
40
+ * @see MessengerNotificationService for actual implementation
41
+ * @see MessengerNotificationMoleculerService for Moleculer service layer
42
+ */
43
+ let MessengerNotificationProxyService = class MessengerNotificationProxyService {
44
+ constructor(broker, logger) {
45
+ const childLogger = logger.child({
46
+ className: 'MessengerNotificationProxyService'
47
+ });
48
+ // ⚡ ONE LINE: Auto-generate all proxy methods
49
+ generateProxyMethods(this, MessengerNotificationServiceSchemas, broker, childLogger);
50
+ }
51
+ };
52
+ MessengerNotificationProxyService = __decorate([injectable()
53
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
54
+ , __param(0, inject(CommonType.MOLECULER_BROKER)), __param(1, inject('Logger')), __metadata("design:paramtypes", [ServiceBroker, Object])], MessengerNotificationProxyService);export{MessengerNotificationProxyService};//# sourceMappingURL=MessengerNotificationProxyService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessengerNotificationProxyService.js","sources":["../../../src/services/proxy-services/MessengerNotificationProxyService.ts"],"sourcesContent":[null],"names":[],"mappings":"2OAOA;;AAEG;AACH,MAAM,mCAAmC,GAAG;AACxC,EAAA,KAAA,EAAK;CACR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCG;AAGI,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC,CAAA;aAC1C,CAAA,MAEI,EAAqB,MAErB,EAAyB;AAEzB,IAAA,MAAA,WAAM,GAAA,MAAc,CAAA,KAAO,CAAA;eAC3B,EAAA;;;IAQP,oBAAA,CAAA,IAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,WAAA,CAAA;AAhBY,EAAA;AAFZ;iCACD,GAAA,UAAA,CAAA,CAAA,UAAA;;AAGS,EAAA,OAAA,CAAA,CAAA,EAAA,iBAAO,CAAA,gBAAW,CAAA,CAAgB,EAAC,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,aAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,iCAAA,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { ServiceBroker } from 'moleculer';
2
+ import type { CdmLogger } from '@cdm-logger/core';
3
+ import { IPostService } from 'common/server';
4
+ /**
5
+ * Client-side proxy for Post operations using AUTO-GENERATION.
6
+ *
7
+ * 🎉 FULLY AUTOMATIC: All IPostService methods auto-generated!
8
+ *
9
+ * ✅ ZERO BOILERPLATE: No manual method definitions
10
+ * ✅ TYPE-SAFE: Full TypeScript inference from IPostService
11
+ * ✅ VALIDATED: Zod schemas for parameter validation
12
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
13
+ *
14
+ * This microservice handles comprehensive post management within the messenger platform,
15
+ * providing operations for creating, updating, managing posts and their associated
16
+ * content including file attachments, notifications, threading, and real-time
17
+ * message delivery across channels and organizations through service broker delegation.
18
+ *
19
+ * Key capabilities:
20
+ * - Post lifecycle management (creation, updates, deletion)
21
+ * - File attachment handling and upload management
22
+ * - Real-time message delivery and notifications
23
+ * - Post threading and conversation management
24
+ * - Message status tracking (read, delivered)
25
+ * - Channel integration and message counting
26
+ * - Expo push notification integration
27
+ * - File upload link generation and management
28
+ *
29
+ * Pattern:
30
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
31
+ * - All IPostService methods are automatically generated as Moleculer action calls
32
+ * - Parameters are validated using PostServiceSchemas
33
+ * - Topic is automatically extracted from schemas
34
+ *
35
+ * @see PostService for actual implementation
36
+ * @see PostMoleculerService for Moleculer service layer
37
+ */
38
+ export declare class PostProxyService {
39
+ constructor(broker: ServiceBroker, logger: CdmLogger.ILogger);
40
+ }
41
+ export interface PostProxyService extends IPostService {
42
+ }
@@ -0,0 +1,46 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {ServiceBroker}from'moleculer';import {CommonType}from'@common-stack/core';import {generateProxyMethods}from'@common-stack/codegen-zod';import {PostServiceSchemas}from'common/server';/**
2
+ * Client-side proxy for Post operations using AUTO-GENERATION.
3
+ *
4
+ * 🎉 FULLY AUTOMATIC: All IPostService methods auto-generated!
5
+ *
6
+ * ✅ ZERO BOILERPLATE: No manual method definitions
7
+ * ✅ TYPE-SAFE: Full TypeScript inference from IPostService
8
+ * ✅ VALIDATED: Zod schemas for parameter validation
9
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
10
+ *
11
+ * This microservice handles comprehensive post management within the messenger platform,
12
+ * providing operations for creating, updating, managing posts and their associated
13
+ * content including file attachments, notifications, threading, and real-time
14
+ * message delivery across channels and organizations through service broker delegation.
15
+ *
16
+ * Key capabilities:
17
+ * - Post lifecycle management (creation, updates, deletion)
18
+ * - File attachment handling and upload management
19
+ * - Real-time message delivery and notifications
20
+ * - Post threading and conversation management
21
+ * - Message status tracking (read, delivered)
22
+ * - Channel integration and message counting
23
+ * - Expo push notification integration
24
+ * - File upload link generation and management
25
+ *
26
+ * Pattern:
27
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
28
+ * - All IPostService methods are automatically generated as Moleculer action calls
29
+ * - Parameters are validated using PostServiceSchemas
30
+ * - Topic is automatically extracted from schemas
31
+ *
32
+ * @see PostService for actual implementation
33
+ * @see PostMoleculerService for Moleculer service layer
34
+ */
35
+ let PostProxyService = class PostProxyService {
36
+ constructor(broker, logger) {
37
+ const childLogger = logger.child({
38
+ className: 'PostProxyService'
39
+ });
40
+ // ⚡ ONE LINE: Auto-generate all proxy methods
41
+ generateProxyMethods(this, PostServiceSchemas, broker, childLogger);
42
+ }
43
+ };
44
+ PostProxyService = __decorate([injectable()
45
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
46
+ , __param(0, inject(CommonType.MOLECULER_BROKER)), __param(1, inject('Logger')), __metadata("design:paramtypes", [ServiceBroker, Object])], PostProxyService);export{PostProxyService};//# sourceMappingURL=PostProxyService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostProxyService.js","sources":["../../../src/services/proxy-services/PostProxyService.ts"],"sourcesContent":[null],"names":[],"mappings":"0RAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB,CAAA;aACzB,CAAA,MAEI,EAAqB,MAErB,EAAyB;AAEzB,IAAA,MAAA,WAAM,GAAA,MAAc,CAAA,KAAO,CAAA;eAC3B,EAAA;;;IAGP,oBAAA,CAAA,IAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,WAAA,CAAA;AAXY,EAAA;AAFZ;gBACD,GAAA,UAAA,CAAA,CAAA,UAAA;;AAGS,EAAA,OAAA,CAAA,CAAA,EAAA,iBAAO,CAAA,gBAAW,CAAA,CAAgB,EAAC,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,aAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,gBAAA,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { ServiceBroker } from 'moleculer';
2
+ import type { CdmLogger } from '@cdm-logger/core';
3
+ import { IPostThreadService } from 'common/server';
4
+ /**
5
+ * Client-side proxy for PostThread operations using AUTO-GENERATION.
6
+ *
7
+ * 🎉 FULLY AUTOMATIC: All IPostThreadService methods auto-generated!
8
+ *
9
+ * ✅ ZERO BOILERPLATE: No manual method definitions
10
+ * ✅ TYPE-SAFE: Full TypeScript inference from IPostThreadService
11
+ * ✅ VALIDATED: Zod schemas for parameter validation
12
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
13
+ *
14
+ * This microservice handles post thread management within the messenger platform,
15
+ * providing comprehensive operations for handling threaded conversations,
16
+ * reply management, and discussion organization across different channels
17
+ * and messaging contexts through service broker delegation.
18
+ *
19
+ * Pattern:
20
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
21
+ * - All IPostThreadService methods are automatically generated as Moleculer action calls
22
+ * - Parameters are validated using PostThreadServiceSchemas
23
+ * - Topic is automatically extracted from schemas
24
+ *
25
+ * @see PostThreadService for actual implementation
26
+ * @see PostThreadMoleculerService for Moleculer service layer
27
+ */
28
+ export declare class PostThreadProxyService {
29
+ constructor(broker: ServiceBroker, logger: CdmLogger.ILogger);
30
+ }
31
+ export interface PostThreadProxyService extends IPostThreadService {
32
+ }
@@ -0,0 +1,36 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {ServiceBroker}from'moleculer';import {CommonType}from'@common-stack/core';import {generateProxyMethods}from'@common-stack/codegen-zod';import {PostThreadServiceSchemas}from'common/server';/**
2
+ * Client-side proxy for PostThread operations using AUTO-GENERATION.
3
+ *
4
+ * 🎉 FULLY AUTOMATIC: All IPostThreadService methods auto-generated!
5
+ *
6
+ * ✅ ZERO BOILERPLATE: No manual method definitions
7
+ * ✅ TYPE-SAFE: Full TypeScript inference from IPostThreadService
8
+ * ✅ VALIDATED: Zod schemas for parameter validation
9
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
10
+ *
11
+ * This microservice handles post thread management within the messenger platform,
12
+ * providing comprehensive operations for handling threaded conversations,
13
+ * reply management, and discussion organization across different channels
14
+ * and messaging contexts through service broker delegation.
15
+ *
16
+ * Pattern:
17
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
18
+ * - All IPostThreadService methods are automatically generated as Moleculer action calls
19
+ * - Parameters are validated using PostThreadServiceSchemas
20
+ * - Topic is automatically extracted from schemas
21
+ *
22
+ * @see PostThreadService for actual implementation
23
+ * @see PostThreadMoleculerService for Moleculer service layer
24
+ */
25
+ let PostThreadProxyService = class PostThreadProxyService {
26
+ constructor(broker, logger) {
27
+ const childLogger = logger.child({
28
+ className: 'PostThreadProxyService'
29
+ });
30
+ // ⚡ ONE LINE: Auto-generate all proxy methods
31
+ generateProxyMethods(this, PostThreadServiceSchemas, broker, childLogger);
32
+ }
33
+ };
34
+ PostThreadProxyService = __decorate([injectable()
35
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
36
+ , __param(0, inject(CommonType.MOLECULER_BROKER)), __param(1, inject('Logger')), __metadata("design:paramtypes", [ServiceBroker, Object])], PostThreadProxyService);export{PostThreadProxyService};//# sourceMappingURL=PostThreadProxyService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostThreadProxyService.js","sources":["../../../src/services/proxy-services/PostThreadProxyService.ts"],"sourcesContent":[null],"names":[],"mappings":"gSAOA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AAGI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB,CAAA;aAC/B,CAAA,MAEI,EAAqB,MAErB,EAAyB;AAEzB,IAAA,MAAA,WAAM,GAAA,MAAc,CAAA,KAAO,CAAA;eAC3B,EAAA;;;IAGP,oBAAA,CAAA,IAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,WAAA,CAAA;AAXY,EAAA;AAFZ;sBACD,GAAA,UAAA,CAAA,CAAA,UAAA;;AAGS,EAAA,OAAA,CAAA,CAAA,EAAA,iBAAO,CAAA,gBAAW,CAAA,CAAgB,EAAC,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,aAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,sBAAA,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { ServiceBroker } from 'moleculer';
2
+ import type { CdmLogger } from '@cdm-logger/core';
3
+ import { IReactionService } from 'common/server';
4
+ /**
5
+ * Client-side proxy for Reaction operations using AUTO-GENERATION.
6
+ *
7
+ * 🎉 FULLY AUTOMATIC: All IReactionService methods auto-generated!
8
+ *
9
+ * ✅ ZERO BOILERPLATE: No manual method definitions
10
+ * ✅ TYPE-SAFE: Full TypeScript inference from IReactionService
11
+ * ✅ VALIDATED: Zod schemas for parameter validation
12
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
13
+ *
14
+ * This service provides a comprehensive proxy layer for reaction management
15
+ * within the messenger platform, delegating operations to the reaction microservice
16
+ * while providing enhanced local functionality and error handling.
17
+ *
18
+ * Key capabilities:
19
+ * - Complete reaction lifecycle management (add, remove, update)
20
+ * - Content-based reaction retrieval and aggregation
21
+ * - User reaction tracking and analytics
22
+ * - Reaction statistics and trending analysis
23
+ * - Bulk reaction operations and content cleanup
24
+ * - Cross-platform reaction synchronization
25
+ * - Performance optimization through microservice delegation
26
+ * - Type-safe reaction data management
27
+ *
28
+ * Pattern:
29
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
30
+ * - All IReactionService methods are automatically generated as Moleculer action calls
31
+ * - Parameters are validated using ReactionServiceSchemas
32
+ * - Topic is automatically extracted from schemas
33
+ *
34
+ * @see ReactionService for actual implementation
35
+ * @see ReactionMoleculerService for Moleculer service layer
36
+ */
37
+ export declare class ReactionProxyService {
38
+ constructor(broker: ServiceBroker, logger: CdmLogger.ILogger);
39
+ }
40
+ export interface ReactionProxyService extends IReactionService {
41
+ }
@@ -0,0 +1,45 @@
1
+ import {__decorate,__param,__metadata}from'tslib';import {injectable,inject}from'inversify';import {ServiceBroker}from'moleculer';import {CommonType}from'@common-stack/core';import {generateProxyMethods}from'@common-stack/codegen-zod';import {ReactionServiceSchemas}from'common/server';/**
2
+ * Client-side proxy for Reaction operations using AUTO-GENERATION.
3
+ *
4
+ * 🎉 FULLY AUTOMATIC: All IReactionService methods auto-generated!
5
+ *
6
+ * ✅ ZERO BOILERPLATE: No manual method definitions
7
+ * ✅ TYPE-SAFE: Full TypeScript inference from IReactionService
8
+ * ✅ VALIDATED: Zod schemas for parameter validation
9
+ * ✅ MAINTAINABLE: Add method to interface → automatically available as proxy
10
+ *
11
+ * This service provides a comprehensive proxy layer for reaction management
12
+ * within the messenger platform, delegating operations to the reaction microservice
13
+ * while providing enhanced local functionality and error handling.
14
+ *
15
+ * Key capabilities:
16
+ * - Complete reaction lifecycle management (add, remove, update)
17
+ * - Content-based reaction retrieval and aggregation
18
+ * - User reaction tracking and analytics
19
+ * - Reaction statistics and trending analysis
20
+ * - Bulk reaction operations and content cleanup
21
+ * - Cross-platform reaction synchronization
22
+ * - Performance optimization through microservice delegation
23
+ * - Type-safe reaction data management
24
+ *
25
+ * Pattern:
26
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
27
+ * - All IReactionService methods are automatically generated as Moleculer action calls
28
+ * - Parameters are validated using ReactionServiceSchemas
29
+ * - Topic is automatically extracted from schemas
30
+ *
31
+ * @see ReactionService for actual implementation
32
+ * @see ReactionMoleculerService for Moleculer service layer
33
+ */
34
+ let ReactionProxyService = class ReactionProxyService {
35
+ constructor(broker, logger) {
36
+ const childLogger = logger.child({
37
+ className: 'ReactionProxyService'
38
+ });
39
+ // ⚡ ONE LINE: Auto-generate all proxy methods
40
+ generateProxyMethods(this, ReactionServiceSchemas, broker, childLogger);
41
+ }
42
+ };
43
+ ReactionProxyService = __decorate([injectable()
44
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
45
+ , __param(0, inject(CommonType.MOLECULER_BROKER)), __param(1, inject('Logger')), __metadata("design:paramtypes", [ServiceBroker, Object])], ReactionProxyService);export{ReactionProxyService};//# sourceMappingURL=ReactionProxyService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactionProxyService.js","sources":["../../../src/services/proxy-services/ReactionProxyService.ts"],"sourcesContent":[null],"names":[],"mappings":"8RAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AAGI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;aAC7B,CAAA,MAEI,EAAqB,MAErB,EAAyB;AAEzB,IAAA,MAAA,WAAM,GAAA,MAAc,CAAA,KAAO,CAAA;eAC3B,EAAA;;;IAGP,oBAAA,CAAA,IAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,WAAA,CAAA;AAXY,EAAA;AAFZ;oBACD,GAAA,UAAA,CAAA,CAAA,UAAA;;AAGS,EAAA,OAAA,CAAA,CAAA,EAAA,iBAAO,CAAA,gBAAW,CAAA,CAAgB,EAAC,OAAA,CAAA,CAAA,EAAA,MAAA,CAAA,QAAA,CAAA,CAAA,EAAA,UAAA,CAAA,mBAAA,EAAA,CAAA,aAAA,EAAA,MAAA,CAAA,CAAA,CAAA,EAAA,oBAAA,CAAA"}
@@ -1,5 +1,17 @@
1
- export * from './channel-microservice';
2
- export * from './post-thread-microservice';
3
- export * from './post-microservice';
4
- export * from './reaction-microservice';
5
- export * from './messenger-notification-microservice';
1
+ /**
2
+ * Proxy Services Index
3
+ *
4
+ * All proxy services use the modern auto-generation pattern (Pattern 1):
5
+ * - Uses generateProxyMethods() from @common-stack/codegen-zod
6
+ * - Declaration merging for type safety
7
+ * - Zero boilerplate - all methods auto-generated
8
+ * - Topic automatically extracted from ServiceSchemas
9
+ *
10
+ * @see LLM Proxy Service Generator Prompt for implementation guidelines
11
+ */
12
+ export * from './ChannelProxyService';
13
+ export * from './ExtendedTokenAccountProxyService';
14
+ export * from './PostProxyService';
15
+ export * from './PostThreadProxyService';
16
+ export * from './ReactionProxyService';
17
+ export * from './MessengerNotificationProxyService';
@@ -1,6 +1,126 @@
1
- import { IReaction, IReactionInput, IReactionRepository, IReactionService, IReactionServiceInput } from 'common';
2
- import { BaseService } from '@common-stack/store-mongo';
3
- export declare class ReactionService extends BaseService<IReaction, IReactionServiceInput, Partial<IReactionInput>> implements IReactionService {
1
+ import { IReactionModel, IReactionInput, IReactionRepository, IReactionService, IReactionServiceInput, AsDomainType } from 'common/server';
2
+ import { BaseService2 } from '@common-stack/store-mongo';
3
+ import { CdmLogger } from '@cdm-logger/core';
4
+ import { Disposable, DisposableCollection } from '@adminide-stack/core';
5
+ /**
6
+ * Reaction Service Implementation
7
+ *
8
+ * This service handles reaction management within the messenger platform,
9
+ * providing comprehensive operations for handling emoji reactions, sentiment
10
+ * tracking, and user engagement features across posts, messages, and other
11
+ * interactive content.
12
+ */
13
+ export declare class ReactionService extends BaseService2<IReactionModel, IReactionServiceInput, Partial<IReactionInput>> implements IReactionService, Disposable {
4
14
  readonly reactionRepository: IReactionRepository;
5
- constructor(reactionRepository: IReactionRepository);
15
+ protected readonly toDispose: DisposableCollection;
16
+ private logger;
17
+ constructor(reactionRepository: IReactionRepository, logger?: CdmLogger.ILogger);
18
+ /**
19
+ * Disposes of resources used by the service
20
+ */
21
+ dispose(): void;
22
+ /**
23
+ * Adds a reaction to a post or message
24
+ *
25
+ * @description Creates a new reaction entry for a specific content item,
26
+ * handling duplicate detection and user validation.
27
+ *
28
+ * @param {IReactionServiceInput} data - Reaction creation data including user and reaction type
29
+ * @returns {Promise<AsDomainType<IReactionModel> | Error>} - Created reaction or error
30
+ */
31
+ addReaction(data: IReactionServiceInput): Promise<AsDomainType<IReactionModel> | Error>;
32
+ /**
33
+ * Removes a reaction from a post or message
34
+ *
35
+ * @description Deletes an existing reaction entry, ensuring proper user
36
+ * authorization and content validation.
37
+ *
38
+ * @param {string} reactionId - The unique identifier of the reaction to remove
39
+ * @param {string} userId - The identifier of the user removing the reaction
40
+ * @returns {Promise<boolean | Error>} - Success status or error
41
+ */
42
+ removeReaction(reactionId: string, userId: string): Promise<boolean | Error>;
43
+ /**
44
+ * Retrieves all reactions for a specific content item
45
+ *
46
+ * @description Fetches reaction data with aggregation and user information
47
+ * for display in the user interface.
48
+ *
49
+ * @param {string} contentId - The identifier of the content (post, message, etc.)
50
+ * @param {string} contentType - The type of content being reacted to
51
+ * @returns {Promise<Array<AsDomainType<IReactionModel>> | Error>} - Array of reactions or error
52
+ */
53
+ getReactionsByContent(contentId: string, contentType: string): Promise<Array<AsDomainType<IReactionModel>> | Error>;
54
+ /**
55
+ * Retrieves reaction statistics for content
56
+ *
57
+ * @description Provides aggregated reaction counts and statistics
58
+ * for analytics and display purposes.
59
+ *
60
+ * @param {string} contentId - The identifier of the content
61
+ * @param {string} contentType - The type of content
62
+ * @returns {Promise<any | Error>} - Reaction statistics or error
63
+ */
64
+ getReactionStats(contentId: string, contentType: string): Promise<any | Error>;
65
+ /**
66
+ * Checks if a user has reacted to specific content
67
+ *
68
+ * @description Determines whether a user has already reacted to
69
+ * a piece of content, useful for UI state management.
70
+ *
71
+ * @param {string} contentId - The identifier of the content
72
+ * @param {string} userId - The identifier of the user
73
+ * @param {string} reactionType - The type of reaction to check
74
+ * @returns {Promise<boolean | Error>} - True if user has reacted, or error
75
+ */
76
+ hasUserReacted(contentId: string, userId: string, reactionType: string): Promise<boolean | Error>;
77
+ /**
78
+ * Updates an existing reaction
79
+ *
80
+ * @description Modifies an existing reaction, typically changing
81
+ * the reaction type while maintaining the same user and content association.
82
+ *
83
+ * @param {string} reactionId - The unique identifier of the reaction
84
+ * @param {Partial<IReactionInput>} updates - The reaction updates to apply
85
+ * @returns {Promise<AsDomainType<IReactionModel> | Error>} - Updated reaction or error
86
+ */
87
+ updateReaction(reactionId: string, updates: Partial<IReactionInput>): Promise<AsDomainType<IReactionModel> | Error>;
88
+ /**
89
+ * Removes all reactions from specific content
90
+ *
91
+ * @description Bulk removes all reactions from a content item,
92
+ * typically used during content deletion or moderation.
93
+ *
94
+ * @param {string} contentId - The identifier of the content
95
+ * @param {string} contentType - The type of content
96
+ * @returns {Promise<number | Error>} - Number of reactions removed or error
97
+ */
98
+ removeAllReactionsByContent(contentId: string, contentType: string): Promise<number | Error>;
99
+ /**
100
+ * Retrieves reactions by user across all content
101
+ *
102
+ * @description Gets all reactions created by a specific user,
103
+ * useful for user activity tracking and analytics.
104
+ *
105
+ * @param {string} userId - The identifier of the user
106
+ * @param {number} limit - Maximum number of reactions to return
107
+ * @param {number} offset - Number of reactions to skip
108
+ * @returns {Promise<Array<AsDomainType<IReactionModel>> | Error>} - Array of user reactions or error
109
+ */
110
+ getUserReactions(userId: string, limit?: number, offset?: number): Promise<Array<AsDomainType<IReactionModel>> | Error>;
111
+ /**
112
+ * Gets the most popular reactions across the platform
113
+ *
114
+ * @description Retrieves aggregated data about the most used reactions
115
+ * for analytics and trending features.
116
+ *
117
+ * @param {number} limit - Maximum number of popular reactions to return
118
+ * @param {Date} since - Optional date to filter reactions since
119
+ * @returns {Promise<Array<{ type: string; count: number; users: number }> | Error>} - Popular reactions or error
120
+ */
121
+ getPopularReactions(limit?: number, since?: Date): Promise<Array<{
122
+ type: string;
123
+ count: number;
124
+ users: number;
125
+ }> | Error>;
6
126
  }