@adkit/cli 1.12.27 → 1.12.28
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/cli.js +8 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2999,9 +2999,12 @@ function buildTikTokAdCreative(flags) {
|
|
|
2999
2999
|
if (isSparkAd && flags["media-id"] !== void 0) throw new CliError("INVALID_VALUE", "Use --existing-post-id or --media-id, not both", "Spark Ads promote an existing post; drop --media-id, or drop --existing-post-id to upload a video");
|
|
3000
3000
|
const hasCreativeFlag = ["media-id", "ad-text", "url", "cta", "display-name", "identity-id", "identity-type", "tracking-pixel"].some((key) => flags[key] !== void 0);
|
|
3001
3001
|
if (!hasCreativeFlag && !isSparkAd) return void 0;
|
|
3002
|
-
const creative = {
|
|
3003
|
-
|
|
3004
|
-
|
|
3002
|
+
const creative = {};
|
|
3003
|
+
if (isSparkAd) {
|
|
3004
|
+
if (typeof flags.url === "string" && flags.url.trim()) creative.url = flags.url.trim();
|
|
3005
|
+
} else {
|
|
3006
|
+
creative.url = requireFlag(flags, "url", "Provide the destination URL for the ad");
|
|
3007
|
+
}
|
|
3005
3008
|
if (isSparkAd) {
|
|
3006
3009
|
if (typeof flags["ad-text"] === "string") creative.adText = flags["ad-text"];
|
|
3007
3010
|
} else {
|
|
@@ -5617,14 +5620,14 @@ ${FLAG.data}
|
|
|
5617
5620
|
--media-id <id> TikTok video ID from tiktok media upload
|
|
5618
5621
|
--existing-post-id <id> Spark Ad: promote an existing organic post instead of an uploaded video (needs a BC_AUTH_TT identity)
|
|
5619
5622
|
--ad-text <text> Ad text
|
|
5620
|
-
--url <url> Destination URL
|
|
5623
|
+
--url <url> Destination URL (required with --media-id; optional with --existing-post-id)
|
|
5621
5624
|
--cta <type> learn_more, shop_now, sign_up, download, contact_us, apply_now, book_now
|
|
5622
5625
|
--identity-id <id> TikTok profile/identity ID (falls back to account default)
|
|
5623
5626
|
--identity-type <t> TikTok identity type
|
|
5624
5627
|
|
|
5625
5628
|
Examples:
|
|
5626
5629
|
adkit manage tiktok ads create --ad-group 1770 --name "Hero video" --media-id v123 --ad-text "Try it today" --url https://example.com --cta learn_more
|
|
5627
|
-
adkit manage tiktok ads create --ad-group 1770 --name "Spark Ad" --existing-post-id 7412
|
|
5630
|
+
adkit manage tiktok ads create --ad-group 1770 --name "Spark Ad" --existing-post-id 7412
|
|
5628
5631
|
adkit manage tiktok ads update 1770000000000000000 --status paused --publish`.trim(),
|
|
5629
5632
|
"tiktok results": `adkit manage tiktok results \u2014 TikTok performance reporting
|
|
5630
5633
|
|
package/package.json
CHANGED