@koda-sl/baker-cli 0.435.0 → 0.436.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 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
@@ -23868,11 +23868,11 @@ var LINKEDIN_LIMITS = {
23868
23868
  },
23869
23869
  conversion: {
23870
23870
  nameMax: 255,
23871
- // 365 is accepted only for the types in
23872
- // `CONVERSION_TYPES_ALLOWING_365_DAY_WINDOW`; enforced cross-field in
23871
+ // 180 and 365 are accepted only for the types in
23872
+ // `CONVERSION_TYPES_ALLOWING_LONG_WINDOWS`; enforced cross-field in
23873
23873
  // `conversionCreateSchema`, since the enum alone cannot express it.
23874
- postClickWindows: [1, 7, 30, 90, 365],
23875
- viewThroughWindows: [1, 7, 30, 90, 365]
23874
+ postClickWindows: [1, 7, 30, 90, 180, 365],
23875
+ viewThroughWindows: [1, 7, 30, 90, 180, 365]
23876
23876
  },
23877
23877
  leadForm: {
23878
23878
  nameMax: 256,
@@ -24006,12 +24006,14 @@ var CONVERSION_TYPES = [
24006
24006
  "VIEW_CONTENT",
24007
24007
  "VIEW_VIDEO"
24008
24008
  ];
24009
- var CONVERSION_TYPES_ALLOWING_365_DAY_WINDOW = [
24009
+ var CONVERSION_TYPES_ALLOWING_LONG_WINDOWS = [
24010
24010
  "SUBMIT_APPLICATION",
24011
24011
  "PURCHASE",
24012
24012
  "ADD_TO_CART",
24013
24013
  "QUALIFIED_LEAD",
24014
- "LEAD"
24014
+ "LEAD",
24015
+ "MARKETING_QUALIFIED_LEAD",
24016
+ "SALES_QUALIFIED_LEAD"
24015
24017
  ];
24016
24018
  var CONVERSION_METHODS = ["INSIGHT_TAG", "CONVERSIONS_API"];
24017
24019
  var ATTRIBUTION_TYPES = ["LAST_TOUCH_BY_CAMPAIGN", "LAST_TOUCH_BY_CONVERSION"];
@@ -24610,13 +24612,14 @@ var conversionCreateSchema = z7.object({
24610
24612
  urlMatchRuleExpression: z7.array(z7.array(z7.record(z7.string(), z7.string()))).optional(),
24611
24613
  associateAllCampaigns: z7.boolean().optional()
24612
24614
  }).superRefine((p, ctx) => {
24613
- const allowed365 = CONVERSION_TYPES_ALLOWING_365_DAY_WINDOW.includes(p.type);
24615
+ const allowsLong = CONVERSION_TYPES_ALLOWING_LONG_WINDOWS.includes(p.type);
24614
24616
  for (const field of ["postClickAttributionWindowSize", "viewThroughAttributionWindowSize"]) {
24615
- if (p[field] === 365 && !allowed365) {
24617
+ const days = p[field];
24618
+ if (days !== void 0 && days > 90 && !allowsLong) {
24616
24619
  ctx.addIssue({
24617
24620
  code: "custom",
24618
24621
  path: [field],
24619
- message: `a 365-day window is only available for ${CONVERSION_TYPES_ALLOWING_365_DAY_WINDOW.join(", ")} \u2014 ${p.type} caps at 90`
24622
+ message: `a ${days}-day window is only available for ${CONVERSION_TYPES_ALLOWING_LONG_WINDOWS.join(", ")} \u2014 ${p.type} caps at 90`
24620
24623
  });
24621
24624
  }
24622
24625
  }
@@ -51212,6 +51215,7 @@ registerSchema({
51212
51215
  "company-size",
51213
51216
  "country",
51214
51217
  "region",
51218
+ "dma",
51215
51219
  "device",
51216
51220
  "placement",
51217
51221
  "serving-location",
@@ -51853,8 +51857,16 @@ registerSchema({
51853
51857
  required: true
51854
51858
  },
51855
51859
  method: { type: "string", description: "INSIGHT_TAG|CONVERSIONS_API", required: true },
51856
- "post-click-window": { type: "string", description: "1|7|30|90 days", required: false },
51857
- "view-window": { type: "string", description: "1|7|30 days", required: false },
51860
+ "post-click-window": {
51861
+ type: "string",
51862
+ 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",
51863
+ required: false
51864
+ },
51865
+ "view-window": {
51866
+ type: "string",
51867
+ 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",
51868
+ required: false
51869
+ },
51858
51870
  "attribution-type": {
51859
51871
  type: "string",
51860
51872
  description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION",
@@ -51875,8 +51887,16 @@ registerSchema({
51875
51887
  id: { type: "positional", description: "Conversion rule id or URN", required: true },
51876
51888
  ...writeAccountArgs,
51877
51889
  name: { type: "string", description: "New name", required: false },
51878
- "post-click-window": { type: "string", description: "1|7|30|90 days", required: false },
51879
- "view-window": { type: "string", description: "1|7|30 days", required: false },
51890
+ "post-click-window": {
51891
+ type: "string",
51892
+ 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",
51893
+ required: false
51894
+ },
51895
+ "view-window": {
51896
+ type: "string",
51897
+ 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",
51898
+ required: false
51899
+ },
51880
51900
  "attribution-type": { type: "string", description: "New attribution type", required: false },
51881
51901
  enabled: { type: "string", description: "on|off", required: false },
51882
51902
  file: { type: "string", description: "JSON file with fields to change", required: false }
@@ -52721,8 +52741,14 @@ Example: baker ads linkedin conversions create --name "Demo booked" --type LEAD
52721
52741
  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
52742
  },
52723
52743
  method: { type: "string", description: "INSIGHT_TAG|CONVERSIONS_API" },
52724
- "post-click-window": { type: "string", description: "1|7|30|90 days (playbook default 30)" },
52725
- "view-window": { type: "string", description: "1|7|30 days (playbook default 7)" },
52744
+ "post-click-window": {
52745
+ type: "string",
52746
+ 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"
52747
+ },
52748
+ "view-window": {
52749
+ type: "string",
52750
+ 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"
52751
+ },
52726
52752
  "attribution-type": { type: "string", description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION" },
52727
52753
  "associate-all-campaigns": { type: "boolean", description: "Auto-associate with active campaigns" },
52728
52754
  file: { type: "string", description: "JSON file with the full payload (e.g. urlMatchRuleExpression)" }
@@ -52751,8 +52777,14 @@ Example: baker ads linkedin conversions update 104988516 --post-click-window 30
52751
52777
  id: { type: "positional", description: "Conversion rule id or URN", required: true },
52752
52778
  ...accountArgs,
52753
52779
  name: { type: "string", description: "New name" },
52754
- "post-click-window": { type: "string", description: "1|7|30|90 days" },
52755
- "view-window": { type: "string", description: "1|7|30 days" },
52780
+ "post-click-window": {
52781
+ type: "string",
52782
+ 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"
52783
+ },
52784
+ "view-window": {
52785
+ type: "string",
52786
+ 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"
52787
+ },
52756
52788
  "attribution-type": { type: "string", description: "LAST_TOUCH_BY_CAMPAIGN|LAST_TOUCH_BY_CONVERSION" },
52757
52789
  enabled: { type: "string", description: "on|off" },
52758
52790
  file: { type: "string", description: "JSON file with fields to change" }
@@ -53098,7 +53130,8 @@ var MEMBER_PIVOTS = /* @__PURE__ */ new Set([
53098
53130
  "industry",
53099
53131
  "company-size",
53100
53132
  "country",
53101
- "region"
53133
+ "region",
53134
+ "dma"
53102
53135
  ]);
53103
53136
  var ALL_PIVOTS = [
53104
53137
  "none",
@@ -53115,6 +53148,7 @@ var ALL_PIVOTS = [
53115
53148
  "company-size",
53116
53149
  "country",
53117
53150
  "region",
53151
+ "dma",
53118
53152
  "device",
53119
53153
  "placement",
53120
53154
  "serving-location",
@@ -53252,7 +53286,7 @@ var analyticsCommand = defineCommand62({
53252
53286
  Three-axis design (LinkedIn's superpower over Meta/Google):
53253
53287
  --level account | campaign-group | campaign | creative
53254
53288
  --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
53289
+ --pivot none | job-title | company | industry | seniority | function | company-size | country | region | dma
53256
53290
  | device | placement | serving-location | card-index | objective
53257
53291
  | conversation-node | conversation-node-button
53258
53292
 
@@ -53260,6 +53294,8 @@ Smart defaults:
53260
53294
  --level account, --intent baseline, --pivot none, --granularity DAILY, last 7 days
53261
53295
  Pivot on a MEMBER_* dim \u2192 granularity auto-forced to ALL (LinkedIn rejects DAILY+demographic)
53262
53296
  Demographic data delayed 12-24h with \u22653-event privacy floor \u2014 the CLI flags this in warnings.
53297
+ --pivot dma \u2192 US Nielsen DMA\xAE regions, names resolved. Any report built from it must write "DMA\xAE"
53298
+ and carry Nielsen's notice (returned as the DMA_ATTRIBUTION_REQUIRED warning).
53263
53299
  Derived metrics injected client-side: ctr, cpc, cpm, frequency, leadCompletionRate
53264
53300
 
53265
53301
  Examples \u2014 common AI questions: