@adkit/cli 1.12.25 → 1.12.26

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 +45 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3183,6 +3183,12 @@ async function disconnectRedditAccount(client, args, flags) {
3183
3183
  return client.delete(`/manage/reddit/accounts/${adAccountId}`);
3184
3184
  }
3185
3185
 
3186
+ // src/commands/linkedin.ts
3187
+ async function listLinkedInAvailableAccounts(client, _args, flags) {
3188
+ validateFlags(flags, [], "manage linkedin accounts available");
3189
+ return client.get("/manage/linkedin/accounts/available");
3190
+ }
3191
+
3186
3192
  // src/commands/status.ts
3187
3193
  function isStatusResponse(value) {
3188
3194
  if (!value || typeof value !== "object") return false;
@@ -4131,6 +4137,7 @@ Manage platforms:
4131
4137
  google Google Ads
4132
4138
  tiktok TikTok Ads
4133
4139
  reddit Reddit Ads
4140
+ linkedin LinkedIn Ads
4134
4141
  drafts Drafts across platforms
4135
4142
 
4136
4143
  Run \`adkit <command> --help\` for details.
@@ -4144,7 +4151,7 @@ var FLAG = {
4144
4151
  budgetDaily: " --budget-daily <n> Daily budget in account currency",
4145
4152
  cta: " --cta <type> sign_up, learn_more, shop_now, download, get_offer, contact_us, subscribe, get_quote, book_now, apply_now"
4146
4153
  };
4147
- var RAW_PLATFORM_LABELS = { google: "Google", meta: "Meta", reddit: "Reddit", tiktok: "TikTok", x: "X" };
4154
+ var RAW_PLATFORM_LABELS = { google: "Google", meta: "Meta", reddit: "Reddit", tiktok: "TikTok", x: "X", linkedin: "LinkedIn" };
4148
4155
  function rawPlatformCommandLine(platform2) {
4149
4156
  return `Raw ${RAW_PLATFORM_LABELS[platform2] ?? platform2} API calls use the shared command: adkit manage platform-api-requests --platform ${platform2} ...`;
4150
4157
  }
@@ -5663,7 +5670,7 @@ Examples:
5663
5670
 
5664
5671
  Flags:
5665
5672
  --data <json> Full request object (preferred for agents)
5666
- --platform <meta|google|tiktok|reddit|x> Target platform (required)
5673
+ --platform <meta|google|tiktok|reddit|x|linkedin> Target platform (required)
5667
5674
  --endpoint <path> Relative API path (required)
5668
5675
  --payload <json> JSON body for POST/PUT/PATCH, query params for GET, omit for DELETE
5669
5676
  --method <GET|POST|PUT|PATCH|DELETE> HTTP method (default: POST)
@@ -5680,7 +5687,8 @@ Examples:
5680
5687
  adkit manage platform-api-requests --platform google --endpoint "customers/123/googleAds:mutate" --payload '{"mutateOperations":[...]}' --request-description "Pause ad" --account 123
5681
5688
  adkit manage platform-api-requests --platform tiktok --endpoint "campaign/get/" --method GET --payload '{"advertiser_id":"123"}' --request-description "List TikTok campaigns" --account 123
5682
5689
  adkit manage platform-api-requests --platform reddit --endpoint "ad_accounts/a2_example/campaigns" --payload '{"name":"Test","objective":"TRAFFIC","configured_status":"PAUSED"}' --request-description "Create paused Reddit campaign" --account a2_example
5683
- adkit manage platform-api-requests --platform x --endpoint "accounts/18ce54d4x5t/campaigns" --method GET --request-description "List X campaigns" --account 18ce54d4x5t`.trim(),
5690
+ adkit manage platform-api-requests --platform x --endpoint "accounts/18ce54d4x5t/campaigns" --method GET --request-description "List X campaigns" --account 18ce54d4x5t
5691
+ adkit manage platform-api-requests --platform linkedin --endpoint "adCampaignGroups/(account:urn:li:sponsoredAccount:512345678)" --method GET --request-description "List LinkedIn campaign groups" --account 512345678`.trim(),
5684
5692
  manage: `adkit manage \u2014 Ad platform management
5685
5693
 
5686
5694
  Platforms:
@@ -5689,6 +5697,7 @@ Platforms:
5689
5697
  tiktok TikTok Ads
5690
5698
  reddit Reddit Ads
5691
5699
  x X Ads raw API access
5700
+ linkedin LinkedIn Ads (account discovery + raw API access)
5692
5701
  drafts Manage drafts across platforms
5693
5702
  platform-api-requests Send raw API requests (escape hatch)
5694
5703
 
@@ -5781,6 +5790,19 @@ ${rawPlatformCommandLine("x")}
5781
5790
 
5782
5791
  Examples:
5783
5792
  adkit manage platform-api-requests --platform x --endpoint "accounts/18ce54d4x5t/campaigns" --method GET --request-description "List X campaigns" --account 18ce54d4x5t`.trim(),
5793
+ linkedin: `adkit manage linkedin \u2014 LinkedIn Ads management
5794
+
5795
+ Entity groups:
5796
+ accounts available List LinkedIn ad accounts discoverable from connected workspace logins
5797
+
5798
+ Account discovery currently supports "available" only \u2014 connect/disconnect/list are not exposed yet.
5799
+ First-class LinkedIn campaign/ad reads and writes are not enabled yet.
5800
+ ${rawPlatformCommandLine("linkedin")}
5801
+
5802
+ General flags:
5803
+ ${FLAG.account}
5804
+
5805
+ Run adkit manage linkedin accounts available to discover ad accounts.`.trim(),
5784
5806
  drafts: `adkit manage drafts \u2014 Manage drafts
5785
5807
 
5786
5808
  list List all drafts
@@ -6707,7 +6729,7 @@ function readRawRequestData(flags) {
6707
6729
  };
6708
6730
  }
