import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class UserServiceMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "UserServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static UserServiceEnable = new UserServiceMessagingSettings( 'UserServiceEnable', 'inbox', 'user_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "UserServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static UserServiceDisable = new UserServiceMessagingSettings( 'UserServiceDisable', 'inbox', 'user_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the event with message type * "UserServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static UserServiceEnableFinished = new UserServiceMessagingSettings( 'UserServiceEnableFinished', 'user_service:enable_finished', 'user_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "UserServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static UserServiceEnableFailed = new UserServiceMessagingSettings( 'UserServiceEnableFailed', 'user_service:enable_failed', 'user_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "UserServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static UserServiceDisableFinished = new UserServiceMessagingSettings( 'UserServiceDisableFinished', 'user_service:disable_finished', 'user_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "UserServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static UserServiceDisableFailed = new UserServiceMessagingSettings( 'UserServiceDisableFailed', 'user_service:disable_failed', 'user_service.disable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "UserServiceEndUserDeleted" and aggregate type "end-user". * The aggregate ID field contains the value of the "end user ID" field. */ public static UserServiceEndUserDeleted = new UserServiceMessagingSettings( 'UserServiceEndUserDeleted', 'end_user:deleted', 'end_user.deleted', 'event', 'end-user' ); /** * Defines the messaging settings for the event with message type * "UserServiceEndUserCreated" and aggregate type "end-user". * The aggregate ID field contains the value of the "end user ID" field. */ public static UserServiceEndUserCreated = new UserServiceMessagingSettings( 'UserServiceEndUserCreated', 'end_user:created', 'end_user.created', 'event', 'end-user' ); public readonly serviceId = 'ax-user-service'; private constructor( public readonly messageType: string, public readonly queue: string, public readonly routingKey: string, public readonly action: 'command' | 'event', public readonly aggregateType: string, ) { } public toString = (): string => { return this.messageType; }; }