Ночное задание spam-rescue: возврат инвойсов из Спама (слова проектов/клиентов/вендоров, белый список, фильтры Gmail), миграция 075
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import { runInvoicePaid } from "./invoice-paid.js";
|
||||
import { runInvoiceReconcile } from "./invoice-reconcile.js";
|
||||
import { GmailClient } from "./gmail.js";
|
||||
import { GoogleAuth } from "./google.js";
|
||||
import { runSpamRescue } from "./spam-rescue.js";
|
||||
import { runHistoryWeekly } from "./history-report.js";
|
||||
import { makeClaudeStatementReader, runMonthlyReconcile } from "./reconcile.js";
|
||||
import { buildApi } from "./http-api.js";
|
||||
@@ -153,6 +154,10 @@ const app = buildApi({
|
||||
},
|
||||
"history-weekly": () => runHistoryWeekly({ pool, ...reportSlack() }),
|
||||
"fraud-weekly": () => runFraudWeekly({ pool, ...reportSlack() }),
|
||||
"spam-rescue": async () => {
|
||||
if (!auth || !s.google) throw new Error("не настроены google (ключ сервисного аккаунта)");
|
||||
return runSpamRescue({ pool, auth, log, mailboxes: s.google.spamRescue.mailboxes, sourceMailbox: s.google.gmailUser, dryRun: s.google.spamRescue.dryRun });
|
||||
},
|
||||
summary: async () => {
|
||||
if (!slack || !s.slack) throw new Error("не настроен slack (botToken, accountingChannelId)");
|
||||
const options = { nonWorkdays: await nonWorkdays(), mathesarUrl: s.mathesarUrl, bankFeedUrl: s.receipts.qboBankingUrl };
|
||||
|
||||
Reference in New Issue
Block a user