@erdoai/cli 0.184.1 → 0.185.0
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/index.js +26 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -354,6 +354,9 @@ var ErdoClient = class {
|
|
|
354
354
|
if (customerId) query.set("customer_id", customerId);
|
|
355
355
|
return this.request("GET", `/v1/paid-media/audiences?${query}`);
|
|
356
356
|
}
|
|
357
|
+
auditPaidMediaNegativeCoverage(input) {
|
|
358
|
+
return this.request("POST", "/v1/paid-media/negative-coverage", input);
|
|
359
|
+
}
|
|
357
360
|
listPaidMediaCampaigns(customerId) {
|
|
358
361
|
const query = customerId ? `?customer_id=${encodeURIComponent(customerId)}` : "";
|
|
359
362
|
return this.request("GET", `/v1/paid-media/campaigns${query}`);
|
|
@@ -3083,6 +3086,29 @@ paidMedia.command("audiences").description("Read live audience lists, eligibilit
|
|
|
3083
3086
|
fail(e);
|
|
3084
3087
|
}
|
|
3085
3088
|
});
|
|
3089
|
+
paidMedia.command("negative-coverage").description("Read live Google Ads negative keyword coverage. Does not add or remove keywords").option("--provider <provider>", "ad platform", "google_ads").option("--customer-id <id>", "Google Ads customer id (defaults to the selected account)").option("--campaign-id <id>", "one Search campaign; omit to read Search campaigns in the account").option("--json", "print the raw JSON result, including unreadable scopes").action(async (opts) => {
|
|
3090
|
+
try {
|
|
3091
|
+
const result = await new ErdoClient().auditPaidMediaNegativeCoverage({
|
|
3092
|
+
provider: opts.provider,
|
|
3093
|
+
customer_id: opts.customerId,
|
|
3094
|
+
campaign_id: opts.campaignId
|
|
3095
|
+
});
|
|
3096
|
+
if (opts.json) {
|
|
3097
|
+
print(result);
|
|
3098
|
+
return;
|
|
3099
|
+
}
|
|
3100
|
+
console.log(`customer ${result.customer_id}${result.truncated ? " (truncated)" : ""}`);
|
|
3101
|
+
for (const campaign of result.campaigns ?? []) {
|
|
3102
|
+
const id = String(campaign.campaign_id ?? "");
|
|
3103
|
+
const coverage = String(campaign.coverage ?? "");
|
|
3104
|
+
const missing = Array.isArray(campaign.missing) ? campaign.missing.length : 0;
|
|
3105
|
+
console.log(`${id} ${coverage} missing=${missing}`);
|
|
3106
|
+
}
|
|
3107
|
+
if (result.read_note) console.log(result.read_note);
|
|
3108
|
+
} catch (e) {
|
|
3109
|
+
fail(e);
|
|
3110
|
+
}
|
|
3111
|
+
});
|
|
3086
3112
|
var paidMediaCampaigns = paidMedia.command("campaigns").description("Google Ads campaigns and their conversion goals");
|
|
3087
3113
|
paidMedia.command("audience-mode <campaignId>").description("Set audience Observation or Targeting, preserving other targeting dimensions (approval-gated)").requiredOption("--customer-id <id>", "Google Ads customer ID").requiredOption("--mode <mode>", "observation or targeting").option("--adgroup-id <id>", "update this ad group instead of its parent campaign").option("--reason <text>", "reason shown on the approval card").action(async (campaignId, opts) => {
|
|
3088
3114
|
try {
|