feat: SMS campaigns for people or leads with filters and batching
Add audience tabs, province/city filters, select-all ids, dynamic SMS tokens, and 50-sized create/send chunks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -755,6 +755,8 @@ export interface HealthResponse {
|
||||
export interface CompanySummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
province?: string | null;
|
||||
city?: string | null;
|
||||
}
|
||||
|
||||
export interface CompanyDto {
|
||||
@@ -4321,15 +4323,33 @@ export interface SmsCampaignDto {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
/** حداکثر گیرنده در هر درخواست ساخت/افزودن کمپین پیامک */
|
||||
export const SMS_CAMPAIGN_CHUNK_SIZE = 50;
|
||||
|
||||
/** سقف شناسههای قابل دریافت از /people/ids و /leads/ids */
|
||||
export const FILTERED_IDS_MAX = 50_000;
|
||||
|
||||
export interface FilteredIdsResponse {
|
||||
ids: string[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface CreateSmsCampaignRequest {
|
||||
name: string;
|
||||
body: string;
|
||||
personIds: string[];
|
||||
/** دقیقاً یکی از personIds یا leadIds */
|
||||
personIds?: string[];
|
||||
leadIds?: string[];
|
||||
scheduledAt?: string | null;
|
||||
/** اگر true باشد بلافاصله صف میشود */
|
||||
/** اگر true باشد بلافاصله صف میشود (فقط وقتی همه گیرندهها در همین درخواست باشند یا بعد از افزودن تکهها جداگانه queue شود) */
|
||||
queueNow?: boolean;
|
||||
}
|
||||
|
||||
export interface AddSmsCampaignRecipientsRequest {
|
||||
personIds?: string[];
|
||||
leadIds?: string[];
|
||||
}
|
||||
|
||||
export interface SmsCampaignListResponse {
|
||||
items: SmsCampaignDto[];
|
||||
total: number;
|
||||
|
||||
Reference in New Issue
Block a user