feat: Add billing for inbound

This commit is contained in:
Dries Augustyns
2026-02-18 15:23:31 +01:00
parent e639c72e8b
commit de7ed84fcf
7 changed files with 78 additions and 7 deletions
@@ -0,0 +1,5 @@
-- AlterEnum
ALTER TYPE "EmailSourceType" ADD VALUE 'INBOUND';
-- AlterTable
ALTER TABLE "projects" ADD COLUMN "billingLimitInbound" INTEGER;
+2
View File
@@ -53,6 +53,7 @@ model Project {
billingLimitWorkflows Int? // Max workflow emails per month
billingLimitCampaigns Int? // Max campaign emails per month
billingLimitTransactional Int? // Max transactional emails per month
billingLimitInbound Int? // Max inbound emails per month
// Email Tracking
tracking TrackingMode @default(ENABLED) // Open and click tracking mode
@@ -750,6 +751,7 @@ enum EmailSourceType {
TRANSACTIONAL // Sent via API call
CAMPAIGN // Sent as part of broadcast
WORKFLOW // Sent via workflow automation
INBOUND // Received via SES inbound
}
enum EmailStatus {
+1
View File
@@ -439,6 +439,7 @@ export const BillingLimitSchemas = {
workflows: z.coerce.number().int().positive().nullable(),
campaigns: z.coerce.number().int().positive().nullable(),
transactional: z.coerce.number().int().positive().nullable(),
inbound: z.coerce.number().int().positive().nullable(),
}),
} as const;
+1
View File
@@ -20,6 +20,7 @@ export interface BillingLimitsResponse {
workflows: CategoryUsage;
campaigns: CategoryUsage;
transactional: CategoryUsage;
inbound: CategoryUsage;
currency: string | null;
}