From 12be6cecf693a564bc098d94d99322fee0cd556b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:21:18 +0200 Subject: [PATCH 1/6] refactor: extract Contracts project for all modules --- .../AdminApi/src/AdminApi/packages.lock.json | 64 ++++++- .../packages.lock.json | 64 ++++++- .../AdminCli/src/AdminCli/packages.lock.json | 31 ++++ .../ConsumerApi/src/packages.lock.json | 77 ++++++++- .../packages.lock.json | 77 ++++++++- .../src/DatabaseMigrator/packages.lock.json | 77 ++++++++- .../DatabaseMigrator.Tests/packages.lock.json | 77 ++++++++- .../EventHandlerService/packages.lock.json | 76 ++++++++- .../packages.lock.json | 76 ++++++++- .../src/Housekeeper/packages.lock.json | 77 ++++++++- .../Job.IdentityDeletion/packages.lock.json | 77 ++++++++- .../packages.lock.json | 77 ++++++++- .../packages.lock.json | 77 ++++++++- .../src/SseServer/packages.lock.json | 29 ++++ .../test/SseServerTests/packages.lock.json | 29 ++++ .../Backbone.Tests.ArchUnit.csproj | 8 + Backbone.Tests.ArchUnit/CleanArchitecture.cs | 75 +++++++++ .../DomainEventSerialization.cs | 31 ++++ Backbone.Tests.ArchUnit/DomainEvents.cs | 51 ++---- Backbone.Tests.ArchUnit/packages.lock.json | 79 ++++++++- Backbone.slnx | 8 + .../src/BuildingBlocks.API/packages.lock.json | 29 ++++ .../packages.lock.json | 7 + .../Announcements.Contracts.csproj | 5 + .../AnnouncementCreatedDomainEvent.cs | 4 +- .../packages.lock.json | 54 ++++++ .../Announcements.Domain.csproj | 1 + .../AnnouncementDomainEventExtensions.cs | 28 ++++ .../AnnouncementCreatedDomainEvent.cs | 36 ---- .../Entities/Announcement.cs | 5 +- .../Announcements.Domain/packages.lock.json | 6 + .../packages.lock.json | 7 + .../packages.lock.json | 7 + .../packages.lock.json | 7 + .../Announcements.Module/packages.lock.json | 30 ++++ .../packages.lock.json | 7 + .../Tests/AnnouncementTests.cs | 2 +- .../packages.lock.json | 7 + .../src/Challenges.Module/packages.lock.json | 29 ++++ .../Devices.Application.csproj | 4 + .../AnnouncementCreatedDomainEventHandler.cs | 2 +- .../BackupDeviceUsedDomainEventHandler.cs | 2 +- .../DatawalletModifiedDomainEventHandler.cs | 2 +- .../ExternalEventCreatedDomainEventHandler.cs | 2 +- ...eletionProcessStartedDomainEventHandler.cs | 2 +- .../TokenLockedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 9 +- .../Tiers/Commands/DeleteTier/Handler.cs | 5 +- .../Devices.Application/packages.lock.json | 25 +++ .../Devices.Contracts.csproj | 5 + .../DomainEvents/DomainEvents.cs | 67 ++++++++ .../src/Devices.Contracts/packages.lock.json | 54 ++++++ .../Devices.Domain/Aggregates/Tier/Tier.cs | 5 +- .../src/Devices.Domain/Devices.Domain.csproj | 1 + .../DeviceDomainEventExtensions.cs | 144 ++++++++++++++++ .../DatawalletModifiedDomainEvent.cs | 9 - .../ExternalEventCreatedDomainEvent.cs | 9 - .../TokenLocked/TokenLockedDomainEvent.cs | 9 - .../Outgoing/BackupDeviceUsedDomainEvent.cs | 20 --- ...eatureFlagsOfIdentityChangedDomainEvent.cs | 14 -- .../Outgoing/IdentityCreatedDomainEvent.cs | 16 -- .../Outgoing/IdentityDeletedDomainEvent.cs | 13 -- .../IdentityDeletionCancelledDomainEvent.cs | 13 -- ...entityDeletionProcessStartedDomainEvent.cs | 17 -- ...DeletionProcessStatusChangedDomainEvent.cs | 18 -- .../IdentityToBeDeletedDomainEvent.cs | 16 -- .../Outgoing/TierCreatedDomainEvent.cs | 16 -- .../Outgoing/TierDeletedDomainEvent.cs | 14 -- .../TierOfIdentityChangedDomainEvent.cs | 19 --- .../Entities/Identities/Device.cs | 5 +- .../Entities/Identities/Identity.cs | 17 +- .../Identities/IdentityDeletionProcess.cs | 5 +- .../src/Devices.Domain/packages.lock.json | 6 + .../packages.lock.json | 29 ++++ .../packages.lock.json | 29 ++++ .../Devices.Infrastructure/packages.lock.json | 29 ++++ .../src/Devices.Module/packages.lock.json | 29 ++++ ...ouncementCreatedDomainEventHandlerTests.cs | 2 +- ...rnalEventCreatedDomainEventHandlerTests.cs | 8 +- .../TokenLockedDomainEventHandlerTests.cs | 2 +- .../DatawalletModified/HandlerTests.cs | 2 +- .../Tiers/Commands/DeleteTier/HandlerTests.cs | 2 +- .../packages.lock.json | 29 ++++ .../Domain/DeviceTests.cs | 2 +- .../Identities/CancelDeletionProcessTests.cs | 2 +- .../Identities/ChangeFeatureFlagsTests.cs | 2 +- .../Identities/ChangeTierTests.cs | 2 +- .../Identities/DeletionStartedTests.cs | 2 +- .../Identities/StartDeletionProcessTests.cs | 2 +- .../Devices.Domain.Tests/packages.lock.json | 7 + .../packages.lock.json | 29 ++++ .../src/Files.Application/packages.lock.json | 7 + .../DomainEvents/DomainEvents.cs | 22 +++ .../Files.Contracts/Files.Contracts.csproj | 5 + .../src/Files.Contracts/packages.lock.json | 54 ++++++ .../DomainEvents/FileDomainEventExtensions.cs | 43 +++++ .../FileOwnershipClaimedDomainEvent.cs | 19 --- .../FileOwnershipLockedDomainEvent.cs | 16 -- .../Outgoing/FileUploadedDomainEvent.cs | 16 -- .../Files/src/Files.Domain/Entities/File.cs | 11 +- .../src/Files.Domain/Files.Domain.csproj | 1 + .../Files/src/Files.Domain/packages.lock.json | 6 + .../packages.lock.json | 7 + .../packages.lock.json | 7 + .../Files.Infrastructure/packages.lock.json | 7 + .../Files/src/Files.Module/packages.lock.json | 36 ++++ .../packages.lock.json | 7 + .../Tests/Files/ClaimOwnershipTests.cs | 2 +- .../Tests/Files/ValidateOwnershipTokenTest.cs | 2 +- .../Files.Domain.Tests/packages.lock.json | 7 + .../packages.lock.json | 7 + .../MessageOrphanedDomainEventHandler.cs | 2 +- ...tionshipStatusChangedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 4 +- .../Messages.Application.csproj | 2 + .../Messages.Application/packages.lock.json | 13 ++ .../MessageCreatedDomainEvent.cs | 4 +- .../MessageOrphanedDomainEvent.cs | 8 + .../Messages.Contracts.csproj | 7 + .../src/Messages.Contracts/packages.lock.json | 54 ++++++ .../RelationshipStatusChangedDomainEvent.cs | 12 -- .../MessageDomainEventExtensions.cs | 40 +++++ .../Outgoing/MessageCreatedDomainEvent.cs | 28 ---- .../Outgoing/MessageOrphanedDomainEvent.cs | 22 --- .../src/Messages.Domain/Entities/Message.cs | 7 +- .../Messages.Domain/Messages.Domain.csproj | 1 + .../src/Messages.Domain/packages.lock.json | 6 + .../packages.lock.json | 15 ++ .../packages.lock.json | 15 ++ .../packages.lock.json | 15 ++ .../src/Messages.Module/packages.lock.json | 44 +++++ .../packages.lock.json | 15 ++ .../Messages.Domain.Tests.csproj | 1 + .../Messages/AnonymizeParticipantTests.cs | 6 +- .../Messages/CreationTests.cs | 3 +- .../Messages.Domain.Tests/packages.lock.json | 7 + .../FileUploadedDomainEventHandler.cs | 2 +- .../IdentityCreatedDomainEventHandler.cs | 2 +- .../MessageCreatedDomainEventHandler.cs | 2 +- ...tionshipStatusChangedDomainEventHandler.cs | 2 +- ...onshipTemplateCreatedDomainEventHandler.cs | 2 +- .../TierCreatedDomainEventHandler.cs | 2 +- .../TierDeletedDomainEventHandler.cs | 2 +- ...TierOfIdentityChangedDomainEventHandler.cs | 2 +- ...uotaDefinitionCreatedDomainEventHandler.cs | 2 +- ...uotaDefinitionDeletedDomainEventHandler.cs | 2 +- .../TokenCreatedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 16 +- .../Quotas.Application.csproj | 6 + .../src/Quotas.Application/packages.lock.json | 37 ++++ .../DomainEvents/DomainEvents.cs | 15 ++ .../Quotas.Contracts/Quotas.Contracts.csproj | 5 + .../src/Quotas.Contracts/packages.lock.json | 54 ++++++ .../Quotas.Domain/Aggregates/Tiers/Tier.cs | 7 +- .../FileUploaded/FileUploadedDomainEvent.cs | 9 - .../IdentityCreatedDomainEvent.cs | 10 -- .../MessageCreatedDomainEvent.cs | 8 - .../RelationshipStatusChangedDomainEvent.cs | 9 - .../RelationshipTemplateCreatedDomainEvent.cs | 8 - .../TierCreated/TierCreatedDomainEvent.cs | 9 - .../TierDeleted/TierDeletedDomainEvent.cs | 8 - .../TierOfIdentityChangedDomainEvent.cs | 10 -- .../TokenCreated/TokenCreatedDomainEvent.cs | 8 - .../TierQuotaDefinitionCreatedDomainEvent.cs | 15 -- .../TierQuotaDefinitionDeletedDomainEvent.cs | 15 -- .../QuotaDomainEventExtensions.cs | 29 ++++ .../src/Quotas.Domain/Quotas.Domain.csproj | 1 + .../src/Quotas.Domain/packages.lock.json | 6 + .../packages.lock.json | 45 ++++- .../packages.lock.json | 45 ++++- .../Quotas.Infrastructure/packages.lock.json | 45 ++++- .../src/Quotas.Module/packages.lock.json | 62 ++++++- .../TierDeletedDomainEventHandlerTests.cs | 2 +- .../IdentityCreatedDomainEventHandlerTests.cs | 2 +- ...efinitionCreatedDomainEventHandlerTests.cs | 5 +- .../TierCreatedDomainEventHandlerTests.cs | 2 +- .../packages.lock.json | 45 ++++- .../Tests/Tiers/TierTests.cs | 2 +- .../Quotas.Domain.Tests/packages.lock.json | 7 + .../packages.lock.json | 51 +++++- ...lagsOfIdentityChangedDomainEventHandler.cs | 7 +- .../IdentityDeletedDomainEventHandler.cs | 7 +- ...tityDeletionCancelledDomainEventHandler.cs | 7 +- .../IdentityToBeDeletedDomainEventHandler.cs | 7 +- .../Extensions/IEventBusExtensions.cs | 2 +- .../Relationships.Application.csproj | 2 + .../packages.lock.json | 13 ++ .../DomainEvents/DomainEvents.cs | 66 ++++++++ .../Relationships.Contracts.csproj | 5 + .../packages.lock.json | 54 ++++++ .../RelationshipTemplate.cs | 7 +- .../Aggregates/Relationships/Relationship.cs | 25 +-- ...eatureFlagsOfIdentityChangedDomainEvent.cs | 8 - .../Incoming/IdentityDeletedDomainEvent.cs | 8 - .../IdentityDeletionCancelledDomainEvent.cs | 8 - .../IdentityToBeDeletedDomainEvent.cs | 9 - .../Outgoing/PeerDeletedDomainEvent.cs | 20 --- .../PeerDeletionCancelledDomainEvent.cs | 20 --- .../PeerFeatureFlagsChangedDomainEvent.cs | 15 -- .../Outgoing/PeerToBeDeletedDomainEvent.cs | 22 --- ...ionshipReactivationCompletedDomainEvent.cs | 20 --- ...ionshipReactivationRequestedDomainEvent.cs | 21 --- .../RelationshipStatusChangedDomainEvent.cs | 33 ---- ...TemplateAllocationsExhaustedDomainEvent.cs | 16 -- .../RelationshipTemplateCreatedDomainEvent.cs | 16 -- .../RelationshipDomainEventExtensions.cs | 158 ++++++++++++++++++ .../Relationships.Domain.csproj | 1 + .../Relationships.Domain/packages.lock.json | 6 + .../packages.lock.json | 15 ++ .../packages.lock.json | 15 ++ .../packages.lock.json | 15 ++ .../Relationships.Module/packages.lock.json | 38 +++++ ...IdentityDeletedDomainEventHandler.Tests.cs | 4 +- ...letionCancelledDomainEventHandler.Tests.cs | 4 +- ...tityToBeDeletedDomainEventHandler.Tests.cs | 4 +- .../packages.lock.json | 15 ++ .../RelationshipTemplate.CollectTests.cs | 2 +- .../RelationshipTemplate.CreateTests.cs | 2 +- .../Relationship.AcceptReactivationTests.cs | 2 +- .../Relationships/Relationship.AcceptTests.cs | 2 +- .../Relationships/Relationship.CreateTests.cs | 2 +- .../Relationship.DecomposeTests.cs | 2 +- .../Relationship.RejectReactivationTests.cs | 2 +- .../Relationships/Relationship.RejectTests.cs | 2 +- .../Relationship.RequestReactivationTests.cs | 2 +- .../Relationship.RevokeReactivationsTests.cs | 2 +- .../Relationships/Relationship.RevokeTests.cs | 2 +- .../Relationship.TerminateTests.cs | 2 +- .../packages.lock.json | 7 + .../packages.lock.json | 15 ++ .../FileOwnershipClaimedDomainEventHandler.cs | 2 +- .../FileOwnershipLockedDomainEventHandler.cs | 2 +- ...eletionProcessStartedDomainEventHandler.cs | 2 +- ...nProcessStatusChangedDomainEventHandler.cs | 2 +- .../MessageCreatedDomainEventHandler.cs | 2 +- .../PeerDeletedDomainEventHandler.cs | 2 +- ...PeerDeletionCancelledDomainEventHandler.cs | 2 +- ...erFeatureFlagsChangedDomainEventHandler.cs | 2 +- .../PeerToBeDeletedDomainEventHandler.cs | 2 +- ...ReactivationCompletedDomainEventHandler.cs | 2 +- ...ReactivationRequestedDomainEventHandler.cs | 2 +- ...tionshipStatusChangedDomainEventHandler.cs | 2 +- ...eAllocationsExhaustedDomainEventHandler.cs | 2 +- .../TokenLockedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 19 +-- .../Synchronization.Application.csproj | 5 + .../packages.lock.json | 37 ++++ .../DomainEvents/DomainEvents.cs | 16 ++ .../Synchronization.Contracts.csproj | 5 + .../packages.lock.json | 54 ++++++ .../FileOwnershipClaimedDomainEvent.cs | 10 -- .../FileOwnershipLockedDomainEvent.cs | 9 - ...entityDeletionProcessStartedDomainEvent.cs | 10 -- ...DeletionProcessStatusChangedDomainEvent.cs | 10 -- .../PeerDeleted/PeerDeletedDomainEvent.cs | 10 -- .../PeerDeletionCancelledDomainEvent.cs | 10 -- .../PeerFeatureFlagsChangedDomainEvent.cs | 9 - .../PeerToBeDeletedDomainEvent.cs | 11 -- ...ionshipReactivationCompletedDomainEvent.cs | 10 -- ...ionshipReactivationRequestedDomainEvent.cs | 9 - .../RelationshipStatusChangedDomainEvent.cs | 11 -- ...TemplateAllocationsExhaustedDomainEvent.cs | 9 - .../TokenLocked/TokenLockedDomainEvent.cs | 9 - .../Outgoing/DatawalletModifiedDomainEvent.cs | 16 -- .../ExternalEventCreatedDomainEvent.cs | 18 -- .../SynchronizationDomainEventExtensions.cs | 32 ++++ .../Entities/Datawallet.cs | 5 +- .../Entities/Sync/ExternalEvent.cs | 5 +- .../Synchronization.Domain.csproj | 1 + .../Synchronization.Domain/packages.lock.json | 6 + .../packages.lock.json | 42 +++++ .../packages.lock.json | 42 +++++ .../packages.lock.json | 42 +++++ .../Synchronization.Module/packages.lock.json | 53 ++++++ .../Synchronization.Application.Tests.csproj | 1 + ...onProcessStartedDomainEventHandlerTests.cs | 2 +- ...essStatusChangedDomainEventHandlerTests.cs | 2 +- .../MessageCreatedDomainEventHandlerTests.cs | 2 +- .../PeerDeletedDomainEventHandlerTests.cs | 2 +- ...eletionCancelledDomainEventHandlerTests.cs | 2 +- .../PeerToBeDeletedDomainEventHandlerTests.cs | 2 +- ...ivationCompletedDomainEventHandlerTests.cs | 2 +- ...hipStatusChangedDomainEventHandlerTests.cs | 7 +- .../TokenLockedDomainEventHandlerTests.cs | 2 +- .../packages.lock.json | 42 +++++ .../DatawalletTests.cs | 2 +- .../ExternalEventTests.cs | 2 +- .../packages.lock.json | 7 + .../src/Tokens.Application/packages.lock.json | 7 + .../DomainEvents/DomainEvents.cs | 15 ++ .../Tokens.Contracts/Tokens.Contracts.csproj | 5 + .../src/Tokens.Contracts/packages.lock.json | 54 ++++++ .../Outgoing/TokenCreatedDomainEvent.cs | 16 -- .../Outgoing/TokenLockedDomainEvent.cs | 16 -- .../TokenDomainEventExtensions.cs | 30 ++++ .../src/Tokens.Domain/Entities/Token.cs | 7 +- .../src/Tokens.Domain/Tokens.Domain.csproj | 3 +- .../src/Tokens.Domain/packages.lock.json | 6 + .../packages.lock.json | 7 + .../packages.lock.json | 7 + .../Tokens.Infrastructure/packages.lock.json | 7 + .../src/Tokens.Module/packages.lock.json | 30 ++++ .../packages.lock.json | 7 + .../Tests/Tokens/TokenTests.cs | 2 +- .../Tests/Tokens/TryToAccessTests.cs | 2 +- .../Tokens.Domain.Tests/packages.lock.json | 7 + 306 files changed, 3997 insertions(+), 1119 deletions(-) create mode 100644 Backbone.Tests.ArchUnit/DomainEventSerialization.cs create mode 100644 Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj rename Modules/{Devices/src/Devices.Domain/DomainEvents/Incoming/AnnouncementCreated => Announcements/src/Announcements.Contracts/DomainEvents}/AnnouncementCreatedDomainEvent.cs (80%) create mode 100644 Modules/Announcements/src/Announcements.Contracts/packages.lock.json create mode 100644 Modules/Announcements/src/Announcements.Domain/DomainEvents/AnnouncementDomainEventExtensions.cs delete mode 100644 Modules/Announcements/src/Announcements.Domain/DomainEvents/Outgoing/AnnouncementCreatedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Devices/src/Devices.Contracts/packages.lock.json create mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/DeviceDomainEventExtensions.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/BackupDeviceUsedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/FeatureFlagsOfIdentityChangedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityCreatedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionCancelledDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStartedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStatusChangedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityToBeDeletedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierCreatedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierDeletedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs create mode 100644 Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Files/src/Files.Contracts/Files.Contracts.csproj create mode 100644 Modules/Files/src/Files.Contracts/packages.lock.json create mode 100644 Modules/Files/src/Files.Domain/DomainEvents/FileDomainEventExtensions.cs delete mode 100644 Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipClaimedDomainEvent.cs delete mode 100644 Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipLockedDomainEvent.cs delete mode 100644 Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileUploadedDomainEvent.cs rename Modules/{Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/MessageCreated => Messages/src/Messages.Contracts/DomainEvents}/MessageCreatedDomainEvent.cs (82%) create mode 100644 Modules/Messages/src/Messages.Contracts/DomainEvents/MessageOrphanedDomainEvent.cs create mode 100644 Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj create mode 100644 Modules/Messages/src/Messages.Contracts/packages.lock.json delete mode 100644 Modules/Messages/src/Messages.Domain/DomainEvents/Incoming/RelationshipStatusChangedDomainEvent.cs create mode 100644 Modules/Messages/src/Messages.Domain/DomainEvents/MessageDomainEventExtensions.cs delete mode 100644 Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageCreatedDomainEvent.cs delete mode 100644 Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageOrphanedDomainEvent.cs create mode 100644 Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj create mode 100644 Modules/Quotas/src/Quotas.Contracts/packages.lock.json delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierCreated/TierCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionCreatedDomainEvent.cs delete mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionDeletedDomainEvent.cs create mode 100644 Modules/Quotas/src/Quotas.Domain/DomainEvents/QuotaDomainEventExtensions.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj create mode 100644 Modules/Relationships/src/Relationships.Contracts/packages.lock.json delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/FeatureFlagsOfIdentityChangedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletionCancelledDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityToBeDeletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletionCancelledDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerFeatureFlagsChangedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerToBeDeletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationCompletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationRequestedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipStatusChangedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateAllocationsExhaustedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateCreatedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs create mode 100644 Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj create mode 100644 Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipIsLocked/FileOwnershipLockedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerFeatureFlagsChangedEvent/PeerFeatureFlagsChangedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs delete mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/ExternalEventCreatedDomainEvent.cs create mode 100644 Modules/Synchronization/src/Synchronization.Domain/DomainEvents/SynchronizationDomainEventExtensions.cs create mode 100644 Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj create mode 100644 Modules/Tokens/src/Tokens.Contracts/packages.lock.json delete mode 100644 Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenCreatedDomainEvent.cs delete mode 100644 Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenLockedDomainEvent.cs create mode 100644 Modules/Tokens/src/Tokens.Domain/DomainEvents/TokenDomainEventExtensions.cs diff --git a/Applications/AdminApi/src/AdminApi/packages.lock.json b/Applications/AdminApi/src/AdminApi/packages.lock.json index a27c1aec10..608991e2f9 100644 --- a/Applications/AdminApi/src/AdminApi/packages.lock.json +++ b/Applications/AdminApi/src/AdminApi/packages.lock.json @@ -1100,11 +1100,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1202,7 +1209,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1210,11 +1221,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1266,12 +1284,36 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1279,6 +1321,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1320,6 +1363,18 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Application": { "type": "Project", "dependencies": { @@ -1330,10 +1385,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/AdminApi/test/AdminApi.Tests.Integration/packages.lock.json b/Applications/AdminApi/test/AdminApi.Tests.Integration/packages.lock.json index 5c7ea5677c..93981cd868 100644 --- a/Applications/AdminApi/test/AdminApi.Tests.Integration/packages.lock.json +++ b/Applications/AdminApi/test/AdminApi.Tests.Integration/packages.lock.json @@ -1742,11 +1742,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1844,7 +1851,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1852,11 +1863,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1908,12 +1926,36 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1921,6 +1963,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1962,6 +2005,18 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Application": { "type": "Project", "dependencies": { @@ -1972,10 +2027,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/AdminCli/src/AdminCli/packages.lock.json b/Applications/AdminCli/src/AdminCli/packages.lock.json index a5f284bda2..7bb526f5e1 100644 --- a/Applications/AdminCli/src/AdminCli/packages.lock.json +++ b/Applications/AdminCli/src/AdminCli/packages.lock.json @@ -1244,11 +1244,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1293,7 +1300,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1301,11 +1312,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1357,6 +1375,12 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Application": { "type": "Project", "dependencies": { @@ -1367,10 +1391,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/ConsumerApi/src/packages.lock.json b/Applications/ConsumerApi/src/packages.lock.json index 184e62f1c0..213b5dcaf0 100644 --- a/Applications/ConsumerApi/src/packages.lock.json +++ b/Applications/ConsumerApi/src/packages.lock.json @@ -1053,11 +1053,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1155,7 +1162,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1163,11 +1174,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1228,10 +1246,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1278,14 +1303,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1331,7 +1365,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1339,6 +1385,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1386,7 +1433,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1397,10 +1446,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1447,15 +1503,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1534,10 +1602,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/packages.lock.json b/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/packages.lock.json index 3ed2df5636..0315300298 100644 --- a/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/packages.lock.json +++ b/Applications/ConsumerApi/test/ConsumerApi.Tests.Integration/packages.lock.json @@ -1681,11 +1681,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1783,7 +1790,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1791,11 +1802,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1856,10 +1874,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1906,14 +1931,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1959,7 +1993,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1967,6 +2013,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -2014,7 +2061,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -2025,10 +2074,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -2075,15 +2131,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -2162,10 +2230,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/DatabaseMigrator/src/DatabaseMigrator/packages.lock.json b/Applications/DatabaseMigrator/src/DatabaseMigrator/packages.lock.json index d95617473b..ee992c4e79 100644 --- a/Applications/DatabaseMigrator/src/DatabaseMigrator/packages.lock.json +++ b/Applications/DatabaseMigrator/src/DatabaseMigrator/packages.lock.json @@ -1565,11 +1565,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1643,7 +1650,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1651,11 +1662,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1704,10 +1722,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1740,14 +1765,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1780,7 +1814,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1788,6 +1834,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1823,7 +1870,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1834,10 +1883,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1870,15 +1926,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1917,10 +1985,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/DatabaseMigrator/test/DatabaseMigrator.Tests/packages.lock.json b/Applications/DatabaseMigrator/test/DatabaseMigrator.Tests/packages.lock.json index 115625eef3..7a3dd9cb24 100644 --- a/Applications/DatabaseMigrator/test/DatabaseMigrator.Tests/packages.lock.json +++ b/Applications/DatabaseMigrator/test/DatabaseMigrator.Tests/packages.lock.json @@ -1572,11 +1572,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1650,7 +1657,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1658,11 +1669,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1711,10 +1729,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1747,14 +1772,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1787,7 +1821,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1795,6 +1841,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1830,7 +1877,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1841,10 +1890,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1877,15 +1933,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1924,10 +1992,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/EventHandlerService/src/EventHandlerService/packages.lock.json b/Applications/EventHandlerService/src/EventHandlerService/packages.lock.json index f252e33ce8..5eee78a1e1 100644 --- a/Applications/EventHandlerService/src/EventHandlerService/packages.lock.json +++ b/Applications/EventHandlerService/src/EventHandlerService/packages.lock.json @@ -1298,6 +1298,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Challenges.Application": { "type": "Project", "dependencies": { @@ -1357,7 +1363,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1365,11 +1375,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1430,10 +1447,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1480,14 +1504,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1533,7 +1566,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1541,6 +1586,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1588,7 +1634,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1599,10 +1647,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1649,15 +1704,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1709,10 +1776,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/EventHandlerService/test/EventHandlerService.Tests/packages.lock.json b/Applications/EventHandlerService/test/EventHandlerService.Tests/packages.lock.json index 5a801fef13..a938291ef9 100644 --- a/Applications/EventHandlerService/test/EventHandlerService.Tests/packages.lock.json +++ b/Applications/EventHandlerService/test/EventHandlerService.Tests/packages.lock.json @@ -1441,6 +1441,12 @@ "Serilog.Sinks.Seq": "[9.1.0, 9.1.0]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Challenges.Application": { "type": "Project", "dependencies": { @@ -1500,7 +1506,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1508,11 +1518,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1573,10 +1590,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1623,14 +1647,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1676,7 +1709,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1684,6 +1729,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1731,7 +1777,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1742,10 +1790,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1792,15 +1847,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1852,10 +1919,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/Housekeeper/src/Housekeeper/packages.lock.json b/Applications/Housekeeper/src/Housekeeper/packages.lock.json index 2a478a7bdc..09982612d9 100644 --- a/Applications/Housekeeper/src/Housekeeper/packages.lock.json +++ b/Applications/Housekeeper/src/Housekeeper/packages.lock.json @@ -1565,11 +1565,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1667,7 +1674,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1675,11 +1686,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1740,10 +1758,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1790,14 +1815,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1830,7 +1864,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1838,6 +1884,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1873,7 +1920,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1884,10 +1933,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1934,15 +1990,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1994,10 +2062,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/packages.lock.json b/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/packages.lock.json index 3be1c6d3de..26fc1d66ee 100644 --- a/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/packages.lock.json +++ b/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/packages.lock.json @@ -1292,11 +1292,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1394,7 +1401,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1402,11 +1413,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1467,10 +1485,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1517,14 +1542,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1570,7 +1604,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1578,6 +1624,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1625,7 +1672,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1636,10 +1685,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1686,15 +1742,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1746,10 +1814,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests.Integration/packages.lock.json b/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests.Integration/packages.lock.json index bc3f493162..d3a89a8573 100644 --- a/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests.Integration/packages.lock.json +++ b/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests.Integration/packages.lock.json @@ -1454,11 +1454,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1556,7 +1563,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1564,11 +1575,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1629,10 +1647,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1679,14 +1704,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1732,7 +1766,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1740,6 +1786,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1787,7 +1834,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1798,10 +1847,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1848,15 +1904,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1908,10 +1976,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests/packages.lock.json b/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests/packages.lock.json index bc3f493162..d3a89a8573 100644 --- a/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests/packages.lock.json +++ b/Applications/IdentityDeletionJobs/test/Job.IdentityDeletion.Tests/packages.lock.json @@ -1454,11 +1454,18 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1556,7 +1563,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1564,11 +1575,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1629,10 +1647,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1679,14 +1704,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1732,7 +1766,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1740,6 +1786,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1787,7 +1834,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1798,10 +1847,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1848,15 +1904,27 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1908,10 +1976,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Applications/SseServer/src/SseServer/packages.lock.json b/Applications/SseServer/src/SseServer/packages.lock.json index 3a0fc1ed13..96e42b489e 100644 --- a/Applications/SseServer/src/SseServer/packages.lock.json +++ b/Applications/SseServer/src/SseServer/packages.lock.json @@ -1010,13 +1010,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1024,11 +1034,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1080,6 +1097,18 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Applications/SseServer/test/SseServerTests/packages.lock.json b/Applications/SseServer/test/SseServerTests/packages.lock.json index eb57763bee..ff6bbb6dfe 100644 --- a/Applications/SseServer/test/SseServerTests/packages.lock.json +++ b/Applications/SseServer/test/SseServerTests/packages.lock.json @@ -1462,13 +1462,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1476,11 +1486,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1532,6 +1549,18 @@ "ReHackt.Extensions.Options.Validation": "[10.0.1, 10.0.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.SseServer": { "type": "Project", "dependencies": { diff --git a/Backbone.Tests.ArchUnit/Backbone.Tests.ArchUnit.csproj b/Backbone.Tests.ArchUnit/Backbone.Tests.ArchUnit.csproj index 2b0100e636..f79a39e3fa 100644 --- a/Backbone.Tests.ArchUnit/Backbone.Tests.ArchUnit.csproj +++ b/Backbone.Tests.ArchUnit/Backbone.Tests.ArchUnit.csproj @@ -24,27 +24,35 @@ + + + + + + + + diff --git a/Backbone.Tests.ArchUnit/CleanArchitecture.cs b/Backbone.Tests.ArchUnit/CleanArchitecture.cs index ed34f8d9b7..b38b87df9a 100644 --- a/Backbone.Tests.ArchUnit/CleanArchitecture.cs +++ b/Backbone.Tests.ArchUnit/CleanArchitecture.cs @@ -12,6 +12,11 @@ public class CleanArchitecture .ResideInAssemblyMatching("Backbone.Modules.*") .As("All Modules"); + private static readonly IObjectProvider CONTRACT_ASSEMBLIES = + Types().That() + .ResideInAssemblyMatching("Backbone.Modules.*.Contracts") + .As("Contract Assemblies"); + private static readonly IObjectProvider CONSUMER_API_ASSEMBLIES = Types().That() .ResideInAssemblyMatching("Backbone.Modules.*.ConsumerApi") @@ -34,6 +39,7 @@ public void ModulesShouldNotDependOnOtherModules(IObjectProvider module) var otherModules = Types().That() .Are(MODULES) .And().AreNot(module) + .And().AreNot(CONTRACT_ASSEMBLIES) .As("any other module"); Types() @@ -45,6 +51,23 @@ public void ModulesShouldNotDependOnOtherModules(IObjectProvider module) .Check(Backbone.ARCHITECTURE); } + [Theory] + [ClassData(typeof(Contracts))] + public void ContractAssembliesShouldNotDependOnModules(IObjectProvider contractAssembly) + { + var moduleTypesOutsideContract = Types().That() + .Are(MODULES) + .And().AreNot(contractAssembly) + .As("module types outside the contract assembly"); + + Types() + .That().Are(contractAssembly) + .Should().NotDependOnAny(moduleTypesOutsideContract) + .Because("contracts must not depend on module-specific projects.") + .WithoutRequiringPositiveResults() + .Check(Backbone.ARCHITECTURE); + } + [Fact] public void ApplicationAssembliesShouldNotDependOnInfrastructureAssemblies() { @@ -80,6 +103,11 @@ public void ApplicationAssembliesShouldNotReferenceAspNetCore() public class Modules : IEnumerable { + private static readonly IObjectProvider ANNOUNCEMENTS_MODULE = + Types().That() + .ResideInAssemblyMatching("Backbone.Modules.Announcements.*") + .As("Announcements Module"); + private static readonly IObjectProvider CHALLENGES_MODULE = Types().That() .ResideInAssemblyMatching("Backbone.Modules.Challenges.*") @@ -115,6 +143,11 @@ public class Modules : IEnumerable .ResideInAssemblyMatching("Backbone.Modules.Synchronization.*") .As("Synchronization Module"); + private static readonly IObjectProvider TAGS_MODULE = + Types().That() + .ResideInAssemblyMatching("Backbone.Modules.Tags.*") + .As("Tags Module"); + private static readonly IObjectProvider TOKENS_MODULE = Types().That() .ResideInAssemblyMatching("Backbone.Modules.Tokens.*") @@ -124,6 +157,7 @@ public IEnumerator GetEnumerator() { return new List[]> { + new[] { ANNOUNCEMENTS_MODULE }, new[] { CHALLENGES_MODULE }, new[] { DEVICES_MODULE }, new[] { FILES_MODULE }, @@ -131,6 +165,7 @@ public IEnumerator GetEnumerator() new[] { QUOTAS_MODULE }, new[] { RELATIONSHIPS_MODULE }, new[] { SYNCHRONIZATION_MODULE }, + new[] { TAGS_MODULE }, new[] { TOKENS_MODULE } }.GetEnumerator(); } @@ -140,3 +175,43 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } } + +public class Contracts : IEnumerable +{ + private static readonly IObjectProvider ANNOUNCEMENTS_CONTRACTS = ContractAssembly("Announcements"); + private static readonly IObjectProvider DEVICES_CONTRACTS = ContractAssembly("Devices"); + private static readonly IObjectProvider FILES_CONTRACTS = ContractAssembly("Files"); + private static readonly IObjectProvider MESSAGES_CONTRACTS = + ContractAssembly("Messages"); + private static readonly IObjectProvider QUOTAS_CONTRACTS = ContractAssembly("Quotas"); + private static readonly IObjectProvider RELATIONSHIPS_CONTRACTS = ContractAssembly("Relationships"); + private static readonly IObjectProvider SYNCHRONIZATION_CONTRACTS = ContractAssembly("Synchronization"); + private static readonly IObjectProvider TOKENS_CONTRACTS = ContractAssembly("Tokens"); + + public IEnumerator GetEnumerator() + { + return new List[]> + { + new[] { ANNOUNCEMENTS_CONTRACTS }, + new[] { DEVICES_CONTRACTS }, + new[] { FILES_CONTRACTS }, + new[] { MESSAGES_CONTRACTS }, + new[] { QUOTAS_CONTRACTS }, + new[] { RELATIONSHIPS_CONTRACTS }, + new[] { SYNCHRONIZATION_CONTRACTS }, + new[] { TOKENS_CONTRACTS } + }.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + private static IObjectProvider ContractAssembly(string moduleName) + { + return Types().That() + .ResideInAssembly($"Backbone.Modules.{moduleName}.Contracts") + .As($"{moduleName} Contracts"); + } +} diff --git a/Backbone.Tests.ArchUnit/DomainEventSerialization.cs b/Backbone.Tests.ArchUnit/DomainEventSerialization.cs new file mode 100644 index 0000000000..e0e590acbf --- /dev/null +++ b/Backbone.Tests.ArchUnit/DomainEventSerialization.cs @@ -0,0 +1,31 @@ +using System.Text.Json; +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Backbone.Tests.ArchUnit; + +public class DomainEventSerialization +{ + [Fact] + public void ContractDomainEventsCanBeSerializedAndDeserialized() + { + _ = Backbone.ARCHITECTURE; + + var contractDomainEventTypes = AppDomain.CurrentDomain.GetAssemblies() + .Where(a => a.GetName().Name is { } name && name.StartsWith("Backbone.Modules.") && name.EndsWith(".Contracts")) + .SelectMany(a => a.GetTypes()) + .Where(t => !t.IsAbstract && t.IsAssignableTo(typeof(DomainEvent))) + .ToList(); + + Assert.NotEmpty(contractDomainEventTypes); + + foreach (var eventType in contractDomainEventTypes) + { + var domainEvent = Activator.CreateInstance(eventType)!; + var json = JsonSerializer.Serialize(domainEvent, eventType); + + var deserializedDomainEvent = JsonSerializer.Deserialize(json, eventType); + + Assert.NotNull(deserializedDomainEvent); + } + } +} diff --git a/Backbone.Tests.ArchUnit/DomainEvents.cs b/Backbone.Tests.ArchUnit/DomainEvents.cs index b4038f230d..c6796e693a 100644 --- a/Backbone.Tests.ArchUnit/DomainEvents.cs +++ b/Backbone.Tests.ArchUnit/DomainEvents.cs @@ -1,60 +1,31 @@ -using ArchUnitNET.Domain; -using ArchUnitNET.Domain.Extensions; -using ArchUnitNET.Fluent.Conditions; -using ArchUnitNET.Fluent.Syntax.Elements.Types; +using ArchUnitNET.Fluent.Syntax.Elements.Types; using ArchUnitNET.xUnitV3; using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Tooling.Extensions; using static ArchUnitNET.Fluent.ArchRuleDefinition; namespace Backbone.Backbone.Tests.ArchUnit; public class DomainEvents { - private readonly List _outgoingDomainEvents = Types() + private readonly GivenTypesConjunction _moduleDomainEvents = Types() .That().AreAssignableTo(typeof(DomainEvent)) - .And().ResideInNamespaceMatching("\\.Outgoing") - .GetObjects(Backbone.ARCHITECTURE) - .ToList(); - - private readonly GivenTypesConjunction _incomingDomainEvents = Types() - .That().AreAssignableTo(typeof(DomainEvent)) - .And().ResideInNamespaceMatching("\\.Incoming\\."); + .And().ResideInAssemblyMatching("Backbone.Modules.*"); [Fact] - public void IncomingDomainEventsShouldNotHaveConstructors() + public void ModuleDomainEventsShouldResideInContractAssemblies() { - _incomingDomainEvents - .Should().FollowCustomCondition(type => - { - if (type.GetConstructors().Any(c => c.Parameters.Any())) - return new ConditionResult(type, false, "should not have a constructor with parameters"); - - return new ConditionResult(type, true); - }, "not have constructors with parameters") - .Because( - "objects are only created by the JSON Serializer anyway. Adding a constructor with parameters only causes errors during deserialization if the parameter names don't match the property names.") + _moduleDomainEvents + .Should().ResideInAssemblyMatching("Backbone.Modules.*.Contracts") + .Because("each domain event has one canonical definition in its producer's contract assembly") .Check(Backbone.ARCHITECTURE); } [Fact] - public void IncomingDomainEventsShouldHaveCorrespondingOutgoingDomainEvents() + public void ModuleDomainEventsShouldUseTheContractNamespace() { - _incomingDomainEvents - .Should().FollowCustomCondition(type => - { - var correspondingTypes = _outgoingDomainEvents.Where(t => t.NameMatches(type.Name)).ToList(); - if (correspondingTypes.IsEmpty()) return new ConditionResult(type, false, "does not have a corresponding outgoing domain event"); - - foreach (var property in type.GetPropertyMembers()) - { - foreach (var t in correspondingTypes.Where(t => !t.HasPropertyMemberWithName(property.Name))) - return new ConditionResult(type, false, $"does not have a corresponding property for '{property.Name}' in its corresponding outgoing domain event ({t.FullName})"); - } - - return new ConditionResult(type, true); - }, "have all of their properties found in their corresponding outgoing domain event") - .Because("otherwise they would not be deserialized correctly from JSON") + _moduleDomainEvents + .Should().ResideInNamespaceMatching("\\.Contracts\\.DomainEvents$") + .Because("domain events are shared contracts rather than module implementation details") .Check(Backbone.ARCHITECTURE); } } diff --git a/Backbone.Tests.ArchUnit/packages.lock.json b/Backbone.Tests.ArchUnit/packages.lock.json index b0c8a0d0ac..f566bdf1d0 100644 --- a/Backbone.Tests.ArchUnit/packages.lock.json +++ b/Backbone.Tests.ArchUnit/packages.lock.json @@ -1690,11 +1690,18 @@ "Microsoft.NET.Test.Sdk": "[18.8.1, 18.8.1]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, @@ -1812,7 +1819,11 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1831,11 +1842,18 @@ "Microsoft.NET.Test.Sdk": "[18.8.1, 18.8.1]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1926,10 +1944,17 @@ "Microsoft.NET.Test.Sdk": "[18.8.1, 18.8.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1996,7 +2021,9 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, @@ -2017,16 +2044,24 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, "Backbone.Modules.Messages.Domain.Tests": { "type": "Project", "dependencies": { + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", "Backbone.UnitTestTools": "[1.0.0, )", "FakeItEasy": "[9.0.1, 9.0.1]", @@ -2076,7 +2111,13 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Application.Tests": { @@ -2089,11 +2130,18 @@ "Microsoft.NET.Test.Sdk": "[18.8.1, 18.8.1]" } }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -2164,7 +2212,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -2175,10 +2225,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -2225,7 +2282,12 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -2233,6 +2295,7 @@ "Backbone.Modules.Synchronization.Application.Tests": { "type": "Project", "dependencies": { + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Application": "[1.0.0, )", "Backbone.Modules.Synchronization.Infrastructure": "[1.0.0, )", "Backbone.UnitTestTools": "[1.0.0, )", @@ -2241,10 +2304,17 @@ "Microsoft.NET.Test.Sdk": "[18.8.1, 18.8.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -2345,10 +2415,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Backbone.slnx b/Backbone.slnx index 946a1a117a..ca7ae5d5f2 100644 --- a/Backbone.slnx +++ b/Backbone.slnx @@ -100,6 +100,7 @@ + @@ -125,6 +126,7 @@ + @@ -141,6 +143,7 @@ + @@ -156,6 +159,7 @@ + @@ -169,6 +173,7 @@ + @@ -184,6 +189,7 @@ + @@ -198,6 +204,7 @@ + @@ -218,6 +225,7 @@ + diff --git a/BuildingBlocks/src/BuildingBlocks.API/packages.lock.json b/BuildingBlocks/src/BuildingBlocks.API/packages.lock.json index 1c99e057ba..bcbd03e7db 100644 --- a/BuildingBlocks/src/BuildingBlocks.API/packages.lock.json +++ b/BuildingBlocks/src/BuildingBlocks.API/packages.lock.json @@ -1343,13 +1343,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1357,11 +1367,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1389,6 +1406,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Announcements/src/Announcements.Application/packages.lock.json b/Modules/Announcements/src/Announcements.Application/packages.lock.json index 323bb19229..b7b2eaa6a7 100644 --- a/Modules/Announcements/src/Announcements.Application/packages.lock.json +++ b/Modules/Announcements/src/Announcements.Application/packages.lock.json @@ -740,11 +740,18 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Announcements.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, diff --git a/Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj b/Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEvent.cs b/Modules/Announcements/src/Announcements.Contracts/DomainEvents/AnnouncementCreatedDomainEvent.cs similarity index 80% rename from Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEvent.cs rename to Modules/Announcements/src/Announcements.Contracts/DomainEvents/AnnouncementCreatedDomainEvent.cs index 27eb211206..9690ffa08f 100644 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEvent.cs +++ b/Modules/Announcements/src/Announcements.Contracts/DomainEvents/AnnouncementCreatedDomainEvent.cs @@ -1,6 +1,6 @@ -using Backbone.BuildingBlocks.Domain.Events; +using Backbone.BuildingBlocks.Domain.Events; -namespace Backbone.Modules.Devices.Domain.DomainEvents.Incoming.AnnouncementCreated; +namespace Backbone.Modules.Announcements.Contracts.DomainEvents; public class AnnouncementCreatedDomainEvent : DomainEvent { diff --git a/Modules/Announcements/src/Announcements.Contracts/packages.lock.json b/Modules/Announcements/src/Announcements.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Announcements/src/Announcements.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj b/Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj index e20ff05673..c1309a32db 100644 --- a/Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj +++ b/Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj @@ -3,6 +3,7 @@ + diff --git a/Modules/Announcements/src/Announcements.Domain/DomainEvents/AnnouncementDomainEventExtensions.cs b/Modules/Announcements/src/Announcements.Domain/DomainEvents/AnnouncementDomainEventExtensions.cs new file mode 100644 index 0000000000..f01838ad90 --- /dev/null +++ b/Modules/Announcements/src/Announcements.Domain/DomainEvents/AnnouncementDomainEventExtensions.cs @@ -0,0 +1,28 @@ +using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Announcements.Domain.Entities; + +namespace Backbone.Modules.Announcements.Domain.DomainEvents; + +public static class AnnouncementCreatedDomainEventExtensions +{ + extension(AnnouncementCreatedDomainEvent) + { + public static AnnouncementCreatedDomainEvent Create(Announcement announcement) + { + return new AnnouncementCreatedDomainEvent + { + DomainEventId = $"{announcement.Id}/Created", + Id = announcement.Id.Value, + Severity = announcement.Severity.ToString(), + IsSilent = announcement.IsSilent, + Texts = announcement.Texts.Select(t => new AnnouncementCreatedDomainEventText + { + Language = t.Language.Value, + Title = t.Title, + Body = t.Body + }).ToList(), + Recipients = announcement.Recipients.Select(r => r.Address.Value).ToList() + }; + } + } +} diff --git a/Modules/Announcements/src/Announcements.Domain/DomainEvents/Outgoing/AnnouncementCreatedDomainEvent.cs b/Modules/Announcements/src/Announcements.Domain/DomainEvents/Outgoing/AnnouncementCreatedDomainEvent.cs deleted file mode 100644 index b1d30738d4..0000000000 --- a/Modules/Announcements/src/Announcements.Domain/DomainEvents/Outgoing/AnnouncementCreatedDomainEvent.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Announcements.Domain.Entities; - -namespace Backbone.Modules.Announcements.Domain.DomainEvents.Outgoing; - -public class AnnouncementCreatedDomainEvent : DomainEvent -{ - public AnnouncementCreatedDomainEvent(Announcement announcement) : base($"{announcement.Id}/Created") - { - Id = announcement.Id.Value; - Severity = announcement.Severity.ToString(); - IsSilent = announcement.IsSilent; - Texts = announcement.Texts.Select(t => new AnnouncementCreatedDomainEventText(t)).ToList(); - Recipients = announcement.Recipients.Select(r => r.Address.Value).ToList(); - } - - public string Id { get; } - public string Severity { get; } - public bool IsSilent { get; } - public List Texts { get; } - public List Recipients { get; } -} - -public class AnnouncementCreatedDomainEventText -{ - public AnnouncementCreatedDomainEventText(AnnouncementText announcementText) - { - Language = announcementText.Language.Value; - Title = announcementText.Title; - Body = announcementText.Body; - } - - public string Language { get; } - public string Title { get; } - public string Body { get; } -} diff --git a/Modules/Announcements/src/Announcements.Domain/Entities/Announcement.cs b/Modules/Announcements/src/Announcements.Domain/Entities/Announcement.cs index d3073bcdb4..e5e2da13de 100644 --- a/Modules/Announcements/src/Announcements.Domain/Entities/Announcement.cs +++ b/Modules/Announcements/src/Announcements.Domain/Entities/Announcement.cs @@ -2,7 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Announcements.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Announcements.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Announcements.Domain.Entities; @@ -36,7 +37,7 @@ public Announcement(AnnouncementSeverity severity, bool isSilent, List + + + + diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs index d4757239c3..a37c482523 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Announcements; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.AnnouncementCreated; +using Backbone.Modules.Announcements.Contracts.DomainEvents; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/BackupDeviceUsed/BackupDeviceUsedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/BackupDeviceUsed/BackupDeviceUsedDomainEventHandler.cs index 67764931e7..0edadd3e3e 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/BackupDeviceUsed/BackupDeviceUsedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/BackupDeviceUsed/BackupDeviceUsedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Device; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.BackupDeviceUsed; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs index 7456aef095..f9ebb36cb5 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Datawallet; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs index c7e437b07b..cabc2abdbc 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.ExternalEvents; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.ExternalEventCreated; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs index 47e22a9451..ccd5de6293 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.DeletionProcess; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs index e459e13452..4016797b19 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Tokens; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.TokenLocked; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.TokenLocked; diff --git a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs index 064f023331..a74a94146c 100644 --- a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs @@ -5,11 +5,10 @@ using Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.TokenLocked; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.AnnouncementCreated; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.ExternalEventCreated; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.TokenLocked; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; +using Backbone.Modules.Tokens.Contracts.DomainEvents; +using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.Extensions; diff --git a/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs b/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs index f9dabd156a..ad8d599585 100644 --- a/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs +++ b/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs @@ -3,7 +3,8 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.DomainEvents; using MediatR; namespace Backbone.Modules.Devices.Application.Tiers.Commands.DeleteTier; @@ -41,6 +42,6 @@ public async Task Handle(DeleteTierCommand request, CancellationToken cancellati await _tiersRepository.Remove(tier); - await _eventBus.Publish(new TierDeletedDomainEvent(tier)); + await _eventBus.Publish(TierDeletedDomainEvent.Create(tier)); } } diff --git a/Modules/Devices/src/Devices.Application/packages.lock.json b/Modules/Devices/src/Devices.Application/packages.lock.json index 61161b32f9..83e16edbc8 100644 --- a/Modules/Devices/src/Devices.Application/packages.lock.json +++ b/Modules/Devices/src/Devices.Application/packages.lock.json @@ -812,16 +812,41 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj b/Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..2ef701c461 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,67 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class BackupDeviceUsedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} + +public class FeatureFlagsOfIdentityChangedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} + +public class IdentityCreatedDomainEvent : DomainEvent +{ + public required string Address { get; set; } + public required string Tier { get; set; } +} + +public class IdentityDeletedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} + +public class IdentityDeletionCancelledDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} + +public class IdentityDeletionProcessStartedDomainEvent : DomainEvent +{ + public required string Address { get; set; } + public required string DeletionProcessId { get; set; } + public string? Initiator { get; set; } +} + +public class IdentityDeletionProcessStatusChangedDomainEvent : DomainEvent +{ + public required string DeletionProcessOwner { get; set; } + public required string DeletionProcessId { get; set; } + public string? Initiator { get; set; } +} + +public class IdentityToBeDeletedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } + public required DateTime GracePeriodEndsAt { get; set; } +} + +public class TierCreatedDomainEvent : DomainEvent +{ + public required string Id { get; set; } + public required string Name { get; set; } +} + +public class TierDeletedDomainEvent : DomainEvent +{ + public required string Id { get; set; } +} + +public class TierOfIdentityChangedDomainEvent : DomainEvent +{ + public required string OldTierId { get; set; } + public required string NewTierId { get; set; } + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/packages.lock.json b/Modules/Devices/src/Devices.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Devices/src/Devices.Domain/Aggregates/Tier/Tier.cs b/Modules/Devices/src/Devices.Domain/Aggregates/Tier/Tier.cs index 016724963e..1ceaf284ac 100644 --- a/Modules/Devices/src/Devices.Domain/Aggregates/Tier/Tier.cs +++ b/Modules/Devices/src/Devices.Domain/Aggregates/Tier/Tier.cs @@ -1,6 +1,7 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Errors; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.DomainEvents; namespace Backbone.Modules.Devices.Domain.Aggregates.Tier; @@ -28,7 +29,7 @@ private Tier(TierId id, TierName name, bool canBeUsedAsDefaultForClient, bool ca Name = name; CanBeUsedAsDefaultForClient = canBeUsedAsDefaultForClient; CanBeManuallyAssigned = canBeManuallyAssigned; - RaiseDomainEvent(new TierCreatedDomainEvent(this)); + RaiseDomainEvent(TierCreatedDomainEvent.Create(this)); } public TierId Id { get; } diff --git a/Modules/Devices/src/Devices.Domain/Devices.Domain.csproj b/Modules/Devices/src/Devices.Domain/Devices.Domain.csproj index 321c62af78..0b698e7c02 100644 --- a/Modules/Devices/src/Devices.Domain/Devices.Domain.csproj +++ b/Modules/Devices/src/Devices.Domain/Devices.Domain.csproj @@ -9,6 +9,7 @@ + diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/DeviceDomainEventExtensions.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/DeviceDomainEventExtensions.cs new file mode 100644 index 0000000000..f86c15619c --- /dev/null +++ b/Modules/Devices/src/Devices.Domain/DomainEvents/DeviceDomainEventExtensions.cs @@ -0,0 +1,144 @@ +using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; +using Backbone.Modules.Devices.Domain.Entities.Identities; + +namespace Backbone.Modules.Devices.Domain.DomainEvents; + +public static class BackupDeviceUsedDomainEventExtensions +{ + extension(BackupDeviceUsedDomainEvent) + { + public static BackupDeviceUsedDomainEvent Create(IdentityAddress identityAddress) => new() { IdentityAddress = identityAddress.Value }; + } +} + +public static class FeatureFlagsOfIdentityChangedDomainEventExtensions +{ + extension(FeatureFlagsOfIdentityChangedDomainEvent) + { + public static FeatureFlagsOfIdentityChangedDomainEvent Create(Identity identity) => new() { IdentityAddress = identity.Address.Value }; + } +} + +public static class IdentityCreatedDomainEventExtensions +{ + extension(IdentityCreatedDomainEvent) + { + public static IdentityCreatedDomainEvent Create(Identity identity) => new() + { + DomainEventId = $"{identity.Address}/Created", + Address = identity.Address, + Tier = identity.TierId + }; + } +} + +public static class IdentityDeletedDomainEventExtensions +{ + extension(IdentityDeletedDomainEvent) + { + public static IdentityDeletedDomainEvent Create(IdentityAddress identityAddress) => new() + { + DomainEventId = $"{identityAddress}/IdentityDeleted", + IdentityAddress = identityAddress.Value + }; + } +} + +public static class IdentityDeletionCancelledDomainEventExtensions +{ + extension(IdentityDeletionCancelledDomainEvent) + { + public static IdentityDeletionCancelledDomainEvent Create(IdentityAddress identityAddress) => new() + { + DomainEventId = DomainEventIdFactory.Randomize($"{identityAddress}/IdentityDeletionCancelled"), + IdentityAddress = identityAddress.Value + }; + } +} + +public static class IdentityDeletionProcessStartedDomainEventExtensions +{ + extension(IdentityDeletionProcessStartedDomainEvent) + { + public static IdentityDeletionProcessStartedDomainEvent Create(string identityAddress, string deletionProcessId, string? initiator) => new() + { + DomainEventId = $"{identityAddress}/DeletionProcessStarted/{deletionProcessId}", + Address = identityAddress, + DeletionProcessId = deletionProcessId, + Initiator = initiator + }; + } +} + +public static class IdentityDeletionProcessStatusChangedDomainEventExtensions +{ + extension(IdentityDeletionProcessStatusChangedDomainEvent) + { + public static IdentityDeletionProcessStatusChangedDomainEvent Create(string deletionProcessOwner, string deletionProcessId, string? initiator) => new() + { + DomainEventId = $"{deletionProcessOwner}/IdentityDeletionProcessStatusChanged/{deletionProcessId}", + DeletionProcessOwner = deletionProcessOwner, + DeletionProcessId = deletionProcessId, + Initiator = initiator + }; + } +} + +public static class IdentityToBeDeletedDomainEventExtensions +{ + extension(IdentityToBeDeletedDomainEvent) + { + public static IdentityToBeDeletedDomainEvent Create(IdentityAddress identityAddress, DateTime gracePeriodEndsAt) => new() + { + DomainEventId = DomainEventIdFactory.Randomize($"{identityAddress}/IdentityToBeDeleted"), + IdentityAddress = identityAddress.Value, + GracePeriodEndsAt = gracePeriodEndsAt + }; + } +} + +public static class TierCreatedDomainEventExtensions +{ + extension(TierCreatedDomainEvent) + { + public static TierCreatedDomainEvent Create(Tier tier) => new() + { + DomainEventId = $"{tier.Id}/Created", + Id = tier.Id, + Name = tier.Name + }; + } +} + +public static class TierDeletedDomainEventExtensions +{ + extension(TierDeletedDomainEvent) + { + public static TierDeletedDomainEvent Create(Tier tier) => new() + { + DomainEventId = $"{tier.Id.Value}/Deleted", + Id = tier.Id + }; + } +} + +public static class TierOfIdentityChangedDomainEventExtensions +{ + extension(TierOfIdentityChangedDomainEvent) + { + public static TierOfIdentityChangedDomainEvent Create(Identity identity, TierId oldTierId, TierId newTierId) => new() + { + DomainEventId = DomainEventIdFactory.Randomize($"{identity.Address}/TierOfIdentityChanged"), + OldTierId = oldTierId, + NewTierId = newTierId, + IdentityAddress = identity.Address + }; + } +} + +internal static class DomainEventIdFactory +{ + public static string Randomize(string domainEventId) => domainEventId + "/" + Guid.NewGuid().ToString("N")[..3]; +} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs deleted file mode 100644 index bd8f5ea9ab..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; - -public class DatawalletModifiedDomainEvent : DomainEvent -{ - public required string Identity { get; set; } - public required string ModifiedByDevice { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEvent.cs deleted file mode 100644 index 27d3b7a3d4..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Incoming.ExternalEventCreated; - -public class ExternalEventCreatedDomainEvent : DomainEvent -{ - public required string Owner { get; set; } - public required bool IsDeliveryBlocked { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs deleted file mode 100644 index 4f536aa841..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Incoming.TokenLocked; - -public class TokenLockedDomainEvent : DomainEvent -{ - public required string TokenId { get; set; } - public required string? CreatedBy { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/BackupDeviceUsedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/BackupDeviceUsedDomainEvent.cs deleted file mode 100644 index ca10622faa..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/BackupDeviceUsedDomainEvent.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class BackupDeviceUsedDomainEvent : DomainEvent -{ - [Obsolete("For deserialization only", true)] - public BackupDeviceUsedDomainEvent() - { - IdentityAddress = null!; - } - - public BackupDeviceUsedDomainEvent(IdentityAddress identityAddress) - { - IdentityAddress = identityAddress; - } - - public IdentityAddress IdentityAddress { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/FeatureFlagsOfIdentityChangedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/FeatureFlagsOfIdentityChangedDomainEvent.cs deleted file mode 100644 index 90d95a4070..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/FeatureFlagsOfIdentityChangedDomainEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Devices.Domain.Entities.Identities; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class FeatureFlagsOfIdentityChangedDomainEvent : DomainEvent -{ - public FeatureFlagsOfIdentityChangedDomainEvent(Identity identity) - { - IdentityAddress = identity.Address.Value; - } - - public string IdentityAddress { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityCreatedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityCreatedDomainEvent.cs deleted file mode 100644 index 2ac66a6552..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityCreatedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Devices.Domain.Entities.Identities; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityCreatedDomainEvent : DomainEvent -{ - public IdentityCreatedDomainEvent(Identity identity) : base($"{identity.Address}/Created") - { - Address = identity.Address; - Tier = identity.TierId; - } - - public string Address { get; } - public string Tier { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletedDomainEvent.cs deleted file mode 100644 index 8d31fee7d6..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletedDomainEvent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityDeletedDomainEvent : DomainEvent -{ - public IdentityDeletedDomainEvent(string identityAddress) : base($"{identityAddress}/IdentityDeleted") - { - IdentityAddress = identityAddress; - } - - public string IdentityAddress { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionCancelledDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionCancelledDomainEvent.cs deleted file mode 100644 index e1123aaf55..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionCancelledDomainEvent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityDeletionCancelledDomainEvent : DomainEvent -{ - public IdentityDeletionCancelledDomainEvent(string identityAddress) : base($"{identityAddress}/IdentityDeletionCancelled", randomizeId: true) - { - IdentityAddress = identityAddress; - } - - public string IdentityAddress { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStartedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStartedDomainEvent.cs deleted file mode 100644 index 42671e5aaf..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStartedDomainEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityDeletionProcessStartedDomainEvent : DomainEvent -{ - public IdentityDeletionProcessStartedDomainEvent(string identityAddress, string deletionProcessId, string? initiator) : base($"{identityAddress}/DeletionProcessStarted/{deletionProcessId}") - { - DeletionProcessId = deletionProcessId; - Address = identityAddress; - Initiator = initiator; - } - - public string Address { get; init; } - public string DeletionProcessId { get; init; } - public string? Initiator { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStatusChangedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStatusChangedDomainEvent.cs deleted file mode 100644 index 6db7fc8d2c..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityDeletionProcessStatusChangedDomainEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityDeletionProcessStatusChangedDomainEvent : DomainEvent -{ - public IdentityDeletionProcessStatusChangedDomainEvent(string deletionProcessOwner, string deletionProcessId, string? initiator) - : base($"{deletionProcessOwner}/IdentityDeletionProcessStatusChanged/{deletionProcessId}") - { - DeletionProcessOwner = deletionProcessOwner; - DeletionProcessId = deletionProcessId; - Initiator = initiator; - } - - public string DeletionProcessOwner { get; } - public string DeletionProcessId { get; } - public string? Initiator { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityToBeDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityToBeDeletedDomainEvent.cs deleted file mode 100644 index d955e1b584..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/IdentityToBeDeletedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class IdentityToBeDeletedDomainEvent : DomainEvent -{ - public IdentityToBeDeletedDomainEvent(IdentityAddress identityAddress, DateTime gracePeriodEndsAt) : base($"{identityAddress}/IdentityToBeDeleted", randomizeId: true) - { - IdentityAddress = identityAddress; - GracePeriodEndsAt = gracePeriodEndsAt; - } - - public string IdentityAddress { get; } - public DateTime GracePeriodEndsAt { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierCreatedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierCreatedDomainEvent.cs deleted file mode 100644 index 9ef84b3237..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierCreatedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class TierCreatedDomainEvent : DomainEvent -{ - public TierCreatedDomainEvent(Tier tier) : base($"{tier.Id}/Created") - { - Id = tier.Id; - Name = tier.Name; - } - - public string Id { get; } - public string Name { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierDeletedDomainEvent.cs deleted file mode 100644 index b6a6409927..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierDeletedDomainEvent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class TierDeletedDomainEvent : DomainEvent -{ - public TierDeletedDomainEvent(Tier tier) : base($"{tier.Id.Value}/Deleted") - { - Id = tier.Id; - } - - public string Id { get; } -} diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs deleted file mode 100644 index 6d34d0eaca..0000000000 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.Entities.Identities; - -namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; - -public class TierOfIdentityChangedDomainEvent : DomainEvent -{ - public TierOfIdentityChangedDomainEvent(Identity identity, TierId oldTierIdId, TierId newTierId) : base($"{identity.Address}/TierOfIdentityChanged", randomizeId: true) - { - OldTierId = oldTierIdId; - NewTierId = newTierId; - IdentityAddress = identity.Address; - } - - public string OldTierId { get; set; } - public string NewTierId { get; set; } - public string IdentityAddress { get; set; } -} diff --git a/Modules/Devices/src/Devices.Domain/Entities/Identities/Device.cs b/Modules/Devices/src/Devices.Domain/Entities/Identities/Device.cs index 4fa3a35a67..3b7d638988 100644 --- a/Modules/Devices/src/Devices.Domain/Entities/Identities/Device.cs +++ b/Modules/Devices/src/Devices.Domain/Entities/Identities/Device.cs @@ -3,7 +3,8 @@ using Backbone.BuildingBlocks.Domain.Errors; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Devices.Domain.Entities.Identities; @@ -115,7 +116,7 @@ public void LoginOccurred() if (IsBackupDevice) { IsBackupDevice = false; - RaiseDomainEvent(new BackupDeviceUsedDomainEvent(IdentityAddress)); + RaiseDomainEvent(BackupDeviceUsedDomainEvent.Create(IdentityAddress)); } User.LoginOccurred(); diff --git a/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs b/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs index 10ed04c9bc..ab19e86aff 100644 --- a/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs +++ b/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs @@ -3,7 +3,8 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.DomainEvents; using Backbone.Tooling; using Entity = Backbone.BuildingBlocks.Domain.Entity; @@ -44,7 +45,7 @@ private Identity(string clientId, IdentityAddress address, byte[] publicKey, Tie Devices.Add(Device.CreateTestDevice(this, deviceCommunicationLanguage, username)); - RaiseDomainEvent(new IdentityCreatedDomainEvent(this)); + RaiseDomainEvent(IdentityCreatedDomainEvent.Create(this)); } public Identity(string clientId, IdentityAddress address, byte[] publicKey, TierId tierId, byte identityVersion, CommunicationLanguage deviceCommunicationLanguage) @@ -61,7 +62,7 @@ public Identity(string clientId, IdentityAddress address, byte[] publicKey, Tier Devices.Add(new Device(this, deviceCommunicationLanguage)); - RaiseDomainEvent(new IdentityCreatedDomainEvent(this)); + RaiseDomainEvent(IdentityCreatedDomainEvent.Create(this)); } public string? ClientId { get; } @@ -89,7 +90,7 @@ private set // if the oldTier was null, we don't consider it a change if (oldTier != null) - RaiseDomainEvent(new TierOfIdentityChangedDomainEvent(this, oldTier, value)); + RaiseDomainEvent(TierOfIdentityChangedDomainEvent.Create(this, oldTier, value)); } } @@ -138,7 +139,7 @@ public IdentityDeletionProcess StartDeletionProcess(DeviceId asDevice, double? l DeletionGracePeriodEndsAt = deletionProcess.GracePeriodEndsAt; TierId = Tier.QUEUED_FOR_DELETION.Id; Status = IdentityStatus.ToBeDeleted; - RaiseDomainEvent(new IdentityToBeDeletedDomainEvent(Address, deletionProcess.GracePeriodEndsAt!.Value)); + RaiseDomainEvent(IdentityToBeDeletedDomainEvent.Create(Address, deletionProcess.GracePeriodEndsAt!.Value)); return deletionProcess; } @@ -150,7 +151,7 @@ public void DeletionStarted() deletionProcess.DeletionStarted(Address); Status = IdentityStatus.Deleting; - RaiseDomainEvent(new IdentityDeletedDomainEvent(Address)); + RaiseDomainEvent(IdentityDeletedDomainEvent.Create(Address)); } private void EnsureDeletionProcessInStatusExists(DeletionProcessStatus status) @@ -217,7 +218,7 @@ public IdentityDeletionProcess CancelDeletionProcess(IdentityDeletionProcessId d DeletionGracePeriodEndsAt = null; Status = IdentityStatus.Active; - RaiseDomainEvent(new IdentityDeletionCancelledDomainEvent(Address)); + RaiseDomainEvent(IdentityDeletionCancelledDomainEvent.Create(Address)); return deletionProcess; } @@ -246,7 +247,7 @@ public void ChangeFeatureFlags(Dictionary featureFlags) FeatureFlags.Set(keyValuePair.Key, keyValuePair.Value); } - RaiseDomainEvent(new FeatureFlagsOfIdentityChangedDomainEvent(this)); + RaiseDomainEvent(FeatureFlagsOfIdentityChangedDomainEvent.Create(this)); } #region Expressions diff --git a/Modules/Devices/src/Devices.Domain/Entities/Identities/IdentityDeletionProcess.cs b/Modules/Devices/src/Devices.Domain/Entities/Identities/IdentityDeletionProcess.cs index 772c0d1a3a..2d7d744319 100644 --- a/Modules/Devices/src/Devices.Domain/Entities/Identities/IdentityDeletionProcess.cs +++ b/Modules/Devices/src/Devices.Domain/Entities/Identities/IdentityDeletionProcess.cs @@ -2,7 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Devices.Domain.Entities.Identities; @@ -135,6 +136,6 @@ public void ErrorDuringDeletion(IdentityAddress address, string errorMessage) private void ChangeStatus(DeletionProcessStatus newStatus, IdentityAddress address, IdentityAddress? initiator) { Status = newStatus; - RaiseDomainEvent(new IdentityDeletionProcessStatusChangedDomainEvent(address, Id, initiator?.Value)); + RaiseDomainEvent(IdentityDeletionProcessStatusChangedDomainEvent.Create(address, Id, initiator?.Value)); } } diff --git a/Modules/Devices/src/Devices.Domain/packages.lock.json b/Modules/Devices/src/Devices.Domain/packages.lock.json index 80532d35f8..c86ce8801d 100644 --- a/Modules/Devices/src/Devices.Domain/packages.lock.json +++ b/Modules/Devices/src/Devices.Domain/packages.lock.json @@ -105,6 +105,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/packages.lock.json index 40945e301e..2de22f7632 100644 --- a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/packages.lock.json @@ -1061,13 +1061,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1075,11 +1085,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1107,6 +1124,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/packages.lock.json index 40945e301e..2de22f7632 100644 --- a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/packages.lock.json @@ -1061,13 +1061,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1075,11 +1085,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1107,6 +1124,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/src/Devices.Infrastructure/packages.lock.json b/Modules/Devices/src/Devices.Infrastructure/packages.lock.json index 361406c1f3..2c87e30601 100644 --- a/Modules/Devices/src/Devices.Infrastructure/packages.lock.json +++ b/Modules/Devices/src/Devices.Infrastructure/packages.lock.json @@ -1216,13 +1216,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1230,16 +1240,35 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/src/Devices.Module/packages.lock.json b/Modules/Devices/src/Devices.Module/packages.lock.json index 2c09be4cc4..530b87c54e 100644 --- a/Modules/Devices/src/Devices.Module/packages.lock.json +++ b/Modules/Devices/src/Devices.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1268,6 +1285,18 @@ "Backbone.Modules.Devices.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs index e6da3ba6aa..9cf6fddb5c 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.AnnouncementCreated; +using Backbone.Modules.Announcements.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.DomainEvents.Incoming; diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/ExternalEventCreatedDomainEventHandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/ExternalEventCreatedDomainEventHandlerTests.cs index cf0d29f6c4..a589a298bc 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/ExternalEventCreatedDomainEventHandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/ExternalEventCreatedDomainEventHandlerTests.cs @@ -2,7 +2,7 @@ using Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.ExternalEvents; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.ExternalEventCreated; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.DomainEvents.Incoming; @@ -24,7 +24,7 @@ public async Task Sends_a_push_notification_to_the_owner_of_the_external_event() A.CallTo(() => fakeIdentitiesRepository.Get(externalEventOwner, A._, A._)).Returns(identity); // Act - await handler.Handle(new ExternalEventCreatedDomainEvent { Owner = externalEventOwner, IsDeliveryBlocked = false }); + await handler.Handle(new ExternalEventCreatedDomainEvent { EventId = Guid.NewGuid().ToString(), Owner = externalEventOwner, IsDeliveryBlocked = false }); // Assert A.CallTo(() => mockPushSender.SendNotification( @@ -51,7 +51,7 @@ public async Task Does_not_send_push_notification_if_owner_is_in_status_to_be_de A.CallTo(() => fakeIdentitiesRepository.Get(externalEventOwner, A._, A._)).Returns(identity); // Act - await handler.Handle(new ExternalEventCreatedDomainEvent { Owner = externalEventOwner, IsDeliveryBlocked = false }); + await handler.Handle(new ExternalEventCreatedDomainEvent { EventId = Guid.NewGuid().ToString(), Owner = externalEventOwner, IsDeliveryBlocked = false }); // Assert A.CallTo(() => mockPushSender.SendNotification( @@ -76,7 +76,7 @@ public async Task Does_not_send_a_push_notification_when_delivery_of_the_externa A.CallTo(() => fakeIdentitiesRepository.Get(externalEventOwner, A._, A._)).Returns(identity); // Act - await handler.Handle(new ExternalEventCreatedDomainEvent { Owner = externalEventOwner, IsDeliveryBlocked = true }); + await handler.Handle(new ExternalEventCreatedDomainEvent { EventId = Guid.NewGuid().ToString(), Owner = externalEventOwner, IsDeliveryBlocked = true }); // Assert A.CallTo(() => mockPushSender.SendNotification( diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/TokenLockedDomainEventHandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/TokenLockedDomainEventHandlerTests.cs index 05528826e8..085fc3e90d 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/TokenLockedDomainEventHandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/TokenLockedDomainEventHandlerTests.cs @@ -3,7 +3,7 @@ using Backbone.Modules.Devices.Application.DomainEvents.Incoming.TokenLocked; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Tokens; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.TokenLocked; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.DomainEvents.Incoming; diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/PushNotifications/DatawalletModified/HandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/PushNotifications/DatawalletModified/HandlerTests.cs index 7d8bc718a4..f4ecc5d80d 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/PushNotifications/DatawalletModified/HandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/PushNotifications/DatawalletModified/HandlerTests.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Datawallet; -using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.PushNotifications.DatawalletModified; diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs index 898d93f0ab..9ea337e38d 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs @@ -3,7 +3,7 @@ using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Tiers.Commands.DeleteTier; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.Tiers.Commands.DeleteTier; diff --git a/Modules/Devices/test/Devices.Application.Tests/packages.lock.json b/Modules/Devices/test/Devices.Application.Tests/packages.lock.json index 49397de80d..6e9b199a18 100644 --- a/Modules/Devices/test/Devices.Application.Tests/packages.lock.json +++ b/Modules/Devices/test/Devices.Application.Tests/packages.lock.json @@ -1267,13 +1267,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1281,11 +1291,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1313,6 +1330,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Devices/test/Devices.Domain.Tests/Domain/DeviceTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Domain/DeviceTests.cs index ed923146c2..6e5a73a38d 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Domain/DeviceTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Domain/DeviceTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs index 3b0784afb3..e63f3ed939 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeFeatureFlagsTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeFeatureFlagsTests.cs index 0b0e79a7a1..e03f1489d8 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeFeatureFlagsTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeFeatureFlagsTests.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Modules.Devices.Domain.Tests.Shouldly.Extensions; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs index 21495eb671..14352fab55 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.UnitTestTools.Shouldly.Extensions; namespace Backbone.Modules.Devices.Domain.Tests.Identities; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/DeletionStartedTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/DeletionStartedTests.cs index 021706dee6..8e9ee41a34 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/DeletionStartedTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/DeletionStartedTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Modules.Devices.Domain.Tests.Identities.TestDoubles; using Backbone.Tooling; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs index 97910ca59a..3ea1b496b5 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Devices.Domain.Aggregates.Tier; -using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Modules.Devices.Domain.Tests.Identities.TestDoubles; using Backbone.Tooling; diff --git a/Modules/Devices/test/Devices.Domain.Tests/packages.lock.json b/Modules/Devices/test/Devices.Domain.Tests/packages.lock.json index 2ed51e04bf..cdcd66ed9b 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/packages.lock.json +++ b/Modules/Devices/test/Devices.Domain.Tests/packages.lock.json @@ -797,11 +797,18 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" diff --git a/Modules/Devices/test/Devices.Infrastructure.Tests/packages.lock.json b/Modules/Devices/test/Devices.Infrastructure.Tests/packages.lock.json index 49397de80d..6e9b199a18 100644 --- a/Modules/Devices/test/Devices.Infrastructure.Tests/packages.lock.json +++ b/Modules/Devices/test/Devices.Infrastructure.Tests/packages.lock.json @@ -1267,13 +1267,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1281,11 +1291,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1313,6 +1330,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Files/src/Files.Application/packages.lock.json b/Modules/Files/src/Files.Application/packages.lock.json index 014a282465..89141a8b0f 100644 --- a/Modules/Files/src/Files.Application/packages.lock.json +++ b/Modules/Files/src/Files.Application/packages.lock.json @@ -740,10 +740,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs b/Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..5a25fd57f8 --- /dev/null +++ b/Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,22 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Files.Contracts.DomainEvents; + +public class FileOwnershipClaimedDomainEvent : DomainEvent +{ + public required string FileId { get; set; } + public required string OldOwnerAddress { get; set; } + public required string NewOwnerAddress { get; set; } +} + +public class FileOwnershipLockedDomainEvent : DomainEvent +{ + public required string FileId { get; set; } + public required string OwnerAddress { get; set; } +} + +public class FileUploadedDomainEvent : DomainEvent +{ + public required string FileId { get; set; } + public required string Owner { get; set; } +} diff --git a/Modules/Files/src/Files.Contracts/Files.Contracts.csproj b/Modules/Files/src/Files.Contracts/Files.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Files/src/Files.Contracts/Files.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Files/src/Files.Contracts/packages.lock.json b/Modules/Files/src/Files.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Files/src/Files.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Files/src/Files.Domain/DomainEvents/FileDomainEventExtensions.cs b/Modules/Files/src/Files.Domain/DomainEvents/FileDomainEventExtensions.cs new file mode 100644 index 0000000000..295ef1bbbf --- /dev/null +++ b/Modules/Files/src/Files.Domain/DomainEvents/FileDomainEventExtensions.cs @@ -0,0 +1,43 @@ +using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Files.Contracts.DomainEvents; +using File = Backbone.Modules.Files.Domain.Entities.File; + +namespace Backbone.Modules.Files.Domain.DomainEvents; + +public static class FileOwnershipClaimedDomainEventExtensions +{ + extension(FileOwnershipClaimedDomainEvent) + { + public static FileOwnershipClaimedDomainEvent Create(File file, IdentityAddress oldOwnerAddress) => new() + { + FileId = file.Id.Value, + OldOwnerAddress = oldOwnerAddress.Value, + NewOwnerAddress = file.Owner.Value + }; + } +} + +public static class FileOwnershipLockedDomainEventExtensions +{ + extension(FileOwnershipLockedDomainEvent) + { + public static FileOwnershipLockedDomainEvent Create(File file) => new() + { + FileId = file.Id.Value, + OwnerAddress = file.Owner.Value + }; + } +} + +public static class FileUploadedDomainEventExtensions +{ + extension(FileUploadedDomainEvent) + { + public static FileUploadedDomainEvent Create(File file) => new() + { + DomainEventId = $"{file.Id}/Created", + FileId = file.Id.ToString(), + Owner = file.Owner.ToString() + }; + } +} diff --git a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipClaimedDomainEvent.cs b/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipClaimedDomainEvent.cs deleted file mode 100644 index c89a5523ce..0000000000 --- a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipClaimedDomainEvent.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using File = Backbone.Modules.Files.Domain.Entities.File; - -namespace Backbone.Modules.Files.Domain.DomainEvents.Outgoing; - -public class FileOwnershipClaimedDomainEvent : DomainEvent -{ - public FileOwnershipClaimedDomainEvent(File file, IdentityAddress oldOwnerAddress) - { - FileId = file.Id.Value; - OldOwnerAddress = oldOwnerAddress.Value; - NewOwnerAddress = file.Owner.Value; - } - - public string FileId { get; set; } - public string OldOwnerAddress { get; set; } - public string NewOwnerAddress { get; set; } -} diff --git a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipLockedDomainEvent.cs b/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipLockedDomainEvent.cs deleted file mode 100644 index 23b0200ed6..0000000000 --- a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileOwnershipLockedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using File = Backbone.Modules.Files.Domain.Entities.File; - -namespace Backbone.Modules.Files.Domain.DomainEvents.Outgoing; - -public class FileOwnershipLockedDomainEvent : DomainEvent -{ - public string FileId { get; set; } - public string OwnerAddress { get; set; } - - public FileOwnershipLockedDomainEvent(File file) - { - FileId = file.Id.Value; - OwnerAddress = file.Owner.Value; - } -} diff --git a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileUploadedDomainEvent.cs b/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileUploadedDomainEvent.cs deleted file mode 100644 index df510cfaba..0000000000 --- a/Modules/Files/src/Files.Domain/DomainEvents/Outgoing/FileUploadedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using File = Backbone.Modules.Files.Domain.Entities.File; - -namespace Backbone.Modules.Files.Domain.DomainEvents.Outgoing; - -public class FileUploadedDomainEvent : DomainEvent -{ - public FileUploadedDomainEvent(File file) : base($"{file.Id}/Created") - { - Owner = file.Owner.ToString(); - FileId = file.Id.ToString(); - } - - public string FileId { get; init; } - public string Owner { get; init; } -} diff --git a/Modules/Files/src/Files.Domain/Entities/File.cs b/Modules/Files/src/Files.Domain/Entities/File.cs index 06735e4128..577bddd8e0 100644 --- a/Modules/Files/src/Files.Domain/Entities/File.cs +++ b/Modules/Files/src/Files.Domain/Entities/File.cs @@ -2,7 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Files.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Files.Contracts.DomainEvents; +using Backbone.Modules.Files.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Files.Domain.Entities; @@ -48,7 +49,7 @@ public File(IdentityAddress createdBy, DeviceId createdByDevice, byte[] ownerSig EncryptedProperties = encryptedProperties; - RaiseDomainEvent(new FileUploadedDomainEvent(this)); + RaiseDomainEvent(FileUploadedDomainEvent.Create(this)); } public FileId Id { get; set; } @@ -95,7 +96,7 @@ public bool OwnershipIsLocked private set { if (!field && value) - RaiseDomainEvent(new FileOwnershipLockedDomainEvent(this)); + RaiseDomainEvent(FileOwnershipLockedDomainEvent.Create(this)); field = value; } @@ -153,7 +154,7 @@ public ClaimFileOwnershipResult ClaimOwnership(FileOwnershipToken ownershipToken if (OwnershipToken != ownershipToken) { OwnershipIsLocked = true; - RaiseDomainEvent(new FileOwnershipLockedDomainEvent(this)); + RaiseDomainEvent(FileOwnershipLockedDomainEvent.Create(this)); return ClaimFileOwnershipResult.IncorrectToken; } @@ -164,7 +165,7 @@ public ClaimFileOwnershipResult ClaimOwnership(FileOwnershipToken ownershipToken Owner = newOwnerAddress; OwnershipToken = RegenerateOwnershipToken(newOwnerAddress); - RaiseDomainEvent(new FileOwnershipClaimedDomainEvent(this, oldOwnerAddress)); + RaiseDomainEvent(FileOwnershipClaimedDomainEvent.Create(this, oldOwnerAddress)); return ClaimFileOwnershipResult.Ok; } diff --git a/Modules/Files/src/Files.Domain/Files.Domain.csproj b/Modules/Files/src/Files.Domain/Files.Domain.csproj index fc12cf801d..2c835bae75 100644 --- a/Modules/Files/src/Files.Domain/Files.Domain.csproj +++ b/Modules/Files/src/Files.Domain/Files.Domain.csproj @@ -3,6 +3,7 @@ + diff --git a/Modules/Files/src/Files.Domain/packages.lock.json b/Modules/Files/src/Files.Domain/packages.lock.json index 151a5a315b..6c8df7db3d 100644 --- a/Modules/Files/src/Files.Domain/packages.lock.json +++ b/Modules/Files/src/Files.Domain/packages.lock.json @@ -20,6 +20,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Files/src/Files.Infrastructure.Database.Postgres/packages.lock.json index 17955c60e4..08401b1845 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/packages.lock.json @@ -739,10 +739,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/packages.lock.json index 17955c60e4..08401b1845 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/packages.lock.json @@ -739,10 +739,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/src/Files.Infrastructure/packages.lock.json b/Modules/Files/src/Files.Infrastructure/packages.lock.json index 9729961ee6..3f8f705612 100644 --- a/Modules/Files/src/Files.Infrastructure/packages.lock.json +++ b/Modules/Files/src/Files.Infrastructure/packages.lock.json @@ -775,10 +775,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/src/Files.Module/packages.lock.json b/Modules/Files/src/Files.Module/packages.lock.json index c9388e8121..94561a9241 100644 --- a/Modules/Files/src/Files.Module/packages.lock.json +++ b/Modules/Files/src/Files.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1265,10 +1282,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1296,6 +1320,18 @@ "Backbone.Modules.Files.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Files/test/Files.Application.Tests/packages.lock.json b/Modules/Files/test/Files.Application.Tests/packages.lock.json index 2cad71ee1e..7c242502a3 100644 --- a/Modules/Files/test/Files.Application.Tests/packages.lock.json +++ b/Modules/Files/test/Files.Application.Tests/packages.lock.json @@ -945,10 +945,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/test/Files.Domain.Tests/Tests/Files/ClaimOwnershipTests.cs b/Modules/Files/test/Files.Domain.Tests/Tests/Files/ClaimOwnershipTests.cs index 81da19c13e..d4454443e3 100644 --- a/Modules/Files/test/Files.Domain.Tests/Tests/Files/ClaimOwnershipTests.cs +++ b/Modules/Files/test/Files.Domain.Tests/Tests/Files/ClaimOwnershipTests.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Files.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Files.Domain.Entities; using Backbone.Modules.Files.Domain.Tests.Helpers; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Files/test/Files.Domain.Tests/Tests/Files/ValidateOwnershipTokenTest.cs b/Modules/Files/test/Files.Domain.Tests/Tests/Files/ValidateOwnershipTokenTest.cs index 46aec2c655..4d7d9d2803 100644 --- a/Modules/Files/test/Files.Domain.Tests/Tests/Files/ValidateOwnershipTokenTest.cs +++ b/Modules/Files/test/Files.Domain.Tests/Tests/Files/ValidateOwnershipTokenTest.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Files.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Files.Domain.Entities; using Backbone.Modules.Files.Domain.Tests.Helpers; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Files/test/Files.Domain.Tests/packages.lock.json b/Modules/Files/test/Files.Domain.Tests/packages.lock.json index a525aa30d0..d82b4d203c 100644 --- a/Modules/Files/test/Files.Domain.Tests/packages.lock.json +++ b/Modules/Files/test/Files.Domain.Tests/packages.lock.json @@ -788,10 +788,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Files/test/Files.Infrastructure.Tests/packages.lock.json b/Modules/Files/test/Files.Infrastructure.Tests/packages.lock.json index 3c7aff9ec3..37bb9361eb 100644 --- a/Modules/Files/test/Files.Infrastructure.Tests/packages.lock.json +++ b/Modules/Files/test/Files.Infrastructure.Tests/packages.lock.json @@ -945,10 +945,17 @@ "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Files.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs index 54f2a5d56d..787c96d030 100644 --- a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs +++ b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; using MessageId = Backbone.Modules.Messages.Domain.Ids.MessageId; namespace Backbone.Modules.Messages.Application.DomainEvents.Incoming.MessageOrphaned; diff --git a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs index cbb00c5318..c60ac55478 100644 --- a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs +++ b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Messages.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Messages.Domain.DomainEvents.Incoming; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Messages.Domain.Entities; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs b/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs index 2c4632801a..a4165e6cc1 100644 --- a/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Application.DomainEvents.Incoming.MessageOrphaned; using Backbone.Modules.Messages.Application.DomainEvents.Incoming.RelationshipStatusChanged; -using Backbone.Modules.Messages.Domain.DomainEvents.Incoming; -using Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; namespace Backbone.Modules.Messages.Application.Extensions; diff --git a/Modules/Messages/src/Messages.Application/Messages.Application.csproj b/Modules/Messages/src/Messages.Application/Messages.Application.csproj index 087e4d1cb1..fc77757050 100644 --- a/Modules/Messages/src/Messages.Application/Messages.Application.csproj +++ b/Modules/Messages/src/Messages.Application/Messages.Application.csproj @@ -7,6 +7,8 @@ + + diff --git a/Modules/Messages/src/Messages.Application/packages.lock.json b/Modules/Messages/src/Messages.Application/packages.lock.json index 3e3a5b815e..0f7fc78c9c 100644 --- a/Modules/Messages/src/Messages.Application/packages.lock.json +++ b/Modules/Messages/src/Messages.Application/packages.lock.json @@ -740,13 +740,26 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs b/Modules/Messages/src/Messages.Contracts/DomainEvents/MessageCreatedDomainEvent.cs similarity index 82% rename from Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs rename to Modules/Messages/src/Messages.Contracts/DomainEvents/MessageCreatedDomainEvent.cs index c9581fa8b8..d54cc8a0dc 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs +++ b/Modules/Messages/src/Messages.Contracts/DomainEvents/MessageCreatedDomainEvent.cs @@ -1,12 +1,12 @@ using Backbone.BuildingBlocks.Domain.Events; -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.MessageCreated; +namespace Backbone.Modules.Messages.Contracts.DomainEvents; public class MessageCreatedDomainEvent : DomainEvent { public required string Id { get; set; } - public required string CreatedBy { get; set; } public required IEnumerable Recipients { get; set; } + public required string CreatedBy { get; set; } public class Recipient { diff --git a/Modules/Messages/src/Messages.Contracts/DomainEvents/MessageOrphanedDomainEvent.cs b/Modules/Messages/src/Messages.Contracts/DomainEvents/MessageOrphanedDomainEvent.cs new file mode 100644 index 0000000000..e6c0205212 --- /dev/null +++ b/Modules/Messages/src/Messages.Contracts/DomainEvents/MessageOrphanedDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Messages.Contracts.DomainEvents; + +public class MessageOrphanedDomainEvent : DomainEvent +{ + public required string MessageId { get; set; } +} diff --git a/Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj b/Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj new file mode 100644 index 0000000000..dfb7a1c453 --- /dev/null +++ b/Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Modules/Messages/src/Messages.Contracts/packages.lock.json b/Modules/Messages/src/Messages.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Messages/src/Messages.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Messages/src/Messages.Domain/DomainEvents/Incoming/RelationshipStatusChangedDomainEvent.cs b/Modules/Messages/src/Messages.Domain/DomainEvents/Incoming/RelationshipStatusChangedDomainEvent.cs deleted file mode 100644 index 8ecf04c87e..0000000000 --- a/Modules/Messages/src/Messages.Domain/DomainEvents/Incoming/RelationshipStatusChangedDomainEvent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Messages.Domain.DomainEvents.Incoming; - -public class RelationshipStatusChangedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string NewStatus { get; set; } - public required string Initiator { get; set; } - public required string Peer { get; set; } - public required bool WasDueToIdentityDeletion { get; set; } -} diff --git a/Modules/Messages/src/Messages.Domain/DomainEvents/MessageDomainEventExtensions.cs b/Modules/Messages/src/Messages.Domain/DomainEvents/MessageDomainEventExtensions.cs new file mode 100644 index 0000000000..2b735f0f0f --- /dev/null +++ b/Modules/Messages/src/Messages.Domain/DomainEvents/MessageDomainEventExtensions.cs @@ -0,0 +1,40 @@ +using Backbone.Modules.Messages.Contracts.DomainEvents; +using Backbone.Modules.Messages.Domain.Entities; + +namespace Backbone.Modules.Messages.Domain.DomainEvents; + +public static class MessageCreatedDomainEventExtensions +{ + extension(MessageCreatedDomainEvent) + { + public static MessageCreatedDomainEvent Create(Message message) + { + return new MessageCreatedDomainEvent + { + DomainEventId = $"{message.Id}/Created", + Id = message.Id.Value, + Recipients = message.Recipients.Select(r => new MessageCreatedDomainEvent.Recipient + { + Address = r.Address.Value, + RelationshipId = r.RelationshipId.Value + }), + CreatedBy = message.CreatedBy.Value + }; + } + } +} + +public static class MessageOrphanedDomainEventExtensions +{ + extension(MessageOrphanedDomainEvent) + { + public static MessageOrphanedDomainEvent Create(Message message) + { + return new MessageOrphanedDomainEvent + { + DomainEventId = $"{message.Id}/MessageOrphaned", + MessageId = message.Id + }; + } + } +} diff --git a/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageCreatedDomainEvent.cs b/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageCreatedDomainEvent.cs deleted file mode 100644 index ea15d08518..0000000000 --- a/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageCreatedDomainEvent.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Messages.Domain.Entities; - -namespace Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; - -public class MessageCreatedDomainEvent : DomainEvent -{ - public MessageCreatedDomainEvent(Message message) : base($"{message.Id}/Created") - { - Id = message.Id.Value; - Recipients = message.Recipients.Select(r => new Recipient - { - Address = r.Address.Value, - RelationshipId = r.RelationshipId.Value - }); - CreatedBy = message.CreatedBy.Value; - } - - public string Id { get; } - public IEnumerable Recipients { get; } - public string CreatedBy { get; } - - public class Recipient - { - public required string Address { get; set; } - public required string RelationshipId { get; set; } - } -} diff --git a/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageOrphanedDomainEvent.cs b/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageOrphanedDomainEvent.cs deleted file mode 100644 index c8161fc79b..0000000000 --- a/Modules/Messages/src/Messages.Domain/DomainEvents/Outgoing/MessageOrphanedDomainEvent.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Messages.Domain.Entities; - -namespace Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; - -public class MessageOrphanedDomainEvent : DomainEvent -{ - /** - * This constructor is used by the deserializer. - */ - public MessageOrphanedDomainEvent() - { - MessageId = null!; - } - - public MessageOrphanedDomainEvent(Message message) : base($"{message.Id}/MessageOrphaned") - { - MessageId = message.Id; - } - - public string MessageId { get; set; } -} diff --git a/Modules/Messages/src/Messages.Domain/Entities/Message.cs b/Modules/Messages/src/Messages.Domain/Entities/Message.cs index 81f2ca7ed6..8ff9ee6cab 100644 --- a/Modules/Messages/src/Messages.Domain/Entities/Message.cs +++ b/Modules/Messages/src/Messages.Domain/Entities/Message.cs @@ -2,7 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Messages.Contracts.DomainEvents; +using Backbone.Modules.Messages.Domain.DomainEvents; using Backbone.Modules.Messages.Domain.Ids; using Backbone.Tooling; @@ -33,7 +34,7 @@ public Message(IdentityAddress createdBy, DeviceId createdByDevice, byte[] body, Details = new MessageDetails { Id = Id, Body = body }; Attachments = attachments.ToList(); - RaiseDomainEvent(new MessageCreatedDomainEvent(this)); + RaiseDomainEvent(MessageCreatedDomainEvent.Create(this)); } public MessageId Id { get; } @@ -57,7 +58,7 @@ public void AnonymizeParticipant(IdentityAddress participantAddress, IdentityAdd AnonymizeRecipient(participantAddress, anonymizedAddress); if (IsOrphaned(this, anonymizedAddress)) - RaiseDomainEvent(new MessageOrphanedDomainEvent(this)); + RaiseDomainEvent(MessageOrphanedDomainEvent.Create(this)); } public void DecomposeFor(IdentityAddress decomposerAddress, IdentityAddress peerAddress, IdentityAddress anonymizedAddress) diff --git a/Modules/Messages/src/Messages.Domain/Messages.Domain.csproj b/Modules/Messages/src/Messages.Domain/Messages.Domain.csproj index fc12cf801d..4ea3d7bfbf 100644 --- a/Modules/Messages/src/Messages.Domain/Messages.Domain.csproj +++ b/Modules/Messages/src/Messages.Domain/Messages.Domain.csproj @@ -3,6 +3,7 @@ + diff --git a/Modules/Messages/src/Messages.Domain/packages.lock.json b/Modules/Messages/src/Messages.Domain/packages.lock.json index 151a5a315b..e0b79ef131 100644 --- a/Modules/Messages/src/Messages.Domain/packages.lock.json +++ b/Modules/Messages/src/Messages.Domain/packages.lock.json @@ -20,6 +20,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/packages.lock.json index 6899da6235..7bfa9b1029 100644 --- a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/packages.lock.json @@ -735,14 +735,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -758,6 +767,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/packages.lock.json index 6899da6235..7bfa9b1029 100644 --- a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/packages.lock.json @@ -735,14 +735,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -758,6 +767,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/src/Messages.Infrastructure/packages.lock.json b/Modules/Messages/src/Messages.Infrastructure/packages.lock.json index fa5b248f29..2192c46472 100644 --- a/Modules/Messages/src/Messages.Infrastructure/packages.lock.json +++ b/Modules/Messages/src/Messages.Infrastructure/packages.lock.json @@ -771,17 +771,32 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/src/Messages.Module/packages.lock.json b/Modules/Messages/src/Messages.Module/packages.lock.json index 87d609b326..dfd23a14ec 100644 --- a/Modules/Messages/src/Messages.Module/packages.lock.json +++ b/Modules/Messages/src/Messages.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1261,14 +1278,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1296,6 +1322,24 @@ "Backbone.Modules.Messages.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/test/Messages.Application.Tests/packages.lock.json b/Modules/Messages/test/Messages.Application.Tests/packages.lock.json index 359c8fdc2d..e41dbd9b7c 100644 --- a/Modules/Messages/test/Messages.Application.Tests/packages.lock.json +++ b/Modules/Messages/test/Messages.Application.Tests/packages.lock.json @@ -941,14 +941,23 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -964,6 +973,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Messages/test/Messages.Domain.Tests/Messages.Domain.Tests.csproj b/Modules/Messages/test/Messages.Domain.Tests/Messages.Domain.Tests.csproj index 208d9c5741..8ba545be9c 100644 --- a/Modules/Messages/test/Messages.Domain.Tests/Messages.Domain.Tests.csproj +++ b/Modules/Messages/test/Messages.Domain.Tests/Messages.Domain.Tests.csproj @@ -15,6 +15,7 @@ + diff --git a/Modules/Messages/test/Messages.Domain.Tests/Messages/AnonymizeParticipantTests.cs b/Modules/Messages/test/Messages.Domain.Tests/Messages/AnonymizeParticipantTests.cs index a15b6c5542..2197e3ef7a 100644 --- a/Modules/Messages/test/Messages.Domain.Tests/Messages/AnonymizeParticipantTests.cs +++ b/Modules/Messages/test/Messages.Domain.Tests/Messages/AnonymizeParticipantTests.cs @@ -1,5 +1,5 @@ using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Domain.Entities; using Backbone.Modules.Messages.Domain.Ids; using Backbone.UnitTestTools.Shouldly.Extensions; @@ -112,7 +112,9 @@ public void Raises_a_MessageOrphanedDomainEvent_when_sender_and_all_recipients_a message.AnonymizeParticipant(recipient2Address, anonymizedAddress); // Assert - message.ShouldHaveASingleDomainEvent(); + var domainEvent = message.ShouldHaveASingleDomainEvent(); + domainEvent.DomainEventId.ShouldBe($"{message.Id}/MessageOrphaned"); + domainEvent.MessageId.ShouldBe(message.Id); } private static Message CreateMessage((IdentityAddress createdBy, IEnumerable recipients) parameters) diff --git a/Modules/Messages/test/Messages.Domain.Tests/Messages/CreationTests.cs b/Modules/Messages/test/Messages.Domain.Tests/Messages/CreationTests.cs index ab543a2321..aab4fee147 100644 --- a/Modules/Messages/test/Messages.Domain.Tests/Messages/CreationTests.cs +++ b/Modules/Messages/test/Messages.Domain.Tests/Messages/CreationTests.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Messages.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Domain.Entities; using Backbone.Modules.Messages.Domain.Ids; using Backbone.UnitTestTools.Shouldly.Extensions; @@ -26,6 +26,7 @@ public void Raises_MessageCreatedDomainEvent_when_created() // Assert var domainEvent = message.ShouldHaveASingleDomainEvent(); + domainEvent.DomainEventId.ShouldBe($"{message.Id}/Created"); domainEvent.CreatedBy.ShouldBe(sender); domainEvent.Id.ShouldBe(message.Id); domainEvent.Recipients.ShouldHaveCount(1); diff --git a/Modules/Messages/test/Messages.Domain.Tests/packages.lock.json b/Modules/Messages/test/Messages.Domain.Tests/packages.lock.json index abfc7a0a97..78881fbc30 100644 --- a/Modules/Messages/test/Messages.Domain.Tests/packages.lock.json +++ b/Modules/Messages/test/Messages.Domain.Tests/packages.lock.json @@ -797,10 +797,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs index b1ddc69562..9e1be1d80e 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.FileUploaded; +using Backbone.Modules.Files.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.FileUploaded; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs index 6eed780fb1..23a4a219ed 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs @@ -3,7 +3,7 @@ using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.IdentityCreated; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs index 56cc9137f5..1332acd009 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.MessageCreated; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.MessageCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs index 63b43f903a..0c0261ca70 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipStatusChanged; +using Backbone.Modules.Relationships.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.RelationshipStatusChanged; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEventHandler.cs index 3994afeab0..aef28f1fb6 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipTemplateCreated; +using Backbone.Modules.Relationships.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.RelationshipTemplateCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs index 6593a6fc2a..53ac59ec74 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierCreated; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs index 70d34ec42d..16776d71bc 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierDeleted; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierDeleted; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs index 0d1d91a5c7..f537742ea2 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs @@ -3,7 +3,7 @@ using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierOfIdentityChanged; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierOfIdentityChanged; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs index 12a8715278..8f42fcef08 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs index 4795f02a1e..9ed3f727ca 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs @@ -4,7 +4,7 @@ using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionDeleted; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEventHandler.cs index a36c57734b..56c36c919d 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEventHandler.cs @@ -2,7 +2,7 @@ using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TokenCreated; +using Backbone.Modules.Tokens.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TokenCreated; diff --git a/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs b/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs index 2ce92c65cd..df88c6e551 100644 --- a/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs @@ -1,4 +1,5 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.FileUploaded; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.IdentityCreated; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.MessageCreated; @@ -10,16 +11,11 @@ using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionCreated; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionDeleted; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TokenCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.FileUploaded; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.IdentityCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.MessageCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipStatusChanged; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipTemplateCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierDeleted; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierOfIdentityChanged; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TokenCreated; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Files.Contracts.DomainEvents; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Tokens.Contracts.DomainEvents; +using Backbone.Modules.Quotas.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.Extensions; diff --git a/Modules/Quotas/src/Quotas.Application/Quotas.Application.csproj b/Modules/Quotas/src/Quotas.Application/Quotas.Application.csproj index 8c8723a579..8d19ecae6b 100644 --- a/Modules/Quotas/src/Quotas.Application/Quotas.Application.csproj +++ b/Modules/Quotas/src/Quotas.Application/Quotas.Application.csproj @@ -3,6 +3,12 @@ + + + + + + diff --git a/Modules/Quotas/src/Quotas.Application/packages.lock.json b/Modules/Quotas/src/Quotas.Application/packages.lock.json index 1aecca947f..36f475bca6 100644 --- a/Modules/Quotas/src/Quotas.Application/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Application/packages.lock.json @@ -730,15 +730,52 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..0faa025faa --- /dev/null +++ b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,15 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Quotas.Contracts.DomainEvents; + +public class TierQuotaDefinitionCreatedDomainEvent : DomainEvent +{ + public required string TierId { get; set; } + public required string TierQuotaDefinitionId { get; set; } +} + +public class TierQuotaDefinitionDeletedDomainEvent : DomainEvent +{ + public required string TierId { get; set; } + public required string TierQuotaDefinitionId { get; set; } +} diff --git a/Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj b/Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Quotas/src/Quotas.Contracts/packages.lock.json b/Modules/Quotas/src/Quotas.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs b/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs index 63a7805816..3be26e208d 100644 --- a/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs +++ b/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs @@ -1,7 +1,8 @@ using Backbone.BuildingBlocks.Domain.Errors; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Quotas.Contracts.DomainEvents; +using Backbone.Modules.Quotas.Domain.DomainEvents; using CSharpFunctionalExtensions; using Entity = Backbone.BuildingBlocks.Domain.Entity; @@ -54,7 +55,7 @@ public Result DeleteQuota(string tierQuotaDe Quotas.Remove(quotaDefinition); - RaiseDomainEvent(new TierQuotaDefinitionDeletedDomainEvent(Id, tierQuotaDefinitionId)); + RaiseDomainEvent(TierQuotaDefinitionDeletedDomainEvent.Create(Id, tierQuotaDefinitionId)); return Result.Success(quotaDefinition.Id); } @@ -84,7 +85,7 @@ private Result AddTierQuotaDefinition(MetricKe var quotaDefinition = new TierQuotaDefinition(metricKey, max, period); Quotas.Add(quotaDefinition); - RaiseDomainEvent(new TierQuotaDefinitionCreatedDomainEvent(Id, quotaDefinition.Id)); + RaiseDomainEvent(TierQuotaDefinitionCreatedDomainEvent.Create(Id, quotaDefinition.Id)); return Result.Success(quotaDefinition); } diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEvent.cs deleted file mode 100644 index 113791a2fe..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.FileUploaded; - -public class FileUploadedDomainEvent : DomainEvent -{ - public required string FileId { get; set; } - public required string Owner { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEvent.cs deleted file mode 100644 index 1e811eb394..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.IdentityCreated; - -public class IdentityCreatedDomainEvent : DomainEvent -{ - public required string Address { get; set; } - - public required string Tier { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs deleted file mode 100644 index e85666c0f1..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.MessageCreated; - -public class MessageCreatedDomainEvent : DomainEvent -{ - public required string CreatedBy { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs deleted file mode 100644 index 9e9d7cbe47..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipStatusChanged; - -public class RelationshipStatusChangedDomainEvent : DomainEvent -{ - public required string Initiator { get; set; } - public required string Peer { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEvent.cs deleted file mode 100644 index 2ac33015e6..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/RelationshipTemplateCreated/RelationshipTemplateCreatedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.RelationshipTemplateCreated; - -public class RelationshipTemplateCreatedDomainEvent : DomainEvent -{ - public required string CreatedBy { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierCreated/TierCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierCreated/TierCreatedDomainEvent.cs deleted file mode 100644 index 482d7f4baa..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierCreated/TierCreatedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierCreated; - -public class TierCreatedDomainEvent : DomainEvent -{ - public required string Id { get; set; } - public required string Name { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEvent.cs deleted file mode 100644 index 5b17ae2bb4..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierDeleted; - -public class TierDeletedDomainEvent : DomainEvent -{ - public required string Id { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEvent.cs deleted file mode 100644 index 0db4a55408..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierOfIdentityChanged; - -public class TierOfIdentityChangedDomainEvent : DomainEvent -{ - public required string OldTierId { get; set; } - public required string NewTierId { get; set; } - public required string IdentityAddress { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEvent.cs deleted file mode 100644 index 3d58d44161..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Incoming/TokenCreated/TokenCreatedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TokenCreated; - -public class TokenCreatedDomainEvent : DomainEvent -{ - public string? CreatedBy { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionCreatedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionCreatedDomainEvent.cs deleted file mode 100644 index 2867e66e55..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionCreatedDomainEvent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; - -public class TierQuotaDefinitionCreatedDomainEvent : DomainEvent -{ - public TierQuotaDefinitionCreatedDomainEvent(string tierId, string tierQuotaDefinitionId) : base($"{tierQuotaDefinitionId}/Created") - { - TierId = tierId; - TierQuotaDefinitionId = tierQuotaDefinitionId; - } - - public string TierId { get; } - public string TierQuotaDefinitionId { get; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionDeletedDomainEvent.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionDeletedDomainEvent.cs deleted file mode 100644 index 037147c6be..0000000000 --- a/Modules/Quotas/src/Quotas.Domain/DomainEvents/Outgoing/TierQuotaDefinitionDeletedDomainEvent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; - -public class TierQuotaDefinitionDeletedDomainEvent : DomainEvent -{ - public TierQuotaDefinitionDeletedDomainEvent(string tierId, string tierQuotaDefinitionId) : base($"{tierQuotaDefinitionId}/Deleted") - { - TierId = tierId; - TierQuotaDefinitionId = tierQuotaDefinitionId; - } - - public string TierId { get; } - public string TierQuotaDefinitionId { get; } -} diff --git a/Modules/Quotas/src/Quotas.Domain/DomainEvents/QuotaDomainEventExtensions.cs b/Modules/Quotas/src/Quotas.Domain/DomainEvents/QuotaDomainEventExtensions.cs new file mode 100644 index 0000000000..7a7c67b782 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Domain/DomainEvents/QuotaDomainEventExtensions.cs @@ -0,0 +1,29 @@ +using Backbone.Modules.Quotas.Contracts.DomainEvents; + +namespace Backbone.Modules.Quotas.Domain.DomainEvents; + +public static class TierQuotaDefinitionCreatedDomainEventExtensions +{ + extension(TierQuotaDefinitionCreatedDomainEvent) + { + public static TierQuotaDefinitionCreatedDomainEvent Create(string tierId, string tierQuotaDefinitionId) => new() + { + DomainEventId = $"{tierQuotaDefinitionId}/Created", + TierId = tierId, + TierQuotaDefinitionId = tierQuotaDefinitionId + }; + } +} + +public static class TierQuotaDefinitionDeletedDomainEventExtensions +{ + extension(TierQuotaDefinitionDeletedDomainEvent) + { + public static TierQuotaDefinitionDeletedDomainEvent Create(string tierId, string tierQuotaDefinitionId) => new() + { + DomainEventId = $"{tierQuotaDefinitionId}/Deleted", + TierId = tierId, + TierQuotaDefinitionId = tierQuotaDefinitionId + }; + } +} diff --git a/Modules/Quotas/src/Quotas.Domain/Quotas.Domain.csproj b/Modules/Quotas/src/Quotas.Domain/Quotas.Domain.csproj index 8160926a0b..73d17a505f 100644 --- a/Modules/Quotas/src/Quotas.Domain/Quotas.Domain.csproj +++ b/Modules/Quotas/src/Quotas.Domain/Quotas.Domain.csproj @@ -8,6 +8,7 @@ + diff --git a/Modules/Quotas/src/Quotas.Domain/packages.lock.json b/Modules/Quotas/src/Quotas.Domain/packages.lock.json index 34d2e3fce0..e701341912 100644 --- a/Modules/Quotas/src/Quotas.Domain/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Domain/packages.lock.json @@ -26,6 +26,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/packages.lock.json index 65b2664d60..97d38f6793 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/packages.lock.json @@ -730,12 +730,42 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -743,6 +773,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -760,6 +791,18 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/packages.lock.json index 65b2664d60..97d38f6793 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/packages.lock.json @@ -730,12 +730,42 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -743,6 +773,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -760,6 +791,18 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/src/Quotas.Infrastructure/packages.lock.json b/Modules/Quotas/src/Quotas.Infrastructure/packages.lock.json index 9cfbb98bba..229db36c4d 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Infrastructure/packages.lock.json @@ -776,12 +776,42 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -789,10 +819,23 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/src/Quotas.Module/packages.lock.json b/Modules/Quotas/src/Quotas.Module/packages.lock.json index 03521323f3..6ca1e814f2 100644 --- a/Modules/Quotas/src/Quotas.Module/packages.lock.json +++ b/Modules/Quotas/src/Quotas.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1256,12 +1273,36 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -1269,6 +1310,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1298,6 +1340,24 @@ "Backbone.Modules.Quotas.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs index 8988bf62ff..eb70fb670d 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs @@ -1,7 +1,7 @@ using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierDeleted; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierDeleted; +using Backbone.Modules.Devices.Contracts.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs index 1a352f02f9..300ddcb0e5 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs @@ -4,7 +4,7 @@ using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.IdentityCreated; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs index de7cf06ee7..ac371de2c8 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs @@ -4,7 +4,8 @@ using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Quotas.Contracts.DomainEvents; +using Backbone.Modules.Quotas.Domain.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; @@ -29,7 +30,7 @@ public async Task Creates_tier_quota_after_consuming_domain_event() var handler = CreateHandler(identitiesRepository, tierQuotaDefinitionsRepository); // Act - await handler.Handle(new TierQuotaDefinitionCreatedDomainEvent(tierId, tierQuotaDefinition.Id)); + await handler.Handle(TierQuotaDefinitionCreatedDomainEvent.Create(tierId, tierQuotaDefinition.Id)); // Assert A.CallTo(() => identitiesRepository.Update(A>.That.Matches(ids => diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs index a95dca0502..1568e9ab53 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs @@ -1,7 +1,7 @@ using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierCreated; using Backbone.Modules.Quotas.Application.Tests.TestDoubles; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Incoming.TierCreated; +using Backbone.Modules.Devices.Contracts.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/packages.lock.json b/Modules/Quotas/test/Quotas.Application.Tests/packages.lock.json index 100f6f6716..cbc0e87a7d 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/packages.lock.json +++ b/Modules/Quotas/test/Quotas.Application.Tests/packages.lock.json @@ -936,12 +936,42 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -949,10 +979,23 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs b/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs index a87e3f631e..6605405afa 100644 --- a/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs +++ b/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs @@ -1,7 +1,7 @@ using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.UnitTestTools.Extensions; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Quotas/test/Quotas.Domain.Tests/packages.lock.json b/Modules/Quotas/test/Quotas.Domain.Tests/packages.lock.json index 6fc0adbe47..77451bff52 100644 --- a/Modules/Quotas/test/Quotas.Domain.Tests/packages.lock.json +++ b/Modules/Quotas/test/Quotas.Domain.Tests/packages.lock.json @@ -794,11 +794,18 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Quotas.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } diff --git a/Modules/Quotas/test/Quotas.Infrastructure.Tests/packages.lock.json b/Modules/Quotas/test/Quotas.Infrastructure.Tests/packages.lock.json index dbd9fb479c..00a5b1ef29 100644 --- a/Modules/Quotas/test/Quotas.Infrastructure.Tests/packages.lock.json +++ b/Modules/Quotas/test/Quotas.Infrastructure.Tests/packages.lock.json @@ -936,19 +936,40 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Modules.Messages.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Messages.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -969,7 +990,19 @@ "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", - "Backbone.Modules.Quotas.Domain": "[1.0.0, )" + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", + "Backbone.Modules.Quotas.Domain": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )" + } + }, + "Backbone.Modules.Quotas.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" } }, "Backbone.Modules.Quotas.Domain": { @@ -977,6 +1010,7 @@ "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Quotas.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]" } @@ -1000,7 +1034,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1011,10 +1047,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1030,6 +1073,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs index 3d07faef0d..723d8fe4ca 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs @@ -3,8 +3,9 @@ using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Relationships.Application.DomainEvents.Incoming.FeatureFlagsOfIdentityChanged; @@ -26,7 +27,7 @@ public async Task Handle(FeatureFlagsOfIdentityChangedDomainEvent @event) { var identitiesToBeNotified = await ListIdentitiesToBeNotified(@event); - var publishEventTasks = identitiesToBeNotified.Select(i => _eventBus.Publish(new PeerFeatureFlagsChangedDomainEvent(@event.IdentityAddress, i))); + var publishEventTasks = identitiesToBeNotified.Select(i => _eventBus.Publish(PeerFeatureFlagsChangedDomainEvent.Create(@event.IdentityAddress, i))); await Task.WhenAll(publishEventTasks); } diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs index 3616dc7482..0a20260eef 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs @@ -1,8 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeleted; @@ -38,7 +39,7 @@ private async Task NotifyRelationshipsAboutDeletedPeer(string identityToBeDelete { foreach (var relationship in relationships) { - await _eventBus.Publish(new PeerDeletedDomainEvent(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted)); + await _eventBus.Publish(PeerDeletedDomainEvent.Create(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted)); } } } diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs index e7b3b31bfa..691c063a02 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs @@ -1,8 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeletionCancelled; @@ -38,7 +39,7 @@ private async Task NotifyRelationshipsAboutCancelledDeletion(string identityToBe { foreach (var relationship in relationships) { - await _eventBus.Publish(new PeerDeletionCancelledDomainEvent(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted)); + await _eventBus.Publish(PeerDeletionCancelledDomainEvent.Create(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted)); } } } diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs index 56f980ee3d..f21769fde5 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs @@ -1,8 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityToBeDeleted; @@ -38,7 +39,7 @@ private async Task NotifyRelationshipsOfPeerToBeDeleted(string identityToBeDelet { foreach (var relationship in relationships) { - await _eventBus.Publish(new PeerToBeDeletedDomainEvent(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted, gracePeriodEndsAt)); + await _eventBus.Publish(PeerToBeDeletedDomainEvent.Create(relationship.GetPeerOf(identityToBeDeleted), relationship.Id, identityToBeDeleted, gracePeriodEndsAt)); } } } diff --git a/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs b/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs index bc58620ed7..41b3b6e146 100644 --- a/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs @@ -3,7 +3,7 @@ using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeleted; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeletionCancelled; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityToBeDeleted; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; +using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Relationships.Application.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/Relationships.Application.csproj b/Modules/Relationships/src/Relationships.Application/Relationships.Application.csproj index 51719d45ce..2c249bc1a0 100644 --- a/Modules/Relationships/src/Relationships.Application/Relationships.Application.csproj +++ b/Modules/Relationships/src/Relationships.Application/Relationships.Application.csproj @@ -8,7 +8,9 @@ + + diff --git a/Modules/Relationships/src/Relationships.Application/packages.lock.json b/Modules/Relationships/src/Relationships.Application/packages.lock.json index 1c6ab73841..9deab4fc1f 100644 --- a/Modules/Relationships/src/Relationships.Application/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Application/packages.lock.json @@ -740,16 +740,29 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Common": { "type": "Project", "dependencies": { "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..a7503e3a65 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,66 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class PeerDeletedDomainEvent : DomainEvent +{ + public required string PeerOfDeletedIdentity { get; set; } + public required string RelationshipId { get; set; } + public required string DeletedIdentity { get; set; } +} + +public class PeerDeletionCancelledDomainEvent : DomainEvent +{ + public required string PeerOfIdentityWithDeletionCancelled { get; set; } + public required string RelationshipId { get; set; } + public required string IdentityWithDeletionCancelled { get; set; } +} + +public class PeerFeatureFlagsChangedDomainEvent : DomainEvent +{ + public required string PeerAddress { get; set; } + public required string NotifiedIdentityAddress { get; set; } +} + +public class PeerToBeDeletedDomainEvent : DomainEvent +{ + public required string PeerOfIdentityToBeDeleted { get; set; } + public required string RelationshipId { get; set; } + public required string IdentityToBeDeleted { get; set; } + public required DateTime GracePeriodEndsAt { get; set; } +} + +public class RelationshipReactivationCompletedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string NewRelationshipStatus { get; set; } + public required string Peer { get; set; } +} + +public class RelationshipReactivationRequestedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string RequestingIdentity { get; set; } + public required string Peer { get; set; } +} + +public class RelationshipStatusChangedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string NewStatus { get; set; } + public required string Initiator { get; set; } + public required string Peer { get; set; } + public required bool WasDueToIdentityDeletion { get; set; } +} + +public class RelationshipTemplateAllocationsExhaustedDomainEvent : DomainEvent +{ + public required string RelationshipTemplateId { get; set; } + public required string CreatedBy { get; set; } +} + +public class RelationshipTemplateCreatedDomainEvent : DomainEvent +{ + public required string TemplateId { get; set; } + public required string CreatedBy { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj b/Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Relationships/src/Relationships.Contracts/packages.lock.json b/Modules/Relationships/src/Relationships.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs b/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs index 395841c816..689cbde99c 100644 --- a/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs +++ b/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs @@ -3,7 +3,8 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; @@ -36,7 +37,7 @@ public RelationshipTemplate(IdentityAddress createdBy, DeviceId createdByDevice, ForIdentity = forIdentity; Password = password; - RaiseDomainEvent(new RelationshipTemplateCreatedDomainEvent(this)); + RaiseDomainEvent(RelationshipTemplateCreatedDomainEvent.Create(this)); } public RelationshipTemplateId Id { get; set; } @@ -71,7 +72,7 @@ public void AllocateFor(IdentityAddress identity, DeviceId device) Allocations.Add(new RelationshipTemplateAllocation(Id, identity, device)); if (Allocations.Count == MaxNumberOfAllocations) - RaiseDomainEvent(new RelationshipTemplateAllocationsExhaustedDomainEvent(this)); + RaiseDomainEvent(RelationshipTemplateAllocationsExhaustedDomainEvent.Create(this)); } public void AnonymizeForIdentity(string didDomainName) diff --git a/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs b/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs index cf7d86e6a6..260a8ecfa8 100644 --- a/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs +++ b/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs @@ -4,7 +4,8 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Relationships.Domain.Aggregates.Relationships; @@ -42,7 +43,7 @@ public Relationship(RelationshipTemplate relationshipTemplate, IdentityAddress a AuditLog = [new(RelationshipAuditLogEntryReason.Creation, null, RelationshipStatus.Pending, activeIdentity, activeDevice)]; - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } private void EnsureCanEstablish(RelationshipTemplate relationshipTemplate, IdentityAddress activeIdentity, List existingRelationships) @@ -119,7 +120,7 @@ public void Accept(IdentityAddress activeIdentity, DeviceId activeDevice, byte[] ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } private void EnsureStatus(params RelationshipStatus[] statuses) @@ -151,7 +152,7 @@ public void Reject(IdentityAddress activeIdentity, DeviceId activeDevice, byte[] ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } public void Revoke(IdentityAddress activeIdentity, DeviceId activeDevice, byte[]? creationResponseContent) @@ -171,7 +172,7 @@ public void Revoke(IdentityAddress activeIdentity, DeviceId activeDevice, byte[] ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } private void EnsureRelationshipRequestIsCreatedBySelf(IdentityAddress activeIdentity) @@ -195,7 +196,7 @@ public void Terminate(IdentityAddress activeIdentity, DeviceId activeDevice) ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } public void RequestReactivation(IdentityAddress activeIdentity, DeviceId activeDevice) @@ -212,7 +213,7 @@ public void RequestReactivation(IdentityAddress activeIdentity, DeviceId activeD ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipReactivationRequestedDomainEvent(this, activeIdentity, GetPeerOf(activeIdentity))); + RaiseDomainEvent(RelationshipReactivationRequestedDomainEvent.Create(this, activeIdentity, GetPeerOf(activeIdentity))); } private void EnsureThereIsNoOpenReactivationRequest() @@ -238,7 +239,7 @@ public void AcceptReactivation(IdentityAddress activeIdentity, DeviceId activeDe ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipReactivationCompletedDomainEvent(this, GetPeerOf(activeIdentity))); + RaiseDomainEvent(RelationshipReactivationCompletedDomainEvent.Create(this, GetPeerOf(activeIdentity))); } private void EnsureAcceptableReactivationRequestExistsFor(IdentityAddress activeIdentity) @@ -261,7 +262,7 @@ public void RejectReactivation(IdentityAddress activeIdentity, DeviceId activeDe ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipReactivationCompletedDomainEvent(this, GetPeerOf(activeIdentity))); + RaiseDomainEvent(RelationshipReactivationCompletedDomainEvent.Create(this, GetPeerOf(activeIdentity))); } private void EnsureRejectableRelationshipReactivationRequestExistsFor(IdentityAddress activeIdentity) @@ -284,7 +285,7 @@ public void RevokeReactivation(IdentityAddress activeIdentity, DeviceId activeDe ); AuditLog.Add(auditLogEntry); - RaiseDomainEvent(new RelationshipReactivationCompletedDomainEvent(this, GetPeerOf(activeIdentity))); + RaiseDomainEvent(RelationshipReactivationCompletedDomainEvent.Create(this, GetPeerOf(activeIdentity))); } private void EnsureRevocableReactivationRequestExistsFor(IdentityAddress activeIdentity) @@ -305,7 +306,7 @@ public void Decompose(IdentityAddress activeIdentity, DeviceId activeDevice) else DecomposeAsSecondParticipant(activeIdentity, activeDevice, RelationshipAuditLogEntryReason.Decomposition); - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(this)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(this)); } public void DecomposeDueToIdentityDeletion(IdentityAddress identityToBeDeleted, string didDomainName) @@ -326,7 +327,7 @@ public void DecomposeDueToIdentityDeletion(IdentityAddress identityToBeDeleted, // CAUTION: do NOT call the constructor with the single parameter of type Relationship. Because this would fill the initiator // with the anonymized address. - RaiseDomainEvent(new RelationshipStatusChangedDomainEvent(Id, Status.ToString(), identityToBeDeleted, peer, true)); + RaiseDomainEvent(RelationshipStatusChangedDomainEvent.Create(Id, Status.ToString(), identityToBeDeleted, peer, true)); } private void DecomposeAsFirstParticipant(IdentityAddress activeIdentity, DeviceId? activeDevice, RelationshipAuditLogEntryReason reason) diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/FeatureFlagsOfIdentityChangedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/FeatureFlagsOfIdentityChangedDomainEvent.cs deleted file mode 100644 index 24fb2592b6..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/FeatureFlagsOfIdentityChangedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; - -public class FeatureFlagsOfIdentityChangedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; init; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletedDomainEvent.cs deleted file mode 100644 index a132426838..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletedDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; - -public class IdentityDeletedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; init; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletionCancelledDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletionCancelledDomainEvent.cs deleted file mode 100644 index 4fce523c85..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityDeletionCancelledDomainEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; - -public class IdentityDeletionCancelledDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; init; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityToBeDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityToBeDeletedDomainEvent.cs deleted file mode 100644 index 54b0756579..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Incoming/IdentityToBeDeletedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; - -public class IdentityToBeDeletedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; init; } - public required DateTime GracePeriodEndsAt { get; init; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletedDomainEvent.cs deleted file mode 100644 index 2e3826475a..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletedDomainEvent.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class PeerDeletedDomainEvent : DomainEvent -{ - public PeerDeletedDomainEvent(IdentityAddress peerOfDeletedIdentity, RelationshipId relationshipId, IdentityAddress deletedIdentity) - : base($"{relationshipId}/peerDeletionCancelled/{deletedIdentity}") - { - PeerOfDeletedIdentity = peerOfDeletedIdentity; - RelationshipId = relationshipId; - DeletedIdentity = deletedIdentity; - } - - public string PeerOfDeletedIdentity { get; } - public string RelationshipId { get; } - public string DeletedIdentity { get; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletionCancelledDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletionCancelledDomainEvent.cs deleted file mode 100644 index 5e65f02407..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerDeletionCancelledDomainEvent.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class PeerDeletionCancelledDomainEvent : DomainEvent -{ - public PeerDeletionCancelledDomainEvent(IdentityAddress peerOfIdentityWithDeletionCancelled, RelationshipId relationshipId, IdentityAddress identityWithDeletionCancelled) - : base($"{relationshipId}/peerDeletionCancelled/{identityWithDeletionCancelled}", randomizeId: true) - { - PeerOfIdentityWithDeletionCancelled = peerOfIdentityWithDeletionCancelled; - RelationshipId = relationshipId; - IdentityWithDeletionCancelled = identityWithDeletionCancelled; - } - - public string PeerOfIdentityWithDeletionCancelled { get; } - public string RelationshipId { get; } - public string IdentityWithDeletionCancelled { get; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerFeatureFlagsChangedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerFeatureFlagsChangedDomainEvent.cs deleted file mode 100644 index 5bcf094ae1..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerFeatureFlagsChangedDomainEvent.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class PeerFeatureFlagsChangedDomainEvent : DomainEvent -{ - public PeerFeatureFlagsChangedDomainEvent(string peerAddress, string notifiedIdentityAddress) - { - PeerAddress = peerAddress; - NotifiedIdentityAddress = notifiedIdentityAddress; - } - - public string PeerAddress { get; set; } - public string NotifiedIdentityAddress { get; set; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerToBeDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerToBeDeletedDomainEvent.cs deleted file mode 100644 index 1022515108..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/PeerToBeDeletedDomainEvent.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class PeerToBeDeletedDomainEvent : DomainEvent -{ - public PeerToBeDeletedDomainEvent(IdentityAddress peerOfIdentityToBeDeleted, RelationshipId relationshipId, IdentityAddress identityToBeDeleted, DateTime gracePeriodEndsAt) - : base($"{relationshipId}/peerToBeDeleted/{identityToBeDeleted}", randomizeId: true) - { - PeerOfIdentityToBeDeleted = peerOfIdentityToBeDeleted; - RelationshipId = relationshipId; - IdentityToBeDeleted = identityToBeDeleted; - GracePeriodEndsAt = gracePeriodEndsAt; - } - - public string PeerOfIdentityToBeDeleted { get; } - public string RelationshipId { get; } - public string IdentityToBeDeleted { get; } - public DateTime GracePeriodEndsAt { get; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationCompletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationCompletedDomainEvent.cs deleted file mode 100644 index 1a15c5de3c..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationCompletedDomainEvent.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class RelationshipReactivationCompletedDomainEvent : DomainEvent -{ - public RelationshipReactivationCompletedDomainEvent(Relationship relationship, IdentityAddress peer) - : base($"{relationship.Id}/ReactivationCompleted/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt}") - { - RelationshipId = relationship.Id; - Peer = peer; - NewRelationshipStatus = relationship.Status.ToString(); - } - - public string RelationshipId { get; } - public string NewRelationshipStatus { get; set; } - public string Peer { get; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationRequestedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationRequestedDomainEvent.cs deleted file mode 100644 index d0bf8cfd7d..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipReactivationRequestedDomainEvent.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class RelationshipReactivationRequestedDomainEvent : DomainEvent -{ - public RelationshipReactivationRequestedDomainEvent(Relationship relationship, IdentityAddress requestingIdentity, IdentityAddress peer) : - base($"{relationship.Id}/ReactivationRequested/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt}") - { - RelationshipId = relationship.Id; - RequestingIdentity = requestingIdentity.Value; - Peer = peer.Value; - } - - - public string RelationshipId { get; } - public string RequestingIdentity { get; set; } - public string Peer { get; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipStatusChangedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipStatusChangedDomainEvent.cs deleted file mode 100644 index 1288caeb97..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipStatusChangedDomainEvent.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Tooling.Extensions; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class RelationshipStatusChangedDomainEvent : DomainEvent -{ - public RelationshipStatusChangedDomainEvent(Relationship relationship) : base( - $"{relationship.Id}/StatusChanged/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt.ToUniversalString()}") - { - RelationshipId = relationship.Id; - NewStatus = relationship.Status.ToString(); - Initiator = relationship.LastModifiedBy; - Peer = relationship.GetPeerOf(relationship.LastModifiedBy); - WasDueToIdentityDeletion = false; - } - - public RelationshipStatusChangedDomainEvent(string relationshipId, string newStatus, string initiator, string peer, bool wasDueToIdentityDeletion) - { - RelationshipId = relationshipId; - NewStatus = newStatus; - Initiator = initiator; - Peer = peer; - WasDueToIdentityDeletion = wasDueToIdentityDeletion; - } - - public string RelationshipId { get; set; } - public string NewStatus { get; set; } - public string Initiator { get; set; } - public string Peer { get; set; } - public bool WasDueToIdentityDeletion { get; set; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateAllocationsExhaustedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateAllocationsExhaustedDomainEvent.cs deleted file mode 100644 index 910e42503f..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateAllocationsExhaustedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class RelationshipTemplateAllocationsExhaustedDomainEvent : DomainEvent -{ - public RelationshipTemplateAllocationsExhaustedDomainEvent(RelationshipTemplate template) : base($"{template.Id}/maxNumberOfAllocationsExhausted") - { - RelationshipTemplateId = template.Id; - CreatedBy = template.CreatedBy; - } - - public string RelationshipTemplateId { get; set; } - public string CreatedBy { get; set; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateCreatedDomainEvent.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateCreatedDomainEvent.cs deleted file mode 100644 index 77ecd68ba9..0000000000 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/Outgoing/RelationshipTemplateCreatedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; - -namespace Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; - -public class RelationshipTemplateCreatedDomainEvent : DomainEvent -{ - public RelationshipTemplateCreatedDomainEvent(RelationshipTemplate template) : base($"{template.Id}/Created") - { - TemplateId = template.Id; - CreatedBy = template.CreatedBy; - } - - public string TemplateId { get; init; } - public string CreatedBy { get; init; } -} diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs new file mode 100644 index 0000000000..03e1f8cddc --- /dev/null +++ b/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs @@ -0,0 +1,158 @@ +using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; +using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; +using Backbone.Tooling.Extensions; + +namespace Backbone.Modules.Relationships.Domain.DomainEvents; + +public static class PeerDeletedDomainEventExtensions +{ + extension(PeerDeletedDomainEvent) + { + public static PeerDeletedDomainEvent Create(IdentityAddress peerOfDeletedIdentity, RelationshipId relationshipId, IdentityAddress deletedIdentity) => new() + { + DomainEventId = $"{relationshipId}/peerDeletionCancelled/{deletedIdentity}", + PeerOfDeletedIdentity = peerOfDeletedIdentity, + RelationshipId = relationshipId, + DeletedIdentity = deletedIdentity + }; + } +} + +public static class PeerDeletionCancelledDomainEventExtensions +{ + extension(PeerDeletionCancelledDomainEvent) + { + public static PeerDeletionCancelledDomainEvent Create( + IdentityAddress peerOfIdentityWithDeletionCancelled, + RelationshipId relationshipId, + IdentityAddress identityWithDeletionCancelled) => new() + { + DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerDeletionCancelled/{identityWithDeletionCancelled}"), + PeerOfIdentityWithDeletionCancelled = peerOfIdentityWithDeletionCancelled, + RelationshipId = relationshipId, + IdentityWithDeletionCancelled = identityWithDeletionCancelled + }; + } +} + +public static class PeerFeatureFlagsChangedDomainEventExtensions +{ + extension(PeerFeatureFlagsChangedDomainEvent) + { + public static PeerFeatureFlagsChangedDomainEvent Create(string peerAddress, string notifiedIdentityAddress) => new() + { + PeerAddress = peerAddress, + NotifiedIdentityAddress = notifiedIdentityAddress + }; + } +} + +public static class PeerToBeDeletedDomainEventExtensions +{ + extension(PeerToBeDeletedDomainEvent) + { + public static PeerToBeDeletedDomainEvent Create( + IdentityAddress peerOfIdentityToBeDeleted, + RelationshipId relationshipId, + IdentityAddress identityToBeDeleted, + DateTime gracePeriodEndsAt) => new() + { + DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerToBeDeleted/{identityToBeDeleted}"), + PeerOfIdentityToBeDeleted = peerOfIdentityToBeDeleted, + RelationshipId = relationshipId, + IdentityToBeDeleted = identityToBeDeleted, + GracePeriodEndsAt = gracePeriodEndsAt + }; + } +} + +public static class RelationshipReactivationCompletedDomainEventExtensions +{ + extension(RelationshipReactivationCompletedDomainEvent) + { + public static RelationshipReactivationCompletedDomainEvent Create(Relationship relationship, IdentityAddress peer) => new() + { + DomainEventId = $"{relationship.Id}/ReactivationCompleted/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt}", + RelationshipId = relationship.Id, + Peer = peer, + NewRelationshipStatus = relationship.Status.ToString() + }; + } +} + +public static class RelationshipReactivationRequestedDomainEventExtensions +{ + extension(RelationshipReactivationRequestedDomainEvent) + { + public static RelationshipReactivationRequestedDomainEvent Create(Relationship relationship, IdentityAddress requestingIdentity, IdentityAddress peer) => new() + { + DomainEventId = $"{relationship.Id}/ReactivationRequested/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt}", + RelationshipId = relationship.Id, + RequestingIdentity = requestingIdentity.Value, + Peer = peer.Value + }; + } +} + +public static class RelationshipStatusChangedDomainEventExtensions +{ + extension(RelationshipStatusChangedDomainEvent) + { + public static RelationshipStatusChangedDomainEvent Create(Relationship relationship) => new() + { + DomainEventId = $"{relationship.Id}/StatusChanged/{relationship.AuditLog.OrderBy(a => a.CreatedAt).Last().CreatedAt.ToUniversalString()}", + RelationshipId = relationship.Id, + NewStatus = relationship.Status.ToString(), + Initiator = relationship.LastModifiedBy, + Peer = relationship.GetPeerOf(relationship.LastModifiedBy), + WasDueToIdentityDeletion = false + }; + + public static RelationshipStatusChangedDomainEvent Create( + string relationshipId, + string newStatus, + string initiator, + string peer, + bool wasDueToIdentityDeletion) => new() + { + RelationshipId = relationshipId, + NewStatus = newStatus, + Initiator = initiator, + Peer = peer, + WasDueToIdentityDeletion = wasDueToIdentityDeletion + }; + } +} + +public static class RelationshipTemplateAllocationsExhaustedDomainEventExtensions +{ + extension(RelationshipTemplateAllocationsExhaustedDomainEvent) + { + public static RelationshipTemplateAllocationsExhaustedDomainEvent Create(RelationshipTemplate template) => new() + { + DomainEventId = $"{template.Id}/maxNumberOfAllocationsExhausted", + RelationshipTemplateId = template.Id, + CreatedBy = template.CreatedBy + }; + } +} + +public static class RelationshipTemplateCreatedDomainEventExtensions +{ + extension(RelationshipTemplateCreatedDomainEvent) + { + public static RelationshipTemplateCreatedDomainEvent Create(RelationshipTemplate template) => new() + { + DomainEventId = $"{template.Id}/Created", + TemplateId = template.Id, + CreatedBy = template.CreatedBy + }; + } +} + +internal static class DomainEventIdFactory +{ + public static string Randomize(string domainEventId) => domainEventId + "/" + Guid.NewGuid().ToString("N")[..3]; +} diff --git a/Modules/Relationships/src/Relationships.Domain/Relationships.Domain.csproj b/Modules/Relationships/src/Relationships.Domain/Relationships.Domain.csproj index fc12cf801d..493a6796a8 100644 --- a/Modules/Relationships/src/Relationships.Domain/Relationships.Domain.csproj +++ b/Modules/Relationships/src/Relationships.Domain/Relationships.Domain.csproj @@ -3,6 +3,7 @@ + diff --git a/Modules/Relationships/src/Relationships.Domain/packages.lock.json b/Modules/Relationships/src/Relationships.Domain/packages.lock.json index 151a5a315b..6c3283128f 100644 --- a/Modules/Relationships/src/Relationships.Domain/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Domain/packages.lock.json @@ -20,6 +20,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/packages.lock.json index 3134830d5f..cdd570e8f7 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/packages.lock.json @@ -730,13 +730,21 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -747,10 +755,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/packages.lock.json index 3134830d5f..cdd570e8f7 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/packages.lock.json @@ -730,13 +730,21 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -747,10 +755,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/src/Relationships.Infrastructure/packages.lock.json b/Modules/Relationships/src/Relationships.Infrastructure/packages.lock.json index b9fe30d3cf..98659a45ae 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Infrastructure/packages.lock.json @@ -766,13 +766,21 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -783,10 +791,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/src/Relationships.Module/packages.lock.json b/Modules/Relationships/src/Relationships.Module/packages.lock.json index fb6e87174e..0c67f329aa 100644 --- a/Modules/Relationships/src/Relationships.Module/packages.lock.json +++ b/Modules/Relationships/src/Relationships.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1262,7 +1279,9 @@ "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -1273,10 +1292,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1304,6 +1330,18 @@ "Backbone.Modules.Relationships.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs index 944262b8e3..44a21aaab1 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs @@ -4,8 +4,8 @@ using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityDeleted; diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs index 987a2caa8f..4ec03605a5 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs @@ -4,8 +4,8 @@ using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityDeletionCancelled; diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs index 7680ee6564..a3cd7d3665 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs @@ -4,8 +4,8 @@ using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Relationships.Domain.DomainEvents.Incoming; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityToBeDeleted; diff --git a/Modules/Relationships/test/Relationships.Application.Tests/packages.lock.json b/Modules/Relationships/test/Relationships.Application.Tests/packages.lock.json index 149a9bd3f1..8bb741a7f8 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/packages.lock.json +++ b/Modules/Relationships/test/Relationships.Application.Tests/packages.lock.json @@ -936,13 +936,21 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -953,10 +961,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CollectTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CollectTests.cs index fe2bb66182..a23c751d66 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CollectTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CollectTests.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Relationships.Domain.Tests.TestHelpers; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CreateTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CreateTests.cs index 8349f29cbd..86270741aa 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CreateTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/RelationshipTemplates/RelationshipTemplate.CreateTests.cs @@ -1,5 +1,5 @@ using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.UnitTestTools.Shouldly.Extensions; namespace Backbone.Modules.Relationships.Domain.Tests.Aggregates.RelationshipTemplates; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptReactivationTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptReactivationTests.cs index 77de9f3412..59ed81cc1f 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptReactivationTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptReactivationTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptTests.cs index a857524cfc..7c95043c3a 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.AcceptTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.CreateTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.CreateTests.cs index e00eb18dc9..bc5d5f034c 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.CreateTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.CreateTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.DecomposeTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.DecomposeTests.cs index 9bace20bb3..4fe3b12bf4 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.DecomposeTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.DecomposeTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectReactivationTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectReactivationTests.cs index 7c0beba7b4..5538c61781 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectReactivationTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectReactivationTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectTests.cs index 617accbb4f..24c2b9527a 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RejectTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RequestReactivationTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RequestReactivationTests.cs index cb707dfcfe..a082aa27af 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RequestReactivationTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RequestReactivationTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeReactivationsTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeReactivationsTests.cs index 4de80b9624..02437f531e 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeReactivationsTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeReactivationsTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeTests.cs index 0cf82791c8..0ae1566b42 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.RevokeTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.TerminateTests.cs b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.TerminateTests.cs index acbad5a45c..ce575accb3 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.TerminateTests.cs +++ b/Modules/Relationships/test/Relationships.Domain.Tests/Aggregates/Relationships/Relationship.TerminateTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Relationships.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; using static Backbone.Modules.Relationships.Domain.Tests.TestHelpers.TestData; diff --git a/Modules/Relationships/test/Relationships.Domain.Tests/packages.lock.json b/Modules/Relationships/test/Relationships.Domain.Tests/packages.lock.json index da0a6054a5..6bb40495b6 100644 --- a/Modules/Relationships/test/Relationships.Domain.Tests/packages.lock.json +++ b/Modules/Relationships/test/Relationships.Domain.Tests/packages.lock.json @@ -788,10 +788,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Relationships/test/Relationships.Infrastructure.Tests/packages.lock.json b/Modules/Relationships/test/Relationships.Infrastructure.Tests/packages.lock.json index 0089b5d05b..91a0f4dbf4 100644 --- a/Modules/Relationships/test/Relationships.Infrastructure.Tests/packages.lock.json +++ b/Modules/Relationships/test/Relationships.Infrastructure.Tests/packages.lock.json @@ -927,13 +927,21 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.BuildingBlocks.Domain": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Common": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Relationships.Domain": "[1.0.0, )", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } @@ -944,10 +952,17 @@ "FluentValidation": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Relationships.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs index c8842a0443..77646e7c0f 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipClaimed; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs index 9cfd6c0a19..0c97243555 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipIsLocked; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs index 217ffdcc9d..9aae27f5b7 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStarted; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs index b866f0fede..30c1fdc002 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs index d42d9e90fb..067659812a 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/MessageCreated/MessageCreatedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.MessageCreated; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs index bea5a4f811..807f8ea225 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Backbone.Tooling; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs index 410842fba0..b3ea23b097 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeletionCancelled; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs index 60d25ca2e6..94ed78db2c 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerFeatureFlagsChangedEvent; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs index 2073a257c9..7614a31c02 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerToBeDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs index 22f7d3aaa2..dd96bd72e6 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationCompleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs index c420b390c6..b772cc1029 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationRequested; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs index 0232fb916d..919c11bc07 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipStatusChanged; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs index 36b4104aa1..280bf96140 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipTemplateAllocationsExhausted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs index 7282855912..29ac0aa250 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.TokenLocked; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; namespace Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; diff --git a/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs b/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs index f3eed55276..6c2d8a22ab 100644 --- a/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs @@ -1,4 +1,5 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.FileOwnershipClaimed; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.FileOwnershipLocked; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; @@ -13,20 +14,10 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipStatusChanged; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipTemplateAllocationsExhausted; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipClaimed; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipIsLocked; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStarted; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.MessageCreated; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeleted; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeletionCancelled; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerFeatureFlagsChangedEvent; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerToBeDeleted; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationCompleted; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationRequested; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipStatusChanged; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipTemplateAllocationsExhausted; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.TokenLocked; +using Backbone.Modules.Files.Contracts.DomainEvents; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Tokens.Contracts.DomainEvents; namespace Backbone.Modules.Synchronization.Application.Extensions; diff --git a/Modules/Synchronization/src/Synchronization.Application/Synchronization.Application.csproj b/Modules/Synchronization/src/Synchronization.Application/Synchronization.Application.csproj index 70e852921b..273b138386 100644 --- a/Modules/Synchronization/src/Synchronization.Application/Synchronization.Application.csproj +++ b/Modules/Synchronization/src/Synchronization.Application/Synchronization.Application.csproj @@ -12,6 +12,11 @@ + + + + + diff --git a/Modules/Synchronization/src/Synchronization.Application/packages.lock.json b/Modules/Synchronization/src/Synchronization.Application/packages.lock.json index ff688b4931..6b7437957d 100644 --- a/Modules/Synchronization/src/Synchronization.Application/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Application/packages.lock.json @@ -746,13 +746,50 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..3a1e3351cd --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,16 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Synchronization.Contracts.DomainEvents; + +public class DatawalletModifiedDomainEvent : DomainEvent +{ + public required string Identity { get; set; } + public required string ModifiedByDevice { get; set; } +} + +public class ExternalEventCreatedDomainEvent : DomainEvent +{ + public required string EventId { get; set; } + public required string Owner { get; set; } + public required bool IsDeliveryBlocked { get; set; } +} diff --git a/Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj b/Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json b/Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEvent.cs deleted file mode 100644 index d52b4d5134..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipClaimed; - -public class FileOwnershipClaimedDomainEvent : DomainEvent -{ - public required string FileId { get; set; } - public required string OldOwnerAddress { get; set; } - public required string NewOwnerAddress { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipIsLocked/FileOwnershipLockedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipIsLocked/FileOwnershipLockedDomainEvent.cs deleted file mode 100644 index 6a254e5ffe..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/FileOwnershipIsLocked/FileOwnershipLockedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.FileOwnershipIsLocked; - -public class FileOwnershipLockedDomainEvent : DomainEvent -{ - public required string FileId { get; set; } - public required string OwnerAddress { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEvent.cs deleted file mode 100644 index 82ea88ab40..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStarted; - -public class IdentityDeletionProcessStartedDomainEvent : DomainEvent -{ - public required string Address { get; set; } - public required string DeletionProcessId { get; set; } - public string? Initiator { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEvent.cs deleted file mode 100644 index 1e4d6cbea5..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; - -public class IdentityDeletionProcessStatusChangedDomainEvent : DomainEvent -{ - public required string DeletionProcessOwner { get; set; } - public required string DeletionProcessId { get; set; } - public string? Initiator { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEvent.cs deleted file mode 100644 index 44bfa0313f..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeleted; - -public class PeerDeletedDomainEvent : DomainEvent -{ - public required string PeerOfDeletedIdentity { get; set; } - public required string RelationshipId { get; set; } - public required string DeletedIdentity { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEvent.cs deleted file mode 100644 index 36034a5908..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeletionCancelled; - -public class PeerDeletionCancelledDomainEvent : DomainEvent -{ - public required string PeerOfIdentityWithDeletionCancelled { get; set; } - public required string RelationshipId { get; set; } - public required string IdentityWithDeletionCancelled { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerFeatureFlagsChangedEvent/PeerFeatureFlagsChangedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerFeatureFlagsChangedEvent/PeerFeatureFlagsChangedDomainEvent.cs deleted file mode 100644 index edc70f124d..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerFeatureFlagsChangedEvent/PeerFeatureFlagsChangedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerFeatureFlagsChangedEvent; - -public class PeerFeatureFlagsChangedDomainEvent : DomainEvent -{ - public required string PeerAddress { get; set; } - public required string NotifiedIdentityAddress { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEvent.cs deleted file mode 100644 index cda32c76e5..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEvent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerToBeDeleted; - -public class PeerToBeDeletedDomainEvent : DomainEvent -{ - public required string PeerOfIdentityToBeDeleted { get; set; } - public required string RelationshipId { get; set; } - public required string IdentityToBeDeleted { get; set; } - public required DateTime GracePeriodEndsAt { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEvent.cs deleted file mode 100644 index 808a814f89..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationCompleted; - -public class RelationshipReactivationCompletedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string NewRelationshipStatus { get; set; } - public required string Peer { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEvent.cs deleted file mode 100644 index cb242a220f..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationRequested; - -public class RelationshipReactivationRequestedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string Peer { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs deleted file mode 100644 index 7a30ba0ef0..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEvent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipStatusChanged; - -public class RelationshipStatusChangedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string Initiator { get; set; } - public required string Peer { get; set; } - public required string NewStatus { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEvent.cs deleted file mode 100644 index 77380b7ff2..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipTemplateAllocationsExhausted; - -public class RelationshipTemplateAllocationsExhaustedDomainEvent : DomainEvent -{ - public required string RelationshipTemplateId { get; set; } - public required string CreatedBy { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs deleted file mode 100644 index 1f2946bb97..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEvent.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.TokenLocked; - -public class TokenLockedDomainEvent : DomainEvent -{ - public required string TokenId { get; set; } - public required string? CreatedBy { get; set; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs deleted file mode 100644 index 33cc317f94..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.DevelopmentKit.Identity.ValueObjects; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; - -public class DatawalletModifiedDomainEvent : DomainEvent -{ - public DatawalletModifiedDomainEvent(IdentityAddress identity, DeviceId modifiedByDevice) : base($"{identity}/Datawallet/Modified/{Guid.NewGuid()}") - { - Identity = identity; - ModifiedByDevice = modifiedByDevice; - } - - public string Identity { get; } - public string ModifiedByDevice { get; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/ExternalEventCreatedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/ExternalEventCreatedDomainEvent.cs deleted file mode 100644 index a690f2af21..0000000000 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/ExternalEventCreatedDomainEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Synchronization.Domain.Entities.Sync; - -namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; - -public class ExternalEventCreatedDomainEvent : DomainEvent -{ - public ExternalEventCreatedDomainEvent(ExternalEvent externalEvent) : base($"{externalEvent.Id}/Created") - { - EventId = externalEvent.Id; - Owner = externalEvent.Owner; - IsDeliveryBlocked = externalEvent.IsDeliveryBlocked; - } - - public string EventId { get; } - public string Owner { get; } - public bool IsDeliveryBlocked { get; } -} diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/SynchronizationDomainEventExtensions.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/SynchronizationDomainEventExtensions.cs new file mode 100644 index 0000000000..1ce5b6e44c --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/SynchronizationDomainEventExtensions.cs @@ -0,0 +1,32 @@ +using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Domain.Entities.Sync; + +namespace Backbone.Modules.Synchronization.Domain.DomainEvents; + +public static class DatawalletModifiedDomainEventExtensions +{ + extension(DatawalletModifiedDomainEvent) + { + public static DatawalletModifiedDomainEvent Create(IdentityAddress identity, DeviceId modifiedByDevice) => new() + { + DomainEventId = $"{identity}/Datawallet/Modified/{Guid.NewGuid()}", + Identity = identity, + ModifiedByDevice = modifiedByDevice + }; + } +} + +public static class ExternalEventCreatedDomainEventExtensions +{ + extension(ExternalEventCreatedDomainEvent) + { + public static ExternalEventCreatedDomainEvent Create(ExternalEvent externalEvent) => new() + { + DomainEventId = $"{externalEvent.Id}/Created", + EventId = externalEvent.Id, + Owner = externalEvent.Owner, + IsDeliveryBlocked = externalEvent.IsDeliveryBlocked + }; + } +} diff --git a/Modules/Synchronization/src/Synchronization.Domain/Entities/Datawallet.cs b/Modules/Synchronization/src/Synchronization.Domain/Entities/Datawallet.cs index d91623d9fa..06d1b6c4d6 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/Entities/Datawallet.cs +++ b/Modules/Synchronization/src/Synchronization.Domain/Entities/Datawallet.cs @@ -1,7 +1,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Domain.DomainEvents; namespace Backbone.Modules.Synchronization.Domain.Entities; @@ -52,7 +53,7 @@ public DatawalletModification AddModification(DatawalletModificationType type, D Modifications.Add(newModification); if (DomainEvents.All(d => d.GetType() != typeof(DatawalletModifiedDomainEvent))) - RaiseDomainEvent(new DatawalletModifiedDomainEvent(Owner, createdByDevice)); + RaiseDomainEvent(DatawalletModifiedDomainEvent.Create(Owner, createdByDevice)); return newModification; } diff --git a/Modules/Synchronization/src/Synchronization.Domain/Entities/Sync/ExternalEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/Entities/Sync/ExternalEvent.cs index ecbf27f174..5a2a51f180 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/Entities/Sync/ExternalEvent.cs +++ b/Modules/Synchronization/src/Synchronization.Domain/Entities/Sync/ExternalEvent.cs @@ -1,6 +1,7 @@ using Backbone.BuildingBlocks.Domain; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Domain.DomainEvents; using Backbone.Tooling; namespace Backbone.Modules.Synchronization.Domain.Entities.Sync; @@ -28,7 +29,7 @@ protected ExternalEvent(ExternalEventType type, IdentityAddress owner, object pa Context = context; Errors = []; - RaiseDomainEvent(new ExternalEventCreatedDomainEvent(this)); + RaiseDomainEvent(ExternalEventCreatedDomainEvent.Create(this)); } public ExternalEventId Id { get; } diff --git a/Modules/Synchronization/src/Synchronization.Domain/Synchronization.Domain.csproj b/Modules/Synchronization/src/Synchronization.Domain/Synchronization.Domain.csproj index fc12cf801d..cc4802edd4 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/Synchronization.Domain.csproj +++ b/Modules/Synchronization/src/Synchronization.Domain/Synchronization.Domain.csproj @@ -3,6 +3,7 @@ + diff --git a/Modules/Synchronization/src/Synchronization.Domain/packages.lock.json b/Modules/Synchronization/src/Synchronization.Domain/packages.lock.json index 151a5a315b..60e7915751 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Domain/packages.lock.json @@ -20,6 +20,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/packages.lock.json index d4ad12eec8..68bda7daf3 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/packages.lock.json @@ -735,20 +735,56 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -765,6 +801,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/packages.lock.json index d4ad12eec8..68bda7daf3 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/packages.lock.json @@ -735,20 +735,56 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -765,6 +801,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure/packages.lock.json b/Modules/Synchronization/src/Synchronization.Infrastructure/packages.lock.json index d0be093853..75924ed487 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Infrastructure/packages.lock.json @@ -780,23 +780,65 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/src/Synchronization.Module/packages.lock.json b/Modules/Synchronization/src/Synchronization.Module/packages.lock.json index e5fd9c9067..75a6ec2a6a 100644 --- a/Modules/Synchronization/src/Synchronization.Module/packages.lock.json +++ b/Modules/Synchronization/src/Synchronization.Module/packages.lock.json @@ -1215,13 +1215,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1229,11 +1239,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1261,20 +1278,50 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -1303,6 +1350,12 @@ "Backbone.Modules.Synchronization.Infrastructure": "[1.0.0, )" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Synchronization.Application.Tests.csproj b/Modules/Synchronization/test/Synchronization.Application.Tests/Synchronization.Application.Tests.csproj index c1feb052e1..de24516b90 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Synchronization.Application.Tests.csproj +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Synchronization.Application.Tests.csproj @@ -15,6 +15,7 @@ + diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs index 80b91172f4..e34446ba76 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStarted; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs index ce62f4afc1..e29fb375d9 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs index 8894af5951..3dbe9628c8 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.MessageCreated; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.MessageCreated; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Backbone.Tooling; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs index d1e90f1a87..3c301b0ed3 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs index 42d9a55499..534921c966 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeletionCancelled; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerDeletionCancelled; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs index 9ad7da906b..f2453925f9 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerToBeDeleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.PeerToBeDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs index 1dd07ac0e5..0184735e6c 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipReactivationCompleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipReactivationCompleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs index af0f7ded2d..a5ebc03416 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipStatusChanged; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.RelationshipStatusChanged; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; @@ -17,6 +17,7 @@ public async Task Creates_an_external_event() var relationshipTo = CreateRandomIdentityAddress(); var @event = new RelationshipStatusChangedDomainEvent { + WasDueToIdentityDeletion = false, RelationshipId = "REL1", Peer = relationshipTo, NewStatus = "Pending", @@ -41,6 +42,7 @@ public async Task Does_not_create_an_external_event_if_new_status_is_ReadyForDel var relationshipTo = CreateRandomIdentityAddress(); var @event = new RelationshipStatusChangedDomainEvent { + WasDueToIdentityDeletion = false, RelationshipId = "REL1", Peer = relationshipTo, NewStatus = "ReadyForDeletion", @@ -69,6 +71,7 @@ public async Task Calls_DeleteUnsyncedExternalEventsWithOwnerAndContext_when_new var initiator = CreateRandomIdentityAddress(); var @event = new RelationshipStatusChangedDomainEvent { + WasDueToIdentityDeletion = false, RelationshipId = relationshipId, Peer = relationshipTo, NewStatus = newStatus, @@ -96,6 +99,7 @@ public async Task Unblocks_MessageReceivedExternalEvents() var relationshipStatusChangedDomainEvent = new RelationshipStatusChangedDomainEvent { + WasDueToIdentityDeletion = false, RelationshipId = relationshipId, Peer = relationshipTo, NewStatus = "Active", @@ -132,6 +136,7 @@ public async Task Calls_DeleteBlockedExternalEventsWithTypeAndContext_when_new_s var initiator = CreateRandomIdentityAddress(); var @event = new RelationshipStatusChangedDomainEvent { + WasDueToIdentityDeletion = false, RelationshipId = relationshipId, Peer = relationshipTo, NewStatus = newStatus, diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs index 1b20410836..cd97e4b6bb 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Incoming.TokenLocked; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/packages.lock.json b/Modules/Synchronization/test/Synchronization.Application.Tests/packages.lock.json index 78da668e39..328c7b0cb7 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/packages.lock.json +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/packages.lock.json @@ -936,20 +936,56 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Files.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Messages.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, + "Backbone.Modules.Relationships.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", + "Backbone.Modules.Files.Contracts": "[1.0.0, )", + "Backbone.Modules.Messages.Contracts": "[1.0.0, )", + "Backbone.Modules.Relationships.Contracts": "[1.0.0, )", "Backbone.Modules.Synchronization.Domain": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, @@ -966,6 +1002,12 @@ "Npgsql.EntityFrameworkCore.PostgreSQL": "[10.0.3, 10.0.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Synchronization/test/Synchronization.Domain.Tests/DatawalletTests.cs b/Modules/Synchronization/test/Synchronization.Domain.Tests/DatawalletTests.cs index 38e90d73af..add66be394 100644 --- a/Modules/Synchronization/test/Synchronization.Domain.Tests/DatawalletTests.cs +++ b/Modules/Synchronization/test/Synchronization.Domain.Tests/DatawalletTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Synchronization/test/Synchronization.Domain.Tests/ExternalEventTests.cs b/Modules/Synchronization/test/Synchronization.Domain.Tests/ExternalEventTests.cs index 36849c325f..034027716d 100644 --- a/Modules/Synchronization/test/Synchronization.Domain.Tests/ExternalEventTests.cs +++ b/Modules/Synchronization/test/Synchronization.Domain.Tests/ExternalEventTests.cs @@ -1,4 +1,4 @@ -using Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Synchronization/test/Synchronization.Domain.Tests/packages.lock.json b/Modules/Synchronization/test/Synchronization.Domain.Tests/packages.lock.json index bf11df37ee..2cf11f043d 100644 --- a/Modules/Synchronization/test/Synchronization.Domain.Tests/packages.lock.json +++ b/Modules/Synchronization/test/Synchronization.Domain.Tests/packages.lock.json @@ -788,10 +788,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Synchronization.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/src/Tokens.Application/packages.lock.json b/Modules/Tokens/src/Tokens.Application/packages.lock.json index c6db9c4390..1b4e66e2f2 100644 --- a/Modules/Tokens/src/Tokens.Application/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Application/packages.lock.json @@ -749,10 +749,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs new file mode 100644 index 0000000000..5f05941e63 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs @@ -0,0 +1,15 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Tokens.Contracts.DomainEvents; + +public class TokenCreatedDomainEvent : DomainEvent +{ + public required string TokenId { get; set; } + public string? CreatedBy { get; set; } +} + +public class TokenLockedDomainEvent : DomainEvent +{ + public required string TokenId { get; set; } + public string? CreatedBy { get; set; } +} diff --git a/Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj b/Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj new file mode 100644 index 0000000000..e862f6d180 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/Modules/Tokens/src/Tokens.Contracts/packages.lock.json b/Modules/Tokens/src/Tokens.Contracts/packages.lock.json new file mode 100644 index 0000000000..05674a5f97 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Contracts/packages.lock.json @@ -0,0 +1,54 @@ +{ + "version": 2, + "dependencies": { + "net10.0": { + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.10", + "contentHash": "5wu/GrYVd8mG2DVUw3vFJzF+O336TyTGg/Kmcgw9bfwYhCoFiV5lR5QeEmKecJyrW4W54nMfD3p3589E8a7czQ==" + }, + "Backbone.BuildingBlocks.Domain": { + "type": "Project", + "dependencies": { + "Backbone.Tooling": "[1.0.0, )" + } + }, + "Backbone.Tooling": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "[10.0.10, 10.0.10]", + "Microsoft.Extensions.Options": "[10.0.10, 10.0.10]" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "zkFxGYUvdxAvIKTyXHrmW+Sux53D4SezD9dMyZ6hrwwzPQJNuwCRy1f5W7AvYTqacEGhWF2XderRQG1OvbV8og==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10" + } + }, + "Microsoft.Extensions.Options": { + "type": "CentralTransitive", + "requested": "[10.0.10, 10.0.10]", + "resolved": "10.0.10", + "contentHash": "srnhnk7nE8krBiIXp71LvBmKBtraBONWSRzdjJgRv1Ko9Mp8IVNqv4vIS9hGeVteBig8aQkva9ZG+sC+o5sVcA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.10", + "Microsoft.Extensions.Primitives": "10.0.10" + } + } + }, + "net10.0/linux-arm64": {}, + "net10.0/linux-x64": {}, + "net10.0/osx-arm64": {}, + "net10.0/win-x64": {} + } +} \ No newline at end of file diff --git a/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenCreatedDomainEvent.cs b/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenCreatedDomainEvent.cs deleted file mode 100644 index 1c98348dd6..0000000000 --- a/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenCreatedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Tokens.Domain.Entities; - -namespace Backbone.Modules.Tokens.Domain.DomainEvents.Outgoing; - -public class TokenCreatedDomainEvent : DomainEvent -{ - public TokenCreatedDomainEvent(Token newToken) : base($"{newToken.Id}/Created") - { - TokenId = newToken.Id; - CreatedBy = newToken.CreatedBy?.Value; - } - - public string TokenId { get; set; } - public string? CreatedBy { get; set; } -} diff --git a/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenLockedDomainEvent.cs b/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenLockedDomainEvent.cs deleted file mode 100644 index f05f20fea9..0000000000 --- a/Modules/Tokens/src/Tokens.Domain/DomainEvents/Outgoing/TokenLockedDomainEvent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; -using Backbone.Modules.Tokens.Domain.Entities; - -namespace Backbone.Modules.Tokens.Domain.DomainEvents.Outgoing; - -public class TokenLockedDomainEvent : DomainEvent -{ - public TokenLockedDomainEvent(Token token) : base($"{token.Id}/Locked") - { - TokenId = token.Id; - CreatedBy = token.CreatedBy?.Value; - } - - public string TokenId { get; set; } - public string? CreatedBy { get; set; } -} diff --git a/Modules/Tokens/src/Tokens.Domain/DomainEvents/TokenDomainEventExtensions.cs b/Modules/Tokens/src/Tokens.Domain/DomainEvents/TokenDomainEventExtensions.cs new file mode 100644 index 0000000000..cc4eb7bd39 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Domain/DomainEvents/TokenDomainEventExtensions.cs @@ -0,0 +1,30 @@ +using Backbone.Modules.Tokens.Contracts.DomainEvents; +using Backbone.Modules.Tokens.Domain.Entities; + +namespace Backbone.Modules.Tokens.Domain.DomainEvents; + +public static class TokenCreatedDomainEventExtensions +{ + extension(TokenCreatedDomainEvent) + { + public static TokenCreatedDomainEvent Create(Token token) => new() + { + DomainEventId = $"{token.Id}/Created", + TokenId = token.Id, + CreatedBy = token.CreatedBy?.Value + }; + } +} + +public static class TokenLockedDomainEventExtensions +{ + extension(TokenLockedDomainEvent) + { + public static TokenLockedDomainEvent Create(Token token) => new() + { + DomainEventId = $"{token.Id}/Locked", + TokenId = token.Id, + CreatedBy = token.CreatedBy?.Value + }; + } +} diff --git a/Modules/Tokens/src/Tokens.Domain/Entities/Token.cs b/Modules/Tokens/src/Tokens.Domain/Entities/Token.cs index 95177a1484..e29c3dc1ba 100644 --- a/Modules/Tokens/src/Tokens.Domain/Entities/Token.cs +++ b/Modules/Tokens/src/Tokens.Domain/Entities/Token.cs @@ -2,7 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Tokens.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Tokens.Contracts.DomainEvents; +using Backbone.Modules.Tokens.Domain.DomainEvents; using Backbone.Tooling; using Backbone.Tooling.Extensions; @@ -46,7 +47,7 @@ public Token(IdentityAddress? createdBy, DeviceId? createdByDevice, byte[]? cont Version = null!; // This property is handled and initialized by the database - RaiseDomainEvent(new TokenCreatedDomainEvent(this)); + RaiseDomainEvent(TokenCreatedDomainEvent.Create(this)); } public TokenId Id { get; set; } @@ -75,7 +76,7 @@ private set // since the access failed count can become higher than the limit from which on the token is considered // locked, we have to perform this check to avoid a TokenLockedDomainEvent being raised multiple times if (IsLocked && !wasLockedBeforeChange) - RaiseDomainEvent(new TokenLockedDomainEvent(this)); + RaiseDomainEvent(TokenLockedDomainEvent.Create(this)); } } diff --git a/Modules/Tokens/src/Tokens.Domain/Tokens.Domain.csproj b/Modules/Tokens/src/Tokens.Domain/Tokens.Domain.csproj index 82013b071d..e48c19b632 100644 --- a/Modules/Tokens/src/Tokens.Domain/Tokens.Domain.csproj +++ b/Modules/Tokens/src/Tokens.Domain/Tokens.Domain.csproj @@ -2,7 +2,8 @@ - + + diff --git a/Modules/Tokens/src/Tokens.Domain/packages.lock.json b/Modules/Tokens/src/Tokens.Domain/packages.lock.json index 151a5a315b..bf18e4d831 100644 --- a/Modules/Tokens/src/Tokens.Domain/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Domain/packages.lock.json @@ -20,6 +20,12 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Tooling": { "type": "Project", "dependencies": { diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/packages.lock.json b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/packages.lock.json index 6d42c20334..633b68fc4e 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/packages.lock.json @@ -749,10 +749,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/packages.lock.json b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/packages.lock.json index 6d42c20334..633b68fc4e 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/packages.lock.json @@ -749,10 +749,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/src/Tokens.Infrastructure/packages.lock.json b/Modules/Tokens/src/Tokens.Infrastructure/packages.lock.json index 2e9322dc02..d6846c9443 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Infrastructure/packages.lock.json @@ -785,10 +785,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/src/Tokens.Module/packages.lock.json b/Modules/Tokens/src/Tokens.Module/packages.lock.json index 4d8cdc66f9..a7845048c2 100644 --- a/Modules/Tokens/src/Tokens.Module/packages.lock.json +++ b/Modules/Tokens/src/Tokens.Module/packages.lock.json @@ -1210,13 +1210,23 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Announcements.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Application": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Application": "[1.0.0, )", "Backbone.BuildingBlocks.Application.Abstractions": "[1.0.0, )", "Backbone.Crypto": "[1.0.0, )", + "Backbone.Modules.Announcements.Contracts": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Modules.Devices.Domain": "[1.0.0, )", + "Backbone.Modules.Synchronization.Contracts": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "FluentValidation": "[12.1.1, 12.1.1]", "FluentValidation.DependencyInjectionExtensions": "[12.1.1, 12.1.1]", "OpenIddict.Core": "[7.6.0, 7.6.0]", @@ -1224,11 +1234,18 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Devices.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Devices.Domain": { "type": "Project", "dependencies": { "Backbone.BuildingBlocks.Domain": "[1.0.0, )", "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Devices.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )", "CSharpFunctionalExtensions": "[3.7.0, 3.7.0]", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "[10.0.10, 10.0.10]" @@ -1256,6 +1273,12 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Synchronization.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Application": { "type": "Project", "dependencies": { @@ -1266,10 +1289,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/test/Tokens.Application.Tests/packages.lock.json b/Modules/Tokens/test/Tokens.Application.Tests/packages.lock.json index 17a6bba3c0..edbbfb0fe9 100644 --- a/Modules/Tokens/test/Tokens.Application.Tests/packages.lock.json +++ b/Modules/Tokens/test/Tokens.Application.Tests/packages.lock.json @@ -955,10 +955,17 @@ "Polly": "[8.7.0, 8.7.0]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, diff --git a/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TokenTests.cs b/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TokenTests.cs index cb340e3a5a..7bd1b66b3c 100644 --- a/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TokenTests.cs +++ b/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TokenTests.cs @@ -1,5 +1,5 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Tokens.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Tokens.Domain.Entities; using Backbone.Modules.Tokens.Domain.Tests.TestHelpers; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TryToAccessTests.cs b/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TryToAccessTests.cs index 27436b721f..103e79584a 100644 --- a/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TryToAccessTests.cs +++ b/Modules/Tokens/test/Tokens.Domain.Tests/Tests/Tokens/TryToAccessTests.cs @@ -1,5 +1,5 @@ using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Tokens.Domain.DomainEvents.Outgoing; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Tokens.Domain.Entities; using Backbone.Modules.Tokens.Domain.Tests.TestHelpers; using Backbone.Tooling; diff --git a/Modules/Tokens/test/Tokens.Domain.Tests/packages.lock.json b/Modules/Tokens/test/Tokens.Domain.Tests/packages.lock.json index 817c9e51b6..d80b0178fb 100644 --- a/Modules/Tokens/test/Tokens.Domain.Tests/packages.lock.json +++ b/Modules/Tokens/test/Tokens.Domain.Tests/packages.lock.json @@ -797,10 +797,17 @@ "SimpleBase": "[5.6.3, 5.6.3]" } }, + "Backbone.Modules.Tokens.Contracts": { + "type": "Project", + "dependencies": { + "Backbone.BuildingBlocks.Domain": "[1.0.0, )" + } + }, "Backbone.Modules.Tokens.Domain": { "type": "Project", "dependencies": { "Backbone.DevelopmentKit.Identity": "[1.0.0, )", + "Backbone.Modules.Tokens.Contracts": "[1.0.0, )", "Backbone.Tooling": "[1.0.0, )" } }, From 3b9b218d39a1816c01306b80e8ced92cce32f8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:29:21 +0200 Subject: [PATCH 2/6] test: introduce global hook for assembly initialization --- .../DomainEventSerialization.cs | 2 -- Backbone.Tests.ArchUnit/TestAssemblyInitializer.cs | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 Backbone.Tests.ArchUnit/TestAssemblyInitializer.cs diff --git a/Backbone.Tests.ArchUnit/DomainEventSerialization.cs b/Backbone.Tests.ArchUnit/DomainEventSerialization.cs index e0e590acbf..da8c634de0 100644 --- a/Backbone.Tests.ArchUnit/DomainEventSerialization.cs +++ b/Backbone.Tests.ArchUnit/DomainEventSerialization.cs @@ -8,8 +8,6 @@ public class DomainEventSerialization [Fact] public void ContractDomainEventsCanBeSerializedAndDeserialized() { - _ = Backbone.ARCHITECTURE; - var contractDomainEventTypes = AppDomain.CurrentDomain.GetAssemblies() .Where(a => a.GetName().Name is { } name && name.StartsWith("Backbone.Modules.") && name.EndsWith(".Contracts")) .SelectMany(a => a.GetTypes()) diff --git a/Backbone.Tests.ArchUnit/TestAssemblyInitializer.cs b/Backbone.Tests.ArchUnit/TestAssemblyInitializer.cs new file mode 100644 index 0000000000..546bbc34df --- /dev/null +++ b/Backbone.Tests.ArchUnit/TestAssemblyInitializer.cs @@ -0,0 +1,14 @@ +using System.Runtime.CompilerServices; + +namespace Backbone.Backbone.Tests.ArchUnit; + +internal static class TestAssemblyInitializer +{ + [ModuleInitializer] + internal static void Initialize() + { + // Project references only copy assemblies to the output directory; they do not guarantee that the assemblies are loaded. + // Build the architecture model before any test runs so AppDomain-based discovery sees every Backbone assembly regardless of test execution order. + _ = Backbone.ARCHITECTURE; + } +} From 1d382f4f0dd8ae20c1e51f6bcf0811ebd1d4a3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:30:52 +0200 Subject: [PATCH 3/6] test: remove redundant archunit test --- Backbone.Tests.ArchUnit/DomainEvents.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Backbone.Tests.ArchUnit/DomainEvents.cs b/Backbone.Tests.ArchUnit/DomainEvents.cs index c6796e693a..c9d1e812f9 100644 --- a/Backbone.Tests.ArchUnit/DomainEvents.cs +++ b/Backbone.Tests.ArchUnit/DomainEvents.cs @@ -19,13 +19,4 @@ public void ModuleDomainEventsShouldResideInContractAssemblies() .Because("each domain event has one canonical definition in its producer's contract assembly") .Check(Backbone.ARCHITECTURE); } - - [Fact] - public void ModuleDomainEventsShouldUseTheContractNamespace() - { - _moduleDomainEvents - .Should().ResideInNamespaceMatching("\\.Contracts\\.DomainEvents$") - .Because("domain events are shared contracts rather than module implementation details") - .Check(Backbone.ARCHITECTURE); - } } From 3b93ecac07845423c8285feca73346af475fdf8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:40:46 +0200 Subject: [PATCH 4/6] refactor: move each event into separate file --- .../BackupDeviceUsedDomainEvent.cs | 8 +++ .../DomainEvents/DomainEvents.cs | 67 ------------------- ...eatureFlagsOfIdentityChangedDomainEvent.cs | 8 +++ .../IdentityCreatedDomainEvent.cs | 9 +++ .../IdentityDeletedDomainEvent.cs | 8 +++ .../IdentityDeletionCancelledDomainEvent.cs | 8 +++ ...entityDeletionProcessStartedDomainEvent.cs | 10 +++ ...DeletionProcessStatusChangedDomainEvent.cs | 10 +++ .../IdentityToBeDeletedDomainEvent.cs | 9 +++ .../DomainEvents/TierCreatedDomainEvent.cs | 9 +++ .../DomainEvents/TierDeletedDomainEvent.cs | 8 +++ .../TierOfIdentityChangedDomainEvent.cs | 10 +++ ....cs => FileOwnershipClaimedDomainEvent.cs} | 12 ---- .../FileOwnershipLockedDomainEvent.cs | 9 +++ .../DomainEvents/FileUploadedDomainEvent.cs | 9 +++ ... TierQuotaDefinitionCreatedDomainEvent.cs} | 6 -- .../TierQuotaDefinitionDeletedDomainEvent.cs | 9 +++ .../DomainEvents/DomainEvents.cs | 66 ------------------ .../DomainEvents/PeerDeletedDomainEvent.cs | 10 +++ .../PeerDeletionCancelledDomainEvent.cs | 10 +++ .../PeerFeatureFlagsChangedDomainEvent.cs | 9 +++ .../PeerToBeDeletedDomainEvent.cs | 11 +++ ...ionshipReactivationCompletedDomainEvent.cs | 10 +++ ...ionshipReactivationRequestedDomainEvent.cs | 10 +++ .../RelationshipStatusChangedDomainEvent.cs | 12 ++++ ...TemplateAllocationsExhaustedDomainEvent.cs | 9 +++ .../RelationshipTemplateCreatedDomainEvent.cs | 9 +++ .../DatawalletModifiedDomainEvent.cs | 9 +++ ....cs => ExternalEventCreatedDomainEvent.cs} | 6 -- ...inEvents.cs => TokenCreatedDomainEvent.cs} | 6 -- .../DomainEvents/TokenLockedDomainEvent.cs | 9 +++ 31 files changed, 232 insertions(+), 163 deletions(-) create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/BackupDeviceUsedDomainEvent.cs delete mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/FeatureFlagsOfIdentityChangedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityCreatedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionCancelledDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStartedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStatusChangedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityToBeDeletedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/TierCreatedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/TierDeletedDomainEvent.cs create mode 100644 Modules/Devices/src/Devices.Contracts/DomainEvents/TierOfIdentityChangedDomainEvent.cs rename Modules/Files/src/Files.Contracts/DomainEvents/{DomainEvents.cs => FileOwnershipClaimedDomainEvent.cs} (51%) create mode 100644 Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipLockedDomainEvent.cs create mode 100644 Modules/Files/src/Files.Contracts/DomainEvents/FileUploadedDomainEvent.cs rename Modules/Quotas/src/Quotas.Contracts/DomainEvents/{DomainEvents.cs => TierQuotaDefinitionCreatedDomainEvent.cs} (61%) create mode 100644 Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionDeletedDomainEvent.cs delete mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletionCancelledDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerFeatureFlagsChangedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerToBeDeletedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationCompletedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationRequestedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipStatusChangedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateAllocationsExhaustedDomainEvent.cs create mode 100644 Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateCreatedDomainEvent.cs create mode 100644 Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DatawalletModifiedDomainEvent.cs rename Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/{DomainEvents.cs => ExternalEventCreatedDomainEvent.cs} (66%) rename Modules/Tokens/src/Tokens.Contracts/DomainEvents/{DomainEvents.cs => TokenCreatedDomainEvent.cs} (63%) create mode 100644 Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenLockedDomainEvent.cs diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/BackupDeviceUsedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/BackupDeviceUsedDomainEvent.cs new file mode 100644 index 0000000000..869084f56d --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/BackupDeviceUsedDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class BackupDeviceUsedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs deleted file mode 100644 index 2ef701c461..0000000000 --- a/Modules/Devices/src/Devices.Contracts/DomainEvents/DomainEvents.cs +++ /dev/null @@ -1,67 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Devices.Contracts.DomainEvents; - -public class BackupDeviceUsedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; set; } -} - -public class FeatureFlagsOfIdentityChangedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; set; } -} - -public class IdentityCreatedDomainEvent : DomainEvent -{ - public required string Address { get; set; } - public required string Tier { get; set; } -} - -public class IdentityDeletedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; set; } -} - -public class IdentityDeletionCancelledDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; set; } -} - -public class IdentityDeletionProcessStartedDomainEvent : DomainEvent -{ - public required string Address { get; set; } - public required string DeletionProcessId { get; set; } - public string? Initiator { get; set; } -} - -public class IdentityDeletionProcessStatusChangedDomainEvent : DomainEvent -{ - public required string DeletionProcessOwner { get; set; } - public required string DeletionProcessId { get; set; } - public string? Initiator { get; set; } -} - -public class IdentityToBeDeletedDomainEvent : DomainEvent -{ - public required string IdentityAddress { get; set; } - public required DateTime GracePeriodEndsAt { get; set; } -} - -public class TierCreatedDomainEvent : DomainEvent -{ - public required string Id { get; set; } - public required string Name { get; set; } -} - -public class TierDeletedDomainEvent : DomainEvent -{ - public required string Id { get; set; } -} - -public class TierOfIdentityChangedDomainEvent : DomainEvent -{ - public required string OldTierId { get; set; } - public required string NewTierId { get; set; } - public required string IdentityAddress { get; set; } -} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/FeatureFlagsOfIdentityChangedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/FeatureFlagsOfIdentityChangedDomainEvent.cs new file mode 100644 index 0000000000..e185bae5ee --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/FeatureFlagsOfIdentityChangedDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class FeatureFlagsOfIdentityChangedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityCreatedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityCreatedDomainEvent.cs new file mode 100644 index 0000000000..7095ac694b --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityCreatedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityCreatedDomainEvent : DomainEvent +{ + public required string Address { get; set; } + public required string Tier { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletedDomainEvent.cs new file mode 100644 index 0000000000..2187614233 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletedDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityDeletedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionCancelledDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionCancelledDomainEvent.cs new file mode 100644 index 0000000000..a0496c5f22 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionCancelledDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityDeletionCancelledDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStartedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStartedDomainEvent.cs new file mode 100644 index 0000000000..7ee9db2304 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStartedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityDeletionProcessStartedDomainEvent : DomainEvent +{ + public required string Address { get; set; } + public required string DeletionProcessId { get; set; } + public string? Initiator { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStatusChangedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStatusChangedDomainEvent.cs new file mode 100644 index 0000000000..8fa1cad30d --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityDeletionProcessStatusChangedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityDeletionProcessStatusChangedDomainEvent : DomainEvent +{ + public required string DeletionProcessOwner { get; set; } + public required string DeletionProcessId { get; set; } + public string? Initiator { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityToBeDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityToBeDeletedDomainEvent.cs new file mode 100644 index 0000000000..325dff1992 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/IdentityToBeDeletedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class IdentityToBeDeletedDomainEvent : DomainEvent +{ + public required string IdentityAddress { get; set; } + public required DateTime GracePeriodEndsAt { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/TierCreatedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierCreatedDomainEvent.cs new file mode 100644 index 0000000000..60350a352b --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierCreatedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class TierCreatedDomainEvent : DomainEvent +{ + public required string Id { get; set; } + public required string Name { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/TierDeletedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierDeletedDomainEvent.cs new file mode 100644 index 0000000000..0a0d34a0de --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierDeletedDomainEvent.cs @@ -0,0 +1,8 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class TierDeletedDomainEvent : DomainEvent +{ + public required string Id { get; set; } +} diff --git a/Modules/Devices/src/Devices.Contracts/DomainEvents/TierOfIdentityChangedDomainEvent.cs b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierOfIdentityChangedDomainEvent.cs new file mode 100644 index 0000000000..110f4370e3 --- /dev/null +++ b/Modules/Devices/src/Devices.Contracts/DomainEvents/TierOfIdentityChangedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Devices.Contracts.DomainEvents; + +public class TierOfIdentityChangedDomainEvent : DomainEvent +{ + public required string OldTierId { get; set; } + public required string NewTierId { get; set; } + public required string IdentityAddress { get; set; } +} diff --git a/Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs b/Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipClaimedDomainEvent.cs similarity index 51% rename from Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs rename to Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipClaimedDomainEvent.cs index 5a25fd57f8..fdb06b1bd1 100644 --- a/Modules/Files/src/Files.Contracts/DomainEvents/DomainEvents.cs +++ b/Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipClaimedDomainEvent.cs @@ -8,15 +8,3 @@ public class FileOwnershipClaimedDomainEvent : DomainEvent public required string OldOwnerAddress { get; set; } public required string NewOwnerAddress { get; set; } } - -public class FileOwnershipLockedDomainEvent : DomainEvent -{ - public required string FileId { get; set; } - public required string OwnerAddress { get; set; } -} - -public class FileUploadedDomainEvent : DomainEvent -{ - public required string FileId { get; set; } - public required string Owner { get; set; } -} diff --git a/Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipLockedDomainEvent.cs b/Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipLockedDomainEvent.cs new file mode 100644 index 0000000000..4d7474c584 --- /dev/null +++ b/Modules/Files/src/Files.Contracts/DomainEvents/FileOwnershipLockedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Files.Contracts.DomainEvents; + +public class FileOwnershipLockedDomainEvent : DomainEvent +{ + public required string FileId { get; set; } + public required string OwnerAddress { get; set; } +} diff --git a/Modules/Files/src/Files.Contracts/DomainEvents/FileUploadedDomainEvent.cs b/Modules/Files/src/Files.Contracts/DomainEvents/FileUploadedDomainEvent.cs new file mode 100644 index 0000000000..5cc4b195a9 --- /dev/null +++ b/Modules/Files/src/Files.Contracts/DomainEvents/FileUploadedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Files.Contracts.DomainEvents; + +public class FileUploadedDomainEvent : DomainEvent +{ + public required string FileId { get; set; } + public required string Owner { get; set; } +} diff --git a/Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionCreatedDomainEvent.cs similarity index 61% rename from Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs rename to Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionCreatedDomainEvent.cs index 0faa025faa..d42db2c7d8 100644 --- a/Modules/Quotas/src/Quotas.Contracts/DomainEvents/DomainEvents.cs +++ b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionCreatedDomainEvent.cs @@ -7,9 +7,3 @@ public class TierQuotaDefinitionCreatedDomainEvent : DomainEvent public required string TierId { get; set; } public required string TierQuotaDefinitionId { get; set; } } - -public class TierQuotaDefinitionDeletedDomainEvent : DomainEvent -{ - public required string TierId { get; set; } - public required string TierQuotaDefinitionId { get; set; } -} diff --git a/Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionDeletedDomainEvent.cs b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionDeletedDomainEvent.cs new file mode 100644 index 0000000000..3ae8fdfefc --- /dev/null +++ b/Modules/Quotas/src/Quotas.Contracts/DomainEvents/TierQuotaDefinitionDeletedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Quotas.Contracts.DomainEvents; + +public class TierQuotaDefinitionDeletedDomainEvent : DomainEvent +{ + public required string TierId { get; set; } + public required string TierQuotaDefinitionId { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs deleted file mode 100644 index a7503e3a65..0000000000 --- a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/DomainEvents.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Backbone.BuildingBlocks.Domain.Events; - -namespace Backbone.Modules.Relationships.Contracts.DomainEvents; - -public class PeerDeletedDomainEvent : DomainEvent -{ - public required string PeerOfDeletedIdentity { get; set; } - public required string RelationshipId { get; set; } - public required string DeletedIdentity { get; set; } -} - -public class PeerDeletionCancelledDomainEvent : DomainEvent -{ - public required string PeerOfIdentityWithDeletionCancelled { get; set; } - public required string RelationshipId { get; set; } - public required string IdentityWithDeletionCancelled { get; set; } -} - -public class PeerFeatureFlagsChangedDomainEvent : DomainEvent -{ - public required string PeerAddress { get; set; } - public required string NotifiedIdentityAddress { get; set; } -} - -public class PeerToBeDeletedDomainEvent : DomainEvent -{ - public required string PeerOfIdentityToBeDeleted { get; set; } - public required string RelationshipId { get; set; } - public required string IdentityToBeDeleted { get; set; } - public required DateTime GracePeriodEndsAt { get; set; } -} - -public class RelationshipReactivationCompletedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string NewRelationshipStatus { get; set; } - public required string Peer { get; set; } -} - -public class RelationshipReactivationRequestedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string RequestingIdentity { get; set; } - public required string Peer { get; set; } -} - -public class RelationshipStatusChangedDomainEvent : DomainEvent -{ - public required string RelationshipId { get; set; } - public required string NewStatus { get; set; } - public required string Initiator { get; set; } - public required string Peer { get; set; } - public required bool WasDueToIdentityDeletion { get; set; } -} - -public class RelationshipTemplateAllocationsExhaustedDomainEvent : DomainEvent -{ - public required string RelationshipTemplateId { get; set; } - public required string CreatedBy { get; set; } -} - -public class RelationshipTemplateCreatedDomainEvent : DomainEvent -{ - public required string TemplateId { get; set; } - public required string CreatedBy { get; set; } -} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletedDomainEvent.cs new file mode 100644 index 0000000000..2a14665277 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class PeerDeletedDomainEvent : DomainEvent +{ + public required string PeerOfDeletedIdentity { get; set; } + public required string RelationshipId { get; set; } + public required string DeletedIdentity { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletionCancelledDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletionCancelledDomainEvent.cs new file mode 100644 index 0000000000..49d738a343 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerDeletionCancelledDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class PeerDeletionCancelledDomainEvent : DomainEvent +{ + public required string PeerOfIdentityWithDeletionCancelled { get; set; } + public required string RelationshipId { get; set; } + public required string IdentityWithDeletionCancelled { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerFeatureFlagsChangedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerFeatureFlagsChangedDomainEvent.cs new file mode 100644 index 0000000000..83357df9d9 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerFeatureFlagsChangedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class PeerFeatureFlagsChangedDomainEvent : DomainEvent +{ + public required string PeerAddress { get; set; } + public required string NotifiedIdentityAddress { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerToBeDeletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerToBeDeletedDomainEvent.cs new file mode 100644 index 0000000000..27ee64e779 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/PeerToBeDeletedDomainEvent.cs @@ -0,0 +1,11 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class PeerToBeDeletedDomainEvent : DomainEvent +{ + public required string PeerOfIdentityToBeDeleted { get; set; } + public required string RelationshipId { get; set; } + public required string IdentityToBeDeleted { get; set; } + public required DateTime GracePeriodEndsAt { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationCompletedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationCompletedDomainEvent.cs new file mode 100644 index 0000000000..b79e163d84 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationCompletedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class RelationshipReactivationCompletedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string NewRelationshipStatus { get; set; } + public required string Peer { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationRequestedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationRequestedDomainEvent.cs new file mode 100644 index 0000000000..2a4fe6e067 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipReactivationRequestedDomainEvent.cs @@ -0,0 +1,10 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class RelationshipReactivationRequestedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string RequestingIdentity { get; set; } + public required string Peer { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipStatusChangedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipStatusChangedDomainEvent.cs new file mode 100644 index 0000000000..f09e672fe3 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipStatusChangedDomainEvent.cs @@ -0,0 +1,12 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class RelationshipStatusChangedDomainEvent : DomainEvent +{ + public required string RelationshipId { get; set; } + public required string NewStatus { get; set; } + public required string Initiator { get; set; } + public required string Peer { get; set; } + public required bool WasDueToIdentityDeletion { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateAllocationsExhaustedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateAllocationsExhaustedDomainEvent.cs new file mode 100644 index 0000000000..befab445ed --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateAllocationsExhaustedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class RelationshipTemplateAllocationsExhaustedDomainEvent : DomainEvent +{ + public required string RelationshipTemplateId { get; set; } + public required string CreatedBy { get; set; } +} diff --git a/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateCreatedDomainEvent.cs b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateCreatedDomainEvent.cs new file mode 100644 index 0000000000..681a134800 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Contracts/DomainEvents/RelationshipTemplateCreatedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Relationships.Contracts.DomainEvents; + +public class RelationshipTemplateCreatedDomainEvent : DomainEvent +{ + public required string TemplateId { get; set; } + public required string CreatedBy { get; set; } +} diff --git a/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DatawalletModifiedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DatawalletModifiedDomainEvent.cs new file mode 100644 index 0000000000..a2f93b7f3f --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DatawalletModifiedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Synchronization.Contracts.DomainEvents; + +public class DatawalletModifiedDomainEvent : DomainEvent +{ + public required string Identity { get; set; } + public required string ModifiedByDevice { get; set; } +} diff --git a/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/ExternalEventCreatedDomainEvent.cs similarity index 66% rename from Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs rename to Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/ExternalEventCreatedDomainEvent.cs index 3a1e3351cd..11265d166f 100644 --- a/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/DomainEvents.cs +++ b/Modules/Synchronization/src/Synchronization.Contracts/DomainEvents/ExternalEventCreatedDomainEvent.cs @@ -2,12 +2,6 @@ namespace Backbone.Modules.Synchronization.Contracts.DomainEvents; -public class DatawalletModifiedDomainEvent : DomainEvent -{ - public required string Identity { get; set; } - public required string ModifiedByDevice { get; set; } -} - public class ExternalEventCreatedDomainEvent : DomainEvent { public required string EventId { get; set; } diff --git a/Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenCreatedDomainEvent.cs similarity index 63% rename from Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs rename to Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenCreatedDomainEvent.cs index 5f05941e63..629d413f9c 100644 --- a/Modules/Tokens/src/Tokens.Contracts/DomainEvents/DomainEvents.cs +++ b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenCreatedDomainEvent.cs @@ -7,9 +7,3 @@ public class TokenCreatedDomainEvent : DomainEvent public required string TokenId { get; set; } public string? CreatedBy { get; set; } } - -public class TokenLockedDomainEvent : DomainEvent -{ - public required string TokenId { get; set; } - public string? CreatedBy { get; set; } -} diff --git a/Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenLockedDomainEvent.cs b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenLockedDomainEvent.cs new file mode 100644 index 0000000000..791dd5e473 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Contracts/DomainEvents/TokenLockedDomainEvent.cs @@ -0,0 +1,9 @@ +using Backbone.BuildingBlocks.Domain.Events; + +namespace Backbone.Modules.Tokens.Contracts.DomainEvents; + +public class TokenLockedDomainEvent : DomainEvent +{ + public required string TokenId { get; set; } + public string? CreatedBy { get; set; } +} From 1ac63129a7f586d231e199308506ef757bd0a11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:41:37 +0200 Subject: [PATCH 5/6] chore: fix formatting --- .../AnnouncementCreatedDomainEventHandler.cs | 2 +- .../ExternalEventCreatedDomainEventHandler.cs | 2 +- .../TokenLockedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 4 +- .../Tiers/Commands/DeleteTier/Handler.cs | 2 +- .../Entities/Identities/Identity.cs | 2 +- ...ouncementCreatedDomainEventHandlerTests.cs | 2 +- .../Tiers/Commands/DeleteTier/HandlerTests.cs | 2 +- .../Identities/CancelDeletionProcessTests.cs | 2 +- .../Identities/ChangeTierTests.cs | 2 +- .../Identities/StartDeletionProcessTests.cs | 2 +- .../MessageOrphanedDomainEventHandler.cs | 2 +- ...tionshipStatusChangedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 2 +- .../FileUploadedDomainEventHandler.cs | 2 +- .../IdentityCreatedDomainEventHandler.cs | 2 +- .../TierCreatedDomainEventHandler.cs | 2 +- .../TierDeletedDomainEventHandler.cs | 2 +- ...TierOfIdentityChangedDomainEventHandler.cs | 2 +- ...uotaDefinitionCreatedDomainEventHandler.cs | 2 +- ...uotaDefinitionDeletedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 6 +-- .../Quotas.Domain/Aggregates/Tiers/Tier.cs | 2 +- .../TierDeletedDomainEventHandlerTests.cs | 2 +- .../IdentityCreatedDomainEventHandlerTests.cs | 2 +- ...efinitionCreatedDomainEventHandlerTests.cs | 2 +- .../TierCreatedDomainEventHandlerTests.cs | 2 +- .../Tests/Tiers/TierTests.cs | 2 +- ...lagsOfIdentityChangedDomainEventHandler.cs | 4 +- .../IdentityDeletedDomainEventHandler.cs | 4 +- ...tityDeletionCancelledDomainEventHandler.cs | 4 +- .../IdentityToBeDeletedDomainEventHandler.cs | 4 +- .../Extensions/IEventBusExtensions.cs | 2 +- .../RelationshipTemplate.cs | 2 +- .../Aggregates/Relationships/Relationship.cs | 2 +- .../RelationshipDomainEventExtensions.cs | 40 +++++++++---------- ...IdentityDeletedDomainEventHandler.Tests.cs | 4 +- ...letionCancelledDomainEventHandler.Tests.cs | 4 +- ...tityToBeDeletedDomainEventHandler.Tests.cs | 4 +- .../FileOwnershipClaimedDomainEventHandler.cs | 2 +- .../FileOwnershipLockedDomainEventHandler.cs | 2 +- ...eletionProcessStartedDomainEventHandler.cs | 2 +- ...nProcessStatusChangedDomainEventHandler.cs | 2 +- .../PeerDeletedDomainEventHandler.cs | 2 +- ...PeerDeletionCancelledDomainEventHandler.cs | 2 +- ...erFeatureFlagsChangedDomainEventHandler.cs | 2 +- .../PeerToBeDeletedDomainEventHandler.cs | 2 +- ...ReactivationCompletedDomainEventHandler.cs | 2 +- ...ReactivationRequestedDomainEventHandler.cs | 2 +- ...tionshipStatusChangedDomainEventHandler.cs | 2 +- ...eAllocationsExhaustedDomainEventHandler.cs | 2 +- .../TokenLockedDomainEventHandler.cs | 2 +- .../Extensions/IEventBusExtensions.cs | 6 +-- ...onProcessStartedDomainEventHandlerTests.cs | 2 +- ...essStatusChangedDomainEventHandlerTests.cs | 4 +- .../MessageCreatedDomainEventHandlerTests.cs | 4 +- .../PeerDeletedDomainEventHandlerTests.cs | 4 +- ...eletionCancelledDomainEventHandlerTests.cs | 4 +- .../PeerToBeDeletedDomainEventHandlerTests.cs | 4 +- ...ivationCompletedDomainEventHandlerTests.cs | 4 +- ...hipStatusChangedDomainEventHandlerTests.cs | 4 +- .../TokenLockedDomainEventHandlerTests.cs | 2 +- 62 files changed, 100 insertions(+), 100 deletions(-) diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs index a37c482523..8df9c0a00f 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/AnnouncementCreated/AnnouncementCreatedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Announcements; using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Announcements; using Backbone.Tooling.Extensions; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs index cabc2abdbc..4973eab64d 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/ExternalEventCreated/ExternalEventCreatedDomainEventHandler.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.ExternalEvents; -using Backbone.Modules.Synchronization.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; +using Backbone.Modules.Synchronization.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs index 4016797b19..a578b1a64d 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Tokens; -using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Devices.Domain.Entities.Identities; +using Backbone.Modules.Tokens.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.TokenLocked; diff --git a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs index a74a94146c..415d9e3fae 100644 --- a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs @@ -1,14 +1,14 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Announcements.Contracts.DomainEvents; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.BackupDeviceUsed; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.TokenLocked; -using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Contracts.DomainEvents; using Backbone.Modules.Tokens.Contracts.DomainEvents; -using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Devices.Application.Extensions; diff --git a/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs b/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs index ad8d599585..7e1fd86e4d 100644 --- a/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs +++ b/Modules/Devices/src/Devices.Application/Tiers/Commands/DeleteTier/Handler.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Domain.DomainEvents; using MediatR; diff --git a/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs b/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs index ab19e86aff..91a5dc092b 100644 --- a/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs +++ b/Modules/Devices/src/Devices.Domain/Entities/Identities/Identity.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Domain.Errors; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Domain.DomainEvents; using Backbone.Tooling; using Entity = Backbone.BuildingBlocks.Domain.Entity; diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs index 9cf6fddb5c..ee31cdac3d 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/DomainEvents/Incoming/AnnouncementCreatedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.PushNotifications; -using Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; using Backbone.Modules.Announcements.Contracts.DomainEvents; +using Backbone.Modules.Devices.Application.DomainEvents.Incoming.AnnouncementCreated; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.DomainEvents.Incoming; diff --git a/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs b/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs index 9ea337e38d..c3f548d576 100644 --- a/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs +++ b/Modules/Devices/test/Devices.Application.Tests/Tests/Tiers/Commands/DeleteTier/HandlerTests.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.Modules.Devices.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Devices.Application.Tiers.Commands.DeleteTier; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using FakeItEasy; namespace Backbone.Modules.Devices.Application.Tests.Tests.Tiers.Commands.DeleteTier; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs index e63f3ed939..c4a5f77d1f 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/CancelDeletionProcessTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Tooling; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs index 14352fab55..54aff91cf7 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/ChangeTierTests.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Domain.Exceptions; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.UnitTestTools.Shouldly.Extensions; namespace Backbone.Modules.Devices.Domain.Tests.Identities; diff --git a/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs b/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs index 3ea1b496b5..0bca79ef37 100644 --- a/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs +++ b/Modules/Devices/test/Devices.Domain.Tests/Identities/StartDeletionProcessTests.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Devices.Domain.Aggregates.Tier; using Backbone.Modules.Devices.Domain.Entities.Identities; using Backbone.Modules.Devices.Domain.Tests.Identities.TestDoubles; using Backbone.Tooling; diff --git a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs index 787c96d030..f22a439da1 100644 --- a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs +++ b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/MessageOrphaned/MessageOrphanedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Application.Infrastructure.Persistence.Repository; +using Backbone.Modules.Messages.Contracts.DomainEvents; using MessageId = Backbone.Modules.Messages.Domain.Ids.MessageId; namespace Backbone.Modules.Messages.Application.DomainEvents.Incoming.MessageOrphaned; diff --git a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs index c60ac55478..b215171413 100644 --- a/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs +++ b/Modules/Messages/src/Messages.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; using Backbone.Modules.Messages.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Messages.Domain.Entities; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs b/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs index a4165e6cc1..c46ec2315b 100644 --- a/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Messages/src/Messages.Application/Extensions/IEventBusExtensions.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Messages.Application.DomainEvents.Incoming.MessageOrphaned; using Backbone.Modules.Messages.Application.DomainEvents.Incoming.RelationshipStatusChanged; +using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Relationships.Contracts.DomainEvents; namespace Backbone.Modules.Messages.Application.Extensions; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs index 9e1be1d80e..a3c3f45483 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/FileUploaded/FileUploadedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Files.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.FileUploaded; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs index 23a4a219ed..e8cc8a989b 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/IdentityCreated/IdentityCreatedDomainEventHandler.cs @@ -1,9 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Exceptions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs index 53ac59ec74..2f69ff8c21 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierCreated/TierCreatedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs index 16776d71bc..2956891f67 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierDeleted/TierDeletedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Exceptions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierDeleted; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs index f537742ea2..51ee77485f 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierOfIdentityChanged/TierOfIdentityChangedDomainEventHandler.cs @@ -1,9 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Exceptions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierOfIdentityChanged; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs index 8f42fcef08..d058f608f3 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionCreated/TierQuotaDefinitionCreatedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; using Backbone.Modules.Quotas.Contracts.DomainEvents; +using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionCreated; diff --git a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs index 9ed3f727ca..a49a40d2c9 100644 --- a/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs +++ b/Modules/Quotas/src/Quotas.Application/DomainEvents/Incoming/TierQuotaDefinitionDeleted/TierQuotaDefinitionDeletedDomainEventHandler.cs @@ -1,10 +1,10 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Application.Metrics; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Contracts.DomainEvents; using Microsoft.Extensions.Logging; namespace Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionDeleted; diff --git a/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs b/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs index df88c6e551..48b0e0cc50 100644 --- a/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Quotas/src/Quotas.Application/Extensions/IEventBusExtensions.cs @@ -1,4 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.FileUploaded; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.IdentityCreated; @@ -11,11 +13,9 @@ using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionCreated; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionDeleted; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TokenCreated; -using Backbone.Modules.Files.Contracts.DomainEvents; -using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Tokens.Contracts.DomainEvents; -using Backbone.Modules.Quotas.Contracts.DomainEvents; namespace Backbone.Modules.Quotas.Application.Extensions; diff --git a/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs b/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs index 3be26e208d..a8db775622 100644 --- a/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs +++ b/Modules/Quotas/src/Quotas.Domain/Aggregates/Tiers/Tier.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Domain.Errors; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; -using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.DomainEvents; using CSharpFunctionalExtensions; using Entity = Backbone.BuildingBlocks.Domain.Entity; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs index eb70fb670d..21a1c20809 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/DomainEvents/TierDeleted/TierDeletedDomainEventHandlerTests.cs @@ -1,7 +1,7 @@ +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierDeleted; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs index 300ddcb0e5..03bdc5ddaa 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/IdentityCreatedDomainEventHandlerTests.cs @@ -1,10 +1,10 @@ +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.IdentityCreated; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Application.Tests.TestDoubles; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Metrics; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs index ac371de2c8..7920720a70 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Identities/TierQuotaDefinitionCreatedDomainEventHandlerTests.cs @@ -1,10 +1,10 @@ using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierQuotaDefinitionCreated; using Backbone.Modules.Quotas.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Quotas.Application.Tests.TestDoubles; +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs index 1568e9ab53..bc89f46d3d 100644 --- a/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs +++ b/Modules/Quotas/test/Quotas.Application.Tests/Tests/Tiers/TierCreatedDomainEventHandlerTests.cs @@ -1,7 +1,7 @@ +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Quotas.Application.DomainEvents.Incoming.TierCreated; using Backbone.Modules.Quotas.Application.Tests.TestDoubles; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Devices.Contracts.DomainEvents; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs b/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs index 6605405afa..09392070ec 100644 --- a/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs +++ b/Modules/Quotas/test/Quotas.Domain.Tests/Tests/Tiers/TierTests.cs @@ -1,7 +1,7 @@ +using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.Modules.Quotas.Domain.Aggregates.Identities; using Backbone.Modules.Quotas.Domain.Aggregates.Metrics; using Backbone.Modules.Quotas.Domain.Aggregates.Tiers; -using Backbone.Modules.Quotas.Contracts.DomainEvents; using Backbone.UnitTestTools.Extensions; using Backbone.UnitTestTools.Shouldly.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs index 723d8fe4ca..4ff4296711 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/FeatureFlagsOfIdentityChanged/FeatureFlagsOfIdentityChangedDomainEventHandler.cs @@ -1,10 +1,10 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; -using Backbone.Modules.Devices.Contracts.DomainEvents; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs index 0a20260eef..f5be9f8eaf 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs index 691c063a02..65d737e4c6 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs index f21769fde5..0102f904de 100644 --- a/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs +++ b/Modules/Relationships/src/Relationships.Application/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.cs @@ -1,8 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling.Extensions; diff --git a/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs b/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs index 41b3b6e146..a02be7c131 100644 --- a/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Relationships/src/Relationships.Application/Extensions/IEventBusExtensions.cs @@ -1,9 +1,9 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.FeatureFlagsOfIdentityChanged; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeleted; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeletionCancelled; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityToBeDeleted; -using Backbone.Modules.Devices.Contracts.DomainEvents; namespace Backbone.Modules.Relationships.Application.Extensions; diff --git a/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs b/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs index 689cbde99c..f48568fcc9 100644 --- a/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs +++ b/Modules/Relationships/src/Relationships.Domain/Aggregates/RelationshipTemplates/RelationshipTemplate.cs @@ -2,8 +2,8 @@ using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling; diff --git a/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs b/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs index 260a8ecfa8..b74a530c6f 100644 --- a/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs +++ b/Modules/Relationships/src/Relationships.Domain/Aggregates/Relationships/Relationship.cs @@ -3,8 +3,8 @@ using Backbone.BuildingBlocks.Domain.Errors; using Backbone.BuildingBlocks.Domain.Exceptions; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.RelationshipTemplates; using Backbone.Modules.Relationships.Domain.DomainEvents; using Backbone.Tooling; diff --git a/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs b/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs index 03e1f8cddc..6594dc6761 100644 --- a/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs +++ b/Modules/Relationships/src/Relationships.Domain/DomainEvents/RelationshipDomainEventExtensions.cs @@ -28,12 +28,12 @@ public static PeerDeletionCancelledDomainEvent Create( IdentityAddress peerOfIdentityWithDeletionCancelled, RelationshipId relationshipId, IdentityAddress identityWithDeletionCancelled) => new() - { - DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerDeletionCancelled/{identityWithDeletionCancelled}"), - PeerOfIdentityWithDeletionCancelled = peerOfIdentityWithDeletionCancelled, - RelationshipId = relationshipId, - IdentityWithDeletionCancelled = identityWithDeletionCancelled - }; + { + DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerDeletionCancelled/{identityWithDeletionCancelled}"), + PeerOfIdentityWithDeletionCancelled = peerOfIdentityWithDeletionCancelled, + RelationshipId = relationshipId, + IdentityWithDeletionCancelled = identityWithDeletionCancelled + }; } } @@ -58,13 +58,13 @@ public static PeerToBeDeletedDomainEvent Create( RelationshipId relationshipId, IdentityAddress identityToBeDeleted, DateTime gracePeriodEndsAt) => new() - { - DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerToBeDeleted/{identityToBeDeleted}"), - PeerOfIdentityToBeDeleted = peerOfIdentityToBeDeleted, - RelationshipId = relationshipId, - IdentityToBeDeleted = identityToBeDeleted, - GracePeriodEndsAt = gracePeriodEndsAt - }; + { + DomainEventId = DomainEventIdFactory.Randomize($"{relationshipId}/peerToBeDeleted/{identityToBeDeleted}"), + PeerOfIdentityToBeDeleted = peerOfIdentityToBeDeleted, + RelationshipId = relationshipId, + IdentityToBeDeleted = identityToBeDeleted, + GracePeriodEndsAt = gracePeriodEndsAt + }; } } @@ -116,13 +116,13 @@ public static RelationshipStatusChangedDomainEvent Create( string initiator, string peer, bool wasDueToIdentityDeletion) => new() - { - RelationshipId = relationshipId, - NewStatus = newStatus, - Initiator = initiator, - Peer = peer, - WasDueToIdentityDeletion = wasDueToIdentityDeletion - }; + { + RelationshipId = relationshipId, + NewStatus = newStatus, + Initiator = initiator, + Peer = peer, + WasDueToIdentityDeletion = wasDueToIdentityDeletion + }; } } diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs index 44a21aaab1..97c0cae851 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeleted/IdentityDeletedDomainEventHandler.Tests.cs @@ -1,11 +1,11 @@ using System.Linq.Expressions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeleted; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityDeleted; diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs index 4ec03605a5..bf0e541688 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityDeletionCancelled/IdentityDeletionCancelledDomainEventHandler.Tests.cs @@ -1,11 +1,11 @@ using System.Linq.Expressions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityDeletionCancelled; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityDeletionCancelled; diff --git a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs index a3cd7d3665..5c67ec0c92 100644 --- a/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs +++ b/Modules/Relationships/test/Relationships.Application.Tests/DomainEvents/Incoming/IdentityToBeDeleted/IdentityToBeDeletedDomainEventHandler.Tests.cs @@ -1,11 +1,11 @@ using System.Linq.Expressions; using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Application.DomainEvents.Incoming.IdentityToBeDeleted; using Backbone.Modules.Relationships.Application.Infrastructure.Persistence.Repository; using Backbone.Modules.Relationships.Application.Tests.TestHelpers; -using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Domain.Aggregates.Relationships; using FakeItEasy; namespace Backbone.Modules.Relationships.Application.Tests.DomainEvents.Incoming.IdentityToBeDeleted; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs index 77646e7c0f..0bb25cd0b1 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipClaimed/FileOwnershipClaimedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Files.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs index 0c97243555..52db6cfd03 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/FileOwnershipLocked/FileOwnershipLockedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Files.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs index 9aae27f5b7..9afa0de987 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStarted/IdentityDeletionProcessStartedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs index 30c1fdc002..16496cf259 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/IdentityDeletionProcessStatusChanged/IdentityDeletionProcessStatusChangedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs index 807f8ea225..898c2813e6 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeleted/PeerDeletedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Backbone.Tooling; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs index b3ea23b097..e78b3b1054 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerDeletionCancelled/PeerDeletionCancelledDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs index 94ed78db2c..e45973ada7 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerFeatureFlagsChanged/PeerFeatureFlagsChangedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs index 7614a31c02..8ba69058bb 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/PeerToBeDeleted/PeerToBeDeletedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.DevelopmentKit.Identity.ValueObjects; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs index dd96bd72e6..bca5cc8fcf 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationCompleted/RelationshipReactivationCompletedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs index b772cc1029..bf3165349d 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipReactivationRequested/RelationshipReactivationRequestedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs index 919c11bc07..57e60f3f93 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipStatusChanged/RelationshipStatusChangedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs index 280bf96140..c97248c78f 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/RelationshipTemplateAllocationsExhausted/RelationshipTemplateAllocationsExhaustedDomainEventHandler.cs @@ -1,6 +1,6 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; -using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.Infrastructure; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs index 29ac0aa250..2ee33e4ccb 100644 --- a/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs +++ b/Modules/Synchronization/src/Synchronization.Application/DomainEvents/Incoming/TokenLocked/TokenLockedDomainEventHandler.cs @@ -1,7 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; +using Backbone.Modules.Tokens.Contracts.DomainEvents; namespace Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; diff --git a/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs b/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs index 6c2d8a22ab..b082ea25f2 100644 --- a/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Synchronization/src/Synchronization.Application/Extensions/IEventBusExtensions.cs @@ -1,5 +1,8 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Files.Contracts.DomainEvents; using Backbone.Modules.Messages.Contracts.DomainEvents; +using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.FileOwnershipClaimed; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.FileOwnershipLocked; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; @@ -14,9 +17,6 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipStatusChanged; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipTemplateAllocationsExhausted; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; -using Backbone.Modules.Files.Contracts.DomainEvents; -using Backbone.Modules.Devices.Contracts.DomainEvents; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Tokens.Contracts.DomainEvents; namespace Backbone.Modules.Synchronization.Application.Extensions; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs index e34446ba76..4652475d76 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStartedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ +using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs index e29fb375d9..9855a87233 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/IdentityDeletionProcessStatusChangedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; +using Backbone.Modules.Devices.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.IdentityDeletionProcessStatusChanged; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Devices.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs index 3dbe9628c8..7d666331e8 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/MessageCreatedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.MessageCreated; +using Backbone.Modules.Messages.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.MessageCreated; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Messages.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using Backbone.Tooling; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs index 3c301b0ed3..7cb7c1f720 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs index 534921c966..a95f205f4c 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerDeletionCancelledDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeletionCancelled; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerDeletionCancelled; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs index f2453925f9..3a1e86e717 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/PeerToBeDeletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerToBeDeleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.PeerToBeDeleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; using Microsoft.Extensions.Logging; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs index 0184735e6c..adcb845480 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipReactivationCompletedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipReactivationCompleted; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipReactivationCompleted; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs index a5ebc03416..f65fd88a9a 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/RelationshipStatusChangedDomainEventHandlerTests.cs @@ -1,6 +1,6 @@ -using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipStatusChanged; +using Backbone.Modules.Relationships.Contracts.DomainEvents; +using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.RelationshipStatusChanged; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Relationships.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Relationships; using Backbone.Modules.Synchronization.Domain.Entities.Sync; using FakeItEasy; diff --git a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs index cd97e4b6bb..9f2f9e6953 100644 --- a/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs +++ b/Modules/Synchronization/test/Synchronization.Application.Tests/Tests/DomainEvents/TokenLockedDomainEventHandlerTests.cs @@ -1,7 +1,7 @@ using Backbone.Modules.Synchronization.Application.DomainEvents.Incoming.TokenLocked; using Backbone.Modules.Synchronization.Application.Infrastructure; -using Backbone.Modules.Tokens.Contracts.DomainEvents; using Backbone.Modules.Synchronization.Domain.Entities.Sync; +using Backbone.Modules.Tokens.Contracts.DomainEvents; using FakeItEasy; namespace Backbone.Modules.Synchronization.Application.Tests.Tests.DomainEvents; From b4e4c65924b3ba033f5138b8a89c177dbdc44131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20H=C3=BCgel?= Date: Mon, 28 Sep 2026 14:54:12 +0200 Subject: [PATCH 6/6] chore: fix dockerfiles --- Applications/AdminApi/src/AdminApi/Dockerfile | 8 ++++++++ Applications/AdminCli/src/AdminCli/Dockerfile | 4 ++++ .../DatabaseMigrator/src/DatabaseMigrator/Dockerfile | 8 ++++++++ .../src/EventHandlerService/Dockerfile | 8 ++++++++ Applications/Housekeeper/src/Housekeeper/Dockerfile | 8 ++++++++ .../src/Job.IdentityDeletion/Dockerfile | 8 ++++++++ 6 files changed, 44 insertions(+) diff --git a/Applications/AdminApi/src/AdminApi/Dockerfile b/Applications/AdminApi/src/AdminApi/Dockerfile index ca34f20d99..2cd5407fef 100644 --- a/Applications/AdminApi/src/AdminApi/Dockerfile +++ b/Applications/AdminApi/src/AdminApi/Dockerfile @@ -26,6 +26,14 @@ COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks COPY ["BuildingBlocks/src/BuildingBlocks.Application/BuildingBlocks.Application.csproj", "BuildingBlocks/src/BuildingBlocks.Application/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Application/"] COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Files/src/Files.Contracts/Files.Contracts.csproj", "Modules/Files/src/Files.Contracts/packages.lock.json*", "Modules/Files/src/Files.Contracts/"] +COPY ["Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj", "Modules/Messages/src/Messages.Contracts/packages.lock.json*", "Modules/Messages/src/Messages.Contracts/"] +COPY ["Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj", "Modules/Quotas/src/Quotas.Contracts/packages.lock.json*", "Modules/Quotas/src/Quotas.Contracts/"] +COPY ["Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj", "Modules/Relationships/src/Relationships.Contracts/packages.lock.json*", "Modules/Relationships/src/Relationships.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["Modules/Announcements/src/Announcements.Application/Announcements.Application.csproj", "Modules/Announcements/src/Announcements.Application/packages.lock.json*", "Modules/Announcements/src/Announcements.Application/"] COPY ["Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj", "Modules/Announcements/src/Announcements.Domain/packages.lock.json*", "Modules/Announcements/src/Announcements.Domain/"] diff --git a/Applications/AdminCli/src/AdminCli/Dockerfile b/Applications/AdminCli/src/AdminCli/Dockerfile index 07866a5ff2..f83dbd46ff 100644 --- a/Applications/AdminCli/src/AdminCli/Dockerfile +++ b/Applications/AdminCli/src/AdminCli/Dockerfile @@ -28,6 +28,10 @@ COPY ["BuildingBlocks/src/Tooling/Tooling.csproj", "BuildingBlocks/src/Tooling/p COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["Modules/Announcements/src/Announcements.Application/Announcements.Application.csproj", "Modules/Announcements/src/Announcements.Application/packages.lock.json*", "Modules/Announcements/src/Announcements.Application/"] COPY ["Modules/Announcements/src/Announcements.Infrastructure/Announcements.Infrastructure.csproj", "Modules/Announcements/src/Announcements.Infrastructure/packages.lock.json*", "Modules/Announcements/src/Announcements.Infrastructure/"] diff --git a/Applications/DatabaseMigrator/src/DatabaseMigrator/Dockerfile b/Applications/DatabaseMigrator/src/DatabaseMigrator/Dockerfile index b0b2c198a8..6a24617e45 100644 --- a/Applications/DatabaseMigrator/src/DatabaseMigrator/Dockerfile +++ b/Applications/DatabaseMigrator/src/DatabaseMigrator/Dockerfile @@ -28,6 +28,14 @@ COPY ["BuildingBlocks/src/BuildingBlocks.Application/BuildingBlocks.Application. COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Files/src/Files.Contracts/Files.Contracts.csproj", "Modules/Files/src/Files.Contracts/packages.lock.json*", "Modules/Files/src/Files.Contracts/"] +COPY ["Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj", "Modules/Messages/src/Messages.Contracts/packages.lock.json*", "Modules/Messages/src/Messages.Contracts/"] +COPY ["Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj", "Modules/Quotas/src/Quotas.Contracts/packages.lock.json*", "Modules/Quotas/src/Quotas.Contracts/"] +COPY ["Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj", "Modules/Relationships/src/Relationships.Contracts/packages.lock.json*", "Modules/Relationships/src/Relationships.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["Modules/Announcements/src/Announcements.Infrastructure/Announcements.Infrastructure.csproj", "Modules/Announcements/src/Announcements.Infrastructure/packages.lock.json*", "Modules/Announcements/src/Announcements.Infrastructure/"] COPY ["Modules/Announcements/src/Announcements.Application/Announcements.Application.csproj", "Modules/Announcements/src/Announcements.Application/packages.lock.json*", "Modules/Announcements/src/Announcements.Application/"] diff --git a/Applications/EventHandlerService/src/EventHandlerService/Dockerfile b/Applications/EventHandlerService/src/EventHandlerService/Dockerfile index 12b0128b81..62307ab4cf 100644 --- a/Applications/EventHandlerService/src/EventHandlerService/Dockerfile +++ b/Applications/EventHandlerService/src/EventHandlerService/Dockerfile @@ -23,6 +23,14 @@ COPY ["Modules/Devices/src/Devices.Infrastructure/Devices.Infrastructure.csproj" COPY ["Modules/Devices/src/Devices.Application/Devices.Application.csproj", "Modules/Devices/src/Devices.Application/packages.lock.json*", "Modules/Devices/src/Devices.Application/"] COPY ["BuildingBlocks/src/BuildingBlocks.Application/BuildingBlocks.Application.csproj", "BuildingBlocks/src/BuildingBlocks.Application/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Application/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Files/src/Files.Contracts/Files.Contracts.csproj", "Modules/Files/src/Files.Contracts/packages.lock.json*", "Modules/Files/src/Files.Contracts/"] +COPY ["Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj", "Modules/Messages/src/Messages.Contracts/packages.lock.json*", "Modules/Messages/src/Messages.Contracts/"] +COPY ["Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj", "Modules/Quotas/src/Quotas.Contracts/packages.lock.json*", "Modules/Quotas/src/Quotas.Contracts/"] +COPY ["Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj", "Modules/Relationships/src/Relationships.Contracts/packages.lock.json*", "Modules/Relationships/src/Relationships.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["Modules/Challenges/src/Challenges.Application/Challenges.Application.csproj", "Modules/Challenges/src/Challenges.Application/packages.lock.json*", "Modules/Challenges/src/Challenges.Application/"] COPY ["Modules/Challenges/src/Challenges.Domain/Challenges.Domain.csproj", "Modules/Challenges/src/Challenges.Domain/packages.lock.json*", "Modules/Challenges/src/Challenges.Domain/"] diff --git a/Applications/Housekeeper/src/Housekeeper/Dockerfile b/Applications/Housekeeper/src/Housekeeper/Dockerfile index cc33262c93..3cb928674e 100644 --- a/Applications/Housekeeper/src/Housekeeper/Dockerfile +++ b/Applications/Housekeeper/src/Housekeeper/Dockerfile @@ -24,6 +24,14 @@ COPY ["Modules/Devices/src/Devices.Infrastructure/Devices.Infrastructure.csproj" COPY ["Modules/Devices/src/Devices.Application/Devices.Application.csproj", "Modules/Devices/src/Devices.Application/packages.lock.json*", "Modules/Devices/src/Devices.Application/"] COPY ["BuildingBlocks/src/BuildingBlocks.Application/BuildingBlocks.Application.csproj", "BuildingBlocks/src/BuildingBlocks.Application/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Application/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Files/src/Files.Contracts/Files.Contracts.csproj", "Modules/Files/src/Files.Contracts/packages.lock.json*", "Modules/Files/src/Files.Contracts/"] +COPY ["Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj", "Modules/Messages/src/Messages.Contracts/packages.lock.json*", "Modules/Messages/src/Messages.Contracts/"] +COPY ["Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj", "Modules/Quotas/src/Quotas.Contracts/packages.lock.json*", "Modules/Quotas/src/Quotas.Contracts/"] +COPY ["Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj", "Modules/Relationships/src/Relationships.Contracts/packages.lock.json*", "Modules/Relationships/src/Relationships.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["BuildingBlocks/src/BuildingBlocks.Module/BuildingBlocks.Module.csproj", "BuildingBlocks/src/BuildingBlocks.Module/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Module/"] COPY ["Modules/Announcements/src/Announcements.Infrastructure.Database.Postgres/Announcements.Infrastructure.Database.Postgres.csproj", "Modules/Announcements/src/Announcements.Infrastructure.Database.Postgres/packages.lock.json*", "Modules/Announcements/src/Announcements.Infrastructure.Database.Postgres/"] diff --git a/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/Dockerfile b/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/Dockerfile index 7f98bed34c..024e79cffc 100644 --- a/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/Dockerfile +++ b/Applications/IdentityDeletionJobs/src/Job.IdentityDeletion/Dockerfile @@ -19,6 +19,14 @@ COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks COPY ["BuildingBlocks/src/BuildingBlocks.Application/BuildingBlocks.Application.csproj", "BuildingBlocks/src/BuildingBlocks.Application/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Application/"] COPY ["BuildingBlocks/src/BuildingBlocks.Module/BuildingBlocks.Module.csproj", "BuildingBlocks/src/BuildingBlocks.Module/packages.lock.json*", "BuildingBlocks/src/BuildingBlocks.Module/"] COPY ["Common/src/Common.Infrastructure/Common.Infrastructure.csproj", "Common/src/Common.Infrastructure/packages.lock.json*", "Common/src/Common.Infrastructure/"] +COPY ["Modules/Announcements/src/Announcements.Contracts/Announcements.Contracts.csproj", "Modules/Announcements/src/Announcements.Contracts/packages.lock.json*", "Modules/Announcements/src/Announcements.Contracts/"] +COPY ["Modules/Devices/src/Devices.Contracts/Devices.Contracts.csproj", "Modules/Devices/src/Devices.Contracts/packages.lock.json*", "Modules/Devices/src/Devices.Contracts/"] +COPY ["Modules/Files/src/Files.Contracts/Files.Contracts.csproj", "Modules/Files/src/Files.Contracts/packages.lock.json*", "Modules/Files/src/Files.Contracts/"] +COPY ["Modules/Messages/src/Messages.Contracts/Messages.Contracts.csproj", "Modules/Messages/src/Messages.Contracts/packages.lock.json*", "Modules/Messages/src/Messages.Contracts/"] +COPY ["Modules/Quotas/src/Quotas.Contracts/Quotas.Contracts.csproj", "Modules/Quotas/src/Quotas.Contracts/packages.lock.json*", "Modules/Quotas/src/Quotas.Contracts/"] +COPY ["Modules/Relationships/src/Relationships.Contracts/Relationships.Contracts.csproj", "Modules/Relationships/src/Relationships.Contracts/packages.lock.json*", "Modules/Relationships/src/Relationships.Contracts/"] +COPY ["Modules/Synchronization/src/Synchronization.Contracts/Synchronization.Contracts.csproj", "Modules/Synchronization/src/Synchronization.Contracts/packages.lock.json*", "Modules/Synchronization/src/Synchronization.Contracts/"] +COPY ["Modules/Tokens/src/Tokens.Contracts/Tokens.Contracts.csproj", "Modules/Tokens/src/Tokens.Contracts/packages.lock.json*", "Modules/Tokens/src/Tokens.Contracts/"] COPY ["BuildingBlocks/src/Crypto/Crypto.csproj", "BuildingBlocks/src/Crypto/packages.lock.json*", "BuildingBlocks/src/Crypto/"] COPY ["Modules/Announcements/src/Announcements.Domain/Announcements.Domain.csproj", "Modules/Announcements/src/Announcements.Domain/packages.lock.json*", "Modules/Announcements/src/Announcements.Domain/"] COPY ["Modules/Announcements/src/Announcements.Application/Announcements.Application.csproj", "Modules/Announcements/src/Announcements.Application/packages.lock.json*", "Modules/Announcements/src/Announcements.Application/"]