@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.
- package/lib/channels/ack-reactions.d.ts +46 -0
- package/lib/channels/ack-reactions.js +48 -0
- package/lib/channels/ack-reactions.js.map +1 -0
- package/lib/channels/allowlist-match.d.ts +38 -0
- package/lib/channels/allowlist-match.js +67 -0
- package/lib/channels/allowlist-match.js.map +1 -0
- package/lib/channels/channel-config.d.ts +46 -0
- package/lib/channels/channel-config.js +63 -0
- package/lib/channels/channel-config.js.map +1 -0
- package/lib/channels/command-gating.d.ts +47 -0
- package/lib/channels/command-gating.js +52 -0
- package/lib/channels/command-gating.js.map +1 -0
- package/lib/channels/conversation-label.d.ts +23 -0
- package/lib/channels/conversation-label.js +43 -0
- package/lib/channels/conversation-label.js.map +1 -0
- package/lib/channels/index.d.ts +18 -0
- package/lib/channels/mention-gating.d.ts +50 -0
- package/lib/channels/mention-gating.js +72 -0
- package/lib/channels/mention-gating.js.map +1 -0
- package/lib/channels/registry.d.ts +23 -0
- package/lib/channels/registry.js +282 -0
- package/lib/channels/registry.js.map +1 -0
- package/lib/channels/sender-identity.d.ts +11 -0
- package/lib/channels/sender-identity.js +48 -0
- package/lib/channels/sender-identity.js.map +1 -0
- package/lib/channels/session.d.ts +63 -0
- package/lib/channels/session.js +29 -0
- package/lib/channels/session.js.map +1 -0
- package/lib/channels/types.d.ts +147 -0
- package/lib/channels/types.js +28 -0
- package/lib/channels/types.js.map +1 -0
- package/lib/channels/typing.d.ts +62 -0
- package/lib/channels/typing.js +37 -0
- package/lib/channels/typing.js.map +1 -0
- package/lib/channels/typing.test.d.ts +1 -0
- package/lib/config/env-config.d.ts +7 -0
- package/lib/config/env-config.js +21 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/constants/default-channel-props.d.ts +11 -0
- package/lib/constants/default-channel-props.js +32 -0
- package/lib/constants/default-channel-props.js.map +1 -0
- package/lib/constants/default-notify-props.js.map +1 -1
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/query.constants.js.map +1 -1
- package/lib/containers/containers.js +13 -7
- package/lib/containers/containers.js.map +1 -1
- package/lib/containers/context-services-from-container.d.ts +2 -2
- package/lib/containers/context-services-from-container.js +7 -7
- package/lib/containers/context-services-from-container.js.map +1 -1
- package/lib/gateway/channel-registry.d.ts +10 -0
- package/lib/gateway/gateway-service.d.ts +23 -0
- package/lib/gateway/index.d.ts +4 -0
- package/lib/gateway/message-router.d.ts +20 -0
- package/lib/gateway/types.d.ts +270 -0
- package/lib/graphql/resolvers/channel-capabilities.d.ts +13 -0
- package/lib/graphql/resolvers/channel-capabilities.js +179 -0
- package/lib/graphql/resolvers/channel-capabilities.js.map +1 -0
- package/lib/graphql/resolvers/channel-member.d.ts +3 -3
- package/lib/graphql/resolvers/channel-member.js +30 -5
- package/lib/graphql/resolvers/channel-member.js.map +1 -1
- package/lib/graphql/resolvers/channel.d.ts +3 -3
- package/lib/graphql/resolvers/channel.js +348 -55
- package/lib/graphql/resolvers/channel.js.map +1 -1
- package/lib/graphql/resolvers/chat-configuration.d.ts +59 -0
- package/lib/graphql/resolvers/chat-configuration.js +89 -0
- package/lib/graphql/resolvers/chat-configuration.js.map +1 -0
- package/lib/graphql/resolvers/extended-token-account.d.ts +3 -32
- package/lib/graphql/resolvers/extended-token-account.js +90 -23
- package/lib/graphql/resolvers/extended-token-account.js.map +1 -1
- package/lib/graphql/resolvers/gateway.d.ts +18 -0
- package/lib/graphql/resolvers/index.d.ts +47 -26
- package/lib/graphql/resolvers/index.js +1 -1
- package/lib/graphql/resolvers/index.js.map +1 -1
- package/lib/graphql/resolvers/post-thread.d.ts +2 -3
- package/lib/graphql/resolvers/post-thread.js +294 -132
- package/lib/graphql/resolvers/post-thread.js.map +1 -1
- package/lib/graphql/resolvers/post.d.ts +2 -3
- package/lib/graphql/resolvers/post.js +764 -237
- package/lib/graphql/resolvers/post.js.map +1 -1
- package/lib/graphql/resolvers/reaction.d.ts +3 -3
- package/lib/graphql/resolvers/reaction.js +96 -14
- package/lib/graphql/resolvers/reaction.js.map +1 -1
- package/lib/graphql/resolvers/streaming.d.ts +20 -0
- package/lib/graphql/resolvers/streaming.js +147 -0
- package/lib/graphql/resolvers/streaming.js.map +1 -0
- package/lib/graphql/schema/channel-capabilities.graphql +492 -0
- package/lib/graphql/schema/channel-capabilities.graphql.js +1 -0
- package/lib/graphql/schema/channel-capabilities.graphql.js.map +1 -0
- package/lib/graphql/schema/channel-member.graphql +110 -21
- package/lib/graphql/schema/channel-member.graphql.js +1 -1
- package/lib/graphql/schema/channel.graphql +465 -24
- package/lib/graphql/schema/channel.graphql.js +1 -1
- package/lib/graphql/schema/chat-configuration.graphql +77 -0
- package/lib/graphql/schema/chat-configuration.graphql.js +1 -0
- package/lib/graphql/schema/chat-configuration.graphql.js.map +1 -0
- package/lib/graphql/schema/gateway.graphql +363 -0
- package/lib/graphql/schema/index.js +2 -2
- package/lib/graphql/schema/index.js.map +1 -1
- package/lib/graphql/schema/post-thread.graphql +167 -21
- package/lib/graphql/schema/post-thread.graphql.js +1 -1
- package/lib/graphql/schema/post.graphql +433 -36
- package/lib/graphql/schema/post.graphql.js +1 -1
- package/lib/graphql/schema/preferences.graphql +190 -3
- package/lib/graphql/schema/preferences.graphql.js +1 -1
- package/lib/graphql/schema/reaction.graphql +71 -13
- package/lib/graphql/schema/reaction.graphql.js +1 -1
- package/lib/graphql/schema/services.graphql +18 -0
- package/lib/graphql/schema/streaming.graphql +224 -0
- package/lib/graphql/schema/streaming.graphql.js +1 -0
- package/lib/graphql/schema/streaming.graphql.js.map +1 -0
- package/lib/graphql/schema/users.graphql +76 -13
- package/lib/graphql/schema/users.graphql.js +1 -1
- package/lib/graphql/schema/workflow-service.graphql +82 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interfaces/index.d.ts +0 -2
- package/lib/interfaces/services.d.ts +1 -3
- package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.d.ts +42 -0
- package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.js +60 -0
- package/lib/migrations/dbMigrations/AddChannelConfigurationsMigration.js.map +1 -0
- package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.d.ts +21 -0
- package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.js +30 -0
- package/lib/migrations/dbMigrations/AddChatConfigurationsMigration.js.map +1 -0
- package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.d.ts +17 -0
- package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js +44 -0
- package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js.map +1 -0
- package/lib/migrations/dbMigrations/index.d.ts +3 -0
- package/lib/migrations/index.d.ts +1 -0
- package/lib/migrations/mail-template-migration.d.ts +3 -6
- package/lib/migrations/mail-template-migration.js +8 -21
- package/lib/migrations/mail-template-migration.js.map +1 -1
- package/lib/migrations/message-notification-template-migration.d.ts +4 -7
- package/lib/migrations/message-notification-template-migration.js +8 -25
- package/lib/migrations/message-notification-template-migration.js.map +1 -1
- package/lib/module.d.ts +1 -1
- package/lib/module.js +3 -10
- package/lib/module.js.map +1 -1
- package/lib/plugins/ChannelMoleculerService.d.ts +39 -0
- package/lib/plugins/ChannelMoleculerService.js +58 -0
- package/lib/plugins/ChannelMoleculerService.js.map +1 -0
- package/lib/plugins/ExtendedTokenAccountMoleculerService.d.ts +65 -0
- package/lib/plugins/ExtendedTokenAccountMoleculerService.js +88 -0
- package/lib/plugins/ExtendedTokenAccountMoleculerService.js.map +1 -0
- package/lib/plugins/MessengerNotificationMoleculerService.d.ts +52 -0
- package/lib/plugins/MessengerNotificationMoleculerService.js +84 -0
- package/lib/plugins/MessengerNotificationMoleculerService.js.map +1 -0
- package/lib/plugins/PostMoleculerService.d.ts +65 -0
- package/lib/plugins/PostMoleculerService.js +87 -0
- package/lib/plugins/PostMoleculerService.js.map +1 -0
- package/lib/plugins/PostThreadMoleculerService.d.ts +40 -0
- package/lib/plugins/PostThreadMoleculerService.js +59 -0
- package/lib/plugins/PostThreadMoleculerService.js.map +1 -0
- package/lib/plugins/ReactionMoleculerService.d.ts +37 -0
- package/lib/plugins/ReactionMoleculerService.js +56 -0
- package/lib/plugins/ReactionMoleculerService.js.map +1 -0
- package/lib/plugins/index.d.ts +18 -6
- package/lib/preferences/permissions/inbox-permission-contribution.js +58 -97
- package/lib/preferences/permissions/inbox-permission-contribution.js.map +1 -1
- package/lib/preferences/permissions/inbox-roles-permission-overwrite.js +144 -144
- package/lib/preferences/permissions/inbox-roles-permission-overwrite.js.map +1 -1
- package/lib/preferences/settings/channel-settings.d.ts +39 -0
- package/lib/preferences/settings/channel-settings.js +180 -0
- package/lib/preferences/settings/channel-settings.js.map +1 -0
- package/lib/preferences/settings/chat-settings.d.ts +248 -0
- package/lib/preferences/settings/chat-settings.js +1152 -0
- package/lib/preferences/settings/chat-settings.js.map +1 -0
- package/lib/preferences/settings/index.d.ts +3 -0
- package/lib/preferences/settings/messenger-channels-contribution.d.ts +39 -0
- package/lib/preferences/settings/messenger-channels-contribution.js +355 -0
- package/lib/preferences/settings/messenger-channels-contribution.js.map +1 -0
- package/lib/preferences/settings/post-settings.d.ts +16 -0
- package/lib/preferences/settings/post-settings.js +75 -3
- package/lib/preferences/settings/post-settings.js.map +1 -1
- package/lib/services/channel-service.d.ts +215 -34
- package/lib/services/channel-service.js +1058 -273
- package/lib/services/channel-service.js.map +1 -1
- package/lib/services/extended-token-account-service.d.ts +175 -20
- package/lib/services/extended-token-account-service.js +636 -56
- package/lib/services/extended-token-account-service.js.map +1 -1
- package/lib/services/messenger-notification-service.d.ts +177 -17
- package/lib/services/messenger-notification-service.js +975 -421
- package/lib/services/messenger-notification-service.js.map +1 -1
- package/lib/services/post-service.d.ts +245 -18
- package/lib/services/post-service.js +1027 -113
- package/lib/services/post-service.js.map +1 -1
- package/lib/services/post-thread-service.d.ts +153 -6
- package/lib/services/post-thread-service.js +475 -9
- package/lib/services/post-thread-service.js.map +1 -1
- package/lib/services/proxy-services/ChannelProxyService.d.ts +27 -0
- package/lib/services/proxy-services/ChannelProxyService.js +31 -0
- package/lib/services/proxy-services/ChannelProxyService.js.map +1 -0
- package/lib/services/proxy-services/ExtendedTokenAccountProxyService.d.ts +42 -0
- package/lib/services/proxy-services/ExtendedTokenAccountProxyService.js +46 -0
- package/lib/services/proxy-services/ExtendedTokenAccountProxyService.js.map +1 -0
- package/lib/services/proxy-services/MessengerNotificationProxyService.d.ts +44 -0
- package/lib/services/proxy-services/MessengerNotificationProxyService.js +54 -0
- package/lib/services/proxy-services/MessengerNotificationProxyService.js.map +1 -0
- package/lib/services/proxy-services/PostProxyService.d.ts +42 -0
- package/lib/services/proxy-services/PostProxyService.js +46 -0
- package/lib/services/proxy-services/PostProxyService.js.map +1 -0
- package/lib/services/proxy-services/PostThreadProxyService.d.ts +32 -0
- package/lib/services/proxy-services/PostThreadProxyService.js +36 -0
- package/lib/services/proxy-services/PostThreadProxyService.js.map +1 -0
- package/lib/services/proxy-services/ReactionProxyService.d.ts +41 -0
- package/lib/services/proxy-services/ReactionProxyService.js +45 -0
- package/lib/services/proxy-services/ReactionProxyService.js.map +1 -0
- package/lib/services/proxy-services/index.d.ts +17 -5
- package/lib/services/reaction-service.d.ts +124 -4
- package/lib/services/reaction-service.js +413 -3
- package/lib/services/reaction-service.js.map +1 -1
- package/lib/store/models/account-token-store.d.ts +1 -1
- package/lib/store/models/account-token-store.js.map +1 -1
- package/lib/store/models/channel.d.ts +2 -3
- package/lib/store/models/channel.js +216 -70
- package/lib/store/models/channel.js.map +1 -1
- package/lib/store/models/post-thread.d.ts +3 -3
- package/lib/store/models/post-thread.js +96 -14
- package/lib/store/models/post-thread.js.map +1 -1
- package/lib/store/models/post.d.ts +2 -3
- package/lib/store/models/post.js +143 -23
- package/lib/store/models/post.js.map +1 -1
- package/lib/store/models/reaction.d.ts +2 -3
- package/lib/store/models/reaction.js +67 -8
- package/lib/store/models/reaction.js.map +1 -1
- package/lib/store/repositories/__tests__/__fixtures__/team-repository.d.ts +3 -3
- package/lib/store/repositories/channel-repository.d.ts +6 -6
- package/lib/store/repositories/channel-repository.js +5 -2
- package/lib/store/repositories/channel-repository.js.map +1 -1
- package/lib/store/repositories/post-repository.d.ts +6 -6
- package/lib/store/repositories/post-repository.js +5 -2
- package/lib/store/repositories/post-repository.js.map +1 -1
- package/lib/store/repositories/post-thread-repository.d.ts +6 -6
- package/lib/store/repositories/post-thread-repository.js +5 -2
- package/lib/store/repositories/post-thread-repository.js.map +1 -1
- package/lib/store/repositories/reaction-repository.d.ts +6 -6
- package/lib/store/repositories/reaction-repository.js +5 -2
- package/lib/store/repositories/reaction-repository.js.map +1 -1
- package/lib/streaming/block-chunker.d.ts +40 -0
- package/lib/streaming/block-chunker.js +103 -0
- package/lib/streaming/block-chunker.js.map +1 -0
- package/lib/streaming/block-chunker.test.d.ts +1 -0
- package/lib/streaming/index.d.ts +4 -0
- package/lib/streaming/stream-service.d.ts +71 -0
- package/lib/streaming/stream-service.js +325 -0
- package/lib/streaming/stream-service.js.map +1 -0
- package/lib/streaming/stream-service.test.d.ts +16 -0
- package/lib/streaming/streaming-post.integration.test.d.ts +10 -0
- package/lib/streaming/types.d.ts +33 -0
- package/lib/streaming/types.js +37 -0
- package/lib/streaming/types.js.map +1 -0
- package/lib/templates/constants/CONTRIBUTION_POINTS.ts.template +78 -0
- package/lib/templates/constants/SERVER_TYPES.ts.template +1 -4
- package/lib/templates/constants/WorkflowNamespace.ts.template +10 -0
- package/lib/templates/repositories/ChannelRepository.ts.template +3 -3
- package/lib/templates/repositories/PostRepository.ts.template +3 -3
- package/lib/templates/repositories/PostThreadRepository.ts.template +3 -3
- package/lib/templates/repositories/ReactionRepository.ts.template +3 -4
- package/lib/templates/services/ChannelService.ts.template +290 -39
- package/lib/templates/services/ExtendedTokenAccountService.ts.template +107 -3
- package/lib/templates/services/MessengerNotificationService.ts.template +94 -19
- package/lib/templates/services/MessengerStreamService.ts.template +131 -0
- package/lib/templates/services/PostService.ts.template +228 -20
- package/lib/templates/services/PostThreadService.ts.template +151 -6
- package/lib/templates/services/ReactionService.ts.template +129 -3
- package/lib/templates/services/RedisCacheManager.ts.template +22 -0
- package/package.json +10 -6
- package/lib/interfaces/context.d.ts +0 -14
- package/lib/plugins/channel-moleculer-service.d.ts +0 -8
- package/lib/plugins/channel-moleculer-service.js +0 -129
- package/lib/plugins/channel-moleculer-service.js.map +0 -1
- package/lib/plugins/extended-token-account-moleculer-service.d.ts +0 -8
- package/lib/plugins/extended-token-account-moleculer-service.js +0 -47
- package/lib/plugins/extended-token-account-moleculer-service.js.map +0 -1
- package/lib/plugins/messenger-notification-moleculer-service.d.ts +0 -9
- package/lib/plugins/messenger-notification-moleculer-service.js +0 -116
- package/lib/plugins/messenger-notification-moleculer-service.js.map +0 -1
- package/lib/plugins/post-moleculer-service.d.ts +0 -35
- package/lib/plugins/post-moleculer-service.js +0 -393
- package/lib/plugins/post-moleculer-service.js.map +0 -1
- package/lib/plugins/post-thread-moleculer-service.d.ts +0 -8
- package/lib/plugins/post-thread-moleculer-service.js +0 -33
- package/lib/plugins/post-thread-moleculer-service.js.map +0 -1
- package/lib/plugins/reaction-moleculer-service.d.ts +0 -8
- package/lib/plugins/reaction-moleculer-service.js +0 -20
- package/lib/plugins/reaction-moleculer-service.js.map +0 -1
- package/lib/services/proxy-services/channel-microservice.d.ts +0 -44
- package/lib/services/proxy-services/channel-microservice.js +0 -199
- package/lib/services/proxy-services/channel-microservice.js.map +0 -1
- package/lib/services/proxy-services/messenger-notification-microservice.d.ts +0 -16
- package/lib/services/proxy-services/messenger-notification-microservice.js +0 -54
- package/lib/services/proxy-services/messenger-notification-microservice.js.map +0 -1
- package/lib/services/proxy-services/post-microservice.d.ts +0 -22
- package/lib/services/proxy-services/post-microservice.js +0 -64
- package/lib/services/proxy-services/post-microservice.js.map +0 -1
- package/lib/services/proxy-services/post-thread-microservice.d.ts +0 -10
- package/lib/services/proxy-services/post-thread-microservice.js +0 -15
- package/lib/services/proxy-services/post-thread-microservice.js.map +0 -1
- package/lib/services/proxy-services/reaction-microservice.d.ts +0 -9
- package/lib/services/proxy-services/reaction-microservice.js +0 -10
- package/lib/services/proxy-services/reaction-microservice.js.map +0 -1
- package/lib/store/models/common-options.js +0 -20
- 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|
-
|
|
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
|
}
|