{
	"$comment": "Environment variables this brick depends on. Read by `fonderie env`, the admin console and check:env-declarations — docs/ENV-DECLARATIONS-DESIGN.md",
	"brick": "@fonderie/courier",
	"vars": [
		{
			"name": "SMTP_FROM",
			"source": "option",
			"required": "always",
			"secret": false,
			"kind": "string",
			"feeds": "email.from",
			"dev": "App <no-reply@localhost>",
			"description": "From address on every email, e.g. \"Acme <no-reply@acme.example>\"."
		},
		{
			"name": "SMTP_REPLY_TO",
			"source": "option",
			"required": "never",
			"secret": false,
			"kind": "string",
			"feeds": "email.replyTo",
			"description": "Reply-To address, if replies should go elsewhere."
		},
		{
			"name": "SMTP_HOST",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "string",
			"feeds": "email.smtp.host",
			"feature": "smtp",
			"description": "SMTP server host."
		},
		{
			"name": "SMTP_PORT",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "int",
			"feeds": "email.smtp.port",
			"feature": "smtp",
			"description": "SMTP port — 587 (STARTTLS) or 465 (TLS)."
		},
		{
			"name": "SMTP_SECURE",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "bool",
			"feeds": "email.smtp.secure",
			"feature": "smtp",
			"description": "true for implicit TLS (port 465)."
		},
		{
			"name": "SMTP_USER",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "string",
			"feeds": "email.smtp.user",
			"feature": "smtp",
			"description": "SMTP username."
		},
		{
			"name": "SMTP_PASS",
			"source": "option",
			"required": "feature",
			"secret": true,
			"kind": "string",
			"feeds": "email.smtp.pass",
			"feature": "smtp",
			"description": "SMTP password."
		},
		{
			"name": "RESEND_API_KEY",
			"source": "option",
			"required": "feature",
			"secret": true,
			"kind": "string",
			"feeds": "email.apiKey",
			"feature": "resend",
			"description": "Resend API key (re_…)."
		},
		{
			"name": "TWILIO_ACCOUNT_SID",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "string",
			"feeds": "sms.accountSid",
			"feature": "twilio",
			"description": "Twilio account SID (AC…)."
		},
		{
			"name": "TWILIO_AUTH_TOKEN",
			"source": "option",
			"required": "feature",
			"secret": true,
			"kind": "string",
			"feeds": "sms.authToken",
			"feature": "twilio",
			"description": "Twilio auth token."
		},
		{
			"name": "SMTP_DKIM_SELECTORS",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "csv",
			"feeds": "email.senderDns.dkimSelectors",
			"feature": "sender-dns",
			"description": "DKIM selectors the doctor checks in DNS, comma-separated."
		},
		{
			"name": "SMTP_RETURN_PATH_DOMAIN",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "string",
			"feeds": "email.senderDns.returnPathDomain",
			"feature": "sender-dns",
			"description": "Return-path domain the doctor checks in DNS."
		},
		{
			"name": "MAILGUN_SIGNING_KEY",
			"source": "option",
			"required": "feature",
			"secret": true,
			"kind": "string",
			"feeds": "delivery.signingKeys.mailgun",
			"feature": "mailgun-events",
			"description": "Mailgun webhook signing key. Unset: the delivery-event route is not mounted."
		},
		{
			"name": "SENDGRID_VERIFICATION_KEY",
			"source": "option",
			"required": "feature",
			"secret": false,
			"kind": "string",
			"feeds": "delivery.signingKeys.sendgrid",
			"feature": "sendgrid-events",
			"description": "SendGrid event-webhook verification key (a public key). Unset: the route is not mounted."
		},
		{
			"name": "ADMIN_TOKEN",
			"source": "option",
			"required": "never",
			"secret": true,
			"kind": "secret32",
			"feeds": "adminToken",
			"generate": "hex-32",
			"enforcedBy": "readiness:ADMIN_TOKEN_TOO_SHORT|ADMIN_TOKEN_PLACEHOLDER (error)",
			"description": "Bearer token guarding the template admin routes. Unset: those routes are not mounted. Shared by every brick that has an admin surface."
		}
	],
	"features": {
		"smtp": {
			"description": "Email over SMTP (email.provider: smtp)"
		},
		"resend": {
			"description": "Email through Resend (email.provider: resend)"
		},
		"twilio": {
			"description": "SMS through Twilio"
		},
		"sender-dns": {
			"description": "Doctor check of SPF/DKIM/return-path records"
		},
		"mailgun-events": {
			"description": "Mailgun delivery/bounce webhooks"
		},
		"sendgrid-events": {
			"description": "SendGrid delivery/bounce webhooks"
		}
	}
}
