From ee76b84b0fc6187cfa35ba80d7917279cf29e278 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 24 May 2026 04:08:43 -0400 Subject: [PATCH] feat(transport): bundle entity DTOs + secret carving in EntitySerializer --- .../Serialization/EntityDtos.cs | 155 ++++++++ .../Serialization/EntitySerializer.cs | 344 ++++++++++++++++++ .../Serialization/EntitySerializerTests.cs | 189 ++++++++++ 3 files changed, 688 insertions(+) create mode 100644 src/ScadaLink.Transport/Serialization/EntityDtos.cs create mode 100644 src/ScadaLink.Transport/Serialization/EntitySerializer.cs create mode 100644 tests/ScadaLink.Transport.Tests/Serialization/EntitySerializerTests.cs diff --git a/src/ScadaLink.Transport/Serialization/EntityDtos.cs b/src/ScadaLink.Transport/Serialization/EntityDtos.cs new file mode 100644 index 0000000..864c1ee --- /dev/null +++ b/src/ScadaLink.Transport/Serialization/EntityDtos.cs @@ -0,0 +1,155 @@ +using ScadaLink.Commons.Entities.ExternalSystems; +using ScadaLink.Commons.Entities.InboundApi; +using ScadaLink.Commons.Entities.Notifications; +using ScadaLink.Commons.Entities.Scripts; +using ScadaLink.Commons.Entities.Templates; +using ScadaLink.Commons.Types.Enums; + +namespace ScadaLink.Transport.Serialization; + +/// +/// In-memory aggregate of all bundle-eligible Commons entities. Matches the +/// shape of but uses the real persistence- +/// ignorant POCO types — what consumes/produces +/// on the application side of the bundle boundary. +/// +public sealed record EntityAggregate( + IReadOnlyList TemplateFolders, + IReadOnlyList