@adkit/cli 1.12.19 → 1.12.20

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.
Files changed (2) hide show
  1. package/dist/cli.js +28 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1815,8 +1815,8 @@ var ASSET_CREATE_FLAGS = ["type", "text", "sitelink", "header", "value", "descri
1815
1815
  var ASSET_LINK_FLAGS = ["type", "scope", "scope-id", "status"];
1816
1816
  var MEDIA_UPLOAD_FLAGS = ["file", "url", "base64", "adkit-media", "filename", "content-type", "name"];
1817
1817
  var CAMPAIGN_LIST_FLAGS = ["status", "limit", "offset"];
1818
- var CAMPAIGN_CREATE_FLAGS = ["name", "status", "budget-daily", "campaign-type", "bid-strategy", "search-partners", "display-network", "tracking-url-suffix", "countries"];
1819
- var CAMPAIGN_UPDATE_FLAGS = ["name", "status", "budget-daily", "bid-strategy", "search-partners", "display-network", "tracking-url-suffix", "countries"];
1818
+ var CAMPAIGN_CREATE_FLAGS = ["name", "status", "budget-daily", "campaign-type", "bid-strategy", "target-cpa", "target-roas", "search-partners", "display-network", "tracking-url-suffix", "countries"];
1819
+ var CAMPAIGN_UPDATE_FLAGS = ["name", "status", "budget-daily", "bid-strategy", "target-cpa", "target-roas", "search-partners", "display-network", "tracking-url-suffix", "countries"];
1820
1820
  var AD_GROUP_LIST_FLAGS = ["campaign", "status", "limit", "offset"];
1821
1821
  var AD_GROUP_FLAGS = ["campaign", "name", "status", "cpc-bid"];
1822
1822
  var AD_LIST_FLAGS = ["ad-group", "status", "policy-status", "limit", "offset"];
@@ -1831,7 +1831,7 @@ var NEGATIVE_LIST_LIST_FLAGS = ["status", "limit", "offset"];
1831
1831
  var NEGATIVE_LIST_ATTACH_FLAGS = ["campaign"];
1832
1832
  var SEARCH_TERMS_FLAGS = ["campaign", "ad-group", "keyword", "keyword-match-type", "period", "from", "to", "min-impressions", "sort", "limit", "raw"];
1833
1833
  var PLACEMENT_REPORT_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "raw"];
1834
- var GOOGLE_RESULTS_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "status", "breakdown", "fields", "raw"];
1834
+ var GOOGLE_RESULTS_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "status", "breakdown", "fields", "conversion-actions", "raw"];
1835
1835
  var GOOGLE_KEYWORD_RESULTS_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "status", "fields", "raw"];
1836
1836
  var CHANGE_HISTORY_FLAGS = ["account", "period", "from", "to", "limit", "resource", "campaign", "ad-group"];
1837
1837
  var KEYWORD_RESEARCH_FLAGS = ["url", "location", "language", "limit", "min-volume"];
