import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class AdminServiceMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "ExecuteAsyncWrapperStep" and aggregate type "step". * The aggregate ID field must contain the value of the "environment ID" field. */ public static ExecuteAsyncWrapperStep = new AdminServiceMessagingSettings( 'ExecuteAsyncWrapperStep', 'inbox', 'async_wrapper_step.execute', 'command', 'step' ); /** * Defines the messaging settings for the event with message type * "ExecuteAsyncWrapperStepFinished" and aggregate type "step". * The aggregate ID field contains the value of the "environment ID" field. */ public static ExecuteAsyncWrapperStepFinished = new AdminServiceMessagingSettings( 'ExecuteAsyncWrapperStepFinished', 'async_wrapper_step:execute_finished', 'async_wrapper_step.execute_finished', 'event', 'step' ); /** * Defines the messaging settings for the event with message type * "ExecuteAsyncWrapperStepFailed" and aggregate type "step". * The aggregate ID field contains the value of the "environment ID" field. */ public static ExecuteAsyncWrapperStepFailed = new AdminServiceMessagingSettings( 'ExecuteAsyncWrapperStepFailed', 'async_wrapper_step:execute_failed', 'async_wrapper_step.execute_failed', 'event', 'step' ); /** * Defines the messaging settings for the event with message type * "EnvironmentCreated" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static EnvironmentCreated = new AdminServiceMessagingSettings( 'EnvironmentCreated', 'environment:created', 'environment.created', '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; }; }