fix(sms): repair S1 build breaks — null-filter EmailAddress projections + SiteNotificationRepository SMS stubs

S1 made NotificationRecipient.EmailAddress nullable + added SmsConfiguration
and four INotificationRepository SMS methods, breaking compilation beyond the
intentionally-deferred central NotificationRepository.

Fix 1 (CS8620/CS8604 nullable EmailAddress projections, email-only paths):
- NotificationOutbox EmailNotificationDeliveryAdapter: filter non-null emails
- DeploymentManager ArtifactDeploymentService: filter non-null emails
- Transport EntitySerializer: filter non-null emails into NotificationRecipientDto

Fix 2 (CS0535): stub the four SMS-config methods on SiteRuntime
SiteNotificationRepository (central-only — NotSupportedException, matching the
existing 'Managed via artifact deployment from Central' write-path pattern).

Doc nits: reword NotificationRecipient private ctor and SmsConfiguration.AuthToken
comments.

The central ConfigurationDatabase.NotificationRepository compile break is left
as-is (S2 implements those four methods).
This commit is contained in:
Joseph Doherty
2026-06-19 09:51:07 -04:00
parent c5378f8723
commit 095361b73f
6 changed files with 35 additions and 8 deletions
@@ -71,8 +71,9 @@ public class NotificationRecipient
}
/// <summary>
/// Parameterless constructor used by EF Core materialization and the SMS factory, where the
/// contact field is assigned via property setters rather than constructor parameters.
/// Private parameterless constructor that backs the <see cref="ForSms"/> factory path,
/// where the contact field is assigned via property setters rather than constructor
/// parameters — without exposing a half-initialized public constructor to callers.
/// </summary>
private NotificationRecipient()
{
@@ -6,7 +6,10 @@ public class SmsConfiguration
public int Id { get; set; }
/// <summary>Gets or sets the Twilio Account SID.</summary>
public string AccountSid { get; set; }
/// <summary>Gets or sets the Twilio Auth Token (secret), or null when not applicable.</summary>
/// <summary>
/// Gets or sets the Twilio Auth Token (secret). Stored encrypted; null only transiently
/// during configuration, never a valid production value.
/// </summary>
public string? AuthToken { get; set; }
/// <summary>Gets or sets the sender phone number (E.164) placed in the From field.</summary>
public string FromNumber { get; set; }