@adkit/cli 1.13.29 → 1.13.31

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 +210 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1567,25 +1567,35 @@ async function listMetaLeadForms(client, _args, flags) {
1567
1567
  const qs = queryString({ accountId, pageId, fields, raw });
1568
1568
  return client.get(`/manage/meta/lead-forms${qs}`);
1569
1569
  }
1570
- function buildCampaignPayload(flags) {
1570
+ async function listMetaConversions(client, _args, flags) {
1571
+ validateFlags(flags, ["account", "limit", "offset", "raw"], "manage meta conversions list");
1572
+ const accountId = typeof flags.account === "string" ? flags.account : void 0;
1573
+ const limit = typeof flags.limit === "string" ? flags.limit : void 0;
1574
+ const offset = typeof flags.offset === "string" ? flags.offset : void 0;
1575
+ const raw = flags.raw === true ? "true" : void 0;
1576
+ const qs = queryString({ accountId, limit, offset, raw });
1577
+ return client.get(`/manage/meta/conversions${qs}`);
1578
+ }
1579
+ function buildCampaignPayload(flags, { defaultCbo }) {
1571
1580
  const payload = {};
1572
1581
  if (typeof flags.name === "string") payload.name = flags.name;
1573
1582
  if (typeof flags.objective === "string") payload.objective = flags.objective;
1574
1583
  if (typeof flags.status === "string") payload.status = flags.status;
1575
1584
  if (typeof flags["bid-strategy"] === "string") payload.bidStrategy = flags["bid-strategy"];
1576
1585
  if (flags.abo === true) payload.advantageCampaignBudget = false;
1577
- else payload.advantageCampaignBudget = true;
1586
+ else if (defaultCbo) payload.advantageCampaignBudget = true;
1578
1587
  if (typeof flags["budget-daily"] === "string") payload.budget = { daily: parseFloat(flags["budget-daily"]) };
1579
1588
  if (typeof flags["budget-total"] === "string") payload.budget = { ...payload.budget, lifetime: parseFloat(flags["budget-total"]) };
1580
1589
  if (typeof flags["platform-overrides"] === "string") payload.platformOverrides = parseJsonObject(flags["platform-overrides"], "platform-overrides");
1581
1590
  return payload;
1582
1591
  }
1583
1592
  async function listMetaCampaigns(client, _args, flags) {
1584
- validateFlags(flags, ["account", "status", "raw"], "manage meta campaigns list");
1593
+ validateFlags(flags, ["account", "status", "limit", "raw"], "manage meta campaigns list");
1585
1594
  const accountId = typeof flags.account === "string" ? flags.account : void 0;
1586
1595
  const status2 = typeof flags.status === "string" ? flags.status : void 0;
1596
+ const limit = typeof flags.limit === "string" ? flags.limit : void 0;
1587
1597
  const raw = flags.raw === true ? "true" : void 0;
1588
- const qs = queryString({ accountId, status: status2, raw });
1598
+ const qs = queryString({ accountId, status: status2, limit, raw });
1589
1599
  return client.get(`/manage/meta/campaigns${qs}`);
1590
1600
  }
1591
1601
  var CAMPAIGN_FLAGS = ["name", "objective", "status", "budget-daily", "budget-total", "abo", "bid-strategy"];
@@ -1603,7 +1613,7 @@ async function createCampaign(client, _args, flags) {
1603
1613
  return client.post(`/manage/meta/campaigns${publish2}`, body2);
1604
1614
  }
1605
1615
  validateFlags(flags, CAMPAIGN_FLAGS, "manage meta campaigns create");
1606
- const payload = buildCampaignPayload(flags);
1616
+ const payload = buildCampaignPayload(flags, { defaultCbo: true });
1607
1617
  if (!payload.name) payload.name = generateCampaignName();
1608
1618
  const body = { campaigns: [payload] };
1609
1619
  mergeAccountId(body, flags);
@@ -1612,15 +1622,16 @@ async function createCampaign(client, _args, flags) {
1612
1622
  }
1613
1623
  async function updateCampaign(client, args, flags) {
1614
1624
  const id = requireArg(args, 0, "campaign-id", `Run: adkit manage meta campaigns update <campaign-id> --status paused`);
1625
+ const publish = flags.publish === true ? "?publish=true" : "";
1615
1626
  if (typeof flags.data === "string") {
1616
1627
  const body = parseDataFlag(flags, "Check JSON syntax in --data");
1617
1628
  mergeAccountId(body, flags);
1618
- return client.patch(`/manage/meta/campaigns/${id}`, body);
1629
+ return client.patch(`/manage/meta/campaigns/${id}${publish}`, body);
1619
1630
  }
1620
1631
  validateFlags(flags, CAMPAIGN_FLAGS, "manage meta campaigns update");
1621
- const payload = buildCampaignPayload(flags);
1632
+ const payload = buildCampaignPayload(flags, { defaultCbo: false });
1622
1633
  mergeAccountId(payload, flags);
1623
- return client.patch(`/manage/meta/campaigns/${id}`, payload);
1634
+ return client.patch(`/manage/meta/campaigns/${id}${publish}`, payload);
1624
1635
  }
1625
1636
  async function deleteCampaign(client, args, flags) {
1626
1637
  const id = requireArg(args, 0, "campaign-id", "Run: adkit manage meta campaigns delete <campaign-id>");
@@ -1693,15 +1704,16 @@ async function createAdSet(client, _args, flags) {
1693
1704
  }
1694
1705
  async function updateAdSet(client, args, flags) {
1695
1706
  const id = requireArg(args, 0, "adset-id", `Run: adkit manage meta adsets update <adset-id> --budget-daily 50`);
1707
+ const publish = flags.publish === true ? "?publish=true" : "";
1696
1708
  if (typeof flags.data === "string") {
1697
1709
  const body = parseDataFlag(flags, "Check JSON syntax in --data");
1698
1710
  mergeAccountId(body, flags);
1699
- return client.patch(`/manage/meta/adsets/${id}`, body);
1711
+ return client.patch(`/manage/meta/adsets/${id}${publish}`, body);
1700
1712
  }
1701
1713
  validateFlags(flags, ADSET_FLAGS, "manage meta adsets update");
1702
1714
  const payload = buildAdSetPayload(flags);
1703
1715
  mergeAccountId(payload, flags);
1704
- return client.patch(`/manage/meta/adsets/${id}`, payload);
1716
+ return client.patch(`/manage/meta/adsets/${id}${publish}`, payload);
1705
1717
  }
1706
1718
  async function deleteAdSet(client, args, flags) {
1707
1719
  const id = requireArg(args, 0, "adset-id", "Run: adkit manage meta adsets delete <adset-id>");
@@ -1864,7 +1876,8 @@ async function updateAd(client, args, flags) {
1864
1876
  const id = requireArg(args, 0, "ad-id", `Run: adkit manage meta ads update <ad-id> --data '{"status":"paused"}'`);
1865
1877
  const body = parseDataFlag(flags, "Check JSON syntax in --data");
1866
1878
  mergeAccountId(body, flags);
1867
- return client.patch(`/manage/meta/ads/${id}`, body);
1879
+ const publish = flags.publish === true ? "?publish=true" : "";
1880
+ return client.patch(`/manage/meta/ads/${id}${publish}`, body);
1868
1881
  }
1869
1882
  async function deleteAd(client, args, flags) {
1870
1883
  const id = requireArg(args, 0, "ad-id", "Run: adkit manage meta ads delete <ad-id>");
@@ -1918,15 +1931,16 @@ async function createCreative(client, _args, flags) {
1918
1931
  }
1919
1932
  async function updateCreative(client, args, flags) {
1920
1933
  const id = requireArg(args, 0, "creative-id", `Run: adkit manage meta creatives update <creative-id> --primary-text "Start free trial"`);
1934
+ const publish = flags.publish === true ? "?publish=true" : "";
1921
1935
  if (typeof flags.data === "string") {
1922
1936
  const body = parseDataFlag(flags, "Check JSON syntax in --data");
1923
1937
  mergeAccountId(body, flags);
1924
- return client.patch(`/manage/meta/creatives/${id}`, body);
1938
+ return client.patch(`/manage/meta/creatives/${id}${publish}`, body);
1925
1939
  }
1926
1940
  validateFlags(flags, CREATIVE_FLAGS, "manage meta creatives update");
1927
1941
  const payload = buildCreativePayload(flags);
1928
1942
  mergeAccountId(payload, flags);
1929
- return client.patch(`/manage/meta/creatives/${id}`, payload);
1943
+ return client.patch(`/manage/meta/creatives/${id}${publish}`, payload);
1930
1944
  }
1931
1945
  async function deleteCreative(client, args, flags) {
1932
1946
  const id = requireArg(args, 0, "creative-id", "Run: adkit manage meta creatives delete <creative-id>");
@@ -2024,6 +2038,9 @@ var SEARCH_TERMS_FLAGS = ["campaign", "ad-group", "keyword", "keyword-match-type
2024
2038
  var PLACEMENT_REPORT_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "raw"];
2025
2039
  var GOOGLE_RESULTS_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "status", "breakdown", "fields", "conversion-actions", "raw"];
2026
2040
  var GOOGLE_KEYWORD_RESULTS_FLAGS = ["campaign", "ad-group", "period", "from", "to", "sort", "limit", "status", "fields", "raw"];
2041
+ var CONVERSION_LIST_FLAGS = ["limit", "offset"];
2042
+ var CONVERSION_CREATE_FLAGS = ["name", "type", "category", "status", "counting-type", "default-value", "currency", "click-days", "view-days"];
2043
+ var CONVERSION_UPDATE_FLAGS = ["name", "category", "counting-type", "default-value", "currency"];
2027
2044
  var CONVERSION_UPLOAD_FLAGS = ["conversion", "gclid", "gbraid", "wbraid", "occurred-at", "value", "currency", "order-id", "conversion-environment", "validate-only", "job-id"];
2028
2045
  var CHANGE_HISTORY_FLAGS = ["account", "period", "from", "to", "limit", "resource", "campaign", "ad-group"];
2029
2046
  var KEYWORD_RESEARCH_FLAGS = ["url", "location", "language", "limit", "min-volume"];
@@ -2250,6 +2267,40 @@ function applyGoogleClickConversionUploadOptions(body, flags) {
2250
2267
  if (!Number.isInteger(jobId) || jobId >= 2147483648) throw new CliError("INVALID_VALUE", `Invalid integer for --job-id: ${rawJobId}`, "Use a non-negative integer below 2147483648");
2251
2268
  body.jobId = jobId;
2252
2269
  }
2270
+ function buildGoogleConversionCreateInput(flags) {
2271
+ const conversion = {
2272
+ name: requireFlag(flags, "name", "Google conversion create requires --name"),
2273
+ type: requireFlag(flags, "type", "Google conversion create requires --type"),
2274
+ category: requireFlag(flags, "category", "Google conversion create requires --category")
2275
+ };
2276
+ if (flags.status !== void 0) {
2277
+ if (flags.status !== "enabled") throw new CliError("INVALID_VALUE", `Unsupported conversion create status: ${String(flags.status)}`, "Use --status enabled or omit the flag.");
2278
+ conversion.status = flags.status;
2279
+ }
2280
+ if (typeof flags["counting-type"] === "string") conversion.countingType = flags["counting-type"];
2281
+ if (typeof flags["default-value"] === "string") conversion.defaultValue = readNumberFlag(flags, "default-value", "Use a non-negative number for --default-value");
2282
+ if (typeof flags.currency === "string") conversion.currency = flags.currency;
2283
+ const clickDays = readPositiveIntegerFlag(flags, "click-days");
2284
+ const viewDays = readPositiveIntegerFlag(flags, "view-days");
2285
+ if (clickDays !== void 0 || viewDays !== void 0) conversion.attributionWindow = { clickDays, viewDays };
2286
+ return conversion;
2287
+ }
2288
+ function buildGoogleConversionUpdateInput(flags) {
2289
+ const changes = {};
2290
+ if (typeof flags.name === "string") changes.name = flags.name;
2291
+ if (typeof flags.category === "string") changes.category = flags.category;
2292
+ if (typeof flags["counting-type"] === "string") changes.countingType = flags["counting-type"];
2293
+ if (typeof flags["default-value"] === "string") changes.defaultValue = readNumberFlag(flags, "default-value", "Use a non-negative number for --default-value");
2294
+ if (typeof flags.currency === "string") changes.currency = flags.currency;
2295
+ if (Object.keys(changes).length === 0) throw new CliError("MISSING_FLAG", "Conversion update requires at least one change", "Pass --name, --category, --counting-type, --default-value, --currency, or --data");
2296
+ return changes;
2297
+ }
2298
+ function readPositiveIntegerFlag(flags, key) {
2299
+ const value = flags[key];
2300
+ if (value === void 0) return void 0;
2301
+ if (typeof value !== "string" || !/^\d+$/u.test(value) || Number(value) < 1) throw new CliError("INVALID_VALUE", `Invalid positive integer for --${key}: ${String(value)}`, `Use a positive integer for --${key}`);
2302
+ return Number(value);
2303
+ }
2253
2304
  function resolveAssetScope(flags) {
2254
2305
  const scopeType = typeof flags.scope === "string" ? flags.scope : void 0;
2255
2306
  if (scopeType !== "account" && scopeType !== "campaign" && scopeType !== "ad-group") throw new CliError("MISSING_FLAG", "Missing required flag: `--scope`", "Use --scope account|campaign|ad-group");
@@ -2616,6 +2667,57 @@ async function uploadGoogleConversions(client, _args, flags) {
2616
2667
  const path3 = `/manage/google/conversions/upload${query}`;
2617
2668
  return client.post(path3, body);
2618
2669
  }
2670
+ async function listGoogleConversions(client, _args, flags) {
2671
+ validateFlags(flags, CONVERSION_LIST_FLAGS, "manage google conversions list");
2672
+ const accountId = typeof flags.account === "string" ? flags.account : void 0;
2673
+ const fields = typeof flags.fields === "string" ? flags.fields : void 0;
2674
+ const limit = typeof flags.limit === "string" ? flags.limit : void 0;
2675
+ const offset = typeof flags.offset === "string" ? flags.offset : void 0;
2676
+ const query = queryString({ accountId, fields, limit, offset });
2677
+ return client.get(`/manage/google/conversions${query}`);
2678
+ }
2679
+ async function getGoogleConversion(client, args, flags) {
2680
+ validateFlags(flags, [], "manage google conversions get");
2681
+ const id = requireGoogleNumericId(args, "conversion-id", "Run: adkit manage google conversions get <conversion-id>");
2682
+ const accountId = typeof flags.account === "string" ? flags.account : void 0;
2683
+ const fields = typeof flags.fields === "string" ? flags.fields : void 0;
2684
+ const query = queryString({ accountId, fields });
2685
+ return client.get(`/manage/google/conversions/${id}${query}`);
2686
+ }
2687
+ async function createGoogleConversion(client, _args, flags) {
2688
+ validateFlags(flags, CONVERSION_CREATE_FLAGS, "manage google conversions create");
2689
+ if (typeof flags.data === "string") {
2690
+ const rawBody2 = parseDataFlag(flags, 'Use { "conversions": [...] } for Google conversion create');
2691
+ const query2 = buildGoogleMutationQuery(flags, rawBody2);
2692
+ const body2 = removeQueryOnlyBodyKeys(rawBody2, ["accountId"]);
2693
+ return client.post(`/manage/google/conversions${query2}`, body2);
2694
+ }
2695
+ const conversion = buildGoogleConversionCreateInput(flags);
2696
+ const rawBody = { conversions: [conversion] };
2697
+ const query = buildGoogleMutationQuery(flags, rawBody);
2698
+ const body = removeQueryOnlyBodyKeys(rawBody, ["accountId"]);
2699
+ return client.post(`/manage/google/conversions${query}`, body);
2700
+ }
2701
+ async function updateGoogleConversion(client, args, flags) {
2702
+ validateFlags(flags, CONVERSION_UPDATE_FLAGS, "manage google conversions update");
2703
+ const id = requireGoogleNumericId(args, "conversion-id", "Run: adkit manage google conversions update <conversion-id> --data <json>");
2704
+ if (typeof flags.data === "string") {
2705
+ const rawBody2 = parseDataFlag(flags, "Use a Google conversion update object");
2706
+ const query2 = buildGoogleMutationQuery(flags, rawBody2);
2707
+ const body2 = removeQueryOnlyBodyKeys(rawBody2, ["accountId"]);
2708
+ return client.patch(`/manage/google/conversions/${id}${query2}`, body2);
2709
+ }
2710
+ const rawBody = buildGoogleConversionUpdateInput(flags);
2711
+ const query = buildGoogleMutationQuery(flags, rawBody);
2712
+ const body = removeQueryOnlyBodyKeys(rawBody, ["accountId"]);
2713
+ return client.patch(`/manage/google/conversions/${id}${query}`, body);
2714
+ }
2715
+ async function deleteGoogleConversion(client, args, flags) {
2716
+ validateFlags(flags, [], "manage google conversions delete");
2717
+ const id = requireGoogleNumericId(args, "conversion-id", "Run: adkit manage google conversions delete <conversion-id>");
2718
+ const query = buildGoogleMutationQuery(flags, {});
2719
+ return client.delete(`/manage/google/conversions/${id}${query}`);
2720
+ }
2619
2721
  async function listGoogleCampaigns(client, _args, flags) {
2620
2722
  validateFlags(flags, CAMPAIGN_LIST_FLAGS, "manage google campaigns list");
2621
2723
  const qs = buildGoogleListQuery(flags);
@@ -5083,6 +5185,7 @@ ${FLAG.budgetDaily}
5083
5185
  Flags (list):
5084
5186
  ${FLAG.account}
5085
5187
  --status <s> Filter by effective status (default: active,paused,in_process,with_issues; use "all" for every status)
5188
+ --limit <n> Maximum campaigns to return
5086
5189
 
5087
5190
  Flags (list/get):
5088
5191
  --raw Return raw Meta API response (no conversion)
@@ -5118,6 +5221,7 @@ ${FLAG.budgetDaily}
5118
5221
  Flags (list):
5119
5222
  ${FLAG.account}
5120
5223
  --status <s> Filter by effective status (default: active,paused,in_process,with_issues; use "all" for every status)
5224
+ --limit <n> Maximum campaigns to return
5121
5225
 
5122
5226
  Flags (list/get):
5123
5227
  --raw Return raw Meta API response (no conversion)
@@ -5472,7 +5576,9 @@ Flags:
5472
5576
  --adset-ids <ids> Comma-separated ad set IDs
5473
5577
  --ad-ids <ids> Comma-separated ad IDs
5474
5578
  --statuses <s> active, paused (filter by entity status)
5475
- --period <range> Relative range like 7d or preset: today, yesterday, this_month, last_month, this_quarter, last_quarter, this_year, last_year, maximum (default: 30d)
5579
+ --period <range> 3d, 7d, 14d, 28d, 30d, 90d, or a named preset (default: 30d)
5580
+ Named presets: today, yesterday, this_month, last_month, this_quarter, last_quarter, this_year, last_year, maximum
5581
+ Use --from/--to for any other date range.
5476
5582
  --from <date> Start date, YYYY-MM-DD
5477
5583
  --to <date> End date, YYYY-MM-DD
5478
5584
  --fields <list> Normalized fields, e.g. spend, impressions, clicks, conversionEvents, etc
@@ -6441,8 +6547,43 @@ Notes:
6441
6547
  YouTube registration does not upload, copy, or re-host the video.`;
6442
6548
  var GOOGLE_CONVERSIONS_HELP = `adkit manage google conversions \u2014 Google Ads conversion tracking
6443
6549
 
6550
+ list List configured conversion actions
6551
+ get <id> View a conversion action
6552
+ create Create a conversion action
6553
+ update <id> Update a conversion action
6554
+ delete <id> Delete a conversion action
6444
6555
  upload Upload offline click conversion events
6445
6556
 
6557
+ Flags (list/get):
6558
+ --account <id> Optional if one Google Ads account is connected
6559
+ --fields <fields> Comma-separated response fields
6560
+ --limit <n> Maximum rows to return (list only)
6561
+ --offset <n> Rows to skip (list only)
6562
+
6563
+ Flags (create):
6564
+ --name <name> Conversion action name (required for create)
6565
+ --type <type> Conversion action type (required for create)
6566
+ --category <value> Conversion category (required for create)
6567
+ --status <status> enabled (create only)
6568
+ --counting-type <t> one or many
6569
+ --default-value <n> Non-negative default conversion value
6570
+ --currency <code> ISO currency code, e.g. USD
6571
+ --click-days <n> Positive click attribution window
6572
+ --view-days <n> Positive view attribution window
6573
+ --account <id> Optional if one Google Ads account is connected
6574
+ --publish Apply directly to Google instead of saving a draft
6575
+ --data <json> Exact body: {"conversions":[...]}
6576
+
6577
+ Flags (update):
6578
+ --name <name> New conversion action name
6579
+ --category <value> New conversion category
6580
+ --counting-type <t> one or many
6581
+ --default-value <n> Non-negative default conversion value
6582
+ --currency <code> ISO currency code, e.g. USD
6583
+ --account <id> Optional if one Google Ads account is connected
6584
+ --publish Apply directly to Google instead of saving a draft
6585
+ --data <json> Exact partial update object
6586
+
6446
6587
  Flags (upload):
6447
6588
  --conversion <id> Google conversion ID (platformId), must be type upload_clicks
6448
6589
  --gclid <id> Google click ID
@@ -6459,13 +6600,38 @@ Flags (upload):
6459
6600
  --data <json> Batch body: {"conversions":[...],"validateOnly":true}
6460
6601
 
6461
6602
  Examples:
6603
+ adkit manage google conversions list --account 1234567890
6604
+ adkit manage google conversions get 123456 --account 1234567890
6605
+ adkit manage google conversions create --name "Qualified lead" --type upload_clicks --category submit_lead_form
6606
+ adkit manage google conversions update 123456 --name "Qualified lead v2" --publish
6607
+ adkit manage google conversions delete 123456
6462
6608
  adkit manage google conversions upload --conversion 123 --gclid EAIaIQob... --occurred-at "2026-06-24 13:45:00+00:00" --value 120 --currency USD --validate-only
6463
6609
  adkit manage google conversions upload --data '{"conversions":[{"conversionId":"123","gclid":"EAIaIQob...","occurredAt":"2026-06-24 13:45:00+00:00","value":120,"currency":"USD"}],"validateOnly":true}' --account 1234567890
6464
6610
 
6465
6611
  Notes:
6612
+ Create, update, and delete save a draft by default. Pass --publish to apply immediately.
6613
+ Google conversion actions do not support paused. Use delete for removal.
6614
+ Use --data for advanced fields such as isPrimary and alwaysUseDefaultValue.
6466
6615
  Upload sends events directly to Google; it is not a draft flow.
6467
6616
  Use --validate-only before a real upload when testing a new CRM/backend export.
6468
6617
  Real uploads require publish access.`;
6618
+ var META_CONVERSIONS_HELP = `adkit manage meta conversions \u2014 Meta Custom Conversions
6619
+
6620
+ list List configured custom conversions
6621
+
6622
+ Flags (list):
6623
+ --account <id> Optional if one Meta ad account is connected
6624
+ --limit <n> Maximum rows to return
6625
+ --offset <n> Rows to skip
6626
+ --raw Return raw Meta custom conversion rows
6627
+
6628
+ Notes:
6629
+ This command is read-only. Create or edit custom conversions in Meta Events Manager.
6630
+ Use platformId from a result with: adkit manage meta results --conversion-event-keys <id>
6631
+ For conversion counts, CPA, and ROAS, use meta results instead.
6632
+
6633
+ Example:
6634
+ adkit manage meta conversions list --account act_123`;
6469
6635
  var META_RESEARCH_HELP = `adkit manage meta research \u2014 Meta Ads research tools
6470
6636
 
6471
6637
  interests <query> Search targeting interests (returns IDs for ad set targeting)
@@ -6504,6 +6670,7 @@ Examples:
6504
6670
  "meta results": RESULTS_HELP,
6505
6671
  "meta creatives": CREATIVE_HELP,
6506
6672
  "meta lead-forms": LEAD_FORM_HELP,
6673
+ "meta conversions": META_CONVERSIONS_HELP,
6507
6674
  "google accounts": `adkit manage google accounts \u2014 Google Ads accounts
6508
6675
 
6509
6676
  list List connected Google Ads accounts
@@ -6955,6 +7122,7 @@ Entity groups:
6955
7122
  adsets Manage ad sets
6956
7123
  ads Manage ads
6957
7124
  lead-forms List existing Meta Instant Forms (supporting asset)
7125
+ conversions List configured Meta Custom Conversions
6958
7126
  results Performance metrics (spend, clicks, conversions) \u2014 not in list commands
6959
7127
  creatives Manage ad creatives (prefer using ads with --media instead)
6960
7128
  research Research targeting interests
@@ -8534,6 +8702,16 @@ async function main() {
8534
8702
  }
8535
8703
  break;
8536
8704
  }
8705
+ case "conversions": {
8706
+ if (!action || flags.help) {
8707
+ showHelp("meta conversions");
8708
+ return;
8709
+ }
8710
+ if (action !== "list") throw new CliError("UNKNOWN_COMMAND", `Unknown action: meta conversions ${action}`, "Available: list");
8711
+ data = await listMetaConversions(client, restArgs, flags);
8712
+ emptyHint = "No Meta Custom Conversions found. Standard events such as purchase and lead do not appear in this list.";
8713
+ break;
8714
+ }
8537
8715
  case "creatives": {
8538
8716
  switch (action) {
8539
8717
  case "create":
@@ -8579,7 +8757,7 @@ async function main() {
8579
8757
  break;
8580
8758
  }
8581
8759
  default:
8582
- throw new CliError("UNKNOWN_COMMAND", `Unknown entity: meta ${entity}`, "Available: accounts, campaigns, adsets, ads, lead-forms, results, creatives, media, research");
8760
+ throw new CliError("UNKNOWN_COMMAND", `Unknown entity: meta ${entity}`, "Available: accounts, campaigns, adsets, ads, lead-forms, conversions, results, creatives, media, research");
8583
8761
  }
8584
8762
  } else if (platform2 === "google") {
8585
8763
  switch (entity) {
@@ -8851,11 +9029,27 @@ async function main() {
8851
9029
  return;
8852
9030
  }
8853
9031
  switch (action) {
9032
+ case "list":
9033
+ data = await listGoogleConversions(client, restArgs, flags);
9034
+ emptyHint = "No Google conversion actions found for this account.";
9035
+ break;
9036
+ case "get":
9037
+ data = await getGoogleConversion(client, restArgs, flags);
9038
+ break;
9039
+ case "create":
9040
+ data = await createGoogleConversion(client, restArgs, flags);
9041
+ break;
9042
+ case "update":
9043
+ data = await updateGoogleConversion(client, restArgs, flags);
9044
+ break;
9045
+ case "delete":
9046
+ data = await deleteGoogleConversion(client, restArgs, flags);
9047
+ break;
8854
9048
  case "upload":
8855
9049
  data = await uploadGoogleConversions(client, restArgs, flags);
8856
9050
  break;
8857
9051
  default:
8858
- throw new CliError("UNKNOWN_COMMAND", `Unknown action: google conversions ${action}`, "Available: upload");
9052
+ throw new CliError("UNKNOWN_COMMAND", `Unknown action: google conversions ${action}`, "Available: list, get, create, update, delete, upload");
8859
9053
  }
8860
9054
  break;
8861
9055
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adkit/cli",
3
- "version": "1.13.29",
3
+ "version": "1.13.31",
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",