using ZB.MOM.WW.ScadaBridge.Commons.Entities.ExternalSystems;
using ZB.MOM.WW.ScadaBridge.Commons.Entities.InboundApi; // ApiMethod
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Notifications;
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Scripts;
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Templates;
using ZB.MOM.WW.ScadaBridge.Commons.Types.Transport;

namespace ZB.MOM.WW.ScadaBridge.Transport.Export;

/// <summary>
/// Output of <see cref="DependencyResolver.ResolveAsync"/> — the full closure of
/// entities that need to land in a bundle for the given <see cref="ExportSelection"/>,
/// along with a stable, manifest-ready <c>ContentManifest</c>. Templates are
/// topologically ordered (base before derived) so the importer can apply them
/// in-order without further sorting.
/// </summary>
public sealed record ResolvedExport(
    IReadOnlyList<TemplateFolder> TemplateFolders,
    IReadOnlyList<Template> Templates,
    IReadOnlyList<SharedScript> SharedScripts,
    IReadOnlyList<ExternalSystemDefinition> ExternalSystems,
    IReadOnlyList<ExternalSystemMethod> ExternalSystemMethods,
    IReadOnlyList<DatabaseConnectionDefinition> DatabaseConnections,
    IReadOnlyList<NotificationList> NotificationLists,
    IReadOnlyList<SmtpConfiguration> SmtpConfigs,
    // Inbound API keys are not transported between environments (re-arch C4); only methods.
    IReadOnlyList<ApiMethod> ApiMethods,
    IReadOnlyList<ManifestContentEntry> ContentManifest);
