@adkit/cli 1.12.8 → 1.12.9

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 +120 -93
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -154,6 +154,10 @@ function buildRetrySuggestion(retryable, retryAfterSeconds) {
154
154
  if (typeof retryAfterSeconds === "number") return `Try again ${describeRetryDelay(retryAfterSeconds)}`;
155
155
  return "Retry in a few seconds";
156
156
  }
157
+ function buildMetaDsaSuggestion(code) {
158
+ if (code !== "meta_dsa_identity_required") return void 0;
159
+ return 'Run: adkit manage meta accounts <account-id> update --beneficiary "<promoted person/org>" --payor "<payer>"';
160
+ }
157
161
  var AUTH_CODES = /* @__PURE__ */ new Set(["invalid_grant", "auth_error", "auth_expired", "not_connected", "token_expired", "refresh_token_expired"]);
158
162
  function buildAuthSuggestion(code) {
159
163
  const normalizedCode = code.toLowerCase();
@@ -219,7 +223,7 @@ var AdkitClient = class {
219
223
  if (structured) {
220
224
  const fallbackMsg = response.status >= 500 ? `Server error (HTTP ${String(response.status)})` : `Request failed (HTTP ${String(response.status)})`;
221
225
  const errorMsg = appendErrorDetail(dataMessage || serverMessage || fallbackMsg, batchSummary);
222
- const suggestion2 = buildRetrySuggestion(retryable, retryAfterSeconds) ?? buildAuthSuggestion(structured.code);
226
+ const suggestion2 = buildMetaDsaSuggestion(structured.code) ?? buildRetrySuggestion(retryable, retryAfterSeconds) ?? buildAuthSuggestion(structured.code);
223
227
  const error = new CliError(structured.code, errorMsg, suggestion2);
224
228
  error.instructions = structured.instructions;
225
229
  error.actionUrl = structured.actionUrl;
@@ -2674,12 +2678,12 @@ var PLATFORM_OVERRIDE_FLAG = "platform-overrides";
2674
2678
  var CAMPAIGN_CREATE_FLAGS = ["name", "objective", "status", "budget-daily", "budget-lifetime", PLATFORM_OVERRIDE_FLAG];
2675
2679
  var CAMPAIGN_UPDATE_FLAGS = ["name", "status", "budget-daily", "budget-lifetime", PLATFORM_OVERRIDE_FLAG];
2676
2680
  var AD_GROUP_LIST_FLAGS2 = ["campaign-ids", "fields", "limit", "offset"];
2677
- var AD_GROUP_CREATE_FLAGS = ["campaign", "name", "status", "budget-daily", "budget-lifetime", "billing-event", "bid-strategy", "optimization", "schedule-start-time", "schedule-end-time", "schedule-type", "pacing", "bid-amount", "event-type", "pixel", "placement", PLATFORM_OVERRIDE_FLAG];
2678
- var AD_GROUP_UPDATE_FLAGS = ["name", "status", "budget-daily", "budget-lifetime", "billing-event", "optimization", "schedule-start-time", "schedule-end-time", "schedule-type", "pacing", "bid-amount", "event-type", "pixel", PLATFORM_OVERRIDE_FLAG];
2681
+ var AD_GROUP_CREATE_FLAGS = ["campaign", "name", "status", "budget-daily", "budget-lifetime", "billing-event", "bid-strategy", "optimization", "start-date", "end-date", "pacing", "bid-amount", "event-type", "pixel", "placement", PLATFORM_OVERRIDE_FLAG];
2682
+ var AD_GROUP_UPDATE_FLAGS = ["name", "status", "budget-daily", "budget-lifetime", "billing-event", "optimization", "start-date", "end-date", "pacing", "bid-amount", "event-type", "pixel", PLATFORM_OVERRIDE_FLAG];
2679
2683
  var AD_LIST_FLAGS2 = ["ad-group-ids", "campaign-ids", "fields", "limit", "offset"];
2680
2684
  var AD_CREATE_FLAGS = ["ad-group", "name", "status", "media-id", "ad-text", "url", "cta", "display-name", "identity-id", "identity-type", "tracking-pixel", PLATFORM_OVERRIDE_FLAG];
2681
2685
  var AD_UPDATE_FLAGS = ["ad-group", "name", "status", "media-id", "ad-text", "url", "cta", "display-name", "identity-id", "identity-type", "tracking-pixel", PLATFORM_OVERRIDE_FLAG];
2682
- var RESULTS_FLAGS = ["level", "dimensions", "metrics", "from", "to", "order-field", "order-type", "limit", "offset"];
2686
+ var RESULTS_FLAGS = ["level", "fields", "breakdowns", "from", "to", "sort", "sort-direction", "limit", "offset"];
2683
2687
  function readSingleFlagValue2(flags, key, duplicateHint) {
2684
2688
  const value = flags[key];
2685
2689
  if (Array.isArray(value)) {
@@ -2818,19 +2822,15 @@ function buildTikTokAdGroupPayload(flags, mode) {
2818
2822
  if (mode === "create") {
2819
2823
  payload.campaignId = requireFlag(flags, "campaign", 'Run: adkit manage tiktok ad-groups create --campaign <campaign-id> --name "US Broad"');
2820
2824
  payload.name = requireFlag(flags, "name", 'Run: adkit manage tiktok ad-groups create --name "US Broad"');
2821
- payload.scheduleStartTime = requireFlag(flags, "schedule-start-time", "Use YYYY-MM-DD HH:mm:ss, or pass a full JSON body with --data");
2822
- } else {
2823
- if (typeof flags.name === "string") payload.name = flags.name;
2824
- if (typeof flags["schedule-start-time"] === "string") payload.scheduleStartTime = flags["schedule-start-time"];
2825
- }
2825
+ } else if (typeof flags.name === "string") payload.name = flags.name;
2826
2826
  const budget = buildTikTokBudget(flags);
2827
2827
  if (budget) payload.budget = budget;
2828
2828
  if (typeof flags.status === "string") payload.status = flags.status;
2829
2829
  if (typeof flags["billing-event"] === "string") payload.billingEvent = flags["billing-event"];
2830
2830
  if (mode === "create" && typeof flags["bid-strategy"] === "string") payload.bidStrategy = flags["bid-strategy"];
2831
2831
  if (typeof flags.optimization === "string") payload.optimization = flags.optimization;
2832
- if (typeof flags["schedule-end-time"] === "string") payload.scheduleEndTime = flags["schedule-end-time"];
2833
- if (typeof flags["schedule-type"] === "string") payload.scheduleType = flags["schedule-type"];
2832
+ if (typeof flags["start-date"] === "string") payload.startDate = flags["start-date"];
2833
+ if (typeof flags["end-date"] === "string") payload.endDate = flags["end-date"];
2834
2834
  if (typeof flags.pacing === "string") payload.pacing = flags.pacing;
2835
2835
  const bidAmount = readNumberFlag(flags, "bid-amount");
2836
2836
  if (bidAmount !== void 0) payload.bidAmount = bidAmount;
@@ -3004,14 +3004,14 @@ async function listTikTokResults(client, _args, flags) {
3004
3004
  const accountId = typeof flags.account === "string" ? flags.account : void 0;
3005
3005
  const query = queryString({
3006
3006
  accountId,
3007
- dimensions: typeof flags.dimensions === "string" ? flags.dimensions : void 0,
3007
+ breakdowns: typeof flags.breakdowns === "string" ? flags.breakdowns : void 0,
3008
+ fields: typeof flags.fields === "string" ? flags.fields : void 0,
3008
3009
  from: typeof flags.from === "string" ? flags.from : void 0,
3009
3010
  level: typeof flags.level === "string" ? flags.level : void 0,
3010
3011
  limit: typeof flags.limit === "string" ? flags.limit : void 0,
3011
- metrics: typeof flags.metrics === "string" ? flags.metrics : void 0,
3012
3012
  offset: typeof flags.offset === "string" ? flags.offset : void 0,
3013
- orderField: typeof flags["order-field"] === "string" ? flags["order-field"] : void 0,
3014
- orderType: typeof flags["order-type"] === "string" ? flags["order-type"] : void 0,
3013
+ sort: typeof flags.sort === "string" ? flags.sort : void 0,
3014
+ sortDirection: typeof flags["sort-direction"] === "string" ? flags["sort-direction"] : void 0,
3015
3015
  to: typeof flags.to === "string" ? flags.to : void 0
3016
3016
  });
3017
3017
  return client.get(`/manage/tiktok/results${query}`);
@@ -4107,13 +4107,15 @@ Rules:
4107
4107
  Note:
4108
4108
  list returns ad set configuration only (targeting, budget, optimization).
4109
4109
  AdKit hides deleted and archived ad sets by default. Use --status to include them.
4110
- Geo targeting lives in targeting.geoLocations. Use type=country for country targeting.
4111
- Advanced geo examples: adkit manage meta adsets --help full
4110
+ Geo targeting lives in targeting.geoLocations. Use type=country or type=radius with latitude/longitude coordinates.
4111
+ Native city/place/zip examples: adkit manage meta adsets --help full
4112
4112
  For spend/clicks/conversions: adkit manage meta results
4113
4113
 
4114
4114
  Examples:
4115
4115
  # Conversion-optimized ad set targeting the US
4116
4116
  adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"US Broad","optimization":"conversions","eventType":"purchase","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]}}}' --publish
4117
+ # Radius targeting around coordinates
4118
+ adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"Strijen 30km","optimization":"link_clicks","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"radius","latitude":51.745,"longitude":4.55,"radius":30,"radiusUnit":"km"}]}}}' --publish
4117
4119
  # Target specific interests
4118
4120
  adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"US SaaS","optimization":"conversions","eventType":"purchase","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]},"interests":["6003344765839","6003127206524"]}}' --publish
4119
4121
  # Engagement-optimized ad set
@@ -4173,7 +4175,7 @@ Advanced flags:
4173
4175
  promotedObject.customEventType (string) Custom conversion event
4174
4176
  promotedObject.pageId (string) Facebook Page ID
4175
4177
  targeting.age (object) {"min":25,"max":55}
4176
- targeting.geoLocations (object) {"include":[{"type":"country","country":"US"}]} or {"include":[{"type":"platformLocation","platform":"meta","value":{"custom_locations":[...]}}]}
4178
+ targeting.geoLocations (object) {"include":[{"type":"country","country":"US"}]} or {"include":[{"type":"radius","latitude":51.745,"longitude":4.55,"radius":30,"radiusUnit":"km"}]}
4177
4179
  targeting.publisherPlatforms (string[]) facebook, instagram, audience_network, messenger
4178
4180
  targeting.devicePlatforms (string[]) mobile, desktop
4179
4181
  targeting.interests (string[]) Interest IDs
@@ -4190,15 +4192,16 @@ Advanced flags:
4190
4192
  Note:
4191
4193
  list returns ad set configuration only (targeting, budget, optimization).
4192
4194
  AdKit hides deleted and archived ad sets by default. Use --status to include them.
4193
- Geo targeting lives in targeting.geoLocations. Use type=country for simple countries, or type=platformLocation for raw Meta geo like custom_locations.
4194
- With platformLocation, pass the exact Meta geo object to send; AdKit does not look up or convert city names or addresses.
4195
+ Geo targeting lives in targeting.geoLocations. Use type=country for simple countries or type=radius for coordinate-radius targeting.
4196
+ Radius targeting requires latitude/longitude coordinates; AdKit does not geocode addresses yet.
4197
+ With platformLocation, pass the exact Meta geo object to send for native city/place/zip IDs and unsupported geo fields.
4195
4198
  For spend/clicks/conversions: adkit manage meta results
4196
4199
 
4197
4200
  Examples:
4198
4201
  # Conversion-optimized ad set targeting the US
4199
4202
  adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"US Broad","optimization":"conversions","eventType":"purchase","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]}}}' --publish
4200
- # Radius targeting through raw Meta geo
4201
- adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"SF 5mi","optimization":"link_clicks","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"platformLocation","platform":"meta","value":{"custom_locations":[{"latitude":37.7749,"longitude":-122.4194,"radius":5,"distance_unit":"mile"}]}}]}}}' --publish
4203
+ # Radius targeting around coordinates
4204
+ adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"Strijen 30km","optimization":"link_clicks","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"radius","latitude":51.745,"longitude":4.55,"radius":30,"radiusUnit":"km"}]}}}' --publish
4202
4205
  # Target specific interests
4203
4206
  adkit manage meta adsets create --data '{"campaignId":"cmp_abc","name":"US SaaS","optimization":"conversions","eventType":"purchase","budget":{"daily":20},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]},"interests":["6003344765839","6003127206524"]}}' --publish
4204
4207
  # Full JSON payload with custom targeting and age range
@@ -4223,7 +4226,7 @@ var ADS_HELP = `adkit manage meta ads \u2014 Meta ads
4223
4226
 
4224
4227
  Flags (create \u2014 new creative from media):
4225
4228
  --adset <id> Ad set ID (required)
4226
- --media <path|url> Media file or URL (repeatable). Handles upload + processing automatically
4229
+ --media <path|url> Media file or URL (repeatable). Handles upload + processing automatically for single-image/video ads
4227
4230
  --primary-text <t> Ad body text (repeatable)
4228
4231
  --headline <text> Headline text (repeatable)
4229
4232
  --description <t> Description text (repeatable, optional)
@@ -4250,6 +4253,7 @@ Note:
4250
4253
  update is partial. If --data sends an array field, it replaces that whole array; omitted arrays stay unchanged.
4251
4254
  list returns ad configuration only (creative, status, adset).
4252
4255
  AdKit hides deleted and archived ads by default. Use --status to include them.
4256
+ Single-image/video ads use --media. Carousel ads use --data with carouselCards.
4253
4257
 
4254
4258
  Examples:
4255
4259
  # Create an ad with a local video file
@@ -4272,7 +4276,7 @@ Examples:
4272
4276
  Tip: to share engagement (likes/comments) across ads, reuse the creative ID
4273
4277
  from your first ad: --creative <id>
4274
4278
 
4275
- Run --help full for all fields including per-placement creative (--media-format).`;
4279
+ Run --help full for all fields including carouselCards and per-placement creative (--media-format).`;
4276
4280
  var ADS_HELP_FULL = `adkit manage meta ads \u2014 Meta ads
4277
4281
 
4278
4282
  list List ads
@@ -4283,7 +4287,7 @@ var ADS_HELP_FULL = `adkit manage meta ads \u2014 Meta ads
4283
4287
 
4284
4288
  Flags (create \u2014 new creative from media):
4285
4289
  --adset <id> Ad set ID (required)
4286
- --media <path|url> Media file or URL (repeatable). Handles upload + processing automatically
4290
+ --media <path|url> Media file or URL (repeatable). Handles upload + processing automatically for single-image/video ads
4287
4291
  --media-format <f> Optional format for each --media: default, square, vertical, horizontal
4288
4292
  --primary-text <t> Ad body text (repeatable)
4289
4293
  --headline <text> Headline text (repeatable)
@@ -4311,6 +4315,7 @@ Note:
4311
4315
  update is partial. If --data sends an array field, it replaces that whole array; omitted arrays stay unchanged.
4312
4316
  list returns ad configuration only (creative, status, adset).
4313
4317
  AdKit hides deleted and archived ads by default. Use --status to include them.
4318
+ Single-image/video ads use --media. Carousel ads use --data with carouselCards.
4314
4319
 
4315
4320
  --data JSON fields:
4316
4321
  adsetId (required) Parent ad set ID
@@ -4321,6 +4326,17 @@ Note:
4321
4326
  Keeps its likes/comments/shares. Cannot combine with media/creative fields.
4322
4327
  media [{ id: "imageHashOrVideoId" }, { id: "...", format: "vertical" }]
4323
4328
  Normal media works on all placements. Add format only to replace a specific placement group with different media: square (Feed), vertical (Stories/Reels), horizontal (Right Column).
4329
+ Do not use top-level media for carousel ads.
4330
+ carouselCards
4331
+ Card list for carousel ads. Each card needs headline and media.
4332
+ carouselCards[].headline
4333
+ Required card title.
4334
+ carouselCards[].description
4335
+ Optional card text.
4336
+ carouselCards[].linkUrl
4337
+ Optional card destination. Defaults to url when omitted.
4338
+ carouselCards[].media
4339
+ Required card media: [{ role: "image"|"video", id }]. Use uploaded image hashes or video IDs.
4324
4340
  leadFormId Existing Meta Instant Form ID; requires media + url
4325
4341
  platformOverrides Raw Meta API fields merged onto the payload
4326
4342
 
@@ -4341,6 +4357,17 @@ Examples:
4341
4357
  adkit manage meta ads create --adset as_789 \\
4342
4358
  --media ./feed.jpg --media ./story.mp4 --media-format default --media-format vertical \\
4343
4359
  --primary-text "Try it free" --headline "Get started" --url https://example.com --publish
4360
+ # Create a carousel ad with existing uploaded media IDs
4361
+ adkit manage meta ads create --data '{
4362
+ "ads":[{
4363
+ "adsetId":"as_789","name":"Carousel v1","pageId":"pg_123",
4364
+ "primaryTexts":["Shop the collection"],"url":"https://example.com","cta":"shop_now",
4365
+ "carouselCards":[
4366
+ {"headline":"Product 1","media":[{"role":"image","id":"abc123hash"}]},
4367
+ {"headline":"Product 2","media":[{"role":"video","id":"120..."}]}
4368
+ ]
4369
+ }]
4370
+ }' --publish
4344
4371
  # Create an ad from an existing creative (shares engagement)
4345
4372
  adkit manage meta ads create --adset as_789 --creative cr_abc --name "Hero v1" --publish
4346
4373
  # Use an existing Facebook post as the ad
@@ -4489,7 +4516,7 @@ var GOOGLE_ASSET_HELP = `adkit manage google assets \u2014 Reusable Google manua
4489
4516
  Flags (list):
4490
4517
  --type <type> callout, sitelink, structured-snippet
4491
4518
  --scope <scope> account, campaign, ad-group
4492
- --scope-id <id> Campaign/ad-group ID for scoped filtering
4519
+ --scope-id <id> Google campaign/ad group ID (platformId); required for campaign/ad-group scope
4493
4520
 
4494
4521
  Flags (create/update):
4495
4522
  --type <type> callout, sitelink, structured-snippet
@@ -4501,7 +4528,7 @@ Flags (create/update):
4501
4528
  Flags (attach/detach):
4502
4529
  --type <type> callout, sitelink, structured-snippet, image
4503
4530
  --scope <scope> account, campaign, ad-group
4504
- --scope-id <id> Required for campaign/ad-group scope
4531
+ --scope-id <id> Google campaign/ad group ID (platformId); required for campaign/ad-group scope
4505
4532
 
4506
4533
  Examples:
4507
4534
  adkit manage google assets list --type callout --account 1234567890
@@ -4528,7 +4555,7 @@ var GOOGLE_ASSET_HELP_FULL = `adkit manage google assets \u2014 Reusable Google
4528
4555
  Flags (list):
4529
4556
  --type <type> callout, sitelink, structured-snippet
4530
4557
  --scope <scope> account, campaign, ad-group
4531
- --scope-id <id> Campaign/ad-group ID for scoped filtering
4558
+ --scope-id <id> Google campaign/ad group ID (platformId); required for campaign/ad-group scope
4532
4559
  ${FLAG.account}
4533
4560
 
4534
4561
  Flags (create/update):
@@ -4550,7 +4577,7 @@ ${FLAG.data}
4550
4577
  Flags (attach/detach):
4551
4578
  --type <type> callout, sitelink, structured-snippet, image
4552
4579
  --scope <scope> account, campaign, ad-group
4553
- --scope-id <id> Required for campaign/ad-group scope
4580
+ --scope-id <id> Google campaign/ad group ID (platformId); required for campaign/ad-group scope
4554
4581
  --status <s> enabled, paused, removed
4555
4582
  ${FLAG.account}
4556
4583
  ${FLAG.publish}
@@ -4568,9 +4595,9 @@ var GOOGLE_CAMPAIGN_HELP = `adkit manage google campaigns \u2014 Google Ads camp
4568
4595
 
4569
4596
  list List campaigns
4570
4597
  create Create a campaign
4571
- update <id> Update a campaign
4572
- delete <id> Delete a campaign
4573
- <id> View campaign details (PMAX includes assetGroups)
4598
+ update <id> Update by Google campaign ID (platformId)
4599
+ delete <id> Delete by Google campaign ID (platformId)
4600
+ <id> View by Google campaign ID (platformId)
4574
4601
 
4575
4602
  Flags (create):
4576
4603
  --name <name> Campaign name (required)
@@ -4611,9 +4638,9 @@ var GOOGLE_CAMPAIGN_HELP_FULL = `adkit manage google campaigns \u2014 Google Ads
4611
4638
 
4612
4639
  list List campaigns
4613
4640
  create Create a campaign
4614
- update <id> Update a campaign
4615
- delete <id> Delete a campaign
4616
- <id> View campaign details (PMAX includes assetGroups)
4641
+ update <id> Update by Google campaign ID (platformId)
4642
+ delete <id> Delete by Google campaign ID (platformId)
4643
+ <id> View by Google campaign ID (platformId)
4617
4644
 
4618
4645
  Flags (create):
4619
4646
  --name <name> Campaign name (required)
@@ -4663,18 +4690,18 @@ var GOOGLE_AD_GROUP_HELP = `adkit manage google ad-groups \u2014 Google Ads ad g
4663
4690
 
4664
4691
  list List ad groups
4665
4692
  create Create an ad group
4666
- update <id> Update an ad group
4667
- delete <id> Delete an ad group
4668
- <id> View ad group details
4693
+ update <id> Update by Google ad group ID (platformId)
4694
+ delete <id> Delete by Google ad group ID (platformId)
4695
+ <id> View by Google ad group ID (platformId)
4669
4696
 
4670
4697
  Flags (create/update):
4671
- --campaign <id> Parent campaign ID
4698
+ --campaign <id> Google campaign ID (platformId)
4672
4699
  --name <name> Ad group name
4673
4700
  --status <s> enabled, paused, removed
4674
4701
  --cpc-bid <n> CPC bid in account currency
4675
4702
 
4676
4703
  Flags (list):
4677
- --campaign <id> Filter by campaign ID
4704
+ --campaign <id> Filter by Google campaign ID (platformId)
4678
4705
  --status <s> Filter by ad group status (default: enabled,paused; use all for every status)
4679
4706
  --limit <n> Max results
4680
4707
  --offset <n> Pagination offset
@@ -4699,12 +4726,12 @@ var GOOGLE_AD_GROUP_HELP_FULL = `adkit manage google ad-groups \u2014 Google Ads
4699
4726
 
4700
4727
  list List ad groups
4701
4728
  create Create an ad group
4702
- update <id> Update an ad group
4703
- delete <id> Delete an ad group
4704
- <id> View ad group details
4729
+ update <id> Update by Google ad group ID (platformId)
4730
+ delete <id> Delete by Google ad group ID (platformId)
4731
+ <id> View by Google ad group ID (platformId)
4705
4732
 
4706
4733
  Flags (create/update):
4707
- --campaign <id> Parent campaign ID
4734
+ --campaign <id> Google campaign ID (platformId)
4708
4735
  --name <name> Ad group name
4709
4736
  --status <s> enabled, paused, removed
4710
4737
  --cpc-bid <n> CPC bid in account currency
@@ -4713,7 +4740,7 @@ ${FLAG.publish}
4713
4740
  ${FLAG.data}
4714
4741
 
4715
4742
  Flags (list):
4716
- --campaign <id> Filter by campaign ID
4743
+ --campaign <id> Filter by Google campaign ID (platformId)
4717
4744
  --status <s> Filter by ad group status (default: enabled,paused; use all for every status)
4718
4745
  --limit <n> Max results
4719
4746
  --offset <n> Pagination offset
@@ -4740,12 +4767,12 @@ var GOOGLE_AD_HELP = `adkit manage google ads \u2014 Google ads
4740
4767
 
4741
4768
  list List ads
4742
4769
  create Create an ad
4743
- update <id> Update an ad
4744
- delete <id> Delete an ad
4745
- <id> View ad details
4770
+ update <id> Update by Google ad ID (platformId)
4771
+ delete <id> Delete by Google ad ID (platformId)
4772
+ <id> View by Google ad ID (platformId)
4746
4773
 
4747
4774
  Flags (create/update):
4748
- --ad-group <id> Parent ad group ID
4775
+ --ad-group <id> Google ad group ID (platformId)
4749
4776
  --headline <text> Search RSA headline (repeatable, max 30 chars each). Use --headline-1/2/3 to pin to position 1\u20133.
4750
4777
  --description <text> Search RSA description (repeatable, max 90 chars each). Use --description-1/2 to pin to position 1\u20132.
4751
4778
  --callout <value> Repeatable. Use asset:<id> or raw callout text
@@ -4755,7 +4782,7 @@ Flags (create/update):
4755
4782
  --status <s> enabled, paused, removed
4756
4783
 
4757
4784
  Flags (list):
4758
- --ad-group <id> Filter by ad group ID
4785
+ --ad-group <id> Filter by Google ad group ID (platformId)
4759
4786
  --status <s> Filter by ad status (default: enabled,paused; use all for every status)
4760
4787
  --limit <n> Max results
4761
4788
  --offset <n> Pagination offset
@@ -4787,12 +4814,12 @@ var GOOGLE_AD_HELP_FULL = `adkit manage google ads \u2014 Google ads
4787
4814
 
4788
4815
  list List ads
4789
4816
  create Create an ad
4790
- update <id> Update an ad
4791
- delete <id> Delete an ad
4792
- <id> View ad details
4817
+ update <id> Update by Google ad ID (platformId)
4818
+ delete <id> Delete by Google ad ID (platformId)
4819
+ <id> View by Google ad ID (platformId)
4793
4820
 
4794
4821
  Flags (create/update):
4795
- --ad-group <id> Parent ad group ID
4822
+ --ad-group <id> Google ad group ID (platformId)
4796
4823
  --headline <text> Search RSA headline (repeatable, unpinned, max 30 chars each). Up to 15 per ad.
4797
4824
  --headline-1/2/3 <t> Search RSA headline pinned to position 1, 2, or 3 (repeatable, max 30 chars each).
4798
4825
  --description <text> Search RSA description (repeatable, unpinned, max 90 chars each). Up to 4 per ad.
@@ -4807,7 +4834,7 @@ ${FLAG.publish}
4807
4834
  ${FLAG.data}
4808
4835
 
4809
4836
  Flags (list):
4810
- --ad-group <id> Filter by ad group ID
4837
+ --ad-group <id> Filter by Google ad group ID (platformId)
4811
4838
  --status <s> Filter by ad status (default: enabled,paused; use all for every status)
4812
4839
  --limit <n> Max results
4813
4840
  --offset <n> Pagination offset
@@ -4843,22 +4870,22 @@ var GOOGLE_KEYWORD_HELP = `adkit manage google keywords \u2014 Google Ads keywor
4843
4870
  negatives Manage negative keywords
4844
4871
  negative-lists Manage reusable shared negative lists
4845
4872
  add Add a keyword
4846
- update <id> Update a keyword
4847
- remove <id> Remove a keyword
4848
- <id> View keyword details
4873
+ update <id> Update by Google keyword ID (platformId)
4874
+ remove <id> Remove by Google keyword ID (platformId)
4875
+ <id> View by Google keyword ID (platformId)
4849
4876
 
4850
4877
  Flags (add):
4851
- --ad-group <id> Parent ad group ID
4878
+ --ad-group <id> Google ad group ID (platformId)
4852
4879
  --text <keyword> Keyword text
4853
4880
  --match-type <type> exact, phrase, broad
4854
4881
 
4855
4882
  Flags (update):
4856
- --ad-group <id> Parent ad group ID
4883
+ --ad-group <id> Google ad group ID (platformId)
4857
4884
  --cpc-bid <n> CPC bid in account currency
4858
4885
  --status <s> enabled, paused, removed
4859
4886
 
4860
4887
  Flags (list):
4861
- --ad-group <id> Filter by ad group ID
4888
+ --ad-group <id> Filter by Google ad group ID (platformId)
4862
4889
  --status <s> Filter by keyword status (default: enabled,paused; use all for every status)
4863
4890
  --limit <n> Max results
4864
4891
  --offset <n> Pagination offset
@@ -4881,17 +4908,17 @@ var GOOGLE_KEYWORD_HELP_FULL = `adkit manage google keywords \u2014 Google Ads k
4881
4908
  negatives Manage negative keywords
4882
4909
  negative-lists Manage reusable shared negative lists
4883
4910
  add Add a keyword
4884
- update <id> Update a keyword
4885
- remove <id> Remove a keyword
4886
- <id> View keyword details
4911
+ update <id> Update by Google keyword ID (platformId)
4912
+ remove <id> Remove by Google keyword ID (platformId)
4913
+ <id> View by Google keyword ID (platformId)
4887
4914
 
4888
4915
  Flags (add):
4889
- --ad-group <id> Parent ad group ID
4916
+ --ad-group <id> Google ad group ID (platformId)
4890
4917
  --text <keyword> Keyword text
4891
4918
  --match-type <type> exact, phrase, broad
4892
4919
 
4893
4920
  Flags (update):
4894
- --ad-group <id> Parent ad group ID
4921
+ --ad-group <id> Google ad group ID (platformId)
4895
4922
  --cpc-bid <n> CPC bid in account currency
4896
4923
  --status <s> enabled, paused, removed
4897
4924
  ${FLAG.account}
@@ -4899,7 +4926,7 @@ ${FLAG.publish}
4899
4926
  ${FLAG.data}
4900
4927
 
4901
4928
  Flags (list):
4902
- --ad-group <id> Filter by ad group ID
4929
+ --ad-group <id> Filter by Google ad group ID (platformId)
4903
4930
  --status <s> Filter by keyword status (default: enabled,paused; use all for every status)
4904
4931
  --limit <n> Max results
4905
4932
  --offset <n> Pagination offset
@@ -4922,17 +4949,17 @@ var GOOGLE_KEYWORD_NEGATIVES_HELP = `adkit manage google keywords negatives \u20
4922
4949
  remove <id> Remove a negative keyword
4923
4950
 
4924
4951
  Flags (list):
4925
- --campaign <id> Filter by campaign
4926
- --ad-group <id> Filter by ad group
4927
- --negative-keyword-list <id> Filter by shared negative list
4952
+ --campaign <id> Filter by Google campaign ID (platformId)
4953
+ --ad-group <id> Filter by Google ad group ID (platformId)
4954
+ --negative-keyword-list <id> Filter by Google negative keyword list ID (platformId)
4928
4955
  --limit <n> Max results
4929
4956
 
4930
4957
  Flags (add):
4931
4958
  --text <keyword> Keyword text (repeatable; supports bracket shorthand: [exact], "phrase", broad)
4932
4959
  --match-type <type> Explicit match type (repeat once or once per --text)
4933
- --campaign <id> Add at campaign scope
4934
- --ad-group <id> Add at ad group scope
4935
- --negative-keyword-list <id> Add to a shared negative list
4960
+ --campaign <id> Google campaign ID (platformId)
4961
+ --ad-group <id> Google ad group ID (platformId)
4962
+ --negative-keyword-list <id> Google negative keyword list ID (platformId)
4936
4963
  ${FLAG.publish}
4937
4964
  ${FLAG.data}
4938
4965
 
@@ -4963,7 +4990,7 @@ ${FLAG.publish}
4963
4990
  ${FLAG.data}
4964
4991
 
4965
4992
  Flags (attach/detach):
4966
- --campaign <id> Campaign ID
4993
+ --campaign <id> Google campaign ID (platformId)
4967
4994
  ${FLAG.publish}
4968
4995
 
4969
4996
  Examples:
@@ -4985,8 +5012,8 @@ var GOOGLE_RESULTS_HELP = `adkit manage google results \u2014 Google Ads perform
4985
5012
  search-terms Search terms that triggered your ads
4986
5013
 
4987
5014
  Flags:
4988
- --campaign <id> Filter by campaign ID
4989
- --ad-group <id> Filter by ad group ID
5015
+ --campaign <id> Filter by Google campaign ID (platformId)
5016
+ --ad-group <id> Filter by Google ad group ID (platformId)
4990
5017
  --period <period> Date range (30d, 90d, this_month, last_year, maximum, etc. Default: 30d)
4991
5018
  --from <date> Start date (YYYY-MM-DD, requires --to)
4992
5019
  --to <date> End date (YYYY-MM-DD, requires --from)
@@ -5021,8 +5048,8 @@ var GOOGLE_RESULTS_PLACEMENTS_HELP = `adkit manage google results placements \u2
5021
5048
 
5022
5049
  Flags:
5023
5050
  --account <id> Optional if one Google Ads account is connected
5024
- --campaign <id> Filter by campaign
5025
- --ad-group <id> Filter by ad group
5051
+ --campaign <id> Filter by Google campaign ID (platformId)
5052
+ --ad-group <id> Filter by Google ad group ID (platformId)
5026
5053
  --period <preset> Date range: 30d, 90d, this_month, last_year, maximum, etc. (default: 30d)
5027
5054
  --from <date> Custom start date (YYYY-MM-DD, requires --to)
5028
5055
  --to <date> Custom end date (YYYY-MM-DD, requires --from)
@@ -5039,8 +5066,8 @@ var GOOGLE_KEYWORD_SEARCH_TERMS_HELP = `adkit manage google results search-terms
5039
5066
 
5040
5067
  Flags:
5041
5068
  --account <id> Optional if one Google Ads account is connected
5042
- --campaign <id> Filter by campaign
5043
- --ad-group <id> Filter by ad group
5069
+ --campaign <id> Filter by Google campaign ID (platformId)
5070
+ --ad-group <id> Filter by Google ad group ID (platformId)
5044
5071
  --keyword <text> Filter by matched keyword text
5045
5072
  --keyword-match-type Filter by matched keyword match type: exact, phrase, broad
5046
5073
  --period <preset> Date range: 30d, 90d, this_month, last_year, maximum, etc. (default: maximum)
@@ -5068,8 +5095,8 @@ var GOOGLE_RESULTS_KEYWORDS_HELP = `adkit manage google results keywords \u2014
5068
5095
 
5069
5096
  Flags:
5070
5097
  --account <id> Optional if one Google Ads account is connected
5071
- --campaign <id> Filter by campaign
5072
- --ad-group <id> Filter by ad group
5098
+ --campaign <id> Filter by Google campaign ID (platformId)
5099
+ --ad-group <id> Filter by Google ad group ID (platformId)
5073
5100
  --period <preset> Date range: 30d, 90d, this_month, last_year, maximum, etc. (default: 30d)
5074
5101
  --from <date> Custom start date (YYYY-MM-DD, requires --to)
5075
5102
  --to <date> Custom end date (YYYY-MM-DD, requires --from)
@@ -5286,8 +5313,8 @@ ${FLAG.data}
5286
5313
  --status <s> active, paused
5287
5314
  --budget-daily <n> Daily budget in account currency
5288
5315
  --budget-lifetime <n> Lifetime budget in account currency
5289
- --schedule-start-time <value> Required for create, e.g. "2026-05-15 12:00:00"
5290
- --schedule-end-time <value> Optional end time
5316
+ --start-date <value> Optional TikTok schedule datetime; omit to start now
5317
+ --end-date <value> Optional TikTok schedule datetime; required with lifetime budget
5291
5318
  --billing-event <s> cpc, cpm, ocpm
5292
5319
  --bid-strategy <s> bid_type_no_bid, bid_type_custom, bid_type_max_conversion
5293
5320
  --optimization <s> click, convert, lead_generation, video_view, reach
@@ -5297,8 +5324,8 @@ ${FLAG.data}
5297
5324
  --placement <ids> Override TikTok placement IDs (publish default: PLACEMENT_TIKTOK)
5298
5325
 
5299
5326
  Examples:
5300
- adkit manage tiktok ad-groups create --campaign 1770 --name "US Broad" --budget-daily 50 --schedule-start-time "2026-05-15 12:00:00" --billing-event cpc --optimization click
5301
- adkit manage tiktok ad-groups create --data '{"adGroups":[{"campaignId":"1770","name":"Purchase","budget":{"daily":50},"scheduleStartTime":"2026-05-15 12:00:00","bidAmount":80,"conversion":{"eventType":"purchase"},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]}}}]}'`.trim(),
5327
+ adkit manage tiktok ad-groups create --campaign 1770 --name "US Broad" --budget-daily 50 --billing-event cpc --optimization click
5328
+ adkit manage tiktok ad-groups create --data '{"adGroups":[{"campaignId":"1770","name":"Purchase","budget":{"daily":50},"startDate":"2026-05-15 12:00:00","bidAmount":80,"conversion":{"eventType":"purchase"},"targeting":{"geoLocations":{"include":[{"type":"country","country":"US"}]}}}]}'`.trim(),
5302
5329
  "tiktok ads": `adkit manage tiktok ads \u2014 TikTok video ads
5303
5330
 
5304
5331
  list List ads
@@ -5334,19 +5361,19 @@ Examples:
5334
5361
  Flags:
5335
5362
  ${FLAG.account}
5336
5363
  --level <level> account, campaigns, ad-groups, ads (default: campaigns)
5337
- --dimensions <csv> TikTok reporting dimensions, e.g. campaign_id
5338
- --metrics <csv> TikTok reporting metrics, e.g. spend,impressions,clicks
5364
+ --fields <csv> Normalized fields, e.g. spend,impressions,clicks,conversions
5365
+ --breakdowns <csv> Row breakdowns, e.g. day
5339
5366
  --from <date> YYYY-MM-DD
5340
5367
  --to <date> YYYY-MM-DD
5341
- --order-field <f> Optional sort metric/field
5342
- --order-type <t> asc or desc
5368
+ --sort <field> Optional normalized sort field, e.g. spend
5369
+ --sort-direction <t> asc or desc
5343
5370
  --limit <n> Max rows
5344
5371
 
5345
5372
  Note:
5346
- Results MVP passes TikTok report dimension/metric names through to the TikTok reporting API.
5373
+ For raw TikTok report dimensions/metrics outside this normalized contract, use platform-api-request with TikTok report/integrated/get.
5347
5374
 
5348
5375
  Example:
5349
- adkit manage tiktok results --level campaigns --dimensions campaign_id --metrics spend,impressions,clicks --from 2026-05-01 --to 2026-05-15`.trim(),
5376
+ adkit manage tiktok results --level campaigns --fields spend,impressions,clicks --breakdowns day --from 2026-05-01 --to 2026-05-15`.trim(),
5350
5377
  "reddit accounts": `adkit manage reddit accounts \u2014 Reddit Ads accounts
5351
5378
 
5352
5379
  list List connected Reddit ad accounts
@@ -6047,7 +6074,7 @@ function printSingleEntity(e, entity) {
6047
6074
  } else {
6048
6075
  const ad = e;
6049
6076
  const createdAt = shortDate(ad.createdAt);
6050
- lines.push(` Ad: ${formatForTTY(ad.name)}`, ` ID: ${formatForTTY(ad.id)}`, ` Ad Set: ${formatForTTY(ad.adsetId)}`, ` Campaign: ${formatForTTY(ad.campaignId)}`, ` Status: ${formatForTTY(ad.status)}`);
6077
+ lines.push(` Ad: ${formatForTTY(ad.name)}`, ` ID: ${formatForTTY(ad.platformId)}`, ` Ad Set: ${formatForTTY(ad.adsetId)}`, ` Campaign: ${formatForTTY(ad.campaignId)}`, ` Status: ${formatForTTY(ad.status)}`);
6051
6078
  const creative = ad.creative;
6052
6079
  if (creative) {
6053
6080
  lines.push("", " Creative", "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adkit/cli",
3
- "version": "1.12.8",
3
+ "version": "1.12.9",
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",