@koda-sl/baker-cli 0.216.0-dev.843330ec0 → 0.217.0
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/README.md +15 -3
- package/dist/{chunk-CMPAHYLB.js → chunk-EKLAHWSF.js} +4 -4
- package/dist/chunk-EKLAHWSF.js.map +1 -0
- package/dist/cli.js +148 -87
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CMPAHYLB.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
ulid,
|
|
59
59
|
validateCanvasDeep,
|
|
60
60
|
ytDlpBlockSignal
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EKLAHWSF.js";
|
|
62
62
|
import {
|
|
63
63
|
csvOrJson,
|
|
64
64
|
daysAgoIso,
|
|
@@ -110,6 +110,36 @@ import {
|
|
|
110
110
|
// src/cli.ts
|
|
111
111
|
import { defineCommand as defineCommand221, runMain } from "citty";
|
|
112
112
|
|
|
113
|
+
// src/cache-flag.ts
|
|
114
|
+
var NO_CACHE_ARG = {
|
|
115
|
+
type: "boolean",
|
|
116
|
+
description: "Skip cached results and read live from the platform (slower)",
|
|
117
|
+
required: false
|
|
118
|
+
};
|
|
119
|
+
var LEGACY = "--skip-cache";
|
|
120
|
+
var CANONICAL = "--no-cache";
|
|
121
|
+
var PARSEABLE = "--noCache";
|
|
122
|
+
function respell(token, from, to) {
|
|
123
|
+
if (token === from) {
|
|
124
|
+
return [to];
|
|
125
|
+
}
|
|
126
|
+
if (!token.startsWith(`${from}=`)) {
|
|
127
|
+
return [token];
|
|
128
|
+
}
|
|
129
|
+
return token.slice(from.length + 1) === "false" ? [] : [to];
|
|
130
|
+
}
|
|
131
|
+
function normalizeCacheFlag(argv) {
|
|
132
|
+
return rewriteBeforeDoubleDash(argv, (token) => respell(token, LEGACY, CANONICAL));
|
|
133
|
+
}
|
|
134
|
+
function cacheFlagForParser(argv) {
|
|
135
|
+
return rewriteBeforeDoubleDash(argv, (token) => respell(token, CANONICAL, PARSEABLE));
|
|
136
|
+
}
|
|
137
|
+
function rewriteBeforeDoubleDash(argv, rewrite) {
|
|
138
|
+
const end = argv.indexOf("--");
|
|
139
|
+
const limit = end === -1 ? argv.length : end;
|
|
140
|
+
return argv.flatMap((token, index) => index >= limit ? [token] : rewrite(token));
|
|
141
|
+
}
|
|
142
|
+
|
|
113
143
|
// src/commands/actions/index.ts
|
|
114
144
|
import { defineCommand as defineCommand18 } from "citty";
|
|
115
145
|
|
|
@@ -5647,6 +5677,16 @@ var aspectRatioSchema = z18.string().regex(/^[1-9]\d*:[1-9]\d*$/, "Write the sha
|
|
|
5647
5677
|
var seedSchema = z18.coerce.number().int().min(0).max(4294967295);
|
|
5648
5678
|
var studioGenerateRequestSchema = z18.object({
|
|
5649
5679
|
prompt: z18.string().min(1).max(MAX_STUDIO_PROMPT_CHARS),
|
|
5680
|
+
/**
|
|
5681
|
+
* Cast one of the company's avatars into the shot, by handle.
|
|
5682
|
+
*
|
|
5683
|
+
* Not the same thing as passing their sheet through `referenceImageIds`: this
|
|
5684
|
+
* carries the identity through the avatar path, which grounds the render on
|
|
5685
|
+
* the sheet, injects the subject description verbatim, and records the avatar
|
|
5686
|
+
* on the batch so it can show everything it has appeared in. Hand-rolling the
|
|
5687
|
+
* reference skips all three.
|
|
5688
|
+
*/
|
|
5689
|
+
avatar: z18.string().min(1).max(32).optional(),
|
|
5650
5690
|
model: imageGenerateModelSchema.optional(),
|
|
5651
5691
|
aspectRatio: aspectRatioSchema.optional(),
|
|
5652
5692
|
count: z18.coerce.number().int().min(1).max(MAX_STUDIO_IMAGES).optional(),
|
|
@@ -5675,6 +5715,16 @@ var studioGenerateRequestSchema = z18.object({
|
|
|
5675
5715
|
backgroundRgbColor: rgbTriple.optional()
|
|
5676
5716
|
});
|
|
5677
5717
|
var studioAnimateRequestSchema = z18.object({
|
|
5718
|
+
/**
|
|
5719
|
+
* Cast one of the company's avatars into the shot, by handle.
|
|
5720
|
+
*
|
|
5721
|
+
* Not the same thing as passing their sheet through `referenceImageIds`: this
|
|
5722
|
+
* carries the identity through the avatar path, which grounds the render on
|
|
5723
|
+
* the sheet, injects the subject description verbatim, and records the avatar
|
|
5724
|
+
* on the batch so it can show everything it has appeared in. Hand-rolling the
|
|
5725
|
+
* reference skips all three.
|
|
5726
|
+
*/
|
|
5727
|
+
avatar: z18.string().min(1).max(32).optional(),
|
|
5678
5728
|
/**
|
|
5679
5729
|
* What MOVES, when a still fixes the look. With no still it is the whole shot,
|
|
5680
5730
|
* because the clip is then generated from the prompt alone.
|
|
@@ -12446,8 +12496,7 @@ registerSchema({
|
|
|
12446
12496
|
description: "List LinkedIn ad accounts in the company's connected scope. Pass --include-all to list every account the OAuth token can see.",
|
|
12447
12497
|
args: {
|
|
12448
12498
|
"include-all": { type: "boolean", description: "Ignore picker scope", required: false },
|
|
12449
|
-
"no-cache":
|
|
12450
|
-
"skip-cache": { type: "boolean", description: "Bypass server-side cache", required: false },
|
|
12499
|
+
"no-cache": NO_CACHE_ARG,
|
|
12451
12500
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12452
12501
|
}
|
|
12453
12502
|
});
|
|
@@ -12457,7 +12506,7 @@ registerSchema({
|
|
|
12457
12506
|
args: {
|
|
12458
12507
|
"account-id": { type: "string", description: "Numeric ID or urn:li:sponsoredAccount:N", required: false },
|
|
12459
12508
|
"account-urn": { type: "string", description: "Alias for --account-id", required: false },
|
|
12460
|
-
"
|
|
12509
|
+
"no-cache": NO_CACHE_ARG,
|
|
12461
12510
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12462
12511
|
}
|
|
12463
12512
|
});
|
|
@@ -12470,7 +12519,7 @@ registerSchema({
|
|
|
12470
12519
|
"all-statuses": { type: "boolean", description: "Drop the ACTIVE filter", required: false },
|
|
12471
12520
|
statuses: { type: "string", description: "CSV of statuses", required: false },
|
|
12472
12521
|
limit: { type: "string", description: "Max rows (default 500)", required: false },
|
|
12473
|
-
"
|
|
12522
|
+
"no-cache": NO_CACHE_ARG,
|
|
12474
12523
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12475
12524
|
}
|
|
12476
12525
|
});
|
|
@@ -12484,7 +12533,7 @@ registerSchema({
|
|
|
12484
12533
|
"all-statuses": { type: "boolean", description: "Drop the ACTIVE filter", required: false },
|
|
12485
12534
|
statuses: { type: "string", description: "CSV of statuses", required: false },
|
|
12486
12535
|
limit: { type: "string", description: "Max rows", required: false },
|
|
12487
|
-
"
|
|
12536
|
+
"no-cache": NO_CACHE_ARG,
|
|
12488
12537
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12489
12538
|
}
|
|
12490
12539
|
});
|
|
@@ -12508,7 +12557,7 @@ registerSchema({
|
|
|
12508
12557
|
required: false
|
|
12509
12558
|
},
|
|
12510
12559
|
limit: { type: "string", description: "Max rows", required: false },
|
|
12511
|
-
"
|
|
12560
|
+
"no-cache": NO_CACHE_ARG,
|
|
12512
12561
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12513
12562
|
}
|
|
12514
12563
|
});
|
|
@@ -12590,7 +12639,7 @@ registerSchema({
|
|
|
12590
12639
|
"no-sort": { type: "boolean", description: "Skip default sort", required: false },
|
|
12591
12640
|
"list-intents": { type: "boolean", description: "List intents and exit", required: false },
|
|
12592
12641
|
"list-pivots": { type: "boolean", description: "List pivots and exit", required: false },
|
|
12593
|
-
"
|
|
12642
|
+
"no-cache": NO_CACHE_ARG,
|
|
12594
12643
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12595
12644
|
}
|
|
12596
12645
|
});
|
|
@@ -12605,7 +12654,7 @@ registerSchema({
|
|
|
12605
12654
|
start: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12606
12655
|
end: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12607
12656
|
"last-days": { type: "string", description: "Window (default 30)", required: false },
|
|
12608
|
-
"
|
|
12657
|
+
"no-cache": NO_CACHE_ARG,
|
|
12609
12658
|
output: { type: "string", description: "json", required: false, default: "json" }
|
|
12610
12659
|
}
|
|
12611
12660
|
});
|
|
@@ -12619,7 +12668,7 @@ registerSchema({
|
|
|
12619
12668
|
start: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12620
12669
|
end: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12621
12670
|
"last-days": { type: "string", description: "Window (default 30)", required: false },
|
|
12622
|
-
"
|
|
12671
|
+
"no-cache": NO_CACHE_ARG,
|
|
12623
12672
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12624
12673
|
}
|
|
12625
12674
|
});
|
|
@@ -12627,7 +12676,7 @@ registerSchema({
|
|
|
12627
12676
|
command: "ads.linkedin.facets.list",
|
|
12628
12677
|
description: "List every targeting facet LinkedIn supports (industries, seniorities, titles, employers, growthRate, etc).",
|
|
12629
12678
|
args: {
|
|
12630
|
-
"
|
|
12679
|
+
"no-cache": NO_CACHE_ARG,
|
|
12631
12680
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12632
12681
|
}
|
|
12633
12682
|
});
|
|
@@ -12639,7 +12688,7 @@ registerSchema({
|
|
|
12639
12688
|
query: { type: "string", description: "Typeahead query (auto-switches finder)", required: false },
|
|
12640
12689
|
finder: { type: "string", description: "adTargetingFacet|typeahead|similarEntities", required: false },
|
|
12641
12690
|
locale: { type: "string", description: "Locale (default en_US)", required: false },
|
|
12642
|
-
"
|
|
12691
|
+
"no-cache": NO_CACHE_ARG,
|
|
12643
12692
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12644
12693
|
}
|
|
12645
12694
|
});
|
|
@@ -12651,7 +12700,7 @@ registerSchema({
|
|
|
12651
12700
|
"account-urn": { type: "string", description: "Alias", required: false },
|
|
12652
12701
|
targeting: { type: "string", description: "Inline JSON targetingCriteria", required: false },
|
|
12653
12702
|
"targeting-file": { type: "string", description: "Path to JSON file", required: false },
|
|
12654
|
-
"
|
|
12703
|
+
"no-cache": NO_CACHE_ARG,
|
|
12655
12704
|
output: { type: "string", description: "json", required: false, default: "json" }
|
|
12656
12705
|
}
|
|
12657
12706
|
});
|
|
@@ -12669,7 +12718,7 @@ registerSchema({
|
|
|
12669
12718
|
"cost-type": { type: "string", description: "CPC|CPM|CPV|CPS", required: true, enum: ["CPC", "CPM", "CPV", "CPS"] },
|
|
12670
12719
|
targeting: { type: "string", description: "Inline JSON targetingCriteria", required: false },
|
|
12671
12720
|
"targeting-file": { type: "string", description: "Path to JSON file", required: false },
|
|
12672
|
-
"
|
|
12721
|
+
"no-cache": NO_CACHE_ARG,
|
|
12673
12722
|
output: { type: "string", description: "json", required: false, default: "json" }
|
|
12674
12723
|
}
|
|
12675
12724
|
});
|
|
@@ -12686,7 +12735,7 @@ registerSchema({
|
|
|
12686
12735
|
bid: { type: "string", description: "Bid e.g. '8 USD'", required: false },
|
|
12687
12736
|
targeting: { type: "string", description: "Inline JSON targetingCriteria", required: false },
|
|
12688
12737
|
"targeting-file": { type: "string", description: "Path to JSON file", required: false },
|
|
12689
|
-
"
|
|
12738
|
+
"no-cache": NO_CACHE_ARG,
|
|
12690
12739
|
output: { type: "string", description: "json", required: false, default: "json" }
|
|
12691
12740
|
}
|
|
12692
12741
|
});
|
|
@@ -12701,7 +12750,7 @@ registerSchema({
|
|
|
12701
12750
|
"since-days": { type: "string", description: "Last N days", required: false },
|
|
12702
12751
|
"since-ms": { type: "string", description: "Epoch ms (alternative to --since-days)", required: false },
|
|
12703
12752
|
limit: { type: "string", description: "Max rows", required: false },
|
|
12704
|
-
"
|
|
12753
|
+
"no-cache": NO_CACHE_ARG,
|
|
12705
12754
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12706
12755
|
}
|
|
12707
12756
|
});
|
|
@@ -12711,7 +12760,7 @@ registerSchema({
|
|
|
12711
12760
|
args: {
|
|
12712
12761
|
"account-id": { type: "string", description: "Account ID", required: false },
|
|
12713
12762
|
"account-urn": { type: "string", description: "Alias", required: false },
|
|
12714
|
-
"
|
|
12763
|
+
"no-cache": NO_CACHE_ARG,
|
|
12715
12764
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12716
12765
|
}
|
|
12717
12766
|
});
|
|
@@ -12721,7 +12770,7 @@ registerSchema({
|
|
|
12721
12770
|
args: {
|
|
12722
12771
|
"account-id": { type: "string", description: "Account ID", required: false },
|
|
12723
12772
|
"account-urn": { type: "string", description: "Alias", required: false },
|
|
12724
|
-
"
|
|
12773
|
+
"no-cache": NO_CACHE_ARG,
|
|
12725
12774
|
output: { type: "string", description: "json", required: false, default: "json" }
|
|
12726
12775
|
}
|
|
12727
12776
|
});
|
|
@@ -12733,7 +12782,7 @@ registerSchema({
|
|
|
12733
12782
|
start: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12734
12783
|
end: { type: "string", description: "YYYY-MM-DD", required: false },
|
|
12735
12784
|
"last-days": { type: "string", description: "Window (default 30)", required: false },
|
|
12736
|
-
"
|
|
12785
|
+
"no-cache": NO_CACHE_ARG,
|
|
12737
12786
|
output: { type: "string", description: "json|csv|jsonl|md", required: false, default: "json" }
|
|
12738
12787
|
}
|
|
12739
12788
|
});
|
|
@@ -12748,7 +12797,7 @@ registerSchema({
|
|
|
12748
12797
|
severity: { type: "string", description: "CSV severity filter (critical,high,medium,low)", required: false },
|
|
12749
12798
|
area: { type: "string", description: "CSV area filter", required: false },
|
|
12750
12799
|
format: { type: "string", description: "json | md", required: false, default: "json" },
|
|
12751
|
-
"
|
|
12800
|
+
"no-cache": NO_CACHE_ARG
|
|
12752
12801
|
}
|
|
12753
12802
|
});
|
|
12754
12803
|
var writeAccountArgs = {
|
|
@@ -13186,14 +13235,14 @@ Examples:
|
|
|
13186
13235
|
args: {
|
|
13187
13236
|
"account-id": { type: "string", description: "Numeric account ID or urn:li:sponsoredAccount:N" },
|
|
13188
13237
|
"account-urn": { type: "string", description: "Alias for --account-id" },
|
|
13189
|
-
"
|
|
13238
|
+
"no-cache": NO_CACHE_ARG,
|
|
13190
13239
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
13191
13240
|
},
|
|
13192
13241
|
run: async ({ args }) => {
|
|
13193
13242
|
const accountId = resolveAccountIdArg2(args);
|
|
13194
13243
|
try {
|
|
13195
13244
|
const params = { "account-id": accountId };
|
|
13196
|
-
if (args["
|
|
13245
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
13197
13246
|
const data = await apiGet("/api/ads/linkedin/account", params);
|
|
13198
13247
|
const fmt = csvOrJson2(args);
|
|
13199
13248
|
if (fmt !== "json") {
|
|
@@ -13233,8 +13282,7 @@ Examples:
|
|
|
13233
13282
|
},
|
|
13234
13283
|
args: {
|
|
13235
13284
|
"include-all": { type: "boolean", description: "List all accessible accounts, ignoring picker scope" },
|
|
13236
|
-
"no-cache":
|
|
13237
|
-
"skip-cache": { type: "boolean", description: "Bypass server-side cache (force re-fetch)" },
|
|
13285
|
+
"no-cache": NO_CACHE_ARG,
|
|
13238
13286
|
output: { type: "string", description: "Output format: json|csv|jsonl|md", default: "json" }
|
|
13239
13287
|
},
|
|
13240
13288
|
run: async ({ args }) => {
|
|
@@ -13256,7 +13304,7 @@ Examples:
|
|
|
13256
13304
|
try {
|
|
13257
13305
|
const params = {};
|
|
13258
13306
|
if (includeAll) params["include-all"] = "true";
|
|
13259
|
-
if (
|
|
13307
|
+
if (!useCache) params["skip-cache"] = "true";
|
|
13260
13308
|
const data = await apiGet("/api/ads/linkedin/accounts", params);
|
|
13261
13309
|
if (useCache) {
|
|
13262
13310
|
cacheSet("linkedin-accounts", cacheKey, data, ACCOUNTS_TTL_MS);
|
|
@@ -13605,7 +13653,7 @@ Examples \u2014 common AI questions:
|
|
|
13605
13653
|
granularity: { type: "string", description: "DAILY|MONTHLY|YEARLY|ALL (default: DAILY)" },
|
|
13606
13654
|
limit: { type: "string", description: "Max rows (default: 1000)" },
|
|
13607
13655
|
"no-sort": { type: "boolean", description: "Skip default sort by costInUsd desc" },
|
|
13608
|
-
"
|
|
13656
|
+
"no-cache": NO_CACHE_ARG,
|
|
13609
13657
|
output: { type: "string", description: "Output format json|csv|jsonl|md", default: "json" }
|
|
13610
13658
|
},
|
|
13611
13659
|
run: async ({ args }) => {
|
|
@@ -13647,7 +13695,7 @@ Examples \u2014 common AI questions:
|
|
|
13647
13695
|
try {
|
|
13648
13696
|
const data = await apiPost("/api/ads/linkedin/analytics", {
|
|
13649
13697
|
request,
|
|
13650
|
-
skipCache: Boolean(args["
|
|
13698
|
+
skipCache: Boolean(args["no-cache"])
|
|
13651
13699
|
});
|
|
13652
13700
|
const rows = args["no-sort"] ? data.rows : sortRows(data.rows);
|
|
13653
13701
|
const fmt = csvOrJson2(args);
|
|
@@ -13721,7 +13769,7 @@ Examples:
|
|
|
13721
13769
|
"account-urn": { type: "string", description: "Alias for --account-id" },
|
|
13722
13770
|
targeting: { type: "string", description: "Inline JSON targetingCriteria payload" },
|
|
13723
13771
|
"targeting-file": { type: "string", description: "Path to JSON file with targetingCriteria" },
|
|
13724
|
-
"
|
|
13772
|
+
"no-cache": NO_CACHE_ARG,
|
|
13725
13773
|
output: { type: "string", description: "json", default: "json" }
|
|
13726
13774
|
},
|
|
13727
13775
|
run: async ({ args }) => {
|
|
@@ -13731,7 +13779,7 @@ Examples:
|
|
|
13731
13779
|
const data = await apiPost("/api/ads/linkedin/audience-size", {
|
|
13732
13780
|
accountId,
|
|
13733
13781
|
targetingCriteria,
|
|
13734
|
-
skipCache: Boolean(args["
|
|
13782
|
+
skipCache: Boolean(args["no-cache"])
|
|
13735
13783
|
});
|
|
13736
13784
|
writeAdsJson({ ok: true, data });
|
|
13737
13785
|
} catch (err) {
|
|
@@ -13832,7 +13880,7 @@ Examples:
|
|
|
13832
13880
|
description: "CSV area filter: Settings,Tracking,Audience,Campaigns,Creative,Performance,Bidding,Compliance,Hygiene"
|
|
13833
13881
|
},
|
|
13834
13882
|
format: { type: "string", description: "Output format: json | md (default: json)" },
|
|
13835
|
-
"
|
|
13883
|
+
"no-cache": NO_CACHE_ARG
|
|
13836
13884
|
},
|
|
13837
13885
|
run: async ({ args }) => {
|
|
13838
13886
|
const accountId = resolveAccountIdArg2(args);
|
|
@@ -13845,7 +13893,7 @@ Examples:
|
|
|
13845
13893
|
accountId,
|
|
13846
13894
|
campaignId: args["campaign-id"] ? String(args["campaign-id"]) : void 0,
|
|
13847
13895
|
windowDays,
|
|
13848
|
-
skipCache: Boolean(args["
|
|
13896
|
+
skipCache: Boolean(args["no-cache"])
|
|
13849
13897
|
});
|
|
13850
13898
|
const severityFilter = args.severity?.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
13851
13899
|
const areaFilter = args.area?.split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -13917,7 +13965,7 @@ Examples:
|
|
|
13917
13965
|
"cost-type": { type: "string", description: "CPC | CPM | CPV | CPS", required: true },
|
|
13918
13966
|
targeting: { type: "string", description: "Inline JSON targetingCriteria" },
|
|
13919
13967
|
"targeting-file": { type: "string", description: "Path to JSON file with targetingCriteria" },
|
|
13920
|
-
"
|
|
13968
|
+
"no-cache": NO_CACHE_ARG,
|
|
13921
13969
|
output: { type: "string", description: "json", default: "json" }
|
|
13922
13970
|
},
|
|
13923
13971
|
run: async ({ args }) => {
|
|
@@ -13929,7 +13977,7 @@ Examples:
|
|
|
13929
13977
|
objectiveType: String(args.objective),
|
|
13930
13978
|
costType: String(args["cost-type"]).toUpperCase(),
|
|
13931
13979
|
targetingCriteria,
|
|
13932
|
-
skipCache: Boolean(args["
|
|
13980
|
+
skipCache: Boolean(args["no-cache"])
|
|
13933
13981
|
});
|
|
13934
13982
|
writeAdsJson({ ok: true, data });
|
|
13935
13983
|
} catch (err) {
|
|
@@ -14694,7 +14742,7 @@ var listArgs = {
|
|
|
14694
14742
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
14695
14743
|
statuses: { type: "string", description: "CSV of statuses (ACTIVE,PAUSED,ARCHIVED,COMPLETED,DRAFT)" },
|
|
14696
14744
|
limit: { type: "string", description: "Max rows (default: 500)" },
|
|
14697
|
-
"
|
|
14745
|
+
"no-cache": NO_CACHE_ARG,
|
|
14698
14746
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
14699
14747
|
};
|
|
14700
14748
|
var campaignGroupsListCommand = defineCommand39({
|
|
@@ -14710,7 +14758,7 @@ var campaignGroupsListCommand = defineCommand39({
|
|
|
14710
14758
|
const statuses = resolveStatusFilter(args);
|
|
14711
14759
|
if (statuses) params.statuses = statuses.join(",");
|
|
14712
14760
|
if (args.limit) params.limit = String(args.limit);
|
|
14713
|
-
if (args["
|
|
14761
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
14714
14762
|
const data = await apiGet("/api/ads/linkedin/campaign-groups", params);
|
|
14715
14763
|
const fmt = csvOrJson2(args);
|
|
14716
14764
|
if (fmt !== "json") {
|
|
@@ -14760,7 +14808,7 @@ var listArgs2 = {
|
|
|
14760
14808
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
14761
14809
|
statuses: { type: "string", description: "CSV of statuses" },
|
|
14762
14810
|
limit: { type: "string", description: "Max rows (default: 500)" },
|
|
14763
|
-
"
|
|
14811
|
+
"no-cache": NO_CACHE_ARG,
|
|
14764
14812
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
14765
14813
|
};
|
|
14766
14814
|
var campaignsListCommand = defineCommand40({
|
|
@@ -14777,7 +14825,7 @@ var campaignsListCommand = defineCommand40({
|
|
|
14777
14825
|
if (statuses) params.statuses = statuses.join(",");
|
|
14778
14826
|
if (args["campaign-group-id"]) params["campaign-group-id"] = String(args["campaign-group-id"]);
|
|
14779
14827
|
if (args.limit) params.limit = String(args.limit);
|
|
14780
|
-
if (args["
|
|
14828
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
14781
14829
|
const data = await apiGet("/api/ads/linkedin/campaigns", params);
|
|
14782
14830
|
const fmt = csvOrJson2(args);
|
|
14783
14831
|
if (fmt !== "json") {
|
|
@@ -14851,7 +14899,7 @@ Examples:
|
|
|
14851
14899
|
start: { type: "string", description: "Start date YYYY-MM-DD" },
|
|
14852
14900
|
end: { type: "string", description: "End date YYYY-MM-DD" },
|
|
14853
14901
|
"last-days": { type: "string", description: "Window relative to today (default: 30)" },
|
|
14854
|
-
"
|
|
14902
|
+
"no-cache": NO_CACHE_ARG,
|
|
14855
14903
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
14856
14904
|
},
|
|
14857
14905
|
run: async ({ args }) => {
|
|
@@ -14874,7 +14922,7 @@ Examples:
|
|
|
14874
14922
|
granularity: "ALL",
|
|
14875
14923
|
limit: 500
|
|
14876
14924
|
},
|
|
14877
|
-
skipCache: Boolean(args["
|
|
14925
|
+
skipCache: Boolean(args["no-cache"])
|
|
14878
14926
|
});
|
|
14879
14927
|
const sorted = [...data.rows].sort((a, b) => Number(b.clicks ?? 0) - Number(a.clicks ?? 0));
|
|
14880
14928
|
const fmt = csvOrJson2(args);
|
|
@@ -14927,14 +14975,14 @@ var listCmd = defineCommand42({
|
|
|
14927
14975
|
args: {
|
|
14928
14976
|
"account-id": { type: "string", description: "Numeric account ID or urn:li:sponsoredAccount:N" },
|
|
14929
14977
|
"account-urn": { type: "string", description: "Alias for --account-id" },
|
|
14930
|
-
"
|
|
14978
|
+
"no-cache": NO_CACHE_ARG,
|
|
14931
14979
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
14932
14980
|
},
|
|
14933
14981
|
run: async ({ args }) => {
|
|
14934
14982
|
const accountId = resolveAccountIdArg2(args);
|
|
14935
14983
|
try {
|
|
14936
14984
|
const params = { "account-id": accountId };
|
|
14937
|
-
if (args["
|
|
14985
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
14938
14986
|
const data = await apiGet("/api/ads/linkedin/conversions", params);
|
|
14939
14987
|
const fmt = csvOrJson2(args);
|
|
14940
14988
|
if (fmt !== "json") {
|
|
@@ -14962,14 +15010,14 @@ Surfaces:
|
|
|
14962
15010
|
args: {
|
|
14963
15011
|
"account-id": { type: "string", description: "Numeric account ID or urn:li:sponsoredAccount:N" },
|
|
14964
15012
|
"account-urn": { type: "string", description: "Alias for --account-id" },
|
|
14965
|
-
"
|
|
15013
|
+
"no-cache": NO_CACHE_ARG,
|
|
14966
15014
|
output: { type: "string", description: "json", default: "json" }
|
|
14967
15015
|
},
|
|
14968
15016
|
run: async ({ args }) => {
|
|
14969
15017
|
const accountId = resolveAccountIdArg2(args);
|
|
14970
15018
|
try {
|
|
14971
15019
|
const params = { "account-id": accountId };
|
|
14972
|
-
if (args["
|
|
15020
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
14973
15021
|
const data = await apiGet("/api/ads/linkedin/conversions", params);
|
|
14974
15022
|
writeAdsJson({ ok: true, data: healthOf(data) });
|
|
14975
15023
|
} catch (err) {
|
|
@@ -15096,7 +15144,7 @@ var listArgs3 = {
|
|
|
15096
15144
|
},
|
|
15097
15145
|
full: { type: "boolean", description: "Return the complete raw records, including the opaque 'content' block" },
|
|
15098
15146
|
limit: { type: "string", description: "Max rows (default: 500)" },
|
|
15099
|
-
"
|
|
15147
|
+
"no-cache": NO_CACHE_ARG,
|
|
15100
15148
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15101
15149
|
};
|
|
15102
15150
|
var creativesListCommand = defineCommand43({
|
|
@@ -15113,7 +15161,7 @@ var creativesListCommand = defineCommand43({
|
|
|
15113
15161
|
if (statuses) params.statuses = statuses.join(",");
|
|
15114
15162
|
if (args["campaign-id"]) params["campaign-id"] = String(args["campaign-id"]);
|
|
15115
15163
|
if (args.limit) params.limit = String(args.limit);
|
|
15116
|
-
if (args["
|
|
15164
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
15117
15165
|
const data = await apiGet("/api/ads/linkedin/creatives", params);
|
|
15118
15166
|
const shaped = shapeRows(data, args);
|
|
15119
15167
|
const fmt = csvOrJson2(args);
|
|
@@ -15209,7 +15257,7 @@ Examples:
|
|
|
15209
15257
|
start: { type: "string", description: "Start date YYYY-MM-DD" },
|
|
15210
15258
|
end: { type: "string", description: "End date YYYY-MM-DD" },
|
|
15211
15259
|
"last-days": { type: "string", description: "Window relative to today (default: 30)" },
|
|
15212
|
-
"
|
|
15260
|
+
"no-cache": NO_CACHE_ARG,
|
|
15213
15261
|
output: { type: "string", description: "json", default: "json" }
|
|
15214
15262
|
},
|
|
15215
15263
|
run: async ({ args }) => {
|
|
@@ -15248,7 +15296,7 @@ Examples:
|
|
|
15248
15296
|
granularity: "ALL",
|
|
15249
15297
|
limit: 500
|
|
15250
15298
|
},
|
|
15251
|
-
skipCache: Boolean(args["
|
|
15299
|
+
skipCache: Boolean(args["no-cache"])
|
|
15252
15300
|
});
|
|
15253
15301
|
results.push({ pivot, rows: topByImpressions(data.rows, topN), warnings: data.warnings });
|
|
15254
15302
|
}
|
|
@@ -15524,13 +15572,13 @@ Cached 7 days. Use this to discover what dimensions you can target on (industrie
|
|
|
15524
15572
|
seniorities, titles, employers, growthRate, companyCategory, skills, etc.).`
|
|
15525
15573
|
},
|
|
15526
15574
|
args: {
|
|
15527
|
-
"
|
|
15575
|
+
"no-cache": NO_CACHE_ARG,
|
|
15528
15576
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15529
15577
|
},
|
|
15530
15578
|
run: async ({ args }) => {
|
|
15531
15579
|
try {
|
|
15532
15580
|
const params = {};
|
|
15533
|
-
if (args["
|
|
15581
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
15534
15582
|
const data = await apiGet("/api/ads/linkedin/facets", params);
|
|
15535
15583
|
const fmt = csvOrJson2(args);
|
|
15536
15584
|
if (fmt !== "json") {
|
|
@@ -15561,7 +15609,7 @@ or the full URN (urn:li:adTargetingFacet:industries).`
|
|
|
15561
15609
|
query: { type: "string", description: "Typeahead query (auto-switches finder to typeahead)" },
|
|
15562
15610
|
finder: { type: "string", description: "adTargetingFacet | typeahead | similarEntities (default: auto)" },
|
|
15563
15611
|
locale: { type: "string", description: "Locale (default: en_US)" },
|
|
15564
|
-
"
|
|
15612
|
+
"no-cache": NO_CACHE_ARG,
|
|
15565
15613
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15566
15614
|
},
|
|
15567
15615
|
run: async ({ args }) => {
|
|
@@ -15571,7 +15619,7 @@ or the full URN (urn:li:adTargetingFacet:industries).`
|
|
|
15571
15619
|
params.finder = finder;
|
|
15572
15620
|
if (args.query) params.query = String(args.query);
|
|
15573
15621
|
if (args.locale) params.locale = String(args.locale);
|
|
15574
|
-
if (args["
|
|
15622
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
15575
15623
|
const data = await apiGet("/api/ads/linkedin/facets/entities", params);
|
|
15576
15624
|
const fmt = csvOrJson2(args);
|
|
15577
15625
|
if (fmt !== "json") {
|
|
@@ -15654,7 +15702,7 @@ Examples:
|
|
|
15654
15702
|
bid: { type: "string", description: "Bid e.g. '8 USD'" },
|
|
15655
15703
|
targeting: { type: "string", description: "Inline JSON targetingCriteria" },
|
|
15656
15704
|
"targeting-file": { type: "string", description: "Path to JSON file with targetingCriteria" },
|
|
15657
|
-
"
|
|
15705
|
+
"no-cache": NO_CACHE_ARG,
|
|
15658
15706
|
output: { type: "string", description: "json", default: "json" }
|
|
15659
15707
|
},
|
|
15660
15708
|
run: async ({ args }) => {
|
|
@@ -15669,7 +15717,7 @@ Examples:
|
|
|
15669
15717
|
dailyBudget: parseMoney(args["daily-budget"]),
|
|
15670
15718
|
totalBudget: parseMoney(args["total-budget"]),
|
|
15671
15719
|
bid: parseMoney(args.bid),
|
|
15672
|
-
skipCache: Boolean(args["
|
|
15720
|
+
skipCache: Boolean(args["no-cache"])
|
|
15673
15721
|
});
|
|
15674
15722
|
writeAdsJson({ ok: true, data });
|
|
15675
15723
|
} catch (err) {
|
|
@@ -15706,7 +15754,7 @@ Examples:
|
|
|
15706
15754
|
description: "Only responses submitted at or after this epoch ms (alternative to --since-days)"
|
|
15707
15755
|
},
|
|
15708
15756
|
limit: { type: "string", description: "Max rows (default: 500)" },
|
|
15709
|
-
"
|
|
15757
|
+
"no-cache": NO_CACHE_ARG,
|
|
15710
15758
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15711
15759
|
},
|
|
15712
15760
|
run: async ({ args }) => {
|
|
@@ -15719,7 +15767,7 @@ Examples:
|
|
|
15719
15767
|
const sinceMs = args["since-ms"] ? Number(args["since-ms"]) : sinceDays ? Date.now() - sinceDays * DAY_MS4 : void 0;
|
|
15720
15768
|
if (sinceMs) params["since-ms"] = String(sinceMs);
|
|
15721
15769
|
if (args.limit) params.limit = String(args.limit);
|
|
15722
|
-
if (args["
|
|
15770
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
15723
15771
|
const data = await apiGet("/api/ads/linkedin/leads", params);
|
|
15724
15772
|
const fmt = csvOrJson2(args);
|
|
15725
15773
|
if (fmt !== "json") {
|
|
@@ -15767,7 +15815,7 @@ couldn't be resolved \u2014 typically an org outside LinkedIn's targetable set.`
|
|
|
15767
15815
|
args: {
|
|
15768
15816
|
urns: { type: "string", description: "Comma-separated org URNs (urn:li:organization:NNN)" },
|
|
15769
15817
|
ids: { type: "string", description: "Comma-separated bare org ids (17719,19022)" },
|
|
15770
|
-
"
|
|
15818
|
+
"no-cache": NO_CACHE_ARG,
|
|
15771
15819
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15772
15820
|
},
|
|
15773
15821
|
run: async ({ args }) => {
|
|
@@ -15779,7 +15827,7 @@ couldn't be resolved \u2014 typically an org outside LinkedIn's targetable set.`
|
|
|
15779
15827
|
try {
|
|
15780
15828
|
const data = await apiPost("/api/ads/linkedin/resolve-orgs", {
|
|
15781
15829
|
urns,
|
|
15782
|
-
skipCache: Boolean(args["
|
|
15830
|
+
skipCache: Boolean(args["no-cache"])
|
|
15783
15831
|
});
|
|
15784
15832
|
const fmt = csvOrJson2(args);
|
|
15785
15833
|
if (fmt !== "json") {
|
|
@@ -15818,7 +15866,7 @@ Examples:
|
|
|
15818
15866
|
start: { type: "string", description: "Start date YYYY-MM-DD" },
|
|
15819
15867
|
end: { type: "string", description: "End date YYYY-MM-DD" },
|
|
15820
15868
|
"last-days": { type: "string", description: "Window relative to today (default: 30)" },
|
|
15821
|
-
"
|
|
15869
|
+
"no-cache": NO_CACHE_ARG,
|
|
15822
15870
|
output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
|
|
15823
15871
|
},
|
|
15824
15872
|
run: async ({ args }) => {
|
|
@@ -15843,7 +15891,7 @@ Examples:
|
|
|
15843
15891
|
granularity: "ALL",
|
|
15844
15892
|
limit: 500
|
|
15845
15893
|
},
|
|
15846
|
-
skipCache: Boolean(args["
|
|
15894
|
+
skipCache: Boolean(args["no-cache"])
|
|
15847
15895
|
});
|
|
15848
15896
|
const top = [...data.rows].sort((a, b) => Number(b.impressions ?? 0) - Number(a.impressions ?? 0)).slice(0, topN);
|
|
15849
15897
|
const fmt = csvOrJson2(args);
|
|
@@ -15948,13 +15996,13 @@ Examples:
|
|
|
15948
15996
|
},
|
|
15949
15997
|
args: {
|
|
15950
15998
|
"account-id": { type: "string", description: "Meta ad account ID (act_...)" },
|
|
15951
|
-
"
|
|
15999
|
+
"no-cache": NO_CACHE_ARG
|
|
15952
16000
|
},
|
|
15953
16001
|
run: async ({ args }) => {
|
|
15954
16002
|
const accountId = resolveAccountIdArg(args);
|
|
15955
16003
|
try {
|
|
15956
16004
|
const params = { "account-id": accountId };
|
|
15957
|
-
if (args["
|
|
16005
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
15958
16006
|
const data = await apiGet("/api/ads/meta/account", params);
|
|
15959
16007
|
writeAdsJson({ ok: true, data });
|
|
15960
16008
|
} catch (err) {
|
|
@@ -15991,8 +16039,7 @@ Examples:
|
|
|
15991
16039
|
},
|
|
15992
16040
|
args: {
|
|
15993
16041
|
"include-all": { type: "boolean", description: "List all accessible accounts, ignoring picker scope" },
|
|
15994
|
-
"no-cache":
|
|
15995
|
-
"skip-cache": { type: "boolean", description: "Bypass server-side cache (force re-fetch)" },
|
|
16042
|
+
"no-cache": NO_CACHE_ARG,
|
|
15996
16043
|
output: { type: "string", description: "Output format: json|csv|jsonl|md", default: "json" }
|
|
15997
16044
|
},
|
|
15998
16045
|
run: async ({ args }) => {
|
|
@@ -16014,7 +16061,7 @@ Examples:
|
|
|
16014
16061
|
try {
|
|
16015
16062
|
const params = {};
|
|
16016
16063
|
if (includeAll) params["include-all"] = "true";
|
|
16017
|
-
if (
|
|
16064
|
+
if (!useCache) params["skip-cache"] = "true";
|
|
16018
16065
|
const data = await apiGet("/api/ads/meta/accounts", params);
|
|
16019
16066
|
if (useCache) {
|
|
16020
16067
|
cacheSet("meta-accounts", cacheKey, data, 60 * 60 * 1e3);
|
|
@@ -16046,7 +16093,7 @@ Examples:
|
|
|
16046
16093
|
"account-id": { type: "string", description: "Meta ad account ID" },
|
|
16047
16094
|
days: { type: "string", description: "Lookback days (default 7)" },
|
|
16048
16095
|
limit: { type: "string", description: "Max rows" },
|
|
16049
|
-
"
|
|
16096
|
+
"no-cache": NO_CACHE_ARG,
|
|
16050
16097
|
output: { type: "string", description: "Output format", default: "json" }
|
|
16051
16098
|
},
|
|
16052
16099
|
run: async ({ args }) => {
|
|
@@ -16055,7 +16102,7 @@ Examples:
|
|
|
16055
16102
|
const params = { "account-id": accountId };
|
|
16056
16103
|
if (args.days) params.days = args.days;
|
|
16057
16104
|
if (args.limit) params.limit = args.limit;
|
|
16058
|
-
if (args["
|
|
16105
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
16059
16106
|
const data = await apiGet("/api/ads/meta/activities", params);
|
|
16060
16107
|
const fmt = csvOrJson(args);
|
|
16061
16108
|
if (fmt !== "json") {
|
|
@@ -17613,7 +17660,7 @@ var listArgs4 = {
|
|
|
17613
17660
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
17614
17661
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
17615
17662
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
17616
|
-
"
|
|
17663
|
+
"no-cache": NO_CACHE_ARG,
|
|
17617
17664
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17618
17665
|
};
|
|
17619
17666
|
var listCommand4 = defineCommand56({
|
|
@@ -17631,7 +17678,7 @@ var listCommand4 = defineCommand56({
|
|
|
17631
17678
|
if (args["campaign-id"]) params["campaign-id"] = args["campaign-id"];
|
|
17632
17679
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
17633
17680
|
if (args.limit) params.limit = args.limit;
|
|
17634
|
-
if (args["
|
|
17681
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17635
17682
|
const data = await apiGet("/api/ads/meta/ads", params);
|
|
17636
17683
|
const fmt = csvOrJson(args);
|
|
17637
17684
|
if (fmt !== "json") {
|
|
@@ -17683,7 +17730,7 @@ var listArgs5 = {
|
|
|
17683
17730
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
17684
17731
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
17685
17732
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
17686
|
-
"
|
|
17733
|
+
"no-cache": NO_CACHE_ARG,
|
|
17687
17734
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17688
17735
|
};
|
|
17689
17736
|
var listCommand5 = defineCommand57({
|
|
@@ -17700,7 +17747,7 @@ var listCommand5 = defineCommand57({
|
|
|
17700
17747
|
if (args["campaign-id"]) params["campaign-id"] = args["campaign-id"];
|
|
17701
17748
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
17702
17749
|
if (args.limit) params.limit = args.limit;
|
|
17703
|
-
if (args["
|
|
17750
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17704
17751
|
const data = await apiGet("/api/ads/meta/adsets", params);
|
|
17705
17752
|
const fmt = csvOrJson(args);
|
|
17706
17753
|
if (fmt !== "json") {
|
|
@@ -17746,7 +17793,7 @@ import { defineCommand as defineCommand58 } from "citty";
|
|
|
17746
17793
|
var listArgs6 = {
|
|
17747
17794
|
"account-id": { type: "string", description: "Meta ad account ID" },
|
|
17748
17795
|
limit: { type: "string", description: "Max rows" },
|
|
17749
|
-
"
|
|
17796
|
+
"no-cache": NO_CACHE_ARG,
|
|
17750
17797
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17751
17798
|
};
|
|
17752
17799
|
var listCommand6 = defineCommand58({
|
|
@@ -17760,7 +17807,7 @@ var listCommand6 = defineCommand58({
|
|
|
17760
17807
|
try {
|
|
17761
17808
|
const params = { "account-id": accountId };
|
|
17762
17809
|
if (args.limit) params.limit = args.limit;
|
|
17763
|
-
if (args["
|
|
17810
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17764
17811
|
const data = await apiGet("/api/ads/meta/audiences", params);
|
|
17765
17812
|
const fmt = csvOrJson(args);
|
|
17766
17813
|
if (fmt !== "json") {
|
|
@@ -17807,13 +17854,13 @@ Examples:
|
|
|
17807
17854
|
baker ads meta businesses`
|
|
17808
17855
|
},
|
|
17809
17856
|
args: {
|
|
17810
|
-
"
|
|
17857
|
+
"no-cache": NO_CACHE_ARG,
|
|
17811
17858
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17812
17859
|
},
|
|
17813
17860
|
run: async ({ args }) => {
|
|
17814
17861
|
try {
|
|
17815
17862
|
const params = {};
|
|
17816
|
-
if (args["
|
|
17863
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17817
17864
|
const data = await apiGet("/api/ads/meta/businesses", params);
|
|
17818
17865
|
const fmt = csvOrJson(args);
|
|
17819
17866
|
if (fmt !== "json") {
|
|
@@ -17834,7 +17881,7 @@ var listArgs7 = {
|
|
|
17834
17881
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
17835
17882
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter and return everything" },
|
|
17836
17883
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
17837
|
-
"
|
|
17884
|
+
"no-cache": NO_CACHE_ARG,
|
|
17838
17885
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17839
17886
|
};
|
|
17840
17887
|
var listCommand7 = defineCommand60({
|
|
@@ -17850,7 +17897,7 @@ var listCommand7 = defineCommand60({
|
|
|
17850
17897
|
const params = { "account-id": accountId };
|
|
17851
17898
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
17852
17899
|
if (args.limit) params.limit = args.limit;
|
|
17853
|
-
if (args["
|
|
17900
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17854
17901
|
const data = await apiGet("/api/ads/meta/campaigns", params);
|
|
17855
17902
|
const fmt = csvOrJson(args);
|
|
17856
17903
|
if (fmt !== "json") {
|
|
@@ -17902,7 +17949,7 @@ var listArgs8 = {
|
|
|
17902
17949
|
"account-id": { type: "string", description: "Meta ad account ID (required if no --creative-id)" },
|
|
17903
17950
|
"creative-id": { type: "string", description: "Single creative ID" },
|
|
17904
17951
|
limit: { type: "string", description: "Max rows (default 500)" },
|
|
17905
|
-
"
|
|
17952
|
+
"no-cache": NO_CACHE_ARG,
|
|
17906
17953
|
output: { type: "string", description: "Output format", default: "json" }
|
|
17907
17954
|
};
|
|
17908
17955
|
var listCommand8 = defineCommand61({
|
|
@@ -17921,7 +17968,7 @@ var listCommand8 = defineCommand61({
|
|
|
17921
17968
|
params["account-id"] = accountId;
|
|
17922
17969
|
}
|
|
17923
17970
|
if (args.limit) params.limit = args.limit;
|
|
17924
|
-
if (args["
|
|
17971
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
17925
17972
|
const data = await apiGet("/api/ads/meta/creatives", params);
|
|
17926
17973
|
const fmt = csvOrJson(args);
|
|
17927
17974
|
if (Array.isArray(data) && fmt !== "json") {
|
|
@@ -18299,7 +18346,7 @@ function buildBody(args) {
|
|
|
18299
18346
|
useAccountAttributionSetting: Boolean(args["use-account-attribution"]),
|
|
18300
18347
|
useUnifiedAttributionSetting: Boolean(args["use-unified-attribution"]),
|
|
18301
18348
|
limit: args.limit ? Number(args.limit) : 1e3,
|
|
18302
|
-
skipCache: Boolean(args["
|
|
18349
|
+
skipCache: Boolean(args["no-cache"])
|
|
18303
18350
|
};
|
|
18304
18351
|
applyDateRange(body, args);
|
|
18305
18352
|
return body;
|
|
@@ -18412,7 +18459,7 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
|
|
|
18412
18459
|
// while nothing consumes it.
|
|
18413
18460
|
async: { type: "boolean", description: "Force the async submit-and-poll path (--no-async refuses it)" },
|
|
18414
18461
|
"no-sort": { type: "boolean", description: "Skip default spend-desc sort" },
|
|
18415
|
-
"
|
|
18462
|
+
"no-cache": NO_CACHE_ARG,
|
|
18416
18463
|
output: { type: "string", description: "Output format", default: "json" }
|
|
18417
18464
|
},
|
|
18418
18465
|
run: async ({ args }) => {
|
|
@@ -18487,13 +18534,13 @@ Examples:
|
|
|
18487
18534
|
baker ads meta pages`
|
|
18488
18535
|
},
|
|
18489
18536
|
args: {
|
|
18490
|
-
"
|
|
18537
|
+
"no-cache": NO_CACHE_ARG,
|
|
18491
18538
|
output: { type: "string", description: "Output format", default: "json" }
|
|
18492
18539
|
},
|
|
18493
18540
|
run: async ({ args }) => {
|
|
18494
18541
|
try {
|
|
18495
18542
|
const params = {};
|
|
18496
|
-
if (args["
|
|
18543
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
18497
18544
|
const data = await apiGet("/api/ads/meta/pages", params);
|
|
18498
18545
|
const fmt = csvOrJson(args);
|
|
18499
18546
|
if (fmt !== "json") {
|
|
@@ -18529,7 +18576,7 @@ Examples:
|
|
|
18529
18576
|
default: "event"
|
|
18530
18577
|
},
|
|
18531
18578
|
days: { type: "string", description: "Lookback days for --stats (default 7)" },
|
|
18532
|
-
"
|
|
18579
|
+
"no-cache": NO_CACHE_ARG,
|
|
18533
18580
|
output: { type: "string", description: "Output format", default: "json" }
|
|
18534
18581
|
},
|
|
18535
18582
|
run: async ({ args }) => {
|
|
@@ -18559,14 +18606,14 @@ async function runStats(args) {
|
|
|
18559
18606
|
"start-time": daysAgoIso(days),
|
|
18560
18607
|
"end-time": todayIso()
|
|
18561
18608
|
};
|
|
18562
|
-
if (args["
|
|
18609
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
18563
18610
|
const data = await apiGet("/api/ads/meta/pixel-stats", params);
|
|
18564
18611
|
emit(data, args);
|
|
18565
18612
|
}
|
|
18566
18613
|
async function runList(args) {
|
|
18567
18614
|
const accountId = resolveAccountIdArg(args);
|
|
18568
18615
|
const params = { "account-id": accountId };
|
|
18569
|
-
if (args["
|
|
18616
|
+
if (args["no-cache"]) params["skip-cache"] = "true";
|
|
18570
18617
|
const { pixels, restrictedFields } = await apiGet("/api/ads/meta/pixels", params);
|
|
18571
18618
|
emit(pixels, args, pixelWarnings(restrictedFields));
|
|
18572
18619
|
}
|
|
@@ -18684,7 +18731,7 @@ Examples:
|
|
|
18684
18731
|
platform: { type: "string", description: "facebook|instagram \u2014 required for --placement feed, which both report" },
|
|
18685
18732
|
"list-formats": { type: "boolean", description: "Print the ad_format values and placement mappings, then exit" },
|
|
18686
18733
|
"out-file": { type: "string", description: "Save iframe HTML to this path" },
|
|
18687
|
-
"
|
|
18734
|
+
"no-cache": NO_CACHE_ARG
|
|
18688
18735
|
},
|
|
18689
18736
|
run: async ({ args }) => {
|
|
18690
18737
|
if (args["list-formats"]) {
|
|
@@ -18712,7 +18759,7 @@ Examples:
|
|
|
18712
18759
|
if (args["ad-id"]) body.adId = args["ad-id"];
|
|
18713
18760
|
if (args["account-id"]) body.accountId = args["account-id"];
|
|
18714
18761
|
if (args.creative) body.creative = args.creative;
|
|
18715
|
-
if (args["
|
|
18762
|
+
if (args["no-cache"]) body.skipCache = true;
|
|
18716
18763
|
try {
|
|
18717
18764
|
const data = await apiPost("/api/ads/meta/preview", body);
|
|
18718
18765
|
const html = data.map((d) => d.body).join("\n");
|
|
@@ -41609,6 +41656,11 @@ registerSchema({
|
|
|
41609
41656
|
description: "What MOVES \u2014 camera, subject, timing. Kling reads 2,500 characters and Seedance 2.0 4,000; over the cap the request is refused rather than trimmed. Seedance 2.5 publishes no cap, which is why it is the one to reach for when the brief is a whole multi-shot sequence.",
|
|
41610
41657
|
required: true
|
|
41611
41658
|
},
|
|
41659
|
+
avatar: {
|
|
41660
|
+
type: "string",
|
|
41661
|
+
description: "Cast one of the company's avatars by short name (e.g. marta). Grounds the render on their identity sheet and reuses their subject description verbatim \u2014 do this instead of passing the sheet through --reference, which skips both and leaves the batch unattributed. `baker avatars list` shows who there is.",
|
|
41662
|
+
required: false
|
|
41663
|
+
},
|
|
41612
41664
|
image: {
|
|
41613
41665
|
type: "string",
|
|
41614
41666
|
description: "Comma-separated source images: library image ids, local file paths, and/or image URLs. Required unless --from text. With the default --from frame this must be exactly ONE image (the opening frame) \u2014 several are refused rather than silently reduced to the first. With --from references, up to 9 on Seedance 2.0 and 30 on Seedance 2.5.",
|
|
@@ -41784,6 +41836,7 @@ function clipModeFor(from) {
|
|
|
41784
41836
|
}
|
|
41785
41837
|
function buildAnimateBody(args, prompt, imageIds) {
|
|
41786
41838
|
const body = { prompt, imageIds, ...clipKnobs(args) };
|
|
41839
|
+
if (args.avatar) body.avatar = args.avatar;
|
|
41787
41840
|
const clipRefs = parseClipRefs(args["from-clip"]);
|
|
41788
41841
|
if (clipRefs) body.clipRefs = clipRefs;
|
|
41789
41842
|
const videoIds = parseVideoIds(args["from-video"]);
|
|
@@ -41972,6 +42025,11 @@ registerSchema({
|
|
|
41972
42025
|
required: false
|
|
41973
42026
|
},
|
|
41974
42027
|
count: { type: "number", description: "Takes to render, 1-8 (default 1)", required: false, default: 1 },
|
|
42028
|
+
avatar: {
|
|
42029
|
+
type: "string",
|
|
42030
|
+
description: "Cast one of the company's avatars by short name (e.g. marta). Grounds the render on their identity sheet and reuses their subject description verbatim \u2014 do this instead of passing the sheet through --reference, which skips both and leaves the batch unattributed. `baker avatars list` shows who there is.",
|
|
42031
|
+
required: false
|
|
42032
|
+
},
|
|
41975
42033
|
reference: {
|
|
41976
42034
|
type: "string",
|
|
41977
42035
|
description: "Comma-separated visual references, in order: library image ids, local file paths, and/or image URLs. Paths and URLs are added to the media library first, so the reference is reusable and the client can see what grounded the render. How many are allowed is per model \u2014 Gemini takes 14, gpt-image 16, Recraft exactly 1.",
|
|
@@ -42059,6 +42117,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
42059
42117
|
if (args.model) body.model = args.model;
|
|
42060
42118
|
if (args["aspect-ratio"]) body.aspectRatio = args["aspect-ratio"];
|
|
42061
42119
|
if (args.count !== void 0 && args.count !== "") body.count = Number(args.count);
|
|
42120
|
+
if (args.avatar) body.avatar = args.avatar;
|
|
42062
42121
|
if (args.skill) body.skillId = args.skill;
|
|
42063
42122
|
if (args.brand) body.useBrand = true;
|
|
42064
42123
|
if (args["image-size"]) body.imageSize = args["image-size"];
|
|
@@ -45812,8 +45871,10 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
45812
45871
|
schema: schemaCommand
|
|
45813
45872
|
}
|
|
45814
45873
|
});
|
|
45874
|
+
process.argv = [...process.argv.slice(0, 2), ...normalizeCacheFlag(process.argv.slice(2))];
|
|
45815
45875
|
installStreamTaps();
|
|
45816
45876
|
logInvocation(process.argv.slice(2));
|
|
45817
45877
|
refuseUnknownFlags(main, process.argv.slice(2));
|
|
45878
|
+
process.argv = [...process.argv.slice(0, 2), ...cacheFlagForParser(process.argv.slice(2))];
|
|
45818
45879
|
runMain(main);
|
|
45819
45880
|
//# sourceMappingURL=cli.js.map
|