@koda-sl/baker-cli 0.242.0 → 0.243.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/dist/cli.js CHANGED
@@ -2122,6 +2122,18 @@ var BIDDING_STRATEGY_TYPES = [
2122
2122
  "MANUAL_CPV",
2123
2123
  "PERCENT_CPC"
2124
2124
  ];
2125
+ var MERGED_TARGET_STRATEGY_CHANNELS = /* @__PURE__ */ new Set(["SEARCH"]);
2126
+ var MERGED_TARGET_CPA_MESSAGE = "Google doesn't accept Target CPA as a bidding strategy of its own on a Search campaign \u2014 the target sits inside Maximize conversions. Choose Maximize conversions and give it the same target CPA; it bids exactly the same.";
2127
+ var MERGED_TARGET_ROAS_MESSAGE = "Google doesn't accept Target ROAS as a bidding strategy of its own on a Search campaign \u2014 the target sits inside Maximize conversion value. Choose Maximize conversion value and give it the same target ROAS; it bids exactly the same.";
2128
+ function mergedTargetStrategyRefusal(channelType, biddingType) {
2129
+ if (channelType === void 0 || !MERGED_TARGET_STRATEGY_CHANNELS.has(channelType)) {
2130
+ return void 0;
2131
+ }
2132
+ if (biddingType === "TARGET_CPA") {
2133
+ return MERGED_TARGET_CPA_MESSAGE;
2134
+ }
2135
+ return biddingType === "TARGET_ROAS" ? MERGED_TARGET_ROAS_MESSAGE : void 0;
2136
+ }
2125
2137
  var POSITIVE_GEO_TARGET_TYPES = ["PRESENCE_OR_INTEREST", "PRESENCE"];
2126
2138
  var NEGATIVE_GEO_TARGET_TYPES = ["PRESENCE_OR_INTEREST", "PRESENCE"];
2127
2139
  var BUDGET_DELIVERY_METHODS = ["STANDARD", "ACCELERATED"];
@@ -2846,6 +2858,10 @@ var campaignCreateSchema2 = z4.strictObject({
2846
2858
  if (p.channelType === "PERFORMANCE_MAX" && p.bidding && p.bidding.type === "MANUAL_CPC") {
2847
2859
  ctx.addIssue({ code: "custom", path: ["bidding"], message: "Performance Max does not support Manual CPC" });
2848
2860
  }
2861
+ const mergedTarget = mergedTargetStrategyRefusal(p.channelType, p.bidding?.type);
2862
+ if (mergedTarget) {
2863
+ ctx.addIssue({ code: "custom", path: ["bidding"], message: mergedTarget });
2864
+ }
2849
2865
  if (p.startDate && p.endDate && p.endDate <= p.startDate) {
2850
2866
  ctx.addIssue({ code: "custom", path: ["endDate"], message: "endDate must be after startDate" });
2851
2867
  }
@@ -13628,10 +13644,16 @@ var campaignsCommand = defineCommand30({
13628
13644
  "budget-ref": { type: "string", description: "Budget ref (g_temp_*, id, or resource name)" },
13629
13645
  "bidding-strategy": {
13630
13646
  type: "string",
13631
- description: "MANUAL_CPC | MAXIMIZE_CONVERSIONS | TARGET_CPA | TARGET_ROAS | \u2026"
13647
+ description: "MANUAL_CPC | MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | \u2026"
13648
+ },
13649
+ "target-cpa": {
13650
+ type: "string",
13651
+ description: "Target CPA (major units). On a Search campaign pair it with --bidding-strategy MAXIMIZE_CONVERSIONS \u2014 Google keeps the target inside that strategy and rejects a standalone TARGET_CPA."
13652
+ },
13653
+ "target-roas": {
13654
+ type: "string",
13655
+ description: "Target ROAS (e.g. 4.0). On a Search campaign pair it with --bidding-strategy MAXIMIZE_CONVERSION_VALUE \u2014 Google keeps the target inside that strategy and rejects a standalone TARGET_ROAS."
13632
13656
  },
13633
- "target-cpa": { type: "string", description: "Target CPA (major units) for TARGET_CPA" },
13634
- "target-roas": { type: "string", description: "Target ROAS (e.g. 4.0) for TARGET_ROAS" },
13635
13657
  ...maxCpcArg,
13636
13658
  ...finalUrlSuffixArg,
13637
13659
  ...urlOptionsArgs,
@@ -13678,9 +13700,18 @@ var campaignsCommand = defineCommand30({
13678
13700
  ...fileArg,
13679
13701
  name: { type: "string" },
13680
13702
  "budget-ref": { type: "string" },
13681
- "bidding-strategy": { type: "string" },
13682
- "target-cpa": { type: "string" },
13683
- "target-roas": { type: "string" },
13703
+ "bidding-strategy": {
13704
+ type: "string",
13705
+ description: "MANUAL_CPC | MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | \u2026"
13706
+ },
13707
+ "target-cpa": {
13708
+ type: "string",
13709
+ description: "Target CPA (major units). On a Search campaign pair it with --bidding-strategy MAXIMIZE_CONVERSIONS \u2014 Google keeps the target inside that strategy and rejects a standalone TARGET_CPA."
13710
+ },
13711
+ "target-roas": {
13712
+ type: "string",
13713
+ description: "Target ROAS (e.g. 4.0). On a Search campaign pair it with --bidding-strategy MAXIMIZE_CONVERSION_VALUE \u2014 Google keeps the target inside that strategy and rejects a standalone TARGET_ROAS."
13714
+ },
13684
13715
  ...maxCpcArg,
13685
13716
  ...finalUrlSuffixArg,
13686
13717
  ...urlOptionsArgs,