feat: log outbound SMS and show history in compose modal

Persist manual, campaign, and automation SMS; expose history APIs for people and leads.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-17 21:23:07 +03:30
co-authored by Cursor
parent 9325d879a5
commit 23f8da2c65
16 changed files with 457 additions and 3 deletions
+25
View File
@@ -4300,6 +4300,31 @@ export interface WebhookDeliveryDto {
deliveredAt: string | null;
}
/* ——— لاگ پیامک خروجی ——— */
export type OutboundSmsSource = "manual" | "campaign" | "automation";
export type OutboundSmsStatus = "sent" | "failed";
export const OUTBOUND_SMS_SOURCE_LABELS: Record<OutboundSmsSource, string> = {
manual: "دستی",
campaign: "کمپین",
automation: "اتوماسیون",
};
export interface OutboundSmsLogDto {
id: string;
body: string;
mobile: string;
source: OutboundSmsSource;
sourceLabel: string;
status: OutboundSmsStatus;
createdAt: string;
}
export interface OutboundSmsHistoryResponse {
items: OutboundSmsLogDto[];
}
/* ——— پیامک گروهی ——— */
export type SmsCampaignStatus =