@@ -1975,6 +1975,8 @@ function buildCampaignPayload2(flags) {
1975
1975
  if (typeof flags["campaign-type"] === "string") payload.campaignType = flags["campaign-type"];
1976
1976
  if (typeof flags["budget-daily"] === "string") payload.budget = { daily: Number.parseFloat(flags["budget-daily"]) };
1977
1977
  if (typeof flags["bid-strategy"] === "string") payload.bidStrategy = flags["bid-strategy"];
1978
+ if (typeof flags["target-cpa"] === "string") payload.targetCpa = Number.parseFloat(flags["target-cpa"]);
1979
+ if (typeof flags["target-roas"] === "string") payload.targetRoas = Number.parseFloat(flags["target-roas"]);
1978
1980
  if (flags["search-partners"] === true) payload.searchPartners = true;
1979
1981
  if (flags["display-network"] === true) payload.displayNetwork = true;
1980
1982
  if (typeof flags["tracking-url-suffix"] === "string") payload.trackingUrlSuffix = flags["tracking-url-suffix"];
@@ -1992,6 +1994,8 @@ function buildCampaignUpdatePayloadFromFlags(flags) {
1992
1994
  if (typeof flags.status === "string") payload.status = flags.status;
1993
1995
  if (typeof flags["budget-daily"] === "string") payload.budget = { daily: Number.parseFloat(flags["budget-daily"]) };
1994
1996
  if (typeof flags["bid-strategy"] === "string") payload.bidStrategy = flags["bid-strategy"];
1997
+ if (typeof flags["target-cpa"] === "string") payload.targetCpa = Number.parseFloat(flags["target-cpa"]);
1998
+ if (typeof flags["target-roas"] === "string") payload.targetRoas = Number.parseFloat(flags["target-roas"]);
1995
1999
  if (flags["search-partners"] === true) payload.searchPartners = true;
1996
2000
  if (flags["display-network"] === true) payload.displayNetwork = true;
1997
2001
  if (typeof flags["tracking-url-suffix"] === "string") payload.trackingUrlSuffix = flags["tracking-url-suffix"];
@@ -2623,8 +2627,9 @@ async function listGoogleResults(client, args, flags) {
2623
2627
  const fieldsFlag = typeof flags.fields === "string" ? flags.fields.trim() : "";
2624
2628
  const fields = fieldsFlag ? fieldsFlag : void 0;
2625
2629
  if (typeof flags.fields === "string") delete flags.fields;
2630
+ const conversionActions = flags["conversion-actions"] === true ? "true" : void 0;
2626
2631
  const raw = flags.raw === true ? "true" : void 0;
2627
- const qs = queryString({ accountId, level, campaignId, adGroupId, period, from, to, sort, limit, status: status2, breakdown, fields, raw });
2632
+ const qs = queryString({ accountId, level, campaignId, adGroupId, period, from, to, sort, limit, status: status2, breakdown, fields, conversionActions, raw });
2628
2633
  return client.get(`/manage/google/results${qs}`);
2629
2634
  }
2630
2635
  function buildSearchTermsQuery(flags) {
@@ -4047,6 +4052,10 @@ var FLAG = {
4047
4052
  budgetDaily: " --budget-daily <n> Daily budget in account currency",
4048
4053
  cta: " --cta <type> sign_up, learn_more, shop_now, download, get_offer, contact_us, subscribe, get_quote, book_now, apply_now"
4049
4054
  };
4055
+ var RAW_PLATFORM_LABELS = { google: "Google", meta: "Meta", reddit: "Reddit", tiktok: "TikTok" };
4056
+ function rawPlatformCommandLine(platform2) {
4057
+ return `Raw ${RAW_PLATFORM_LABELS[platform2] ?? platform2} API calls use the shared command: adkit manage platform-api-requests --platform ${platform2} ...`;
4058
+ }
4050
4059
  var CAMPAIGN_HELP = `adkit manage meta campaigns \u2014 Meta ad campaigns
4051
4060
 
4052
4061
  list List campaigns
@@ -4670,12 +4679,16 @@ Flags (create):
4670
4679
  --budget-daily <n> Daily budget in account currency
4671
4680
  --campaign-type <type> search, display, performance_max (performance_max needs --data for asset groups)
4672
4681
  --bid-strategy <s> manual_cpc, manual_cpm, maximize_clicks, maximize_conversions, maximize_conversion_value, target_spend, target_impression_share
4682
+ --target-cpa <n> Target CPA in account currency (with --bid-strategy maximize_conversions)
4683
+ --target-roas <n> Target ROAS ratio, e.g. 3.5 = 350% (with --bid-strategy maximize_conversion_value)
4673
4684
 
4674
4685
  Flags (update):
4675
4686
  --name <name> Campaign name
4676
4687
  --status <s> enabled, paused
4677
4688
  --budget-daily <n> Daily budget in account currency
4678
4689
  --bid-strategy <s> Change bidding strategy
4690
+ --target-cpa <n> Target CPA in account currency. Send alone to retune the existing maximize_conversions target
4691
+ --target-roas <n> Target ROAS ratio (3.5 = 350%). Send alone to retune the existing target, incl. Performance Max
4679
4692
  --countries <codes> Replace included countries, e.g. US,CA
4680
4693
 
4681
4694
  Flags (list):
@@ -5098,6 +5111,8 @@ Flags:
5098
5111
  --status <s> Filter: enabled, paused, all
5099
5112
  --breakdown <b> Split rows by: day, device, network, hour, geo. Hour/geo support account, campaigns, ad-groups.
5100
5113
  --fields <list> Response fields, e.g. cost,clicks,searchImpressionShare. Omit for default advertiser metrics; use all for every supported field.
5114
+ --conversion-actions
5115
+ Add conversionEvents per row, grouped by Google conversion action. Costs one extra Google read call.
5101
5116
  --raw Return raw Google API response
5102
5117
  --account <id> Optional if one Google Ads account is connected
5103
5118
 
@@ -5121,6 +5136,7 @@ Examples:
5121
5136
  adkit manage google results --campaign 123 --period 7d
5122
5137
  adkit manage google results --campaign 123 --period 7d --breakdown day
5123
5138
  adkit manage google results --campaign 123 --period 7d --breakdown device
5139
+ adkit manage google results campaigns --period 30d --conversion-actions
5124
5140
  adkit manage google results campaigns --period 7d --breakdown hour
5125
5141
  adkit manage google results campaigns --period 30d --breakdown geo
5126
5142
  adkit manage google results placements --campaign 123 --period 30d
@@ -5577,6 +5593,7 @@ ${FLAG.publish}
5577
5593
  ${FLAG.data}
5578
5594
 
5579
5595
  Mutations are draft-first by default. Use --publish to publish immediately.
5596
+ ${rawPlatformCommandLine("meta")}
5580
5597
  Run adkit manage meta <group> --help for details.`.trim(),
5581
5598
  google: `adkit manage google \u2014 Google Ads management
5582
5599
 
@@ -5599,6 +5616,7 @@ ${FLAG.publish}
5599
5616
  ${FLAG.data}
5600
5617
 
5601
5618
  Mutations are draft-first by default. Use --publish to publish immediately.
5619
+ ${rawPlatformCommandLine("google")}
5602
5620
  Display path: research topics/interests, upload images with google media, create campaigns --campaign-type display, create ad-groups with targeting, then create ads with type:"responsive_display".
5603
5621
  Google Display Ads is in beta \u2014 some first-class normalized Display features may not be available yet.
5604
5622
  Run adkit manage google <group> --help for details.`.trim(),
@@ -5617,14 +5635,14 @@ ${FLAG.account}
5617
5635
  ${FLAG.publish}
5618
5636
  ${FLAG.data}
5619
5637
 
5638
+ ${rawPlatformCommandLine("tiktok")}
5620
5639
  Run adkit manage tiktok <group> --help for details.`.trim(),
5621
5640
  reddit: `adkit manage reddit \u2014 Reddit Ads management
5622
5641
 
5623
5642
  Entity groups:
5624
5643
  accounts List and connect Reddit ad accounts
5625
5644
 
5626
- Raw Reddit Ads API access is available through:
5627
- adkit manage platform-api-requests --platform reddit ...
5645
+ ${rawPlatformCommandLine("reddit")}
5628
5646
 
5629
5647
  General flags:
5630
5648
  ${FLAG.account}
@@ -6106,9 +6124,12 @@ ${titleParts.join(" \xB7 ")}`);
6106
6124
  const parts = [];
6107
6125
  const count = num(val, "count");
6108
6126
  const cost = num(val, "costPerResult") ?? num(val, "cost");
6127
+ const label = str(val, "label") ?? humanizeAction(key);
6109
6128
  if (count !== void 0) parts.push(fmtNum(count));
6110
6129
  if (cost !== void 0) parts.push(`${fmtCurrency(cost, currency)} each`);
6111
- if (parts.length > 0) console.log(` ${humanizeAction(key).padEnd(14)}${parts.join(" \xB7 ")}`);
6130
+ const labelColumn = label.padEnd(14);
6131
+ const metricText = parts.join(" \xB7 ");
6132
+ if (parts.length > 0) console.log(` ${labelColumn}${metricText}`);
6112
6133
  }
6113
6134
  }
6114
6135
  const aq = nested(row, "ad_quality");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adkit/cli",
3
- "version": "1.12.19",
3
+ "version": "1.12.20",
4
4
  "description": "The Ads CLI for AI agents — manage Meta & Google ad campaigns, browse the ad library, and generate creatives from your terminal.",
5
5
  "keywords": [
6
6
  "ads cli",