feat(sms): export wizard SMS-config selection (S10c)
This commit is contained in:
@@ -72,6 +72,9 @@ public partial class TransportExport : ComponentBase
|
||||
private List<DatabaseConnectionDefinition> _dbConnections = new();
|
||||
private List<NotificationList> _notificationLists = new();
|
||||
private List<SmtpConfiguration> _smtpConfigs = new();
|
||||
// S10c: SMS provider configs, mirroring _smtpConfigs. Keyed by AccountSid in the
|
||||
// bundle; the wizard selects by entity id (same as SMTP) and never surfaces AuthToken.
|
||||
private List<SmsConfiguration> _smsConfigs = new();
|
||||
// Inbound API keys are not transported between environments (re-arch C4); only methods.
|
||||
private List<ApiMethod> _apiMethods = new();
|
||||
// M8 (E1): site/instance-scoped export. Sites are listed flat; each site's
|
||||
@@ -90,6 +93,8 @@ public partial class TransportExport : ComponentBase
|
||||
private readonly HashSet<int> _selectedDbConnections = new();
|
||||
private readonly HashSet<int> _selectedNotificationLists = new();
|
||||
private readonly HashSet<int> _selectedSmtpConfigs = new();
|
||||
// S10c: SMS provider config selection, mirroring _selectedSmtpConfigs.
|
||||
private readonly HashSet<int> _selectedSmsConfigs = new();
|
||||
// No _selectedApiKeys: inbound API keys are not transported (re-arch C4).
|
||||
private readonly HashSet<int> _selectedApiMethods = new();
|
||||
// M8 (E1): site/instance selection backed by entity primary keys, matching the
|
||||
@@ -138,6 +143,8 @@ public partial class TransportExport : ComponentBase
|
||||
_dbConnections = (await ExternalRepo.GetAllDatabaseConnectionsAsync()).ToList();
|
||||
_notificationLists = (await NotificationRepo.GetAllNotificationListsAsync()).ToList();
|
||||
_smtpConfigs = (await NotificationRepo.GetAllSmtpConfigurationsAsync()).ToList();
|
||||
// S10c: SMS provider configs, mirroring the SMTP load path above.
|
||||
_smsConfigs = (await NotificationRepo.GetAllSmsConfigurationsAsync()).ToList();
|
||||
// Inbound API keys are not transported (re-arch C4) — only methods are loaded.
|
||||
_apiMethods = (await InboundApiRepo.GetAllApiMethodsAsync()).ToList();
|
||||
|
||||
@@ -199,6 +206,7 @@ public partial class TransportExport : ComponentBase
|
||||
|| _selectedDbConnections.Count > 0
|
||||
|| _selectedNotificationLists.Count > 0
|
||||
|| _selectedSmtpConfigs.Count > 0
|
||||
|| _selectedSmsConfigs.Count > 0
|
||||
|| _selectedApiMethods.Count > 0
|
||||
|| _selectedSites.Count > 0
|
||||
|| _selectedInstances.Count > 0;
|
||||
@@ -247,6 +255,9 @@ public partial class TransportExport : ComponentBase
|
||||
// already-selected owning site.
|
||||
SiteIds = _selectedSites.ToList(),
|
||||
InstanceIds = _selectedInstances.ToList(),
|
||||
// S10c: SMS provider config ids feed the resolver's SmsConfigurationIds,
|
||||
// exactly as SmtpConfigurationIds above (init-only, trailing additive shape).
|
||||
SmsConfigurationIds = _selectedSmsConfigs.ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -314,6 +325,11 @@ public partial class TransportExport : ComponentBase
|
||||
{
|
||||
if (!string.IsNullOrEmpty(smtp.Credentials)) count++;
|
||||
}
|
||||
// S10c: SMS provider AuthToken is a secret, mirroring SMTP Credentials above.
|
||||
foreach (var sms in resolved.SmsConfigs)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sms.AuthToken)) count++;
|
||||
}
|
||||
foreach (var db in resolved.DatabaseConnections)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(db.ConnectionString)) count++;
|
||||
@@ -440,6 +456,7 @@ public partial class TransportExport : ComponentBase
|
||||
_selectedDbConnections.Clear();
|
||||
_selectedNotificationLists.Clear();
|
||||
_selectedSmtpConfigs.Clear();
|
||||
_selectedSmsConfigs.Clear();
|
||||
_selectedApiMethods.Clear();
|
||||
_selectedSites.Clear();
|
||||
_selectedInstances.Clear();
|
||||
|
||||
Reference in New Issue
Block a user