feat: ship self-hosted KOC LOOP workflows
This commit is contained in:
@@ -7,8 +7,6 @@ import {
|
||||
} from "../../../lib/recovery-workbook";
|
||||
import { consumeMcpExportToken } from "../../../lib/mcp-export-token";
|
||||
|
||||
export const runtime = "edge";
|
||||
|
||||
type AccountRow = {
|
||||
id: string;
|
||||
platform: string;
|
||||
@@ -18,6 +16,7 @@ type AccountRow = {
|
||||
ip_location: string;
|
||||
followers: number;
|
||||
post_count: number;
|
||||
cooperation_source: string;
|
||||
first_seen_at: string;
|
||||
last_seen_at: string;
|
||||
};
|
||||
@@ -118,7 +117,15 @@ async function exportAccounts(accountIds: string[]) {
|
||||
];
|
||||
const rows: RecoveryWorkbookRow[] = accounts.map((account, index) => {
|
||||
const cooperation = cooperationByAccount.get(account.id) ?? [];
|
||||
const sources = [...new Set(cooperation.map((item) => item.partner_name))];
|
||||
const sources = [
|
||||
...new Set([
|
||||
...cooperation.map((item) => item.partner_name),
|
||||
...(account.cooperation_source || "")
|
||||
.split(/[、,,;;|]/)
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean),
|
||||
]),
|
||||
];
|
||||
const partnerManagedOnly =
|
||||
cooperation.some((item) => item.delegation_bundle_id) &&
|
||||
cooperation.every((item) => item.delegation_bundle_id);
|
||||
|
||||
Reference in New Issue
Block a user