Parent: #25 — Remove all SaaS billing code
Depends on: #26 (SendBillingNotifications removal)
What to Remove
email/email.go
- 18 billing email type constants (lines 36-53): BillingHighlightTrial7Days through BillingInvalidPayment
OneTimeBillingNotifications array (lines 56-62)
getBillingNotificationSubject() function (lines 151-192)
getBillingNotificationMessage() function (lines 194-257)
SendBillingNotificationEmail() function (lines 259-294)
BillingNotificationTemplateID constant (line 25)
SendGridOutboundEmail constant (line 27) — if only used by billing
main.go — SendGrid client initialization
| Line |
Usage |
| 59 |
Import: sendgrid |
| 364 |
sendgrid.NewSendClient(env.Config.SendgridKey) |
| 500, 585 |
Passed to worker/OTEL resolvers |
Resolver MailClient fields
| File |
Line |
Usage |
public-graph/graph/resolver.go |
87 |
MailClient *sendgrid.Client |
private-graph/graph/resolver.go |
134 |
MailClient *sendgrid.Client |
env config
SendgridKey env var — may need to keep if SendGrid is used for non-billing emails
Strategy
Check if SendGrid/email is used for ANY non-billing purpose. If billing is the only email use case, the entire email package + SendGrid dependency can be removed.
Test Plan
🤖 Generated with Claude Code
Parent: #25 — Remove all SaaS billing code
Depends on: #26 (SendBillingNotifications removal)
What to Remove
email/email.go
OneTimeBillingNotificationsarray (lines 56-62)getBillingNotificationSubject()function (lines 151-192)getBillingNotificationMessage()function (lines 194-257)SendBillingNotificationEmail()function (lines 259-294)BillingNotificationTemplateIDconstant (line 25)SendGridOutboundEmailconstant (line 27) — if only used by billingmain.go — SendGrid client initialization
sendgrid.NewSendClient(env.Config.SendgridKey)Resolver MailClient fields
public-graph/graph/resolver.goMailClient *sendgrid.Clientprivate-graph/graph/resolver.goMailClient *sendgrid.Clientenv config
SendgridKeyenv var — may need to keep if SendGrid is used for non-billing emailsStrategy
Check if SendGrid/email is used for ANY non-billing purpose. If billing is the only email use case, the entire email package + SendGrid dependency can be removed.
Test Plan
🤖 Generated with Claude Code