import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class MicroFrontendMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "MicroFrontendServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static MicroFrontendServiceEnable = new MicroFrontendMessagingSettings( 'MicroFrontendServiceEnable', 'inbox', 'micro_frontend_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "MicroFrontendServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static MicroFrontendServiceDisable = new MicroFrontendMessagingSettings( 'MicroFrontendServiceDisable', 'inbox', 'micro_frontend_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "WorkflowsEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static WorkflowsEnable = new MicroFrontendMessagingSettings( 'WorkflowsEnable', 'inbox', 'workflows.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "WorkflowsDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static WorkflowsDisable = new MicroFrontendMessagingSettings( 'WorkflowsDisable', 'inbox', 'workflows.disable', 'command', 'environment' ); /** * Defines the messaging settings for the event with message type * "MicroFrontendServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static MicroFrontendServiceEnableFinished = new MicroFrontendMessagingSettings( 'MicroFrontendServiceEnableFinished', 'micro_frontend_service:enable_finished', 'micro_frontend_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "MicroFrontendServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static MicroFrontendServiceEnableFailed = new MicroFrontendMessagingSettings( 'MicroFrontendServiceEnableFailed', 'micro_frontend_service:enable_failed', 'micro_frontend_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "MicroFrontendServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static MicroFrontendServiceDisableFinished = new MicroFrontendMessagingSettings( 'MicroFrontendServiceDisableFinished', 'micro_frontend_service:disable_finished', 'micro_frontend_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "MicroFrontendServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static MicroFrontendServiceDisableFailed = new MicroFrontendMessagingSettings( 'MicroFrontendServiceDisableFailed', 'micro_frontend_service:disable_failed', 'micro_frontend_service.disable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "WorkflowsEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static WorkflowsEnableFinished = new MicroFrontendMessagingSettings( 'WorkflowsEnableFinished', 'workflows:enable_finished', 'workflows.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "WorkflowsEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static WorkflowsEnableFailed = new MicroFrontendMessagingSettings( 'WorkflowsEnableFailed', 'workflows:enable_failed', 'workflows.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "WorkflowsDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static WorkflowsDisableFinished = new MicroFrontendMessagingSettings( 'WorkflowsDisableFinished', 'workflows:disable_finished', 'workflows.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "WorkflowsDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static WorkflowsDisableFailed = new MicroFrontendMessagingSettings( 'WorkflowsDisableFailed', 'workflows:disable_failed', 'workflows.disable_failed', 'event', 'environment' ); public readonly serviceId = 'ax-micro-frontend-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; }; }