@kenniy/godeye-event-contracts
Version:
Shared event schemas and stream definitions for 8Medical microservices architecture
31 lines • 1.85 kB
TypeScript
export declare const EventStreams: {
readonly USER_SERVICE_EVENTS: "user-service-events";
readonly HRM_SERVICE_EVENTS: "hrm-service-events";
readonly NOTIFICATION_SERVICE_EVENTS: "notification-service-events";
readonly PAYMENT_SERVICE_EVENTS: "payment-service-events";
readonly TRANSPORT_SERVICE_EVENTS: "transport-service-events";
readonly BUSINESS_VERIFICATION_EVENTS: "business-verification-events";
readonly SERVICE_HEALTH_EVENTS: "service-health-events";
readonly AUDIT_EVENTS: "audit-events";
};
export declare const StreamsByService: {
readonly USER_SERVICE: readonly ["user-service-events", "business-verification-events"];
readonly HRM_SERVICE: readonly ["hrm-service-events"];
readonly FILE_NOTIFICATION_SERVICE: readonly ["notification-service-events"];
readonly PAYMENT_SERVICE: readonly ["payment-service-events"];
readonly TRANSPORT_SERVICE: readonly ["transport-service-events"];
readonly SYSTEM: readonly ["service-health-events", "audit-events"];
};
export declare const FutureDomainStreams: {
readonly USER_DOMAIN_EVENTS: "user-domain-events";
readonly HEALTHCARE_DOMAIN_EVENTS: "healthcare-domain-events";
readonly FINANCIAL_DOMAIN_EVENTS: "financial-domain-events";
readonly COMMUNICATION_DOMAIN_EVENTS: "communication-domain-events";
readonly LOGISTICS_DOMAIN_EVENTS: "logistics-domain-events";
};
export type EventStreamName = typeof EventStreams[keyof typeof EventStreams];
export type DomainStreamName = typeof FutureDomainStreams[keyof typeof FutureDomainStreams];
export type ServiceStreamGroup = keyof typeof StreamsByService;
export declare function getStreamsByService(service: ServiceStreamGroup): readonly string[];
export declare function isValidStream(streamName: string): streamName is EventStreamName;
//# sourceMappingURL=index.d.ts.map