Files
ScadaBridge/src/ZB.MOM.WW.ScadaBridge.Commons/Messages/Management/TransportCommands.cs
T
Joseph Doherty 7b0b9c7365 refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj,
namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated.
ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated.
SQL roles/logins, LDAP domains, CLI command name, and CLI config dir
(~/.scadalink → ~/.scadabridge) also renamed.

Build green; 5 Host.Tests fail awaiting SQL login rename in next commit.
Pre-existing StaleTagMonitor timing flakes unchanged.

Rename script committed at tools/rename-to-scadabridge.sh.
2026-05-28 09:37:45 -04:00

63 lines
2.3 KiB
C#

using ZB.MOM.WW.ScadaBridge.Commons.Types.Transport;
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
/// <summary>
/// Exports a bundle. Names rather than IDs in the selection so test scripts can
/// be written without an ID lookup step. <c>All=true</c> overrides the per-type
/// name lists and exports every entity of every supported type.
/// </summary>
public sealed record ExportBundleCommand(
bool All,
IReadOnlyList<string>? TemplateNames,
IReadOnlyList<string>? SharedScriptNames,
IReadOnlyList<string>? ExternalSystemNames,
IReadOnlyList<string>? DatabaseConnectionNames,
IReadOnlyList<string>? NotificationListNames,
IReadOnlyList<string>? SmtpConfigurationNames,
IReadOnlyList<string>? ApiKeyNames,
IReadOnlyList<string>? ApiMethodNames,
bool IncludeDependencies,
string? Passphrase,
string SourceEnvironment);
/// <summary>
/// Bundle body returned as base64-encoded ZIP. <see cref="ByteCount"/> is the
/// pre-encoded size for sanity checks against the configured bundle cap.
/// </summary>
public sealed record ExportBundleResult(
string Base64Bundle,
int ByteCount);
/// <summary>
/// Loads a bundle and returns its preview without applying anything. Useful
/// for tests that want to assert on the diff shape before committing.
/// </summary>
public sealed record PreviewBundleCommand(
string Base64Bundle,
string? Passphrase);
public sealed record PreviewBundleResult(
IReadOnlyList<ImportPreviewItem> Items,
int AddCount,
int ModifiedCount,
int IdenticalCount,
int BlockerCount);
/// <summary>
/// Loads, previews, and applies a bundle in a single call. The diff is built
/// internally; every <see cref="ConflictKind.Modified"/> row is resolved with
/// <see cref="DefaultConflictPolicy"/>, every <see cref="ConflictKind.New"/>
/// row gets <see cref="ResolutionAction.Add"/>, every
/// <see cref="ConflictKind.Identical"/> row gets <see cref="ResolutionAction.Skip"/>,
/// and any <see cref="ConflictKind.Blocker"/> row fails the call.
/// <para>
/// Valid <see cref="DefaultConflictPolicy"/> values: <c>"skip"</c>,
/// <c>"overwrite"</c>, <c>"rename"</c>. Rename mints a unique suffix per row.
/// </para>
/// </summary>
public sealed record ImportBundleCommand(
string Base64Bundle,
string? Passphrase,
string DefaultConflictPolicy);