feat: add student crm push

This commit is contained in:
Codex
2026-06-30 16:21:17 +08:00
parent d94b20b8ed
commit 7f97b52165
15 changed files with 774 additions and 27 deletions

View File

@@ -124,6 +124,20 @@ export interface TenantStudentFollowupItem {
updatedAt?: string;
}
export interface TenantStudentCrmPushInput {
studentUserIds: string[];
source?: string;
title: string;
message?: string | null;
followupType?: string;
priority?: string;
assignedToUserId?: string | null;
classId?: string | null;
dueAt?: string | null;
metadata?: Record<string, unknown>;
idempotencyKey?: string;
}
export interface ImportJobItem {
id: string;
importType?: string;
@@ -985,6 +999,13 @@ export async function updateTenantStudentStatus(input: { userId: string; status:
});
}
export async function pushTenantStudentsToCrm(input: TenantStudentCrmPushInput) {
return apiRequest<BulkOperationResult & { requestId?: string }>('/api/tenant-admin/students/crm-push', {
method: 'POST',
body: input,
});
}
export async function bulkAssignTenantClassMembers(input: {
classId: string;
assignments: Array<{