adyou 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/adapters/google.js
CHANGED
|
@@ -340,7 +340,7 @@ export class GoogleConnector {
|
|
|
340
340
|
if (!ads.length)
|
|
341
341
|
return [];
|
|
342
342
|
const rows = await this.search(`SELECT ad_group_ad.resource_name, ad_group_ad.ad.name, ad_group_ad.policy_summary.approval_status, ad_group_ad.policy_summary.review_status, ad_group_ad.policy_summary.policy_topic_entries FROM ad_group_ad WHERE ad_group_ad.resource_name IN (${ads.map((a) => `'${a.externalId}'`).join(',')})`);
|
|
343
|
-
return rows.map((r) => ({ id: r.adGroupAd.resourceName, name: r.adGroupAd.ad.name || '', status: `${r.adGroupAd.policySummary?.approvalStatus || ''} · ${r.adGroupAd.policySummary?.reviewStatus || ''}`, issues: (r.adGroupAd.policySummary?.policyTopicEntries || []).map((p) => `${p.type || ''} ${p.topic || ''}`.trim()) }));
|
|
343
|
+
return rows.map((r) => ({ id: r.adGroupAd.resourceName, name: r.adGroupAd.ad.name || '', status: `${r.adGroupAd.policySummary?.approvalStatus || ''} · ${r.adGroupAd.policySummary?.reviewStatus || ''}`, issues: (r.adGroupAd.policySummary?.policyTopicEntries || []).map((p) => `${p.type || ''} ${p.topic || ''}`.trim()), evidence: [...new Set((r.adGroupAd.policySummary?.policyTopicEntries || []).flatMap((p) => (p.evidences || []).flatMap((e) => [...(e.textList?.texts || []), ...(e.destinationTextList?.destinationTexts || []), ...(e.websiteList?.websites || [])])))].slice(0, 20) }));
|
|
344
344
|
}
|
|
345
345
|
async remove(placements) {
|
|
346
346
|
for (const p of placements.filter((x) => x.medium === 'google' && x.kind === 'campaign'))
|
package/dist/adapters/mock.js
CHANGED
|
@@ -81,6 +81,7 @@ export class MockConnector {
|
|
|
81
81
|
}
|
|
82
82
|
async policy(placements) {
|
|
83
83
|
// 시험용 검수 상태 주입 — ADPILOT_MOCK_POLICY='{"google":{"status":"APPROVED_LIMITED · REVIEWED","issues":["FULLY_LIMITED TICKET_RESALE"]}}'
|
|
84
|
+
// skip: 이 글자가 이름에 든 광고는 주입하지 않음(예: "_f" → AI 가 고친 광고는 승인) · evidence: 문제 삼은 문구
|
|
84
85
|
let o;
|
|
85
86
|
try {
|
|
86
87
|
o = JSON.parse(process.env.ADPILOT_MOCK_POLICY || '{}')[this.medium];
|
|
@@ -88,7 +89,7 @@ export class MockConnector {
|
|
|
88
89
|
catch {
|
|
89
90
|
o = undefined;
|
|
90
91
|
}
|
|
91
|
-
return placements.filter((p) => p.medium === this.medium && p.kind === 'ad').map((p) => ({ id: p.externalId, name: p.name, status: o
|
|
92
|
+
return placements.filter((p) => p.medium === this.medium && p.kind === 'ad').map((p) => { const hit = o && !(o.skip && `${p.name} ${p.concept || ''}`.includes(o.skip)); return { id: p.externalId, name: p.name, status: hit ? o.status || 'APPROVED' : 'APPROVED', issues: hit ? o.issues || [] : [], ...(hit && o.evidence ? { evidence: o.evidence } : {}) }; });
|
|
92
93
|
}
|
|
93
94
|
async remove(placements) { const st = this.load(); const ids = new Set(placements.map((p) => p.externalId)); st.objects = st.objects.filter((o) => !ids.has(o.externalId)); st.calls.push('remove'); this.save(st); }
|
|
94
95
|
}
|
package/dist/adapters/types.d.ts
CHANGED
|
@@ -66,7 +66,8 @@ export type PolicyRow = {
|
|
|
66
66
|
id: string;
|
|
67
67
|
name: string;
|
|
68
68
|
status: string;
|
|
69
|
-
issues: string[];
|
|
69
|
+
issues: string[]; /** 매체가 문제 삼은 실제 문구(구글 policy evidence) — AI 자동 수정이 정확히 그 표현만 고치게 */
|
|
70
|
+
evidence?: string[];
|
|
70
71
|
};
|
|
71
72
|
export type InventoryRow = {
|
|
72
73
|
level: 'campaign' | 'adset' | 'ad';
|
package/package.json
CHANGED