import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class HostingServiceMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "HostingServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static HostingServiceEnable = new HostingServiceMessagingSettings( 'HostingServiceEnable', 'inbox', 'hosting_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "HostingServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static HostingServiceDisable = new HostingServiceMessagingSettings( 'HostingServiceDisable', 'inbox', 'hosting_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "EnsureServiceResourcesExist" and aggregate type "resource". * The aggregate ID field must contain the value of the "environment ID" field. */ public static EnsureServiceResourcesExist = new HostingServiceMessagingSettings( 'EnsureServiceResourcesExist', 'ensure_service_resources_exist_command:start', 'ensure_service_resources_exist_command.start', 'command', 'resource' ); /** * Defines the messaging settings for the command with message type * "DeployServiceStart" and aggregate type "service". * The aggregate ID field must contain the value of the "environment ID" field. */ public static DeployServiceStart = new HostingServiceMessagingSettings( 'DeployServiceStart', 'inbox', 'hosting_service_deploy_service.start', 'command', 'service' ); /** * Defines the messaging settings for the command with message type * "UndeployServiceStart" and aggregate type "service". * The aggregate ID field must contain the value of the "environment ID" field. */ public static UndeployServiceStart = new HostingServiceMessagingSettings( 'UndeployServiceStart', 'inbox', 'hosting_service_undeploy_service.start', 'command', 'service' ); /** * Defines the messaging settings for the event with message type * "HostingServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static HostingServiceEnableFinished = new HostingServiceMessagingSettings( 'HostingServiceEnableFinished', 'hosting_service:enable_finished', 'hosting_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "HostingServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static HostingServiceEnableFailed = new HostingServiceMessagingSettings( 'HostingServiceEnableFailed', 'hosting_service:enable_failed', 'hosting_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "HostingServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static HostingServiceDisableFinished = new HostingServiceMessagingSettings( 'HostingServiceDisableFinished', 'hosting_service:disable_finished', 'hosting_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "HostingServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static HostingServiceDisableFailed = new HostingServiceMessagingSettings( 'HostingServiceDisableFailed', 'hosting_service:disable_failed', 'hosting_service.disable_failed', 'event', 'environment' ); public readonly serviceId = 'ax-hosting-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; }; }