UNPKG

@kenniy/event-contracts

Version:

Shared event schemas and stream definitions for 8Medical microservices architecture

107 lines 3.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ServiceConsumerRecommendations = exports.ConsumerGroupStreams = exports.ConsumerGroups = void 0; exports.getServiceConsumerGroups = getServiceConsumerGroups; exports.getConsumerGroupStreams = getConsumerGroupStreams; exports.ConsumerGroups = { HRM_PROCESSORS: 'hrm-business-processors', EMAIL_PROCESSORS: 'email-notification-processors', SMS_PROCESSORS: 'sms-notification-processors', ANALYTICS_PROCESSORS: 'analytics-processors', AUDIT_PROCESSORS: 'audit-trail-processors', PAYMENT_PROCESSORS: 'payment-processors', TRANSPORT_PROCESSORS: 'transport-processors', HEALTH_PROCESSORS: 'health-monitoring-processors', INTEGRATION_PROCESSORS: 'integration-processors', FILE_PROCESSORS: 'file-processors', }; exports.ConsumerGroupStreams = { [exports.ConsumerGroups.HRM_PROCESSORS]: [ 'user-service-events', 'business-verification-events', ], [exports.ConsumerGroups.EMAIL_PROCESSORS]: [ 'user-service-events', 'hrm-service-events', 'payment-service-events', 'transport-service-events', ], [exports.ConsumerGroups.SMS_PROCESSORS]: [ 'user-service-events', 'hrm-service-events', 'transport-service-events', ], [exports.ConsumerGroups.ANALYTICS_PROCESSORS]: [ 'user-service-events', 'hrm-service-events', 'notification-service-events', 'payment-service-events', 'transport-service-events', 'business-verification-events', 'service-health-events', ], [exports.ConsumerGroups.AUDIT_PROCESSORS]: [ 'user-service-events', 'hrm-service-events', 'notification-service-events', 'payment-service-events', 'transport-service-events', 'business-verification-events', 'audit-events', ], [exports.ConsumerGroups.PAYMENT_PROCESSORS]: [ 'payment-service-events', 'user-service-events', ], [exports.ConsumerGroups.TRANSPORT_PROCESSORS]: [ 'transport-service-events', 'hrm-service-events', ], [exports.ConsumerGroups.HEALTH_PROCESSORS]: [ 'service-health-events', 'audit-events', ], [exports.ConsumerGroups.INTEGRATION_PROCESSORS]: [], [exports.ConsumerGroups.FILE_PROCESSORS]: [ 'notification-service-events', ], }; exports.ServiceConsumerRecommendations = { 'user-service': [ exports.ConsumerGroups.ANALYTICS_PROCESSORS, exports.ConsumerGroups.AUDIT_PROCESSORS, ], 'hrm-service': [ exports.ConsumerGroups.HRM_PROCESSORS, exports.ConsumerGroups.ANALYTICS_PROCESSORS, exports.ConsumerGroups.AUDIT_PROCESSORS, ], 'file-notification-service': [ exports.ConsumerGroups.EMAIL_PROCESSORS, exports.ConsumerGroups.SMS_PROCESSORS, exports.ConsumerGroups.FILE_PROCESSORS, exports.ConsumerGroups.ANALYTICS_PROCESSORS, ], 'payment-service': [ exports.ConsumerGroups.PAYMENT_PROCESSORS, exports.ConsumerGroups.ANALYTICS_PROCESSORS, exports.ConsumerGroups.AUDIT_PROCESSORS, ], 'transport-service': [ exports.ConsumerGroups.TRANSPORT_PROCESSORS, exports.ConsumerGroups.ANALYTICS_PROCESSORS, ], 'analytics-service': [ exports.ConsumerGroups.ANALYTICS_PROCESSORS, ], 'audit-service': [ exports.ConsumerGroups.AUDIT_PROCESSORS, ], }; function getServiceConsumerGroups(serviceName) { return exports.ServiceConsumerRecommendations[serviceName] || []; } function getConsumerGroupStreams(consumerGroup) { return exports.ConsumerGroupStreams[consumerGroup] || []; } //# sourceMappingURL=index.js.map