@koda-sl/baker-cli 0.435.0 → 0.437.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 +4 -1
- package/dist/cli.js +149 -19
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1183,7 +1183,8 @@ baker ads linkedin bid-pricing --account-id 503001492 \
|
|
|
1183
1183
|
**`analytics`** — the 3-axis workhorse:
|
|
1184
1184
|
- `--level account` (override: `campaign-group|campaign|creative`)
|
|
1185
1185
|
- `--intent baseline` field bundle. Intents: `baseline | revenue | funnel | engagement | video | lead-gen | inmail | document | ranking | identity`. List with `--list-intents`.
|
|
1186
|
-
- `--pivot none`. Pivots: `none | campaign | campaign-group | creative | company | account | conversion | job-title | job-function | seniority | industry | company-size | country | region | device | placement | serving-location | card-index | objective | conversation-node | conversation-node-button`. List with `--list-pivots`.
|
|
1186
|
+
- `--pivot none`. Pivots: `none | campaign | campaign-group | creative | company | account | conversion | job-title | job-function | seniority | industry | company-size | country | region | dma | device | placement | serving-location | card-index | objective | conversation-node | conversation-node-button`. List with `--list-pivots`.
|
|
1187
|
+
- `--pivot dma` — US Nielsen Designated Market Areas, with region names resolved. LinkedIn's terms: any report built from it writes "DMA®" each time and carries "DMA® is a registered service mark of The Nielsen Company." — the `DMA_ATTRIBUTION_REQUIRED` warning repeats this on every call.
|
|
1187
1188
|
- `--granularity DAILY`. Auto-forced to `ALL` when pivoting on a `MEMBER_*` dim (LinkedIn rejects DAILY + demographic) — surfaced in stderr + `warnings`.
|
|
1188
1189
|
- `--last-days 7` unless you pass `--start`/`--end`.
|
|
1189
1190
|
- Sort: `costInUsd` descending. `--no-sort` to disable.
|
|
@@ -1289,6 +1290,8 @@ baker ads linkedin campaigns exclude-companies 123456 --segment urn:li:dmpSegmen
|
|
|
1289
1290
|
# Conversions with playbook-default windows
|
|
1290
1291
|
baker ads linkedin conversions create --name "Demo booked" --type LEAD --method INSIGHT_TAG \
|
|
1291
1292
|
--post-click-window 30 --view-window 7
|
|
1293
|
+
# Windows are 1|7|30|90 days; 180 and 365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD,
|
|
1294
|
+
# SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION — refused at stage time otherwise
|
|
1292
1295
|
|
|
1293
1296
|
# Safe duplication — stage-time read of the source → staged DRAFT create ("Duplicate ad", never "Link to original")
|
|
1294
1297
|
baker ads linkedin campaigns duplicate 123456 --name "New variant"
|
package/dist/cli.js
CHANGED
|
@@ -23717,6 +23717,100 @@ var adContentSchema = z5.object({
|
|
|
23717
23717
|
offer: adContentOfferSchema
|
|
23718
23718
|
});
|
|
23719
23719
|
var adContentResponseSchema = z5.object({ ad: adContentSchema });
|
|
23720
|
+
var adDnaColorSchema = z5.object({
|
|
23721
|
+
hex: z5.string(),
|
|
23722
|
+
share: z5.number().nullable()
|
|
23723
|
+
});
|
|
23724
|
+
var adDnaSceneSchema = z5.object({
|
|
23725
|
+
start_s: z5.number(),
|
|
23726
|
+
end_s: z5.number(),
|
|
23727
|
+
role: z5.string().nullable(),
|
|
23728
|
+
visual: z5.string(),
|
|
23729
|
+
speech: z5.string().nullable(),
|
|
23730
|
+
on_screen_text: z5.string().nullable(),
|
|
23731
|
+
sound: z5.string().nullable()
|
|
23732
|
+
});
|
|
23733
|
+
var adDnaMomentSchema = z5.object({
|
|
23734
|
+
kind: z5.enum(["hook_ends", "product", "price", "cta", "logo"]),
|
|
23735
|
+
at_s: z5.number()
|
|
23736
|
+
});
|
|
23737
|
+
var adDnaStorySchema = z5.object({
|
|
23738
|
+
duration_s: z5.number().nullable(),
|
|
23739
|
+
summary: z5.string().nullable(),
|
|
23740
|
+
hook: z5.string().nullable(),
|
|
23741
|
+
scenes: z5.array(adDnaSceneSchema),
|
|
23742
|
+
moments: z5.array(adDnaMomentSchema)
|
|
23743
|
+
});
|
|
23744
|
+
var adDnaCardSchema = z5.object({
|
|
23745
|
+
index: z5.number(),
|
|
23746
|
+
role: z5.string().nullable(),
|
|
23747
|
+
layout: z5.string().nullable(),
|
|
23748
|
+
colors: z5.array(adDnaColorSchema),
|
|
23749
|
+
open_loop: z5.string().nullable(),
|
|
23750
|
+
transition: z5.string().nullable()
|
|
23751
|
+
});
|
|
23752
|
+
var adDnaAgeReachSchema = z5.object({
|
|
23753
|
+
age_range: z5.string(),
|
|
23754
|
+
female: z5.number(),
|
|
23755
|
+
male: z5.number(),
|
|
23756
|
+
unknown: z5.number()
|
|
23757
|
+
});
|
|
23758
|
+
var adDnaReachSchema = z5.object({
|
|
23759
|
+
total: z5.number().nullable(),
|
|
23760
|
+
eu_total: z5.number().nullable(),
|
|
23761
|
+
ages: z5.object({ min: z5.number(), max: z5.number() }).nullable(),
|
|
23762
|
+
gender: z5.string().nullable(),
|
|
23763
|
+
locations: z5.array(z5.string()),
|
|
23764
|
+
excluded_locations: z5.array(z5.string()),
|
|
23765
|
+
channels: z5.array(z5.string()),
|
|
23766
|
+
by_age: z5.array(adDnaAgeReachSchema)
|
|
23767
|
+
});
|
|
23768
|
+
var adDnaTraitSchema = z5.object({
|
|
23769
|
+
key: z5.string(),
|
|
23770
|
+
value: z5.union([z5.string(), z5.number(), z5.boolean(), z5.array(z5.string())])
|
|
23771
|
+
});
|
|
23772
|
+
var adDnaTraitGroupKeySchema = z5.enum([
|
|
23773
|
+
"audience",
|
|
23774
|
+
"business",
|
|
23775
|
+
"message",
|
|
23776
|
+
"copy",
|
|
23777
|
+
"look",
|
|
23778
|
+
"cast",
|
|
23779
|
+
"pacing",
|
|
23780
|
+
"sound",
|
|
23781
|
+
"on_screen_text",
|
|
23782
|
+
"branding",
|
|
23783
|
+
"subject",
|
|
23784
|
+
"cta_visual",
|
|
23785
|
+
"markers",
|
|
23786
|
+
"carousel",
|
|
23787
|
+
"offer",
|
|
23788
|
+
"delivery"
|
|
23789
|
+
]);
|
|
23790
|
+
var adDnaTraitGroupSchema = z5.object({
|
|
23791
|
+
key: adDnaTraitGroupKeySchema,
|
|
23792
|
+
traits: z5.array(adDnaTraitSchema)
|
|
23793
|
+
});
|
|
23794
|
+
var adDnaDetailSchema = z5.object({
|
|
23795
|
+
palette: z5.array(adDnaColorSchema),
|
|
23796
|
+
background_hex: z5.string().nullable(),
|
|
23797
|
+
button_hex: z5.string().nullable(),
|
|
23798
|
+
story: adDnaStorySchema.nullable(),
|
|
23799
|
+
cards: z5.array(adDnaCardSchema),
|
|
23800
|
+
reach: adDnaReachSchema.nullable(),
|
|
23801
|
+
groups: z5.array(adDnaTraitGroupSchema),
|
|
23802
|
+
extracted_at: z5.string().nullable()
|
|
23803
|
+
});
|
|
23804
|
+
var adCardMediaSchema = z5.object({
|
|
23805
|
+
index: z5.number(),
|
|
23806
|
+
url: z5.string(),
|
|
23807
|
+
kind: z5.enum(["image", "video"]).nullable()
|
|
23808
|
+
});
|
|
23809
|
+
var adDetailSchema = z5.object({
|
|
23810
|
+
content: adContentSchema,
|
|
23811
|
+
dna: adDnaDetailSchema,
|
|
23812
|
+
card_media: z5.array(adCardMediaSchema)
|
|
23813
|
+
});
|
|
23720
23814
|
|
|
23721
23815
|
// ../api/src/ads-linkedin/companies.ts
|
|
23722
23816
|
import { z as z6 } from "zod";
|
|
@@ -23868,11 +23962,11 @@ var LINKEDIN_LIMITS = {
|
|
|
23868
23962
|
},
|
|
23869
23963
|
conversion: {
|
|
23870
23964
|
nameMax: 255,
|
|
23871
|
-
// 365
|
|
23872
|
-
// `
|
|
23965
|
+
// 180 and 365 are accepted only for the types in
|
|
23966
|
+
// `CONVERSION_TYPES_ALLOWING_LONG_WINDOWS`; enforced cross-field in
|
|
23873
23967
|
// `conversionCreateSchema`, since the enum alone cannot express it.
|
|
23874
|
-
postClickWindows: [1, 7, 30, 90, 365],
|
|
23875
|
-
viewThroughWindows: [1, 7, 30, 90, 365]
|
|
23968
|
+
postClickWindows: [1, 7, 30, 90, 180, 365],
|
|
23969
|
+
viewThroughWindows: [1, 7, 30, 90, 180, 365]
|
|
23876
23970
|
},
|
|
23877
23971
|
leadForm: {
|
|
23878
23972
|
nameMax: 256,
|
|
@@ -24006,12 +24100,14 @@ var CONVERSION_TYPES = [
|
|
|
24006
24100
|
"VIEW_CONTENT",
|
|
24007
24101
|
"VIEW_VIDEO"
|
|
24008
24102
|
];
|
|
24009
|
-
var
|
|
24103
|
+
var CONVERSION_TYPES_ALLOWING_LONG_WINDOWS = [
|
|
24010
24104
|
"SUBMIT_APPLICATION",
|
|
24011
24105
|
"PURCHASE",
|
|
24012
24106
|
"ADD_TO_CART",
|
|
24013
24107
|
"QUALIFIED_LEAD",
|
|
24014
|
-
"LEAD"
|
|
24108
|
+
"LEAD",
|
|
24109
|
+
"MARKETING_QUALIFIED_LEAD",
|
|
24110
|
+
"SALES_QUALIFIED_LEAD"
|
|
24015
24111
|
];
|
|
24016
24112
|
var CONVERSION_METHODS = ["INSIGHT_TAG", "CONVERSIONS_API"];
|
|
24017
24113
|
var ATTRIBUTION_TYPES = ["LAST_TOUCH_BY_CAMPAIGN", "LAST_TOUCH_BY_CONVERSION"];
|
|
@@ -24610,13 +24706,14 @@ var conversionCreateSchema = z7.object({
|
|
|
24610
24706
|
urlMatchRuleExpression: z7.array(z7.array(z7.record(z7.string(), z7.string()))).optional(),
|
|
24611
24707
|
associateAllCampaigns: z7.boolean().optional()
|
|
24612
24708
|
}).superRefine((p, ctx) => {
|
|
24613
|
-
const
|
|
24709
|
+
const allowsLong = CONVERSION_TYPES_ALLOWING_LONG_WINDOWS.includes(p.type);
|
|
24614
24710
|
for (const field of ["postClickAttributionWindowSize", "viewThroughAttributionWindowSize"]) {
|
|
24615
|
-
|
|
24711
|
+
const days = p[field];
|
|
24712
|
+
if (days !== void 0 && days > 90 && !allowsLong) {
|
|
24616
24713
|
ctx.addIssue({
|
|
24617
24714
|
code: "custom",
|
|
24618
24715
|
path: [field],
|
|
24619
|
-
message: `a
|
|
24716
|
+
message: `a ${days}-day window is only available for ${CONVERSION_TYPES_ALLOWING_LONG_WINDOWS.join(", ")} \u2014 ${p.type} caps at 90`
|
|
24620
24717
|
});
|
|
24621
24718
|
}
|
|
24622
24719
|
}
|
|
@@ -51212,6 +51309,7 @@ registerSchema({
|
|
|
51212
51309
|
"company-size",
|
|
51213
51310
|
"country",
|
|
51214
51311
|
"region",
|
|
51312
|
+
"dma",
|
|
51215
51313
|
"device",
|
|
51216
51314
|
"placement",
|
|
51217
51315
|
"serving-location",
|
|
@@ -51853,8 +51951,16 @@ registerSchema({
|
|
|
51853
51951
|
required: true
|
|
51854
51952
|
},
|
|
51855
51953
|
method: { type: "string", description: "INSIGHT_TAG|CONVERSIONS_API", required: true },
|
|
51856
|
-
"post-click-window": {
|
|
51857
|
-
|
|
51954
|
+
"post-click-window": {
|
|
51955
|
+
type: "string",
|
|
51956
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION",
|
|
51957
|
+
required: false
|
|
51958
|
+
},
|
|
51959
|
+
"view-window": {
|
|
51960
|
+
type: "string",
|
|
51961
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION",
|
|
51962
|
+
required: false
|
|
51963
|
+
},
|
|
51858
51964
|
"attribution-type": {
|
|
51859
51965
|
type: "string",
|
|
51860
51966
|
description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION",
|
|
@@ -51875,8 +51981,16 @@ registerSchema({
|
|
|
51875
51981
|
id: { type: "positional", description: "Conversion rule id or URN", required: true },
|
|
51876
51982
|
...writeAccountArgs,
|
|
51877
51983
|
name: { type: "string", description: "New name", required: false },
|
|
51878
|
-
"post-click-window": {
|
|
51879
|
-
|
|
51984
|
+
"post-click-window": {
|
|
51985
|
+
type: "string",
|
|
51986
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION",
|
|
51987
|
+
required: false
|
|
51988
|
+
},
|
|
51989
|
+
"view-window": {
|
|
51990
|
+
type: "string",
|
|
51991
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION",
|
|
51992
|
+
required: false
|
|
51993
|
+
},
|
|
51880
51994
|
"attribution-type": { type: "string", description: "New attribution type", required: false },
|
|
51881
51995
|
enabled: { type: "string", description: "on|off", required: false },
|
|
51882
51996
|
file: { type: "string", description: "JSON file with fields to change", required: false }
|
|
@@ -52721,8 +52835,14 @@ Example: baker ads linkedin conversions create --name "Demo booked" --type LEAD
|
|
|
52721
52835
|
description: "Conversion type. Common: LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, SIGN_UP, DOWNLOAD, PURCHASE, KEY_PAGE_VIEW, ADD_TO_CART, BOOK_APPOINTMENT, SUBMIT_APPLICATION, OTHER \u2014 `baker schema ads.linkedin.conversions.create` lists all 34"
|
|
52722
52836
|
},
|
|
52723
52837
|
method: { type: "string", description: "INSIGHT_TAG|CONVERSIONS_API" },
|
|
52724
|
-
"post-click-window": {
|
|
52725
|
-
|
|
52838
|
+
"post-click-window": {
|
|
52839
|
+
type: "string",
|
|
52840
|
+
description: "1|7|30|90 days (playbook default 30); 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION"
|
|
52841
|
+
},
|
|
52842
|
+
"view-window": {
|
|
52843
|
+
type: "string",
|
|
52844
|
+
description: "1|7|30|90 days (playbook default 7); 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION"
|
|
52845
|
+
},
|
|
52726
52846
|
"attribution-type": { type: "string", description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION" },
|
|
52727
52847
|
"associate-all-campaigns": { type: "boolean", description: "Auto-associate with active campaigns" },
|
|
52728
52848
|
file: { type: "string", description: "JSON file with the full payload (e.g. urlMatchRuleExpression)" }
|
|
@@ -52751,8 +52871,14 @@ Example: baker ads linkedin conversions update 104988516 --post-click-window 30
|
|
|
52751
52871
|
id: { type: "positional", description: "Conversion rule id or URN", required: true },
|
|
52752
52872
|
...accountArgs,
|
|
52753
52873
|
name: { type: "string", description: "New name" },
|
|
52754
|
-
"post-click-window": {
|
|
52755
|
-
|
|
52874
|
+
"post-click-window": {
|
|
52875
|
+
type: "string",
|
|
52876
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION"
|
|
52877
|
+
},
|
|
52878
|
+
"view-window": {
|
|
52879
|
+
type: "string",
|
|
52880
|
+
description: "1|7|30|90 days; 180|365 only for LEAD, QUALIFIED_LEAD, MARKETING_QUALIFIED_LEAD, SALES_QUALIFIED_LEAD, PURCHASE, ADD_TO_CART, SUBMIT_APPLICATION"
|
|
52881
|
+
},
|
|
52756
52882
|
"attribution-type": { type: "string", description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION" },
|
|
52757
52883
|
enabled: { type: "string", description: "on|off" },
|
|
52758
52884
|
file: { type: "string", description: "JSON file with fields to change" }
|
|
@@ -53098,7 +53224,8 @@ var MEMBER_PIVOTS = /* @__PURE__ */ new Set([
|
|
|
53098
53224
|
"industry",
|
|
53099
53225
|
"company-size",
|
|
53100
53226
|
"country",
|
|
53101
|
-
"region"
|
|
53227
|
+
"region",
|
|
53228
|
+
"dma"
|
|
53102
53229
|
]);
|
|
53103
53230
|
var ALL_PIVOTS = [
|
|
53104
53231
|
"none",
|
|
@@ -53115,6 +53242,7 @@ var ALL_PIVOTS = [
|
|
|
53115
53242
|
"company-size",
|
|
53116
53243
|
"country",
|
|
53117
53244
|
"region",
|
|
53245
|
+
"dma",
|
|
53118
53246
|
"device",
|
|
53119
53247
|
"placement",
|
|
53120
53248
|
"serving-location",
|
|
@@ -53252,7 +53380,7 @@ var analyticsCommand = defineCommand62({
|
|
|
53252
53380
|
Three-axis design (LinkedIn's superpower over Meta/Google):
|
|
53253
53381
|
--level account | campaign-group | campaign | creative
|
|
53254
53382
|
--intent baseline | revenue | funnel | engagement | video | lead-gen | inmail | document | ranking | identity
|
|
53255
|
-
--pivot none | job-title | company | industry | seniority | function | company-size | country | region
|
|
53383
|
+
--pivot none | job-title | company | industry | seniority | function | company-size | country | region | dma
|
|
53256
53384
|
| device | placement | serving-location | card-index | objective
|
|
53257
53385
|
| conversation-node | conversation-node-button
|
|
53258
53386
|
|
|
@@ -53260,6 +53388,8 @@ Smart defaults:
|
|
|
53260
53388
|
--level account, --intent baseline, --pivot none, --granularity DAILY, last 7 days
|
|
53261
53389
|
Pivot on a MEMBER_* dim \u2192 granularity auto-forced to ALL (LinkedIn rejects DAILY+demographic)
|
|
53262
53390
|
Demographic data delayed 12-24h with \u22653-event privacy floor \u2014 the CLI flags this in warnings.
|
|
53391
|
+
--pivot dma \u2192 US Nielsen DMA\xAE regions, names resolved. Any report built from it must write "DMA\xAE"
|
|
53392
|
+
and carry Nielsen's notice (returned as the DMA_ATTRIBUTION_REQUIRED warning).
|
|
53263
53393
|
Derived metrics injected client-side: ctr, cpc, cpm, frequency, leadCompletionRate
|
|
53264
53394
|
|
|
53265
53395
|
Examples \u2014 common AI questions:
|