import { MultiTenantMessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class ImageServiceMultiTenantMessagingSettings extends MultiTenantMessagingSettings { /** * Defines the messaging settings for the command with message type * "DeclareImageTypes" and aggregate type "image-type". * The aggregate ID field must contain the value of the "environment ID" field. */ public static DeclareImageTypes = new ImageServiceMultiTenantMessagingSettings( 'DeclareImageTypes', 'inbox', '*.*.image_types.declare', 'command', 'image-type' ); /** * Defines the messaging settings for the command with message type * "EnsureImageExists" and aggregate type "image". * The aggregate ID is not known (yet) so the field must contain the value "UNDEFINED_ID". */ public static EnsureImageExists = new ImageServiceMultiTenantMessagingSettings( 'EnsureImageExists', 'inbox', '*.*.image.ensure_exists', 'command', 'image' ); /** * Defines the messaging settings for the command with message type * "ArchiveImages" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field must contain the value "MULTIPLE_IDS". */ public static ArchiveImages = new ImageServiceMultiTenantMessagingSettings( 'ArchiveImages', 'inbox', '*.*.images.archive', 'command', 'image' ); /** * Defines the messaging settings for the command with message type * "UnarchiveImages" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field must contain the value "MULTIPLE_IDS". */ public static UnarchiveImages = new ImageServiceMultiTenantMessagingSettings( 'UnarchiveImages', 'inbox', '*.*.images.unarchive', 'command', 'image' ); /** * Defines the messaging settings for the command with message type * "StartImagesDeletion" and aggregate type "image". * The aggregate ID field must contain the value of the "image ID" field. */ public static StartImagesDeletion = new ImageServiceMultiTenantMessagingSettings( 'StartImagesDeletion', 'inbox', '*.*.images.start_deletion', 'command', 'image' ); /** * Defines the messaging settings for the command with message type * "DeleteImage" and aggregate type "image". * The aggregate ID field must contain the value of the "image ID" field. */ public static DeleteImage = new ImageServiceMultiTenantMessagingSettings( 'DeleteImage', 'inbox', '*.*.image.delete', 'command', 'image' ); /** * Defines the messaging settings for the event with message type * "ImageTypesDeclared" and aggregate type "image-type". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageTypesDeclared = new ImageServiceMultiTenantMessagingSettings( 'ImageTypesDeclared', 'image_types:declared', '*.*.image_types.declared', 'event', 'image-type' ); /** * Defines the messaging settings for the event with message type * "ImageTypesDeclareFailed" and aggregate type "image-type". * The aggregate ID field contains the value of the "environment ID" field. */ public static ImageTypesDeclareFailed = new ImageServiceMultiTenantMessagingSettings( 'ImageTypesDeclareFailed', 'image_types:declare_failed', '*.*.image_types.declare_failed', 'event', 'image-type' ); /** * Defines the messaging settings for the event with message type * "EnsureImageExistsAlreadyExisted" and aggregate type "image". * The aggregate ID field contains the value of the "image ID" field. */ public static EnsureImageExistsAlreadyExisted = new ImageServiceMultiTenantMessagingSettings( 'EnsureImageExistsAlreadyExisted', 'image:ensure_exists_already_existed', '*.*.image.ensure_exists_already_existed', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "EnsureImageExistsImageCreated" and aggregate type "image". * The aggregate ID field contains the value of the "image ID" field. */ public static EnsureImageExistsImageCreated = new ImageServiceMultiTenantMessagingSettings( 'EnsureImageExistsImageCreated', 'image:ensure_exists_created', '*.*.image.ensure_exists_created', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "EnsureImageExistsFailed" and aggregate type "image". * The aggregate ID is not known (yet) so the field contains the value "UNDEFINED_ID". */ public static EnsureImageExistsFailed = new ImageServiceMultiTenantMessagingSettings( 'EnsureImageExistsFailed', 'image:ensure_exists_failed', '*.*.image.ensure_exists_failed', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "ArchiveImagesFinished" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field contains the value "MULTIPLE_IDS". */ public static ArchiveImagesFinished = new ImageServiceMultiTenantMessagingSettings( 'ArchiveImagesFinished', 'images:archive_finished', '*.*.images.archive_finished', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "ArchiveImagesFailed" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field contains the value "MULTIPLE_IDS". */ public static ArchiveImagesFailed = new ImageServiceMultiTenantMessagingSettings( 'ArchiveImagesFailed', 'images:archive_failed', '*.*.images.archive_failed', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "UnarchiveImagesFinished" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field contains the value "MULTIPLE_IDS". */ public static UnarchiveImagesFinished = new ImageServiceMultiTenantMessagingSettings( 'UnarchiveImagesFinished', 'images:unarchive_finished', '*.*.images.unarchive_finished', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "UnarchiveImagesFailed" and aggregate type "image". * There are multiple aggregate IDs in the payload so the field contains the value "MULTIPLE_IDS". */ public static UnarchiveImagesFailed = new ImageServiceMultiTenantMessagingSettings( 'UnarchiveImagesFailed', 'images:unarchive_failed', '*.*.images.unarchive_failed', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "DeleteImageFinished" and aggregate type "image". * The aggregate ID field contains the value of the "image ID" field. */ public static DeleteImageFinished = new ImageServiceMultiTenantMessagingSettings( 'DeleteImageFinished', 'image:delete_finished', '*.*.image.delete_finished', 'event', 'image' ); /** * Defines the messaging settings for the event with message type * "DeleteImageFailed" and aggregate type "image". * The aggregate ID field contains the value of the "image ID" field. */ public static DeleteImageFailed = new ImageServiceMultiTenantMessagingSettings( 'DeleteImageFailed', 'image:delete_failed', '*.*.image.delete_failed', 'event', 'image' ); private constructor( messageType: string, queue: string, routingKey: string, action: 'command' | 'event', aggregateType: string, ) { super('ax-image-service', messageType, queue, routingKey, action, aggregateType); } public override toString = (): string => { return this.messageType; }; }