feat: add CRM lead assignment strategies

This commit is contained in:
Codex
2026-06-29 20:51:24 +08:00
parent f6710ace8b
commit ec23cd3b9b
10 changed files with 375 additions and 20 deletions

View File

@@ -421,6 +421,10 @@ export interface CrmConfigItem {
examType?: string | null;
timeoutSec?: number;
delaySec?: number;
assignmentMode?: 'none' | 'direct' | 'round_robin' | 'referrer';
assignmentPool?: string[];
assignmentCursor?: number;
assignmentConfig?: Record<string, unknown>;
updatedAt?: string;
}
@@ -1017,6 +1021,9 @@ export async function upsertCrmConfig(input: {
examType?: string | null;
timeoutSec?: number;
delaySec?: number;
assignmentMode?: 'none' | 'direct' | 'round_robin' | 'referrer';
assignmentPool?: string[];
assignmentConfig?: Record<string, unknown>;
}) {
return apiRequest<{ item?: CrmConfigItem }>('/api/crm/config', {
method: 'PUT',