import type { MessagingSettings } from '@axinom/mosaic-message-bus-abstractions'; export class AxAuthMessagingSettings implements MessagingSettings { /** * Defines the messaging settings for the command with message type * "AxAuthServiceEnable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static AxAuthServiceEnable = new AxAuthMessagingSettings( 'AxAuthServiceEnable', 'inbox', 'ax_auth_service.enable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "AxAuthServiceDisable" and aggregate type "environment". * The aggregate ID field must contain the value of the "environment ID" field. */ public static AxAuthServiceDisable = new AxAuthMessagingSettings( 'AxAuthServiceDisable', 'inbox', 'ax_auth_service.disable', 'command', 'environment' ); /** * Defines the messaging settings for the command with message type * "AxAuthCreateUser" and aggregate type "user". * The aggregate ID field must contain the value of the "user ID" field. */ public static AxAuthCreateUser = new AxAuthMessagingSettings( 'AxAuthCreateUser', 'inbox', 'user.create', 'command', 'user' ); /** * Defines the messaging settings for the command with message type * "UpdateOAuthRegistration" and aggregate type "oauth-client". * The aggregate ID field must contain the value of the "client ID" field. */ public static UpdateOAuthRegistration = new AxAuthMessagingSettings( 'UpdateOAuthRegistration', 'inbox', 'oauth_registration.update', 'command', 'oauth-client' ); /** * Defines the messaging settings for the event with message type * "AxAuthServiceEnableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static AxAuthServiceEnableFinished = new AxAuthMessagingSettings( 'AxAuthServiceEnableFinished', 'ax_auth_service:enable_finished', 'ax_auth_service.enable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "AxAuthServiceEnableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static AxAuthServiceEnableFailed = new AxAuthMessagingSettings( 'AxAuthServiceEnableFailed', 'ax_auth_service:enable_failed', 'ax_auth_service.enable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "AxAuthServiceDisableFinished" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static AxAuthServiceDisableFinished = new AxAuthMessagingSettings( 'AxAuthServiceDisableFinished', 'ax_auth_service:disable_finished', 'ax_auth_service.disable_finished', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "AxAuthServiceDisableFailed" and aggregate type "environment". * The aggregate ID field contains the value of the "environment ID" field. */ public static AxAuthServiceDisableFailed = new AxAuthMessagingSettings( 'AxAuthServiceDisableFailed', 'ax_auth_service:disable_failed', 'ax_auth_service.disable_failed', 'event', 'environment' ); /** * Defines the messaging settings for the event with message type * "AxAuthCreateUserFinished" and aggregate type "user". * The aggregate ID field contains the value of the "user ID" field. */ public static AxAuthCreateUserFinished = new AxAuthMessagingSettings( 'AxAuthCreateUserFinished', 'ax_auth_user:create_finished', 'ax_auth_user.create_finished', 'event', 'user' ); /** * Defines the messaging settings for the event with message type * "AxAuthCreateUserFailed" and aggregate type "user". * The aggregate ID is not known (yet) so the field contains the value "UNDEFINED_ID". */ public static AxAuthCreateUserFailed = new AxAuthMessagingSettings( 'AxAuthCreateUserFailed', 'ax_auth_user:create_failed', 'ax_auth_user.create_failed', 'event', 'user' ); /** * Defines the messaging settings for the event with message type * "UpdateOAuthRegistrationFinished" and aggregate type "oauth-client". * The aggregate ID field contains the value of the "environment ID" field. */ public static UpdateOAuthRegistrationFinished = new AxAuthMessagingSettings( 'UpdateOAuthRegistrationFinished', 'oauth_registration:update_finished', 'oauth_registration.update_finished', 'event', 'oauth-client' ); /** * Defines the messaging settings for the event with message type * "UpdateOAuthRegistrationFailed" and aggregate type "oauth-client". * The aggregate ID field contains the value of the "environment ID" field. */ public static UpdateOAuthRegistrationFailed = new AxAuthMessagingSettings( 'UpdateOAuthRegistrationFailed', 'oauth_registration:update_failed', 'oauth_registration.update_failed', 'event', 'oauth-client' ); public readonly serviceId = 'ax-auth-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; }; }