6709
6731
  function readRawRequestFlags(flags) {
6710
- const platform2 = requireFlag(flags, "platform", "Required: --platform meta, google, tiktok, reddit, or x");
6732
+ const platform2 = requireFlag(flags, "platform", "Required: --platform meta, google, tiktok, reddit, x, or linkedin");
6711
6733
  const method = readRawRequestMethod(flags.method);
6712
6734
  const rawPayload = readRawRequestFlagPayload(flags);
6713
6735
  const payload = readRawRequestPayload({ method, payload: rawPayload, source: "flag" });
@@ -6742,8 +6764,8 @@ function readRawRequestString(input) {
6742
6764
  throw new CliError("MISSING_FLAG", `Missing required field: \`${input.field}\``, input.hint);
6743
6765
  }
6744
6766
  function readRawRequestPlatform(value) {
6745
- if (value === "meta" || value === "google" || value === "tiktok" || value === "reddit" || value === "x") return value;
6746
- throw new CliError("INVALID_VALUE", `Invalid platform: ${String(value)}`, "Use meta, google, tiktok, reddit, or x");
6767
+ if (value === "meta" || value === "google" || value === "tiktok" || value === "reddit" || value === "x" || value === "linkedin") return value;
6768
+ throw new CliError("INVALID_VALUE", `Invalid platform: ${String(value)}`, "Use meta, google, tiktok, reddit, x, or linkedin");
6747
6769
  }
6748
6770
  function readRawRequestMethod(value) {
6749
6771
  const method = typeof value === "string" ? value.toUpperCase() : "POST";
@@ -6914,7 +6936,7 @@ async function main() {
6914
6936
  return;
6915
6937
  }
6916
6938
  const platform2 = manageTarget;
6917
- if (platform2 !== "meta" && platform2 !== "google" && platform2 !== "tiktok" && platform2 !== "reddit" && platform2 !== "x") throw new CliError("UNKNOWN_COMMAND", `Unknown platform: ${platform2}`, "Available: meta, google, tiktok, reddit, x, drafts, platform-api-requests");
6939
+ if (platform2 !== "meta" && platform2 !== "google" && platform2 !== "tiktok" && platform2 !== "reddit" && platform2 !== "x" && platform2 !== "linkedin") throw new CliError("UNKNOWN_COMMAND", `Unknown platform: ${platform2}`, "Available: meta, google, tiktok, reddit, x, linkedin, drafts, platform-api-requests");
6918
6940
  const entity = args[2];
6919
6941
  const action = args[3];
6920
6942
  const restArgs = args.slice(4);
@@ -7541,8 +7563,23 @@ async function main() {
7541
7563
  default:
7542
7564
  throw new CliError("UNKNOWN_COMMAND", `Unknown entity: reddit ${entity}`, "Available: accounts, platform-api-requests");
7543
7565
  }
7566
+ } else if (platform2 === "linkedin") {
7567
+ switch (entity) {
7568
+ case "accounts":
7569
+ switch (action) {
7570
+ case "available":
7571
+ data = await listLinkedInAvailableAccounts(client, restArgs, flags);
7572
+ emptyHint = "No LinkedIn ad accounts available from the connected workspace login.";
7573
+ break;
7574
+ default:
7575
+ throw new CliError("UNKNOWN_COMMAND", `Unknown action: linkedin accounts ${action}`, "Available: available.");
7576
+ }
7577
+ break;
7578
+ default:
7579
+ throw new CliError("UNKNOWN_COMMAND", `Unknown entity: linkedin ${entity}`, "Available: accounts, platform-api-requests");
7580
+ }
7544
7581
  } else if (platform2 === "x") throw new CliError("UNKNOWN_COMMAND", `Unknown entity: x ${entity}`, "Available: platform-api-requests");
7545
- else throw new CliError("UNKNOWN_COMMAND", "Unknown platform", "Available: meta, google, tiktok, reddit, x, drafts, platform-api-requests");
7582
+ else throw new CliError("UNKNOWN_COMMAND", "Unknown platform", "Available: meta, google, tiktok, reddit, x, linkedin, drafts, platform-api-requests");
7546
7583
  printResult(data, flags, emptyHint, detailEntity);
7547
7584
  return;
7548
7585
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adkit/cli",
3
- "version": "1.12.25",
3
+ "version": "1.12.26",
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",