import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class IdServiceMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "IdServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static IdServiceEnable = new IdServiceMessagingSettings( 'IdServiceEnable', 'inbox', 'id_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "IdServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static IdServiceDisable = new IdServiceMessagingSettings( 'IdServiceDisable', 'inbox', 'id_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the event with message type * "IdServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static IdServiceEnableFinished = new IdServiceMessagingSettings( 'IdServiceEnableFinished', 'id_service:enable_finished', 'id_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "IdServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static IdServiceEnableFailed = new IdServiceMessagingSettings( 'IdServiceEnableFailed', 'id_service:enable_failed', 'id_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "IdServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static IdServiceDisableFinished = new IdServiceMessagingSettings( 'IdServiceDisableFinished', 'id_service:disable_finished', 'id_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "IdServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static IdServiceDisableFailed = new IdServiceMessagingSettings( 'IdServiceDisableFailed', 'id_service:disable_failed', 'id_service.disable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "EnvironmentMetadataChanged" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static EnvironmentMetadataChanged = new IdServiceMessagingSettings( 'EnvironmentMetadataChanged', 'environment:metadata_changed', 'environment.metadata_changed', 'event', 'environment' ); public readonly serviceId = 'ax-id-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; }; }