feat(tahesab): import and refresh customers at chosen hours

Each connection can set how many times a day and at which Tehran hours the server pulls Tahesab customers, including name updates for people already linked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-05 12:31:27 +03:30
co-authored by Cursor
parent c976c0bcd6
commit 94f0383c79
9 changed files with 443 additions and 10 deletions
+10 -1
View File
@@ -4287,6 +4287,11 @@ export interface TahesabConnectionDto {
lastHealthAt: string | null;
lastHealthOk: boolean | null;
lastError: string | null;
/** ساعت‌های ۰ تا ۲۳ به وقت تهران. خالی یعنی بروزرسانی خودکار خاموش است. */
customerSyncHours: number[];
customerSyncLastRunAt: string | null;
customerSyncLastSummary: string | null;
customerSyncLastError: string | null;
createdAt: string;
updatedAt: string;
}
@@ -4301,7 +4306,11 @@ export interface CreateTahesabConnectionRequest {
allowInsecureTls?: boolean;
}
export type UpdateTahesabConnectionRequest = Partial<CreateTahesabConnectionRequest>;
export interface UpdateTahesabConnectionRequest
extends Partial<CreateTahesabConnectionRequest> {
/** آرایهٔ خالی بروزرسانی خودکار را خاموش می‌کند. */
customerSyncHours?: number[];
}
export interface PersonAccountingLinkDto {
id: string;