import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class ImageServiceMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "ImageServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static ImageServiceEnable = new ImageServiceMessagingSettings( 'ImageServiceEnable', 'inbox', 'image_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "ImageServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static ImageServiceDisable = new ImageServiceMessagingSettings( 'ImageServiceDisable', 'inbox', 'image_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the event with message type * "ImageServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageServiceEnableFinished = new ImageServiceMessagingSettings( 'ImageServiceEnableFinished', 'image_service:enable_finished', 'image_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "ImageServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageServiceEnableFailed = new ImageServiceMessagingSettings( 'ImageServiceEnableFailed', 'image_service:enable_failed', 'image_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "ImageServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageServiceDisableFinished = new ImageServiceMessagingSettings( 'ImageServiceDisableFinished', 'image_service:disable_finished', 'image_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "ImageServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageServiceDisableFailed = new ImageServiceMessagingSettings( 'ImageServiceDisableFailed', 'image_service:disable_failed', 'image_service.disable_failed', 'event', 'environment' ); public readonly serviceId = 'ax-image-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; }; }