@koda-sl/baker-cli 0.545.0 → 0.546.0-dev.a72c87f73

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.
Files changed (859) hide show
  1. package/dist/account-IG3U6UXZ.js +82 -0
  2. package/dist/account-IGWCS2VJ.js +82 -0
  3. package/dist/account-reads-LOCJMS35.js +219 -0
  4. package/dist/account-users-H4VP43RZ.js +64 -0
  5. package/dist/account-writes-BSSKSTZ2.js +68 -0
  6. package/dist/accounts-C4PNBT5X.js +701 -0
  7. package/dist/accounts-GPTG4XW5.js +80 -0
  8. package/dist/actions-F7YO5I27.js +55 -0
  9. package/dist/activecampaign-S4E46SA6.js +938 -0
  10. package/dist/ad-group-writes-KMB3OMJG.js +172 -0
  11. package/dist/ad-groups-E67CNQS4.js +70 -0
  12. package/dist/ad-writes-FNMKNFUN.js +176 -0
  13. package/dist/add-LROKBWW4.js +107 -0
  14. package/dist/add-SG5XWFRN.js +305 -0
  15. package/dist/ads-4LASBP4G.js +79 -0
  16. package/dist/ads-7ICT2D4M.js +48 -0
  17. package/dist/advertisers-IQMTOR4D.js +123 -0
  18. package/dist/analytics-6DSJ6WHO.js +2437 -0
  19. package/dist/analytics-D6S5LW2F.js +447 -0
  20. package/dist/animate-OWXAT2RK.js +480 -0
  21. package/dist/assign-TMG6FDLW.js +80 -0
  22. package/dist/audience-size-KPJOSG5W.js +76 -0
  23. package/dist/audiences-3R574STZ.js +280 -0
  24. package/dist/audit-35TDKIGY.js +154 -0
  25. package/dist/autocomplete-T63KPKRZ.js +114 -0
  26. package/dist/avatars-AVK4S3HS.js +38 -0
  27. package/dist/bid-pricing-O5IK37CL.js +103 -0
  28. package/dist/brand-SG6VOHF4.js +22 -0
  29. package/dist/brief-RWA6MXTN.js +543 -0
  30. package/dist/campaign-groups-SSZISPJ5.js +99 -0
  31. package/dist/campaign-writes-74KDZ7RR.js +168 -0
  32. package/dist/campaign-writes-Z2J24SUZ.js +176 -0
  33. package/dist/campaigns-43OS6EUG.js +78 -0
  34. package/dist/campaigns-B5TSL3UD.js +113 -0
  35. package/dist/campaigns-TFNPOQEW.js +111 -0
  36. package/dist/canvas-4LSM4Y5I.js +46 -0
  37. package/dist/capabilities-CTKSS7AI.js +147 -0
  38. package/dist/catalog-7LINLVVY.js +66 -0
  39. package/dist/catalogs-IR22RGZD.js +130 -0
  40. package/dist/changes-JAGWBHQC.js +143 -0
  41. package/dist/chatgpt-NE2RBMFK.js +47 -0
  42. package/dist/chats-6TRVVEBG.js +449 -0
  43. package/dist/check-DZGMLLRL.js +107 -0
  44. package/dist/chunk-2DQC4XSN.js +224 -0
  45. package/dist/chunk-3BWT5YDD.js +57 -0
  46. package/dist/chunk-3EUITH4J.js +638 -0
  47. package/dist/chunk-3J5ZTJGN.js +163 -0
  48. package/dist/chunk-3OFLYMPK.js +547 -0
  49. package/dist/chunk-4IRJ5JXA.js +46 -0
  50. package/dist/chunk-5IFFPSEN.js +225 -0
  51. package/dist/chunk-5YNGVEX2.js +23 -0
  52. package/dist/chunk-64ALJ6TJ.js +274 -0
  53. package/dist/chunk-6OIKNJ7G.js +26 -0
  54. package/dist/chunk-7L3Z2GDZ.js +61 -0
  55. package/dist/chunk-7LYJVM7L.js +377 -0
  56. package/dist/chunk-7UFV6H7J.js +167 -0
  57. package/dist/chunk-AGVLJLOT.js +203 -0
  58. package/dist/chunk-B3CDNANO.js +843 -0
  59. package/dist/chunk-BNI5DAB7.js +783 -0
  60. package/dist/chunk-BRT5IG7N.js +438 -0
  61. package/dist/chunk-CXRS5YLB.js +150 -0
  62. package/dist/chunk-CY6EPTJA.js +191 -0
  63. package/dist/chunk-CZ4Q3I25.js +2209 -0
  64. package/dist/chunk-E5H7JIWB.js +3510 -0
  65. package/dist/chunk-EGW3D3RW.js +207 -0
  66. package/dist/chunk-EPLSDHBT.js +8954 -0
  67. package/dist/chunk-F2VUMTCJ.js +103 -0
  68. package/dist/chunk-F3CZFUXZ.js +3187 -0
  69. package/dist/chunk-F3CZFUXZ.js.map +1 -0
  70. package/dist/chunk-FLF2CIL2.js +66 -0
  71. package/dist/chunk-FM4YT7QA.js +156 -0
  72. package/dist/chunk-FUIPDGGH.js +197 -0
  73. package/dist/chunk-G47B4DOH.js +910 -0
  74. package/dist/chunk-G6J6AWTE.js +5471 -0
  75. package/dist/chunk-GCZK4BMB.js +5368 -0
  76. package/dist/chunk-GVYJOHX5.js +455 -0
  77. package/dist/chunk-H4CLWLYF.js +4269 -0
  78. package/dist/chunk-H4CLWLYF.js.map +1 -0
  79. package/dist/chunk-ICEYCLRU.js +679 -0
  80. package/dist/chunk-IDFTXHRQ.js +275 -0
  81. package/dist/chunk-J2RUOIME.js +494 -0
  82. package/dist/chunk-JBNT444M.js +285 -0
  83. package/dist/chunk-K4IPXVVC.js +430 -0
  84. package/dist/chunk-K4IPXVVC.js.map +1 -0
  85. package/dist/chunk-KAUP6ONR.js +89 -0
  86. package/dist/chunk-KTO2Y3DI.js +1646 -0
  87. package/dist/chunk-KVYXHWX2.js +249 -0
  88. package/dist/chunk-L7AJMZ6Z.js +24026 -0
  89. package/dist/chunk-L7AJMZ6Z.js.map +1 -0
  90. package/dist/chunk-LDFM37DM.js +148 -0
  91. package/dist/chunk-LHC6OHQ6.js +857 -0
  92. package/dist/chunk-LQOJBPKV.js +142 -0
  93. package/dist/chunk-METHLFNZ.js +63 -0
  94. package/dist/chunk-MGOSJSDV.js +51 -0
  95. package/dist/chunk-O34P4WD5.js +604 -0
  96. package/dist/chunk-O5V2KBI4.js +387 -0
  97. package/dist/chunk-OO7Y2NMT.js +685 -0
  98. package/dist/chunk-P3AHGZH2.js +170 -0
  99. package/dist/chunk-P6FMQHJJ.js +131 -0
  100. package/dist/chunk-Q6LCL67T.js +1518 -0
  101. package/dist/chunk-Q7G5CWH6.js +169 -0
  102. package/dist/chunk-RA73BVUX.js +392 -0
  103. package/dist/chunk-S6ZCFRL5.js +19 -0
  104. package/dist/chunk-SIKCVWM3.js +76 -0
  105. package/dist/chunk-SIWXWRAD.js +831 -0
  106. package/dist/chunk-UKIS6BLM.js +7800 -0
  107. package/dist/chunk-UKIS6BLM.js.map +1 -0
  108. package/dist/chunk-UNIJPTDU.js +344 -0
  109. package/dist/chunk-UXFRUYTR.js +91 -0
  110. package/dist/chunk-V4UJERGL.js +64 -0
  111. package/dist/chunk-W46BM7HF.js +334 -0
  112. package/dist/chunk-WH7CATSZ.js +930 -0
  113. package/dist/chunk-WM2PLENG.js +1902 -0
  114. package/dist/chunk-XU6XQPNM.js +1919 -0
  115. package/dist/chunk-YKFGXS26.js +228 -0
  116. package/dist/chunk-YQB66YKJ.js +98 -0
  117. package/dist/chunk-YZKZQXRX.js +297 -0
  118. package/dist/chunk-ZDHWB32Y.js +91 -0
  119. package/dist/chunk-ZOYNCIRB.js +479 -0
  120. package/dist/claim-PTCFUZM2.js +200 -0
  121. package/dist/cli.js +31 -31
  122. package/dist/companies-STCBOG5Z.js +198 -0
  123. package/dist/company-4CE7CGNC.js +308 -0
  124. package/dist/complete-R4A7LBOQ.js +84 -0
  125. package/dist/connect-4VLRGTAM.js +45 -0
  126. package/dist/conversation-JS52LHCZ.js +96 -0
  127. package/dist/conversion-report-R4KJI4VA.js +127 -0
  128. package/dist/conversion-upload-command-WCLWA27O.js +439 -0
  129. package/dist/conversion-writes-XIQEIDPS.js +122 -0
  130. package/dist/conversions-IYEF6WZP.js +140 -0
  131. package/dist/conversions-RMBQNW3T.js +78 -0
  132. package/dist/create-6I7SRQHV.js +135 -0
  133. package/dist/create-JYBMK5JH.js +210 -0
  134. package/dist/create-MPUAOJQB.js +62 -0
  135. package/dist/create-W7L5B374.js +239 -0
  136. package/dist/creatives-EPXJ2PDV.js +223 -0
  137. package/dist/creatives-PP6Z2T6Z.js +58 -0
  138. package/dist/credentials-R4BZ76RD.js +290 -0
  139. package/dist/critique-ICVRILIZ.js +232 -0
  140. package/dist/critique-OTIGYFZU.js +1451 -0
  141. package/dist/crm-5JFMA2YB.js +227 -0
  142. package/dist/crm-PRTHRLXM.js +323 -0
  143. package/dist/currency-BY647ZB7.js +88 -0
  144. package/dist/customers-5EWPVKJV.js +65 -0
  145. package/dist/delete-5EWH2SQQ.js +57 -0
  146. package/dist/delete-V2FBPIN7.js +69 -0
  147. package/dist/delete-ZWUCKXI5.js +67 -0
  148. package/dist/demographics-2YCVAAPH.js +141 -0
  149. package/dist/discard-N7K3UQ7M.js +69 -0
  150. package/dist/discover-TAJUFO5R.js +172 -0
  151. package/dist/domain-YYTNWNSF.js +101 -0
  152. package/dist/download-JMJRYJ37.js +172 -0
  153. package/dist/draft-KQACMPH2.js +313 -0
  154. package/dist/draft-PENVOYCI.js +220 -0
  155. package/dist/draft-RGSDXFFT.js +408 -0
  156. package/dist/draft-SKEGKHIK.js +288 -0
  157. package/dist/draft-UOMHLIVY.js +342 -0
  158. package/dist/engine/index.js +8 -8
  159. package/dist/experiments-W5D7ERVJ.js +236 -0
  160. package/dist/facets-FUNOZ6JS.js +117 -0
  161. package/dist/feedback-OVZFH7UV.js +115 -0
  162. package/dist/feedback-record-DKDR3XHH.js +269 -0
  163. package/dist/fetch-QKP23NSX.js +204 -0
  164. package/dist/fit-PZPU2IZZ.js +65 -0
  165. package/dist/flows-GBMZJX4R.js +250 -0
  166. package/dist/fonts-2YY5465Q.js +39 -0
  167. package/dist/forecast-7B75GCRH.js +121 -0
  168. package/dist/forecast-VOND3WVO.js +169 -0
  169. package/dist/funnel-G4CMJ2C4.js +397 -0
  170. package/dist/generate-SW5KLHXG.js +263 -0
  171. package/dist/get-44VNCDBQ.js +59 -0
  172. package/dist/get-ZPJFKFHL.js +82 -0
  173. package/dist/google-VYARAUQH.js +3270 -0
  174. package/dist/google-ads-BKDTCXUS.js +198 -0
  175. package/dist/history-7DF5HFJT.js +69 -0
  176. package/dist/history-NEKVFRGQ.js +102 -0
  177. package/dist/history-YU6HH574.js +153 -0
  178. package/dist/hubspot-Q3ZQODAX.js +782 -0
  179. package/dist/ideas-75LW4KBY.js +45 -0
  180. package/dist/images-7FS4KEGU.js +92 -0
  181. package/dist/ingest-MHH5OQP4.js +27 -0
  182. package/dist/ingest-S5OS6WIU.js +123 -0
  183. package/dist/insights-YVV5MHPQ.js +132 -0
  184. package/dist/inspect-PIFZILBU.js +192 -0
  185. package/dist/inspiration-KL27O45N.js +53 -0
  186. package/dist/intent-GIAQDMHF.js +95 -0
  187. package/dist/keyword-gap-NZF75XGF.js +130 -0
  188. package/dist/keyword-metrics-H5M5I3N4.js +200 -0
  189. package/dist/keywords-for-site-RILBDULX.js +131 -0
  190. package/dist/landing-H5KY6F7K.js +28 -0
  191. package/dist/languages-GGNN7FEK.js +40 -0
  192. package/dist/leads-WCWH4C73.js +115 -0
  193. package/dist/learn-RUZUBNQZ.js +207 -0
  194. package/dist/line-item-writes-5Z3AEUV2.js +211 -0
  195. package/dist/line-items-IYSM2NEA.js +107 -0
  196. package/dist/link-KRNL5O7Z.js +67 -0
  197. package/dist/linkedin-GZIYAH4C.js +1330 -0
  198. package/dist/linkedin-person-PMXUBPVL.js +139 -0
  199. package/dist/list-ALQGX6JI.js +67 -0
  200. package/dist/list-I37IE3NN.js +154 -0
  201. package/dist/list-JD5T6CGQ.js +306 -0
  202. package/dist/locations-7RYEWKJO.js +69 -0
  203. package/dist/locations-BU4ZGWAS.js +40 -0
  204. package/dist/log-JWUFDOG6.js +95 -0
  205. package/dist/make-QCGOTYNW.js +1367 -0
  206. package/dist/map-EYKEY4VA.js +436 -0
  207. package/dist/mcp-P2PZCFFJ.js +729 -0
  208. package/dist/media-sources-UUNS3LES.js +35 -0
  209. package/dist/members-XTW5F5N5.js +47 -0
  210. package/dist/metrics-Z75Q2FHP.js +152 -0
  211. package/dist/models-X2IXXAD6.js +155 -0
  212. package/dist/normalize-P2UQIQOX.js +144 -0
  213. package/dist/options-2OK4LBAD.js +125 -0
  214. package/dist/organization-I5AIPZEH.js +949 -0
  215. package/dist/performance-4UPNHWC2.js +5565 -0
  216. package/dist/performance-H5FJQBOP.js +27 -0
  217. package/dist/pixels-DBSPNHIE.js +62 -0
  218. package/dist/promoted-tweet-writes-V5N5JDYQ.js +183 -0
  219. package/dist/promoted-tweets-ZSNBS3QQ.js +119 -0
  220. package/dist/publish-M6U72N3H.js +344 -0
  221. package/dist/query-NMQKS4MY.js +62 -0
  222. package/dist/reddit-AZMVTHPR.js +29 -0
  223. package/dist/refresh-42TJTJSN.js +97 -0
  224. package/dist/release-VT6TNWUV.js +63 -0
  225. package/dist/relevant-pages-JRIDJL4L.js +99 -0
  226. package/dist/remove-YW25PRT4.js +53 -0
  227. package/dist/reopen-WGTMBOHK.js +66 -0
  228. package/dist/rerun-O7P5LMC4.js +96 -0
  229. package/dist/research-IQWYPRBV.js +265 -0
  230. package/dist/research-WYNVU26K.js +75 -0
  231. package/dist/reset-4YPVS6QU.js +57 -0
  232. package/dist/reset-NF6K4NHK.js +57 -0
  233. package/dist/resolve-GB4ORVSB.js +124 -0
  234. package/dist/retry-LKJVOXVX.js +65 -0
  235. package/dist/retry-W3NSNNDV.js +63 -0
  236. package/dist/revenue-KHUWJPMJ.js +91 -0
  237. package/dist/rules-HMAONF3A.js +99 -0
  238. package/dist/rules-add-BP5XSD23.js +465 -0
  239. package/dist/run-EBCP5VIQ.js +71 -0
  240. package/dist/run-QP7JP2H4.js +69 -0
  241. package/dist/scaffold-ad-JVDV7FET.js +1513 -0
  242. package/dist/scaffold-static-ad-VD3KXMHT.js +1011 -0
  243. package/dist/scaffold-video-X3YR6APK.js +885 -0
  244. package/dist/schedule-7OKUUJHO.js +64 -0
  245. package/dist/scheduled-agents-N6FDAL7K.js +55 -0
  246. package/dist/schema-6O6CJTT5.js +135 -0
  247. package/dist/scrape-U6DIREQ2.js +2241 -0
  248. package/dist/scrape-U6DIREQ2.js.map +1 -0
  249. package/dist/search-WGOCL2KW.js +177 -0
  250. package/dist/select-6PVDRJQJ.js +110 -0
  251. package/dist/set-prompt-EDM7CPME.js +199 -0
  252. package/dist/setup-links-Z2KIKKJM.js +144 -0
  253. package/dist/shopify-AANLSYQY.js +3980 -0
  254. package/dist/site-6HHZJW2S.js +180 -0
  255. package/dist/sources-72AAZL4C.js +30 -0
  256. package/dist/sources-VRWQ65G6.js +457 -0
  257. package/dist/stale-KO6NQVR4.js +90 -0
  258. package/dist/status-QRO7U5K2.js +65 -0
  259. package/dist/studio-OV2ZY5W3.js +49 -0
  260. package/dist/sync-AQZ7JYEG.js +57 -0
  261. package/dist/sync-definition-OKSJA6MA.js +70 -0
  262. package/dist/tags-5GFUNIIK.js +23 -0
  263. package/dist/tags-DIFC2HFB.js +23 -0
  264. package/dist/tags-M26JKN2F.js +23 -0
  265. package/dist/tags-QFEG7LJV.js +26 -0
  266. package/dist/tags-ZWYUQYWT.js +227 -0
  267. package/dist/targeting-criteria-UQMPM2K5.js +113 -0
  268. package/dist/targets-YCVILKKZ.js +106 -0
  269. package/dist/testimonials-SJQJDEK4.js +32 -0
  270. package/dist/themes-RRLYZ46U.js +95 -0
  271. package/dist/top-companies-LPYM65KX.js +111 -0
  272. package/dist/transcript-D2IQWUSP.js +165 -0
  273. package/dist/translate-CPDFHEI4.js +603 -0
  274. package/dist/triggers-543HDVJK.js +144 -0
  275. package/dist/unlink-DQGU7K7V.js +70 -0
  276. package/dist/unstage-7UQU4MQT.js +88 -0
  277. package/dist/update-DGIBKKIB.js +155 -0
  278. package/dist/update-FEZ3EVTA.js +66 -0
  279. package/dist/update-QF6WBJU7.js +101 -0
  280. package/dist/update-RY3GU5QI.js +192 -0
  281. package/dist/upload-VMDGQ4HS.js +130 -0
  282. package/dist/url-options-2TQCGD2W.js +131 -0
  283. package/dist/url-params-LMC2DRHP.js +101 -0
  284. package/dist/validate-TLWEN4IL.js +125 -0
  285. package/dist/videos-GFOHRAJ7.js +41 -0
  286. package/dist/view-ZT3SAZKQ.js +121 -0
  287. package/dist/view-ZT3SAZKQ.js.map +1 -0
  288. package/dist/viewer-check-EKDFC7LQ.js +83 -0
  289. package/dist/web-L7LF6FLF.js +173 -0
  290. package/dist/winning-ads-RUS4NE5C.js +86 -0
  291. package/dist/write-commands-2JYDSXAX.js +1525 -0
  292. package/dist/x-HLZUSGJT.js +47 -0
  293. package/package.json +1 -1
  294. package/dist/account-2HJ4GKHN.js +0 -82
  295. package/dist/account-6GKPLNDY.js +0 -82
  296. package/dist/account-reads-X36NPCX5.js +0 -219
  297. package/dist/account-users-FGL3DZES.js +0 -64
  298. package/dist/account-writes-FZ3KCJZY.js +0 -68
  299. package/dist/accounts-PKSW3DBQ.js +0 -80
  300. package/dist/accounts-S5C6MZFO.js +0 -701
  301. package/dist/actions-ARN3OFB7.js +0 -55
  302. package/dist/activecampaign-3YJC3H2R.js +0 -938
  303. package/dist/ad-group-writes-XGG3WQEO.js +0 -172
  304. package/dist/ad-groups-GZIPUN64.js +0 -70
  305. package/dist/ad-writes-2VTRWQLW.js +0 -176
  306. package/dist/add-CNYKQD7B.js +0 -107
  307. package/dist/add-IABKHM5N.js +0 -305
  308. package/dist/ads-LNWALF6G.js +0 -79
  309. package/dist/ads-UXHJCUTX.js +0 -48
  310. package/dist/advertisers-UT7EJ6YS.js +0 -123
  311. package/dist/analytics-COUVH7MV.js +0 -447
  312. package/dist/analytics-EHUUNMGZ.js +0 -2437
  313. package/dist/animate-DM4OUJMR.js +0 -480
  314. package/dist/assign-FWT5QQDF.js +0 -80
  315. package/dist/audience-size-YI2RLIG7.js +0 -76
  316. package/dist/audiences-7D5VPOWF.js +0 -280
  317. package/dist/audit-BPRRCIWN.js +0 -154
  318. package/dist/autocomplete-OD6SHZZH.js +0 -114
  319. package/dist/avatars-FFFPCH6D.js +0 -38
  320. package/dist/bid-pricing-JF557IO2.js +0 -103
  321. package/dist/brand-ZUYJWKI3.js +0 -22
  322. package/dist/brief-CJDBD5GJ.js +0 -543
  323. package/dist/campaign-groups-VCT6ZH66.js +0 -99
  324. package/dist/campaign-writes-H22P6YPW.js +0 -176
  325. package/dist/campaign-writes-YOHDMYDT.js +0 -168
  326. package/dist/campaigns-265JXD2Z.js +0 -78
  327. package/dist/campaigns-7EGRZ3V6.js +0 -113
  328. package/dist/campaigns-ORK5BYAM.js +0 -111
  329. package/dist/canvas-FW5F3KZJ.js +0 -46
  330. package/dist/capabilities-ISW7XT44.js +0 -147
  331. package/dist/catalog-DPUQBZZ7.js +0 -66
  332. package/dist/catalogs-SBXFAD3X.js +0 -130
  333. package/dist/changes-HXVZUJMH.js +0 -143
  334. package/dist/chatgpt-UXJPCGZU.js +0 -47
  335. package/dist/chats-FH3DQNYD.js +0 -449
  336. package/dist/check-QC5RHS3Z.js +0 -107
  337. package/dist/chunk-2AC5GJHC.js +0 -455
  338. package/dist/chunk-2VSUMGJV.js +0 -89
  339. package/dist/chunk-4D73PLXU.js +0 -843
  340. package/dist/chunk-4S5ZAG4S.js +0 -63
  341. package/dist/chunk-5MMJPUBH.js +0 -387
  342. package/dist/chunk-5Y2XPKW2.js +0 -156
  343. package/dist/chunk-6HCYCMIH.js +0 -61
  344. package/dist/chunk-6R2BQ6FK.js +0 -344
  345. package/dist/chunk-7P74QKVC.js +0 -297
  346. package/dist/chunk-7SJU6PQ7.js +0 -604
  347. package/dist/chunk-A37TIYFD.js +0 -91
  348. package/dist/chunk-A6NVGPCZ.js +0 -479
  349. package/dist/chunk-AK7CL5IW.js +0 -334
  350. package/dist/chunk-AOT3UZBM.js +0 -930
  351. package/dist/chunk-D2ZAZGQH.js +0 -547
  352. package/dist/chunk-DYTBVVQX.js +0 -679
  353. package/dist/chunk-EB76M4ZH.js +0 -19
  354. package/dist/chunk-EBWOLUII.js +0 -24026
  355. package/dist/chunk-EBWOLUII.js.map +0 -1
  356. package/dist/chunk-EOMY5SUJ.js +0 -783
  357. package/dist/chunk-EY5WWPPZ.js +0 -1902
  358. package/dist/chunk-EZKT5YGX.js +0 -23
  359. package/dist/chunk-FVDC6AKZ.js +0 -150
  360. package/dist/chunk-GN7K3NPI.js +0 -148
  361. package/dist/chunk-GQAKWQAV.js +0 -224
  362. package/dist/chunk-HBDWE7WK.js +0 -98
  363. package/dist/chunk-HETNOUE4.js +0 -377
  364. package/dist/chunk-HFAT5S5B.js +0 -170
  365. package/dist/chunk-HQ3I2QVT.js +0 -275
  366. package/dist/chunk-IN5UCEJD.js +0 -91
  367. package/dist/chunk-JAC6JVCI.js +0 -26
  368. package/dist/chunk-JLLGXYOZ.js +0 -857
  369. package/dist/chunk-JY3OJBKZ.js +0 -3510
  370. package/dist/chunk-KBZRG6IK.js +0 -429
  371. package/dist/chunk-KBZRG6IK.js.map +0 -1
  372. package/dist/chunk-KCRBAMFU.js +0 -392
  373. package/dist/chunk-KIXVHP2C.js +0 -1919
  374. package/dist/chunk-KTY7H44G.js +0 -831
  375. package/dist/chunk-LKOMEXUB.js +0 -51
  376. package/dist/chunk-LVKAMWKJ.js +0 -163
  377. package/dist/chunk-LWCGQNVU.js +0 -685
  378. package/dist/chunk-MCJ5I5LR.js +0 -3187
  379. package/dist/chunk-MCJ5I5LR.js.map +0 -1
  380. package/dist/chunk-MSMTG6OC.js +0 -4269
  381. package/dist/chunk-MSMTG6OC.js.map +0 -1
  382. package/dist/chunk-MZPS46OR.js +0 -76
  383. package/dist/chunk-N4AIJQ4W.js +0 -438
  384. package/dist/chunk-NBWZVBDG.js +0 -131
  385. package/dist/chunk-OKB2EAJH.js +0 -8954
  386. package/dist/chunk-OT2MN5UR.js +0 -169
  387. package/dist/chunk-OZR3KUJ3.js +0 -57
  388. package/dist/chunk-P3VY5JEM.js +0 -274
  389. package/dist/chunk-PXGR3VGW.js +0 -1646
  390. package/dist/chunk-QK3HMAVU.js +0 -5471
  391. package/dist/chunk-R65V26HH.js +0 -7770
  392. package/dist/chunk-R65V26HH.js.map +0 -1
  393. package/dist/chunk-RHEWQB5O.js +0 -638
  394. package/dist/chunk-RP36XHWT.js +0 -46
  395. package/dist/chunk-RXOQZA4K.js +0 -66
  396. package/dist/chunk-SEHJ7Y7J.js +0 -207
  397. package/dist/chunk-SNWFM2DB.js +0 -228
  398. package/dist/chunk-TAGRKRFI.js +0 -103
  399. package/dist/chunk-TARINRA4.js +0 -1518
  400. package/dist/chunk-TNZUMU55.js +0 -167
  401. package/dist/chunk-TP2NS5SG.js +0 -191
  402. package/dist/chunk-UOXC3XA5.js +0 -494
  403. package/dist/chunk-UQA6Z23M.js +0 -142
  404. package/dist/chunk-VOUCQ2YW.js +0 -64
  405. package/dist/chunk-WJ5AHR4K.js +0 -2209
  406. package/dist/chunk-WOE4TZHJ.js +0 -285
  407. package/dist/chunk-XYNQMRNX.js +0 -5368
  408. package/dist/chunk-YEISVDKW.js +0 -203
  409. package/dist/chunk-YNLWSP5E.js +0 -910
  410. package/dist/chunk-ZEUAJAKN.js +0 -225
  411. package/dist/chunk-ZUUVWWB5.js +0 -197
  412. package/dist/chunk-ZVAZFHH7.js +0 -249
  413. package/dist/claim-FBL5VBYZ.js +0 -200
  414. package/dist/companies-URRCAJZE.js +0 -198
  415. package/dist/company-LDCNUPHZ.js +0 -308
  416. package/dist/complete-3UGPO444.js +0 -84
  417. package/dist/connect-M5KPZQWE.js +0 -45
  418. package/dist/conversation-S7YANZJR.js +0 -96
  419. package/dist/conversion-report-RB2MU7UD.js +0 -127
  420. package/dist/conversion-upload-command-HFZYKVXA.js +0 -439
  421. package/dist/conversion-writes-56AIPXPK.js +0 -122
  422. package/dist/conversions-NRX76ZIT.js +0 -78
  423. package/dist/conversions-QZL4DSJO.js +0 -140
  424. package/dist/create-56PJRLMA.js +0 -62
  425. package/dist/create-OE5MRW3X.js +0 -210
  426. package/dist/create-RL7PRIDY.js +0 -239
  427. package/dist/create-Y6YVJ5L4.js +0 -135
  428. package/dist/creatives-ESVH63AP.js +0 -223
  429. package/dist/creatives-URHXATY6.js +0 -58
  430. package/dist/credentials-O6QSB7ZR.js +0 -290
  431. package/dist/critique-EWJBOCXQ.js +0 -1451
  432. package/dist/critique-PTGGXRFG.js +0 -232
  433. package/dist/crm-F6RGNQH5.js +0 -323
  434. package/dist/crm-GLPOO22Q.js +0 -227
  435. package/dist/currency-CHBV6WIO.js +0 -88
  436. package/dist/customers-Q76FCWYO.js +0 -65
  437. package/dist/delete-ODFDZCL3.js +0 -57
  438. package/dist/delete-OVMPDGWQ.js +0 -69
  439. package/dist/delete-XN7N4S4H.js +0 -67
  440. package/dist/demographics-IY5RI55Z.js +0 -141
  441. package/dist/discard-GKIA5FML.js +0 -69
  442. package/dist/discover-ZU2DAV23.js +0 -172
  443. package/dist/domain-WGXA7OXV.js +0 -101
  444. package/dist/download-DYYNUGLX.js +0 -172
  445. package/dist/draft-EWGNZUU4.js +0 -288
  446. package/dist/draft-EX2I6UJB.js +0 -313
  447. package/dist/draft-GKI6MB7L.js +0 -342
  448. package/dist/draft-R7BNWMBR.js +0 -408
  449. package/dist/draft-VYIRZO3E.js +0 -220
  450. package/dist/experiments-6DOKWFH4.js +0 -236
  451. package/dist/facets-ZU5DT2QW.js +0 -117
  452. package/dist/feedback-RIUBM557.js +0 -115
  453. package/dist/feedback-record-3VVAUCOH.js +0 -269
  454. package/dist/fetch-T6TZCU74.js +0 -204
  455. package/dist/fit-YPOHTM7Y.js +0 -65
  456. package/dist/flows-CKVEZFF2.js +0 -250
  457. package/dist/fonts-3J3UVZ2E.js +0 -39
  458. package/dist/forecast-372Q6KQZ.js +0 -169
  459. package/dist/forecast-JEAFUR2O.js +0 -121
  460. package/dist/funnel-FBTNPTS7.js +0 -397
  461. package/dist/generate-JQIK3UYS.js +0 -263
  462. package/dist/get-5N5FCGNH.js +0 -59
  463. package/dist/get-EXHUQT65.js +0 -82
  464. package/dist/google-JHTOX6WM.js +0 -3270
  465. package/dist/google-ads-ZAYRCG2D.js +0 -198
  466. package/dist/history-4ULZ4BVV.js +0 -153
  467. package/dist/history-6J3XRNTZ.js +0 -102
  468. package/dist/history-VNLS2TKB.js +0 -69
  469. package/dist/hubspot-ZEHWWJHK.js +0 -782
  470. package/dist/ideas-SB6546GI.js +0 -45
  471. package/dist/images-LEZYVE7R.js +0 -92
  472. package/dist/ingest-4OOTCOLO.js +0 -123
  473. package/dist/ingest-KNJCCIBG.js +0 -27
  474. package/dist/insights-XY6II7TX.js +0 -132
  475. package/dist/inspect-MHKEYNIC.js +0 -192
  476. package/dist/inspiration-CSN3AXDD.js +0 -53
  477. package/dist/intent-5QUPPZNI.js +0 -95
  478. package/dist/keyword-gap-IG3EFLDH.js +0 -130
  479. package/dist/keyword-metrics-EL7MO3H6.js +0 -200
  480. package/dist/keywords-for-site-I7KJLZ2I.js +0 -131
  481. package/dist/landing-Z3QGJYM3.js +0 -28
  482. package/dist/languages-LNHWSCMT.js +0 -40
  483. package/dist/leads-WQCTZYKT.js +0 -115
  484. package/dist/learn-6KW6TUVL.js +0 -207
  485. package/dist/line-item-writes-B2KSP36W.js +0 -211
  486. package/dist/line-items-3ICE5DBI.js +0 -107
  487. package/dist/link-QRQ34ZDH.js +0 -67
  488. package/dist/linkedin-D4RKHQPS.js +0 -1330
  489. package/dist/linkedin-person-Y5TCUOXS.js +0 -139
  490. package/dist/list-6HZVHA6T.js +0 -154
  491. package/dist/list-CHYJ53JD.js +0 -306
  492. package/dist/list-XAMJSOGI.js +0 -67
  493. package/dist/locations-64JNCQID.js +0 -69
  494. package/dist/locations-KVAAO7LD.js +0 -40
  495. package/dist/log-PLXGA74X.js +0 -95
  496. package/dist/make-EP4YSN26.js +0 -1367
  497. package/dist/map-CAFMAMPP.js +0 -436
  498. package/dist/mcp-DDWSXLU7.js +0 -729
  499. package/dist/media-sources-J5FXYPV5.js +0 -35
  500. package/dist/members-ZA7S5KWP.js +0 -47
  501. package/dist/metrics-MXGA3EFS.js +0 -152
  502. package/dist/models-Z6SUHWKI.js +0 -155
  503. package/dist/normalize-ZHM2ZVXZ.js +0 -144
  504. package/dist/options-JTMDZECY.js +0 -125
  505. package/dist/organization-5OJEJEQV.js +0 -949
  506. package/dist/performance-AHVTOYTM.js +0 -5565
  507. package/dist/performance-S273NSUB.js +0 -27
  508. package/dist/pixels-H642RPK4.js +0 -62
  509. package/dist/promoted-tweet-writes-UF6LYMH4.js +0 -183
  510. package/dist/promoted-tweets-Z4GG6D7P.js +0 -119
  511. package/dist/publish-YQ6MHS7P.js +0 -344
  512. package/dist/query-FT2BA3WH.js +0 -62
  513. package/dist/reddit-YWYRZBL2.js +0 -29
  514. package/dist/refresh-TEXTTECA.js +0 -97
  515. package/dist/release-3JDETBZI.js +0 -63
  516. package/dist/relevant-pages-OCHLUV5K.js +0 -99
  517. package/dist/remove-KZTSU4K2.js +0 -53
  518. package/dist/reopen-GIJSFNDH.js +0 -66
  519. package/dist/rerun-6UZNOPUG.js +0 -96
  520. package/dist/research-TMKG4NQJ.js +0 -75
  521. package/dist/research-XA2IJ2XV.js +0 -265
  522. package/dist/reset-7VL6WJLE.js +0 -57
  523. package/dist/reset-HLZ6JHGY.js +0 -57
  524. package/dist/resolve-H2QW3U5Y.js +0 -124
  525. package/dist/retry-MIZ67MPP.js +0 -65
  526. package/dist/retry-WSWW6EJT.js +0 -63
  527. package/dist/revenue-LTU7HRT2.js +0 -91
  528. package/dist/rules-BGBCUUPH.js +0 -99
  529. package/dist/rules-add-SZT2MSOD.js +0 -465
  530. package/dist/run-FHGT4UQ7.js +0 -69
  531. package/dist/run-XUDGECLL.js +0 -71
  532. package/dist/scaffold-ad-VXNO3SQP.js +0 -1513
  533. package/dist/scaffold-static-ad-FT55VV3T.js +0 -1011
  534. package/dist/scaffold-video-V7WX5AWZ.js +0 -885
  535. package/dist/schedule-BNRLEFMZ.js +0 -64
  536. package/dist/scheduled-agents-MAXXXJ7W.js +0 -55
  537. package/dist/schema-YADPD54K.js +0 -135
  538. package/dist/scrape-3PWNMK4D.js +0 -2241
  539. package/dist/scrape-3PWNMK4D.js.map +0 -1
  540. package/dist/search-56ORG4PL.js +0 -177
  541. package/dist/select-DON4DMNM.js +0 -110
  542. package/dist/set-prompt-J22TUCRU.js +0 -199
  543. package/dist/setup-links-CHODCBYH.js +0 -144
  544. package/dist/shopify-FCYU4AR6.js +0 -3980
  545. package/dist/site-BF3Q26W5.js +0 -180
  546. package/dist/sources-SLCYAWTZ.js +0 -457
  547. package/dist/sources-VHHC6YQM.js +0 -30
  548. package/dist/stale-GLVTL2ZK.js +0 -90
  549. package/dist/status-E3RA644P.js +0 -65
  550. package/dist/studio-6ZXUKA4G.js +0 -49
  551. package/dist/sync-6QCDDJMO.js +0 -57
  552. package/dist/sync-definition-DXNHGY5E.js +0 -70
  553. package/dist/tags-AMZSQJJ2.js +0 -26
  554. package/dist/tags-KW7PG2TR.js +0 -23
  555. package/dist/tags-MGV5KG6I.js +0 -23
  556. package/dist/tags-TM27EIAL.js +0 -23
  557. package/dist/tags-VWGKVGZD.js +0 -227
  558. package/dist/targeting-criteria-FT3G4HAW.js +0 -113
  559. package/dist/targets-XLVHWO6Z.js +0 -106
  560. package/dist/testimonials-INXY7CXU.js +0 -32
  561. package/dist/themes-R3A6IVQN.js +0 -95
  562. package/dist/top-companies-MNX3GBCP.js +0 -111
  563. package/dist/transcript-GIAOWCTO.js +0 -165
  564. package/dist/translate-JEQ4K4AH.js +0 -603
  565. package/dist/triggers-KDXLDZ23.js +0 -144
  566. package/dist/unlink-PNBSDLBQ.js +0 -70
  567. package/dist/unstage-X2PDLT5O.js +0 -88
  568. package/dist/update-4JGHSQVZ.js +0 -66
  569. package/dist/update-4XUQN4LK.js +0 -101
  570. package/dist/update-TJTDFWER.js +0 -155
  571. package/dist/update-URU4TO2F.js +0 -192
  572. package/dist/upload-TO5EPTVD.js +0 -130
  573. package/dist/url-options-YZ6UG3NY.js +0 -131
  574. package/dist/url-params-533CWJH3.js +0 -101
  575. package/dist/validate-XF6HU7D4.js +0 -125
  576. package/dist/videos-KYZ4CUOB.js +0 -41
  577. package/dist/view-VFZUL5UL.js +0 -121
  578. package/dist/view-VFZUL5UL.js.map +0 -1
  579. package/dist/viewer-check-U5GUU34Z.js +0 -83
  580. package/dist/web-ZYMSMIV6.js +0 -173
  581. package/dist/winning-ads-BCN5RVAE.js +0 -86
  582. package/dist/write-commands-PZZ72PNL.js +0 -1525
  583. package/dist/x-DLEZYTAU.js +0 -47
  584. /package/dist/{account-2HJ4GKHN.js.map → account-IG3U6UXZ.js.map} +0 -0
  585. /package/dist/{account-6GKPLNDY.js.map → account-IGWCS2VJ.js.map} +0 -0
  586. /package/dist/{account-reads-X36NPCX5.js.map → account-reads-LOCJMS35.js.map} +0 -0
  587. /package/dist/{account-users-FGL3DZES.js.map → account-users-H4VP43RZ.js.map} +0 -0
  588. /package/dist/{account-writes-FZ3KCJZY.js.map → account-writes-BSSKSTZ2.js.map} +0 -0
  589. /package/dist/{accounts-S5C6MZFO.js.map → accounts-C4PNBT5X.js.map} +0 -0
  590. /package/dist/{accounts-PKSW3DBQ.js.map → accounts-GPTG4XW5.js.map} +0 -0
  591. /package/dist/{actions-ARN3OFB7.js.map → actions-F7YO5I27.js.map} +0 -0
  592. /package/dist/{activecampaign-3YJC3H2R.js.map → activecampaign-S4E46SA6.js.map} +0 -0
  593. /package/dist/{ad-group-writes-XGG3WQEO.js.map → ad-group-writes-KMB3OMJG.js.map} +0 -0
  594. /package/dist/{ad-groups-GZIPUN64.js.map → ad-groups-E67CNQS4.js.map} +0 -0
  595. /package/dist/{ad-writes-2VTRWQLW.js.map → ad-writes-FNMKNFUN.js.map} +0 -0
  596. /package/dist/{add-CNYKQD7B.js.map → add-LROKBWW4.js.map} +0 -0
  597. /package/dist/{add-IABKHM5N.js.map → add-SG5XWFRN.js.map} +0 -0
  598. /package/dist/{ads-LNWALF6G.js.map → ads-4LASBP4G.js.map} +0 -0
  599. /package/dist/{ads-UXHJCUTX.js.map → ads-7ICT2D4M.js.map} +0 -0
  600. /package/dist/{advertisers-UT7EJ6YS.js.map → advertisers-IQMTOR4D.js.map} +0 -0
  601. /package/dist/{analytics-EHUUNMGZ.js.map → analytics-6DSJ6WHO.js.map} +0 -0
  602. /package/dist/{analytics-COUVH7MV.js.map → analytics-D6S5LW2F.js.map} +0 -0
  603. /package/dist/{animate-DM4OUJMR.js.map → animate-OWXAT2RK.js.map} +0 -0
  604. /package/dist/{assign-FWT5QQDF.js.map → assign-TMG6FDLW.js.map} +0 -0
  605. /package/dist/{audience-size-YI2RLIG7.js.map → audience-size-KPJOSG5W.js.map} +0 -0
  606. /package/dist/{audiences-7D5VPOWF.js.map → audiences-3R574STZ.js.map} +0 -0
  607. /package/dist/{audit-BPRRCIWN.js.map → audit-35TDKIGY.js.map} +0 -0
  608. /package/dist/{autocomplete-OD6SHZZH.js.map → autocomplete-T63KPKRZ.js.map} +0 -0
  609. /package/dist/{avatars-FFFPCH6D.js.map → avatars-AVK4S3HS.js.map} +0 -0
  610. /package/dist/{bid-pricing-JF557IO2.js.map → bid-pricing-O5IK37CL.js.map} +0 -0
  611. /package/dist/{brand-ZUYJWKI3.js.map → brand-SG6VOHF4.js.map} +0 -0
  612. /package/dist/{brief-CJDBD5GJ.js.map → brief-RWA6MXTN.js.map} +0 -0
  613. /package/dist/{campaign-groups-VCT6ZH66.js.map → campaign-groups-SSZISPJ5.js.map} +0 -0
  614. /package/dist/{campaign-writes-YOHDMYDT.js.map → campaign-writes-74KDZ7RR.js.map} +0 -0
  615. /package/dist/{campaign-writes-H22P6YPW.js.map → campaign-writes-Z2J24SUZ.js.map} +0 -0
  616. /package/dist/{campaigns-265JXD2Z.js.map → campaigns-43OS6EUG.js.map} +0 -0
  617. /package/dist/{campaigns-7EGRZ3V6.js.map → campaigns-B5TSL3UD.js.map} +0 -0
  618. /package/dist/{campaigns-ORK5BYAM.js.map → campaigns-TFNPOQEW.js.map} +0 -0
  619. /package/dist/{canvas-FW5F3KZJ.js.map → canvas-4LSM4Y5I.js.map} +0 -0
  620. /package/dist/{capabilities-ISW7XT44.js.map → capabilities-CTKSS7AI.js.map} +0 -0
  621. /package/dist/{catalog-DPUQBZZ7.js.map → catalog-7LINLVVY.js.map} +0 -0
  622. /package/dist/{catalogs-SBXFAD3X.js.map → catalogs-IR22RGZD.js.map} +0 -0
  623. /package/dist/{changes-HXVZUJMH.js.map → changes-JAGWBHQC.js.map} +0 -0
  624. /package/dist/{chatgpt-UXJPCGZU.js.map → chatgpt-NE2RBMFK.js.map} +0 -0
  625. /package/dist/{chats-FH3DQNYD.js.map → chats-6TRVVEBG.js.map} +0 -0
  626. /package/dist/{check-QC5RHS3Z.js.map → check-DZGMLLRL.js.map} +0 -0
  627. /package/dist/{chunk-GQAKWQAV.js.map → chunk-2DQC4XSN.js.map} +0 -0
  628. /package/dist/{chunk-OZR3KUJ3.js.map → chunk-3BWT5YDD.js.map} +0 -0
  629. /package/dist/{chunk-RHEWQB5O.js.map → chunk-3EUITH4J.js.map} +0 -0
  630. /package/dist/{chunk-LVKAMWKJ.js.map → chunk-3J5ZTJGN.js.map} +0 -0
  631. /package/dist/{chunk-D2ZAZGQH.js.map → chunk-3OFLYMPK.js.map} +0 -0
  632. /package/dist/{chunk-RP36XHWT.js.map → chunk-4IRJ5JXA.js.map} +0 -0
  633. /package/dist/{chunk-ZEUAJAKN.js.map → chunk-5IFFPSEN.js.map} +0 -0
  634. /package/dist/{chunk-EZKT5YGX.js.map → chunk-5YNGVEX2.js.map} +0 -0
  635. /package/dist/{chunk-P3VY5JEM.js.map → chunk-64ALJ6TJ.js.map} +0 -0
  636. /package/dist/{chunk-JAC6JVCI.js.map → chunk-6OIKNJ7G.js.map} +0 -0
  637. /package/dist/{chunk-6HCYCMIH.js.map → chunk-7L3Z2GDZ.js.map} +0 -0
  638. /package/dist/{chunk-HETNOUE4.js.map → chunk-7LYJVM7L.js.map} +0 -0
  639. /package/dist/{chunk-TNZUMU55.js.map → chunk-7UFV6H7J.js.map} +0 -0
  640. /package/dist/{chunk-YEISVDKW.js.map → chunk-AGVLJLOT.js.map} +0 -0
  641. /package/dist/{chunk-4D73PLXU.js.map → chunk-B3CDNANO.js.map} +0 -0
  642. /package/dist/{chunk-EOMY5SUJ.js.map → chunk-BNI5DAB7.js.map} +0 -0
  643. /package/dist/{chunk-N4AIJQ4W.js.map → chunk-BRT5IG7N.js.map} +0 -0
  644. /package/dist/{chunk-FVDC6AKZ.js.map → chunk-CXRS5YLB.js.map} +0 -0
  645. /package/dist/{chunk-TP2NS5SG.js.map → chunk-CY6EPTJA.js.map} +0 -0
  646. /package/dist/{chunk-WJ5AHR4K.js.map → chunk-CZ4Q3I25.js.map} +0 -0
  647. /package/dist/{chunk-JY3OJBKZ.js.map → chunk-E5H7JIWB.js.map} +0 -0
  648. /package/dist/{chunk-SEHJ7Y7J.js.map → chunk-EGW3D3RW.js.map} +0 -0
  649. /package/dist/{chunk-OKB2EAJH.js.map → chunk-EPLSDHBT.js.map} +0 -0
  650. /package/dist/{chunk-TAGRKRFI.js.map → chunk-F2VUMTCJ.js.map} +0 -0
  651. /package/dist/{chunk-RXOQZA4K.js.map → chunk-FLF2CIL2.js.map} +0 -0
  652. /package/dist/{chunk-5Y2XPKW2.js.map → chunk-FM4YT7QA.js.map} +0 -0
  653. /package/dist/{chunk-ZUUVWWB5.js.map → chunk-FUIPDGGH.js.map} +0 -0
  654. /package/dist/{chunk-YNLWSP5E.js.map → chunk-G47B4DOH.js.map} +0 -0
  655. /package/dist/{chunk-QK3HMAVU.js.map → chunk-G6J6AWTE.js.map} +0 -0
  656. /package/dist/{chunk-XYNQMRNX.js.map → chunk-GCZK4BMB.js.map} +0 -0
  657. /package/dist/{chunk-2AC5GJHC.js.map → chunk-GVYJOHX5.js.map} +0 -0
  658. /package/dist/{chunk-DYTBVVQX.js.map → chunk-ICEYCLRU.js.map} +0 -0
  659. /package/dist/{chunk-HQ3I2QVT.js.map → chunk-IDFTXHRQ.js.map} +0 -0
  660. /package/dist/{chunk-UOXC3XA5.js.map → chunk-J2RUOIME.js.map} +0 -0
  661. /package/dist/{chunk-WOE4TZHJ.js.map → chunk-JBNT444M.js.map} +0 -0
  662. /package/dist/{chunk-2VSUMGJV.js.map → chunk-KAUP6ONR.js.map} +0 -0
  663. /package/dist/{chunk-PXGR3VGW.js.map → chunk-KTO2Y3DI.js.map} +0 -0
  664. /package/dist/{chunk-ZVAZFHH7.js.map → chunk-KVYXHWX2.js.map} +0 -0
  665. /package/dist/{chunk-GN7K3NPI.js.map → chunk-LDFM37DM.js.map} +0 -0
  666. /package/dist/{chunk-JLLGXYOZ.js.map → chunk-LHC6OHQ6.js.map} +0 -0
  667. /package/dist/{chunk-UQA6Z23M.js.map → chunk-LQOJBPKV.js.map} +0 -0
  668. /package/dist/{chunk-4S5ZAG4S.js.map → chunk-METHLFNZ.js.map} +0 -0
  669. /package/dist/{chunk-LKOMEXUB.js.map → chunk-MGOSJSDV.js.map} +0 -0
  670. /package/dist/{chunk-7SJU6PQ7.js.map → chunk-O34P4WD5.js.map} +0 -0
  671. /package/dist/{chunk-5MMJPUBH.js.map → chunk-O5V2KBI4.js.map} +0 -0
  672. /package/dist/{chunk-LWCGQNVU.js.map → chunk-OO7Y2NMT.js.map} +0 -0
  673. /package/dist/{chunk-HFAT5S5B.js.map → chunk-P3AHGZH2.js.map} +0 -0
  674. /package/dist/{chunk-NBWZVBDG.js.map → chunk-P6FMQHJJ.js.map} +0 -0
  675. /package/dist/{chunk-TARINRA4.js.map → chunk-Q6LCL67T.js.map} +0 -0
  676. /package/dist/{chunk-OT2MN5UR.js.map → chunk-Q7G5CWH6.js.map} +0 -0
  677. /package/dist/{chunk-KCRBAMFU.js.map → chunk-RA73BVUX.js.map} +0 -0
  678. /package/dist/{chunk-EB76M4ZH.js.map → chunk-S6ZCFRL5.js.map} +0 -0
  679. /package/dist/{chunk-MZPS46OR.js.map → chunk-SIKCVWM3.js.map} +0 -0
  680. /package/dist/{chunk-KTY7H44G.js.map → chunk-SIWXWRAD.js.map} +0 -0
  681. /package/dist/{chunk-6R2BQ6FK.js.map → chunk-UNIJPTDU.js.map} +0 -0
  682. /package/dist/{chunk-A37TIYFD.js.map → chunk-UXFRUYTR.js.map} +0 -0
  683. /package/dist/{chunk-VOUCQ2YW.js.map → chunk-V4UJERGL.js.map} +0 -0
  684. /package/dist/{chunk-AK7CL5IW.js.map → chunk-W46BM7HF.js.map} +0 -0
  685. /package/dist/{chunk-AOT3UZBM.js.map → chunk-WH7CATSZ.js.map} +0 -0
  686. /package/dist/{chunk-EY5WWPPZ.js.map → chunk-WM2PLENG.js.map} +0 -0
  687. /package/dist/{chunk-KIXVHP2C.js.map → chunk-XU6XQPNM.js.map} +0 -0
  688. /package/dist/{chunk-SNWFM2DB.js.map → chunk-YKFGXS26.js.map} +0 -0
  689. /package/dist/{chunk-HBDWE7WK.js.map → chunk-YQB66YKJ.js.map} +0 -0
  690. /package/dist/{chunk-7P74QKVC.js.map → chunk-YZKZQXRX.js.map} +0 -0
  691. /package/dist/{chunk-IN5UCEJD.js.map → chunk-ZDHWB32Y.js.map} +0 -0
  692. /package/dist/{chunk-A6NVGPCZ.js.map → chunk-ZOYNCIRB.js.map} +0 -0
  693. /package/dist/{claim-FBL5VBYZ.js.map → claim-PTCFUZM2.js.map} +0 -0
  694. /package/dist/{companies-URRCAJZE.js.map → companies-STCBOG5Z.js.map} +0 -0
  695. /package/dist/{company-LDCNUPHZ.js.map → company-4CE7CGNC.js.map} +0 -0
  696. /package/dist/{complete-3UGPO444.js.map → complete-R4A7LBOQ.js.map} +0 -0
  697. /package/dist/{connect-M5KPZQWE.js.map → connect-4VLRGTAM.js.map} +0 -0
  698. /package/dist/{conversation-S7YANZJR.js.map → conversation-JS52LHCZ.js.map} +0 -0
  699. /package/dist/{conversion-report-RB2MU7UD.js.map → conversion-report-R4KJI4VA.js.map} +0 -0
  700. /package/dist/{conversion-upload-command-HFZYKVXA.js.map → conversion-upload-command-WCLWA27O.js.map} +0 -0
  701. /package/dist/{conversion-writes-56AIPXPK.js.map → conversion-writes-XIQEIDPS.js.map} +0 -0
  702. /package/dist/{conversions-QZL4DSJO.js.map → conversions-IYEF6WZP.js.map} +0 -0
  703. /package/dist/{conversions-NRX76ZIT.js.map → conversions-RMBQNW3T.js.map} +0 -0
  704. /package/dist/{create-Y6YVJ5L4.js.map → create-6I7SRQHV.js.map} +0 -0
  705. /package/dist/{create-OE5MRW3X.js.map → create-JYBMK5JH.js.map} +0 -0
  706. /package/dist/{create-56PJRLMA.js.map → create-MPUAOJQB.js.map} +0 -0
  707. /package/dist/{create-RL7PRIDY.js.map → create-W7L5B374.js.map} +0 -0
  708. /package/dist/{creatives-ESVH63AP.js.map → creatives-EPXJ2PDV.js.map} +0 -0
  709. /package/dist/{creatives-URHXATY6.js.map → creatives-PP6Z2T6Z.js.map} +0 -0
  710. /package/dist/{credentials-O6QSB7ZR.js.map → credentials-R4BZ76RD.js.map} +0 -0
  711. /package/dist/{critique-PTGGXRFG.js.map → critique-ICVRILIZ.js.map} +0 -0
  712. /package/dist/{critique-EWJBOCXQ.js.map → critique-OTIGYFZU.js.map} +0 -0
  713. /package/dist/{crm-GLPOO22Q.js.map → crm-5JFMA2YB.js.map} +0 -0
  714. /package/dist/{crm-F6RGNQH5.js.map → crm-PRTHRLXM.js.map} +0 -0
  715. /package/dist/{currency-CHBV6WIO.js.map → currency-BY647ZB7.js.map} +0 -0
  716. /package/dist/{customers-Q76FCWYO.js.map → customers-5EWPVKJV.js.map} +0 -0
  717. /package/dist/{delete-ODFDZCL3.js.map → delete-5EWH2SQQ.js.map} +0 -0
  718. /package/dist/{delete-OVMPDGWQ.js.map → delete-V2FBPIN7.js.map} +0 -0
  719. /package/dist/{delete-XN7N4S4H.js.map → delete-ZWUCKXI5.js.map} +0 -0
  720. /package/dist/{demographics-IY5RI55Z.js.map → demographics-2YCVAAPH.js.map} +0 -0
  721. /package/dist/{discard-GKIA5FML.js.map → discard-N7K3UQ7M.js.map} +0 -0
  722. /package/dist/{discover-ZU2DAV23.js.map → discover-TAJUFO5R.js.map} +0 -0
  723. /package/dist/{domain-WGXA7OXV.js.map → domain-YYTNWNSF.js.map} +0 -0
  724. /package/dist/{download-DYYNUGLX.js.map → download-JMJRYJ37.js.map} +0 -0
  725. /package/dist/{draft-EX2I6UJB.js.map → draft-KQACMPH2.js.map} +0 -0
  726. /package/dist/{draft-VYIRZO3E.js.map → draft-PENVOYCI.js.map} +0 -0
  727. /package/dist/{draft-R7BNWMBR.js.map → draft-RGSDXFFT.js.map} +0 -0
  728. /package/dist/{draft-EWGNZUU4.js.map → draft-SKEGKHIK.js.map} +0 -0
  729. /package/dist/{draft-GKI6MB7L.js.map → draft-UOMHLIVY.js.map} +0 -0
  730. /package/dist/{experiments-6DOKWFH4.js.map → experiments-W5D7ERVJ.js.map} +0 -0
  731. /package/dist/{facets-ZU5DT2QW.js.map → facets-FUNOZ6JS.js.map} +0 -0
  732. /package/dist/{feedback-RIUBM557.js.map → feedback-OVZFH7UV.js.map} +0 -0
  733. /package/dist/{feedback-record-3VVAUCOH.js.map → feedback-record-DKDR3XHH.js.map} +0 -0
  734. /package/dist/{fetch-T6TZCU74.js.map → fetch-QKP23NSX.js.map} +0 -0
  735. /package/dist/{fit-YPOHTM7Y.js.map → fit-PZPU2IZZ.js.map} +0 -0
  736. /package/dist/{flows-CKVEZFF2.js.map → flows-GBMZJX4R.js.map} +0 -0
  737. /package/dist/{fonts-3J3UVZ2E.js.map → fonts-2YY5465Q.js.map} +0 -0
  738. /package/dist/{forecast-JEAFUR2O.js.map → forecast-7B75GCRH.js.map} +0 -0
  739. /package/dist/{forecast-372Q6KQZ.js.map → forecast-VOND3WVO.js.map} +0 -0
  740. /package/dist/{funnel-FBTNPTS7.js.map → funnel-G4CMJ2C4.js.map} +0 -0
  741. /package/dist/{generate-JQIK3UYS.js.map → generate-SW5KLHXG.js.map} +0 -0
  742. /package/dist/{get-5N5FCGNH.js.map → get-44VNCDBQ.js.map} +0 -0
  743. /package/dist/{get-EXHUQT65.js.map → get-ZPJFKFHL.js.map} +0 -0
  744. /package/dist/{google-JHTOX6WM.js.map → google-VYARAUQH.js.map} +0 -0
  745. /package/dist/{google-ads-ZAYRCG2D.js.map → google-ads-BKDTCXUS.js.map} +0 -0
  746. /package/dist/{history-VNLS2TKB.js.map → history-7DF5HFJT.js.map} +0 -0
  747. /package/dist/{history-6J3XRNTZ.js.map → history-NEKVFRGQ.js.map} +0 -0
  748. /package/dist/{history-4ULZ4BVV.js.map → history-YU6HH574.js.map} +0 -0
  749. /package/dist/{hubspot-ZEHWWJHK.js.map → hubspot-Q3ZQODAX.js.map} +0 -0
  750. /package/dist/{ideas-SB6546GI.js.map → ideas-75LW4KBY.js.map} +0 -0
  751. /package/dist/{images-LEZYVE7R.js.map → images-7FS4KEGU.js.map} +0 -0
  752. /package/dist/{ingest-KNJCCIBG.js.map → ingest-MHH5OQP4.js.map} +0 -0
  753. /package/dist/{ingest-4OOTCOLO.js.map → ingest-S5OS6WIU.js.map} +0 -0
  754. /package/dist/{insights-XY6II7TX.js.map → insights-YVV5MHPQ.js.map} +0 -0
  755. /package/dist/{inspect-MHKEYNIC.js.map → inspect-PIFZILBU.js.map} +0 -0
  756. /package/dist/{inspiration-CSN3AXDD.js.map → inspiration-KL27O45N.js.map} +0 -0
  757. /package/dist/{intent-5QUPPZNI.js.map → intent-GIAQDMHF.js.map} +0 -0
  758. /package/dist/{keyword-gap-IG3EFLDH.js.map → keyword-gap-NZF75XGF.js.map} +0 -0
  759. /package/dist/{keyword-metrics-EL7MO3H6.js.map → keyword-metrics-H5M5I3N4.js.map} +0 -0
  760. /package/dist/{keywords-for-site-I7KJLZ2I.js.map → keywords-for-site-RILBDULX.js.map} +0 -0
  761. /package/dist/{landing-Z3QGJYM3.js.map → landing-H5KY6F7K.js.map} +0 -0
  762. /package/dist/{languages-LNHWSCMT.js.map → languages-GGNN7FEK.js.map} +0 -0
  763. /package/dist/{leads-WQCTZYKT.js.map → leads-WCWH4C73.js.map} +0 -0
  764. /package/dist/{learn-6KW6TUVL.js.map → learn-RUZUBNQZ.js.map} +0 -0
  765. /package/dist/{line-item-writes-B2KSP36W.js.map → line-item-writes-5Z3AEUV2.js.map} +0 -0
  766. /package/dist/{line-items-3ICE5DBI.js.map → line-items-IYSM2NEA.js.map} +0 -0
  767. /package/dist/{link-QRQ34ZDH.js.map → link-KRNL5O7Z.js.map} +0 -0
  768. /package/dist/{linkedin-D4RKHQPS.js.map → linkedin-GZIYAH4C.js.map} +0 -0
  769. /package/dist/{linkedin-person-Y5TCUOXS.js.map → linkedin-person-PMXUBPVL.js.map} +0 -0
  770. /package/dist/{list-XAMJSOGI.js.map → list-ALQGX6JI.js.map} +0 -0
  771. /package/dist/{list-6HZVHA6T.js.map → list-I37IE3NN.js.map} +0 -0
  772. /package/dist/{list-CHYJ53JD.js.map → list-JD5T6CGQ.js.map} +0 -0
  773. /package/dist/{locations-64JNCQID.js.map → locations-7RYEWKJO.js.map} +0 -0
  774. /package/dist/{locations-KVAAO7LD.js.map → locations-BU4ZGWAS.js.map} +0 -0
  775. /package/dist/{log-PLXGA74X.js.map → log-JWUFDOG6.js.map} +0 -0
  776. /package/dist/{make-EP4YSN26.js.map → make-QCGOTYNW.js.map} +0 -0
  777. /package/dist/{map-CAFMAMPP.js.map → map-EYKEY4VA.js.map} +0 -0
  778. /package/dist/{mcp-DDWSXLU7.js.map → mcp-P2PZCFFJ.js.map} +0 -0
  779. /package/dist/{media-sources-J5FXYPV5.js.map → media-sources-UUNS3LES.js.map} +0 -0
  780. /package/dist/{members-ZA7S5KWP.js.map → members-XTW5F5N5.js.map} +0 -0
  781. /package/dist/{metrics-MXGA3EFS.js.map → metrics-Z75Q2FHP.js.map} +0 -0
  782. /package/dist/{models-Z6SUHWKI.js.map → models-X2IXXAD6.js.map} +0 -0
  783. /package/dist/{normalize-ZHM2ZVXZ.js.map → normalize-P2UQIQOX.js.map} +0 -0
  784. /package/dist/{options-JTMDZECY.js.map → options-2OK4LBAD.js.map} +0 -0
  785. /package/dist/{organization-5OJEJEQV.js.map → organization-I5AIPZEH.js.map} +0 -0
  786. /package/dist/{performance-AHVTOYTM.js.map → performance-4UPNHWC2.js.map} +0 -0
  787. /package/dist/{performance-S273NSUB.js.map → performance-H5FJQBOP.js.map} +0 -0
  788. /package/dist/{pixels-H642RPK4.js.map → pixels-DBSPNHIE.js.map} +0 -0
  789. /package/dist/{promoted-tweet-writes-UF6LYMH4.js.map → promoted-tweet-writes-V5N5JDYQ.js.map} +0 -0
  790. /package/dist/{promoted-tweets-Z4GG6D7P.js.map → promoted-tweets-ZSNBS3QQ.js.map} +0 -0
  791. /package/dist/{publish-YQ6MHS7P.js.map → publish-M6U72N3H.js.map} +0 -0
  792. /package/dist/{query-FT2BA3WH.js.map → query-NMQKS4MY.js.map} +0 -0
  793. /package/dist/{reddit-YWYRZBL2.js.map → reddit-AZMVTHPR.js.map} +0 -0
  794. /package/dist/{refresh-TEXTTECA.js.map → refresh-42TJTJSN.js.map} +0 -0
  795. /package/dist/{release-3JDETBZI.js.map → release-VT6TNWUV.js.map} +0 -0
  796. /package/dist/{relevant-pages-OCHLUV5K.js.map → relevant-pages-JRIDJL4L.js.map} +0 -0
  797. /package/dist/{remove-KZTSU4K2.js.map → remove-YW25PRT4.js.map} +0 -0
  798. /package/dist/{reopen-GIJSFNDH.js.map → reopen-WGTMBOHK.js.map} +0 -0
  799. /package/dist/{rerun-6UZNOPUG.js.map → rerun-O7P5LMC4.js.map} +0 -0
  800. /package/dist/{research-XA2IJ2XV.js.map → research-IQWYPRBV.js.map} +0 -0
  801. /package/dist/{research-TMKG4NQJ.js.map → research-WYNVU26K.js.map} +0 -0
  802. /package/dist/{reset-7VL6WJLE.js.map → reset-4YPVS6QU.js.map} +0 -0
  803. /package/dist/{reset-HLZ6JHGY.js.map → reset-NF6K4NHK.js.map} +0 -0
  804. /package/dist/{resolve-H2QW3U5Y.js.map → resolve-GB4ORVSB.js.map} +0 -0
  805. /package/dist/{retry-MIZ67MPP.js.map → retry-LKJVOXVX.js.map} +0 -0
  806. /package/dist/{retry-WSWW6EJT.js.map → retry-W3NSNNDV.js.map} +0 -0
  807. /package/dist/{revenue-LTU7HRT2.js.map → revenue-KHUWJPMJ.js.map} +0 -0
  808. /package/dist/{rules-BGBCUUPH.js.map → rules-HMAONF3A.js.map} +0 -0
  809. /package/dist/{rules-add-SZT2MSOD.js.map → rules-add-BP5XSD23.js.map} +0 -0
  810. /package/dist/{run-XUDGECLL.js.map → run-EBCP5VIQ.js.map} +0 -0
  811. /package/dist/{run-FHGT4UQ7.js.map → run-QP7JP2H4.js.map} +0 -0
  812. /package/dist/{scaffold-ad-VXNO3SQP.js.map → scaffold-ad-JVDV7FET.js.map} +0 -0
  813. /package/dist/{scaffold-static-ad-FT55VV3T.js.map → scaffold-static-ad-VD3KXMHT.js.map} +0 -0
  814. /package/dist/{scaffold-video-V7WX5AWZ.js.map → scaffold-video-X3YR6APK.js.map} +0 -0
  815. /package/dist/{schedule-BNRLEFMZ.js.map → schedule-7OKUUJHO.js.map} +0 -0
  816. /package/dist/{scheduled-agents-MAXXXJ7W.js.map → scheduled-agents-N6FDAL7K.js.map} +0 -0
  817. /package/dist/{schema-YADPD54K.js.map → schema-6O6CJTT5.js.map} +0 -0
  818. /package/dist/{search-56ORG4PL.js.map → search-WGOCL2KW.js.map} +0 -0
  819. /package/dist/{select-DON4DMNM.js.map → select-6PVDRJQJ.js.map} +0 -0
  820. /package/dist/{set-prompt-J22TUCRU.js.map → set-prompt-EDM7CPME.js.map} +0 -0
  821. /package/dist/{setup-links-CHODCBYH.js.map → setup-links-Z2KIKKJM.js.map} +0 -0
  822. /package/dist/{shopify-FCYU4AR6.js.map → shopify-AANLSYQY.js.map} +0 -0
  823. /package/dist/{site-BF3Q26W5.js.map → site-6HHZJW2S.js.map} +0 -0
  824. /package/dist/{sources-VHHC6YQM.js.map → sources-72AAZL4C.js.map} +0 -0
  825. /package/dist/{sources-SLCYAWTZ.js.map → sources-VRWQ65G6.js.map} +0 -0
  826. /package/dist/{stale-GLVTL2ZK.js.map → stale-KO6NQVR4.js.map} +0 -0
  827. /package/dist/{status-E3RA644P.js.map → status-QRO7U5K2.js.map} +0 -0
  828. /package/dist/{studio-6ZXUKA4G.js.map → studio-OV2ZY5W3.js.map} +0 -0
  829. /package/dist/{sync-6QCDDJMO.js.map → sync-AQZ7JYEG.js.map} +0 -0
  830. /package/dist/{sync-definition-DXNHGY5E.js.map → sync-definition-OKSJA6MA.js.map} +0 -0
  831. /package/dist/{tags-KW7PG2TR.js.map → tags-5GFUNIIK.js.map} +0 -0
  832. /package/dist/{tags-MGV5KG6I.js.map → tags-DIFC2HFB.js.map} +0 -0
  833. /package/dist/{tags-TM27EIAL.js.map → tags-M26JKN2F.js.map} +0 -0
  834. /package/dist/{tags-AMZSQJJ2.js.map → tags-QFEG7LJV.js.map} +0 -0
  835. /package/dist/{tags-VWGKVGZD.js.map → tags-ZWYUQYWT.js.map} +0 -0
  836. /package/dist/{targeting-criteria-FT3G4HAW.js.map → targeting-criteria-UQMPM2K5.js.map} +0 -0
  837. /package/dist/{targets-XLVHWO6Z.js.map → targets-YCVILKKZ.js.map} +0 -0
  838. /package/dist/{testimonials-INXY7CXU.js.map → testimonials-SJQJDEK4.js.map} +0 -0
  839. /package/dist/{themes-R3A6IVQN.js.map → themes-RRLYZ46U.js.map} +0 -0
  840. /package/dist/{top-companies-MNX3GBCP.js.map → top-companies-LPYM65KX.js.map} +0 -0
  841. /package/dist/{transcript-GIAOWCTO.js.map → transcript-D2IQWUSP.js.map} +0 -0
  842. /package/dist/{translate-JEQ4K4AH.js.map → translate-CPDFHEI4.js.map} +0 -0
  843. /package/dist/{triggers-KDXLDZ23.js.map → triggers-543HDVJK.js.map} +0 -0
  844. /package/dist/{unlink-PNBSDLBQ.js.map → unlink-DQGU7K7V.js.map} +0 -0
  845. /package/dist/{unstage-X2PDLT5O.js.map → unstage-7UQU4MQT.js.map} +0 -0
  846. /package/dist/{update-TJTDFWER.js.map → update-DGIBKKIB.js.map} +0 -0
  847. /package/dist/{update-4JGHSQVZ.js.map → update-FEZ3EVTA.js.map} +0 -0
  848. /package/dist/{update-4XUQN4LK.js.map → update-QF6WBJU7.js.map} +0 -0
  849. /package/dist/{update-URU4TO2F.js.map → update-RY3GU5QI.js.map} +0 -0
  850. /package/dist/{upload-TO5EPTVD.js.map → upload-VMDGQ4HS.js.map} +0 -0
  851. /package/dist/{url-options-YZ6UG3NY.js.map → url-options-2TQCGD2W.js.map} +0 -0
  852. /package/dist/{url-params-533CWJH3.js.map → url-params-LMC2DRHP.js.map} +0 -0
  853. /package/dist/{validate-XF6HU7D4.js.map → validate-TLWEN4IL.js.map} +0 -0
  854. /package/dist/{videos-KYZ4CUOB.js.map → videos-GFOHRAJ7.js.map} +0 -0
  855. /package/dist/{viewer-check-U5GUU34Z.js.map → viewer-check-EKDFC7LQ.js.map} +0 -0
  856. /package/dist/{web-ZYMSMIV6.js.map → web-L7LF6FLF.js.map} +0 -0
  857. /package/dist/{winning-ads-BCN5RVAE.js.map → winning-ads-RUS4NE5C.js.map} +0 -0
  858. /package/dist/{write-commands-PZZ72PNL.js.map → write-commands-2JYDSXAX.js.map} +0 -0
  859. /package/dist/{x-DLEZYTAU.js.map → x-HLZUSGJT.js.map} +0 -0
@@ -1,3270 +0,0 @@
1
- import {
2
- runQuery
3
- } from "./chunk-PXGR3VGW.js";
4
- import "./chunk-Y2FAUFWK.js";
5
- import "./chunk-JPK34QPS.js";
6
- import "./chunk-JLLGXYOZ.js";
7
- import {
8
- AD_COPY_LIST_USAGE,
9
- bidModifierFlag,
10
- customerIdArg,
11
- failWriteValidation,
12
- fileArg,
13
- fileBatchArg,
14
- fileCreateCommand,
15
- fileLines,
16
- handleGoogleError,
17
- keywordEntries,
18
- listFlag,
19
- loadJsonFileArg,
20
- loadJsonPayloads,
21
- mergePayload,
22
- microsFlag,
23
- requireCustomerId,
24
- requireStringFlag,
25
- requireTarget,
26
- stageCreate,
27
- stageGoogleOp,
28
- stageGoogleOps,
29
- stageTarget,
30
- stageUpdate,
31
- targetEntries
32
- } from "./chunk-DYTBVVQX.js";
33
- import {
34
- repeatedFlagValues,
35
- repeatedValues
36
- } from "./chunk-ERSX3MKH.js";
37
- import {
38
- booleanWordPositionalError
39
- } from "./chunk-3W4IORXH.js";
40
- import "./chunk-4NZ47VXO.js";
41
- import "./chunk-D5FY4FAK.js";
42
- import "./chunk-NGQ5J4FV.js";
43
- import "./chunk-QALAJNBG.js";
44
- import "./chunk-SNWFM2DB.js";
45
- import {
46
- getManagerIdForCustomer
47
- } from "./chunk-MGWAZXY6.js";
48
- import "./chunk-VWOKPC3T.js";
49
- import "./chunk-BGT5ZA4L.js";
50
- import "./chunk-JF2XP76K.js";
51
- import "./chunk-SYLPRIFM.js";
52
- import "./chunk-XBR7TSZN.js";
53
- import "./chunk-DGUN7FUH.js";
54
- import "./chunk-NSBNIPIW.js";
55
- import {
56
- ASSET_GROUP_ASSET_FIELD_TYPES,
57
- CALL_AD_RETIRED_MESSAGE,
58
- CONVERSION_ACTION_CATEGORIES,
59
- CONVERSION_ORIGINS,
60
- GOOGLE_DRAFT_BATCH_MAX,
61
- NEGATIVE_GEO_TARGET_TYPES,
62
- POSITIVE_GEO_TARGET_TYPES
63
- } from "./chunk-MSMTG6OC.js";
64
- import {
65
- apiPost
66
- } from "./chunk-B2OHCWYB.js";
67
- import "./chunk-SVUFNCOE.js";
68
- import "./chunk-E54435XT.js";
69
- import {
70
- registerSchema
71
- } from "./chunk-WCIS4FZH.js";
72
- import "./chunk-YQSBHWOI.js";
73
-
74
- // src/commands/ads/google/index.ts
75
- import { defineCommand as defineCommand5 } from "citty";
76
-
77
- // src/commands/ads/google/keywords/index.ts
78
- import { defineCommand } from "citty";
79
- var keywordsCommand = defineCommand({
80
- meta: {
81
- name: "keywords",
82
- description: `Keyword research, plus staged keyword changes. Research: discover, metrics, forecast, themes, locations, languages. Changes: list, add, update, pause, resume, remove \u2014 pause/resume/add take many keywords in one call.
83
-
84
- Examples:
85
- baker ads google keywords discover --customer-id 1234567890 --seeds "running shoes"
86
- baker ads google keywords metrics --customer-id 1234567890 --keywords "running shoes,nike shoes"
87
- baker ads google keywords forecast --customer-id 1234567890 --text "running shoes:PHRASE" --max-cpc 1.2
88
- baker ads google keywords themes --customer-id 1234567890 --keywords "trail shoes" --ad-groups 111,222
89
- baker ads google keywords locations
90
- baker ads google keywords languages`
91
- },
92
- subCommands: {
93
- discover: () => import("./discover-ZU2DAV23.js").then((m) => m.discoverCommand),
94
- metrics: () => import("./metrics-MXGA3EFS.js").then((m) => m.metricsCommand),
95
- forecast: () => import("./forecast-372Q6KQZ.js").then((m) => m.forecastCommand),
96
- themes: () => import("./themes-R3A6IVQN.js").then((m) => m.themesCommand),
97
- locations: () => import("./locations-KVAAO7LD.js").then((m) => m.locationsCommand),
98
- languages: () => import("./languages-LNHWSCMT.js").then((m) => m.languagesCommand)
99
- }
100
- });
101
-
102
- // src/commands/ads/google/list-commands.ts
103
- import { defineCommand as defineCommand2 } from "citty";
104
- var LIST_ARGS = {
105
- "customer-id": { type: "string", description: "Google Ads customer ID (10 digits, no dashes)" },
106
- limit: { type: "string", description: "Rows per page (default: the list's page size)" },
107
- cursor: { type: "string", description: "pagination.cursor from the previous page" },
108
- all: { type: "boolean", description: "Follow every page (use with --out for large lists)" },
109
- out: { type: "string", description: "Write rows to a file (.csv, .jsonl, .json)" },
110
- output: { type: "string", description: "Format: json|csv|jsonl|md", default: "json" },
111
- "serving-only": {
112
- type: "boolean",
113
- description: "Only entities whose whole chain is ENABLED (campaign, ad group, \u2026) \u2014 paused ones are listed by default"
114
- },
115
- "no-cache": { type: "boolean", description: "Skip cache" }
116
- };
117
- var LIST_SPECS = [
118
- {
119
- thing: "campaigns",
120
- preset: "campaigns",
121
- description: "List campaigns: id, name, status, channel, bidding, budget and dates",
122
- example: "baker ads google campaigns list --customer-id 1234567890"
123
- },
124
- {
125
- thing: "budgets",
126
- preset: "budgets",
127
- description: "List campaign budgets: id, name, daily amount, delivery, shared or not, campaigns using it",
128
- example: "baker ads google budgets list --customer-id 1234567890"
129
- },
130
- {
131
- thing: "ad-groups",
132
- preset: "ad-groups",
133
- description: "List ad groups under their campaigns: id, name, status, type, default CPC bid",
134
- example: "baker ads google ad-groups list --customer-id 1234567890"
135
- },
136
- {
137
- thing: "keywords",
138
- preset: "keywords",
139
- description: "List positive keywords with the resource name `keywords update|remove` take",
140
- example: "baker ads google keywords list --customer-id 1234567890 --all --out keywords.csv"
141
- },
142
- {
143
- thing: "negative-keywords",
144
- preset: (args) => args.level === "adGroup" ? "ad-group-negative-keywords" : "campaign-negative-keywords",
145
- description: "List negative keywords (campaign level by default) with the resource name `negative-keywords remove` takes",
146
- extraArgs: { level: { type: "string", description: "campaign (default) | adGroup" } },
147
- example: "baker ads google negative-keywords list --customer-id 1234567890 --level adGroup"
148
- },
149
- {
150
- thing: "keyword-lists",
151
- preset: (args) => args.members ? "negative-keyword-lists" : "shared-sets",
152
- description: "List shared lists (id, name, type, member and campaign counts); --members lists the terms in each",
153
- extraArgs: {
154
- members: { type: "boolean", description: "List each negative list's terms with their resource names" }
155
- },
156
- example: "baker ads google keyword-lists list --customer-id 1234567890 --members"
157
- },
158
- {
159
- thing: "ads",
160
- preset: "ads",
161
- description: "List ads under their ad groups: id, type, name, status, approval, final URLs",
162
- example: "baker ads google ads list --customer-id 1234567890"
163
- },
164
- {
165
- thing: "assets",
166
- preset: "assets",
167
- description: "List the account's asset library: id, name, type, text, final URLs",
168
- example: "baker ads google assets list --customer-id 1234567890"
169
- },
170
- {
171
- thing: "asset-groups",
172
- preset: "asset-groups",
173
- description: "List Performance Max asset groups: id, name, status, final URLs, ad strength",
174
- example: "baker ads google asset-groups list --customer-id 1234567890"
175
- },
176
- {
177
- thing: "audiences",
178
- preset: "audiences",
179
- description: "List audiences (user lists): id, name, type, size on search and display, membership duration",
180
- example: "baker ads google audiences list --customer-id 1234567890"
181
- },
182
- {
183
- thing: "conversions",
184
- preset: "conversion-actions",
185
- description: "List conversion actions: id, name, type, category, origin, status, primary or secondary",
186
- example: "baker ads google conversions list --customer-id 1234567890"
187
- },
188
- {
189
- thing: "bidding-strategies",
190
- preset: "bidding-strategies",
191
- description: "List portfolio bidding strategies: id, name, type, status, campaigns using each",
192
- example: "baker ads google bidding-strategies list --customer-id 1234567890"
193
- },
194
- {
195
- thing: "labels",
196
- preset: "labels",
197
- description: "List labels: id, name, colour, description",
198
- example: "baker ads google labels list --customer-id 1234567890"
199
- },
200
- {
201
- thing: "merchant-center",
202
- preset: "merchant-center",
203
- description: "List the Merchant Center accounts linked to this account \u2014 the merchantId a Shopping or retail Performance Max campaign takes",
204
- example: "baker ads google merchant-center list --customer-id 1234567890"
205
- },
206
- {
207
- thing: "campaign-criteria",
208
- preset: "campaign-criteria",
209
- description: "List campaign targeting and exclusions (locations, languages, devices, schedules, radius, placements, topics, demographics, content types, IP addresses, web pages, brand lists, audiences) with the resource name `campaign-criteria update|remove` take",
210
- example: "baker ads google campaign-criteria list --customer-id 1234567890"
211
- },
212
- {
213
- thing: "ad-group-criteria",
214
- preset: "ad-group-criteria",
215
- description: "List ad group targeting and exclusions other than keywords (placements, topics, demographics, web pages, Demand Gen locations and audiences) with the resource name `ad-group-criteria update|remove` take",
216
- example: "baker ads google ad-group-criteria list --customer-id 1234567890"
217
- },
218
- {
219
- thing: "account-exclusions",
220
- preset: "account-exclusions",
221
- description: "List the account-wide exclusions (sites, apps, YouTube, content types, IP addresses, account negative keyword lists) with the resource name `account-exclusions remove` takes",
222
- example: "baker ads google account-exclusions list --customer-id 1234567890"
223
- },
224
- {
225
- thing: "asset-group-signals",
226
- preset: "asset-group-signals",
227
- description: "List Performance Max asset groups' signals (search themes and the combined audience) with the resource name `asset-group-signals remove` takes",
228
- example: "baker ads google asset-group-signals list --customer-id 1234567890"
229
- },
230
- {
231
- thing: "ad-group-bid-modifiers",
232
- preset: "ad-group-bid-modifiers",
233
- description: "List ad groups' own device bid adjustments with the resource name `ad-group-bid-modifiers update|remove` take",
234
- example: "baker ads google ad-group-bid-modifiers list --customer-id 1234567890"
235
- }
236
- ];
237
- function listQueryArgs(spec, args) {
238
- const preset = typeof spec.preset === "function" ? spec.preset(args) : spec.preset;
239
- return {
240
- preset,
241
- "customer-id": args["customer-id"],
242
- limit: args.limit,
243
- cursor: args.cursor,
244
- all: args.all,
245
- out: args.out,
246
- output: args.output,
247
- "no-cache": args["no-cache"],
248
- "include-paused": !args["serving-only"]
249
- };
250
- }
251
- function listCommand(spec) {
252
- const args = { ...LIST_ARGS, ...spec.extraArgs };
253
- registerSchema({
254
- command: `ads.google.${spec.thing}.list`,
255
- description: `${spec.description}. Start here: \`${spec.example}\`. One page per call (pagination.cursor \u2192 --cursor for the next; --all --out <file> for everything). Paused entities are included; removed ones are not.`,
256
- args: Object.fromEntries(
257
- Object.entries(args).map(([name, arg]) => [
258
- name,
259
- {
260
- type: arg.type,
261
- description: arg.description ?? "",
262
- required: false,
263
- ..."default" in arg ? { default: arg.default } : {}
264
- }
265
- ])
266
- )
267
- });
268
- return defineCommand2({
269
- meta: { name: "list", description: `${spec.description}.
270
-
271
- Example:
272
- ${spec.example}` },
273
- args,
274
- run: async ({ args: parsed }) => {
275
- await runQuery(listQueryArgs(spec, parsed));
276
- }
277
- });
278
- }
279
- var LIST_COMMANDS = Object.fromEntries(
280
- LIST_SPECS.map((spec) => [spec.thing, listCommand(spec)])
281
- );
282
-
283
- // src/commands/ads/google/write-commands.ts
284
- import { defineCommand as defineCommand4 } from "citty";
285
-
286
- // src/commands/ads/google/ad-copy-flags.ts
287
- var AD_COPY_LIST_FLAGS = ["headlines", "descriptions", "long-headlines"];
288
- function skipBlanks(value, at) {
289
- let i = at;
290
- while (value[i] === " " || value[i] === " ") i++;
291
- return i;
292
- }
293
- function readQuotedField(value, open, flag) {
294
- let text = "";
295
- let j = open + 1;
296
- while (!(value[j] === '"' && value[j + 1] !== '"')) {
297
- if (j >= value.length) {
298
- failWriteValidation(`--${flag} has a quote with no closing quote: ${value} \u2014 ${AD_COPY_LIST_USAGE}`);
299
- }
300
- text += value[j];
301
- j += value[j] === '"' ? 2 : 1;
302
- }
303
- const after = skipBlanks(value, j + 1);
304
- if (after < value.length && value[after] !== ",") {
305
- failWriteValidation(
306
- `--${flag}: text follows the closing quote of "${text}" \u2014 a quoted item must end at a comma. To put a quote inside an item, double it ("") or ${AD_COPY_LIST_USAGE}`
307
- );
308
- }
309
- return { text, next: after + 1 };
310
- }
311
- function splitQuotedList(value, flag) {
312
- const fields = [];
313
- let i = 0;
314
- while (i <= value.length) {
315
- const start = skipBlanks(value, i);
316
- if (value[start] === '"') {
317
- const { text, next } = readQuotedField(value, start, flag);
318
- fields.push({ text, quoted: true });
319
- i = next;
320
- } else {
321
- const comma = value.indexOf(",", start);
322
- const end = comma === -1 ? value.length : comma;
323
- fields.push({ text: value.slice(start, end), quoted: false });
324
- i = end + 1;
325
- }
326
- }
327
- const several = fields.length > 1;
328
- return fields.map((field) => ({ text: field.text.trim(), splitAtComma: several && !field.quoted }));
329
- }
330
- function jsonStringArray(value) {
331
- if (!value.startsWith("[")) return void 0;
332
- try {
333
- const parsed = JSON.parse(value);
334
- return Array.isArray(parsed) && parsed.every((v) => typeof v === "string") ? parsed : void 0;
335
- } catch {
336
- return void 0;
337
- }
338
- }
339
- function parseCopyList(value, flag) {
340
- let items;
341
- if (Array.isArray(value)) {
342
- items = value.filter((v) => typeof v === "string").map((v) => ({ text: v.trim(), splitAtComma: false }));
343
- } else if (typeof value === "string") {
344
- const trimmed = value.trim();
345
- const json = jsonStringArray(trimmed);
346
- items = json ? json.map((v) => ({ text: v.trim(), splitAtComma: false })) : splitQuotedList(trimmed, flag);
347
- } else {
348
- return void 0;
349
- }
350
- const kept = items.filter((item) => item.text.length > 0);
351
- return kept.length > 0 ? kept : void 0;
352
- }
353
- function copyListFlag(value, flag) {
354
- return parseCopyList(value, flag)?.map((item) => item.text);
355
- }
356
- function refuseDashLedValue(rawArgs, flag) {
357
- for (let i = 0; i < rawArgs.length - 1; i++) {
358
- if (rawArgs[i] === "--") return;
359
- const value = rawArgs[i + 1];
360
- if (rawArgs[i] === `--${flag}` && value?.startsWith("-")) {
361
- failWriteValidation(
362
- `--${flag} is followed by "${value}", which starts with a dash and is read as another flag, not as copy. Join copy that starts with a dash to its flag with =: --${flag}="${value}"`
363
- );
364
- }
365
- }
366
- }
367
- function withRepeatedCopyFlags(args, rawArgs) {
368
- const out = { ...args };
369
- for (const flag of AD_COPY_LIST_FLAGS) {
370
- refuseDashLedValue(rawArgs ?? [], flag);
371
- const values = repeatedFlagValues(rawArgs ?? [], flag);
372
- if (values.length > 1) {
373
- out[flag] = values;
374
- }
375
- }
376
- return out;
377
- }
378
- function copyListSplitHints(args) {
379
- const hints = [];
380
- for (const flag of AD_COPY_LIST_FLAGS) {
381
- const items = parseCopyList(args[flag], flag) ?? [];
382
- const fragments = items.filter((item, index) => index > 0 && item.splitAtComma && new RegExp("^\\p{Ll}", "u").test(item.text));
383
- if (fragments.length > 0) {
384
- hints.push(
385
- `--${flag}: ${fragments.map((f) => `"${f.text}"`).join(", ")} starts in lowercase \u2014 it looks like the end of one item cut at a comma. Check the staged copy; if it was one item, fix this op in place with \`draft amend <ref>\` (the ref this response returned) rather than staging it again, which would leave the cut copy staged too \u2014 ${AD_COPY_LIST_USAGE}.`
386
- );
387
- }
388
- }
389
- return hints;
390
- }
391
-
392
- // src/commands/ads/google/channel-flags.ts
393
- function str(args, name) {
394
- const value = args[name];
395
- return typeof value === "string" && value.length > 0 ? value : void 0;
396
- }
397
- function bool(args, name) {
398
- const value = args[name];
399
- return typeof value === "boolean" ? value : void 0;
400
- }
401
- function defined(entries) {
402
- const kept = Object.entries(entries).filter(([, value]) => value !== void 0);
403
- return kept.length > 0 ? Object.fromEntries(kept) : void 0;
404
- }
405
- var SHOPPING_PRIORITIES = { low: 0, medium: 1, high: 2 };
406
- var shoppingArgs = {
407
- "merchant-id": {
408
- type: "string",
409
- description: "Shopping / retail Performance Max: the Merchant Center account whose products the campaign advertises. It must be linked to the account \u2014 `baker ads google merchant-center list` shows the linked ones."
410
- },
411
- "feed-label": {
412
- type: "string",
413
- description: 'Shopping / retail Performance Max: only products with this feed label (e.g. "ES").'
414
- },
415
- "shopping-priority": {
416
- type: "string",
417
- description: "Shopping only: low (default) | medium | high \u2014 which Shopping campaign wins when several advertise the same product."
418
- },
419
- "local-inventory": {
420
- type: "boolean",
421
- description: "Shopping only: also advertise products sold in nearby stores (local inventory ads)."
422
- }
423
- };
424
- function shoppingSettingFromFlags(args) {
425
- const priority = str(args, "shopping-priority");
426
- const campaignPriority = priority === void 0 ? void 0 : SHOPPING_PRIORITIES[priority.toLowerCase()];
427
- if (priority !== void 0 && campaignPriority === void 0) {
428
- failWriteValidation("--shopping-priority must be low, medium or high");
429
- }
430
- return defined({
431
- merchantId: str(args, "merchant-id"),
432
- feedLabel: str(args, "feed-label"),
433
- campaignPriority,
434
- enableLocal: bool(args, "local-inventory")
435
- });
436
- }
437
- var shoppingUpdateArgs = {
438
- "merchant-id": {
439
- type: "string",
440
- description: "Not changeable: a campaign keeps the Merchant Center account it was created with."
441
- },
442
- "feed-label": shoppingArgs["feed-label"],
443
- "clear-feed-label": {
444
- type: "boolean",
445
- description: "Shopping / retail Performance Max: advertise every feed of the Merchant Center again."
446
- },
447
- "shopping-priority": shoppingArgs["shopping-priority"],
448
- "local-inventory": {
449
- type: "boolean",
450
- description: "Shopping only: --local-inventory turns local inventory ads on, --local-inventory=false turns them off."
451
- }
452
- };
453
- function shoppingSettingUpdateFromFlags(args) {
454
- if (str(args, "merchant-id") !== void 0) {
455
- failWriteValidation(
456
- "A campaign keeps the Merchant Center account it was created with \u2014 Google does not move it. Create a new campaign on the other account instead."
457
- );
458
- }
459
- if (args["clear-feed-label"] === true && str(args, "feed-label") !== void 0) {
460
- failWriteValidation("--clear-feed-label removes the feed label \u2014 pass it OR --feed-label, not both");
461
- }
462
- const { merchantId: _fixed, ...rest } = shoppingSettingFromFlags(args) ?? {};
463
- return defined({ ...rest, ...args["clear-feed-label"] === true ? { feedLabel: "" } : {} });
464
- }
465
- var APP_STORES = { google: "GOOGLE_APP_STORE", apple: "APPLE_APP_STORE" };
466
- var APP_GOALS = {
467
- installs: "OPTIMIZE_INSTALLS_TARGET_INSTALL_COST",
468
- "installs-volume": "OPTIMIZE_INSTALLS_WITHOUT_TARGET_INSTALL_COST",
469
- "in-app": "OPTIMIZE_IN_APP_CONVERSIONS_TARGET_CONVERSION_COST",
470
- "in-app-install-cost": "OPTIMIZE_IN_APP_CONVERSIONS_TARGET_INSTALL_COST",
471
- value: "OPTIMIZE_RETURN_ON_ADVERTISING_SPEND"
472
- };
473
- var appArgs = {
474
- "app-id": {
475
- type: "string",
476
- description: "App campaigns (--channel-type MULTI_CHANNEL --sub-type APP_CAMPAIGN): the app's package name (Android, e.g. com.example.app) or numeric App Store id. Fixed once created."
477
- },
478
- "app-store": { type: "string", description: "App campaigns: google | apple" },
479
- "app-goal": {
480
- type: "string",
481
- description: "App campaigns: installs (TARGET_CPA = target cost per install) | installs-volume (MAXIMIZE_CONVERSIONS) | in-app (TARGET_CPA per in-app conversion) | in-app-install-cost (TARGET_CPA per install, optimizing in-app) | value (TARGET_ROAS). Each goal takes the one bidding strategy in brackets."
482
- },
483
- "app-conversions": {
484
- type: "string",
485
- description: "App campaigns with an in-app or value goal: comma-separated ids of the APP's conversion actions to optimize toward (required for those goals)."
486
- }
487
- };
488
- function appSettingsFromFlags(args) {
489
- const store = str(args, "app-store");
490
- const goal = str(args, "app-goal");
491
- const appStore = store === void 0 ? void 0 : APP_STORES[store.toLowerCase()] ?? store.toUpperCase();
492
- const biddingStrategyGoalType = goal === void 0 ? void 0 : APP_GOALS[goal.toLowerCase()] ?? goal.toUpperCase();
493
- const conversions = str(args, "app-conversions")?.split(",").map((id) => id.trim()).filter((id) => id.length > 0);
494
- const appCampaignSetting = defined({ appId: str(args, "app-id"), appStore, biddingStrategyGoalType });
495
- return {
496
- ...appCampaignSetting ? { appCampaignSetting } : {},
497
- ...conversions && conversions.length > 0 ? { selectiveOptimization: { conversionActions: conversions } } : {}
498
- };
499
- }
500
- var linkedAccountArgs = {
501
- "travel-account-id": {
502
- type: "string",
503
- description: "Travel campaigns (--channel-type TRAVEL): the travel account linked to this Google Ads account."
504
- },
505
- "hotel-center-id": {
506
- type: "string",
507
- description: "Hotel campaigns (--channel-type HOTEL): the Hotel Center account linked to this Google Ads account."
508
- }
509
- };
510
- function linkedAccountFromFlags(args) {
511
- const travel = str(args, "travel-account-id");
512
- const hotel = str(args, "hotel-center-id");
513
- return {
514
- ...travel ? { travelCampaignSettings: { travelAccountId: travel } } : {},
515
- ...hotel ? { hotelSetting: { hotelCenterId: hotel } } : {}
516
- };
517
- }
518
- function defaultAdStatus(format, status) {
519
- if (status !== void 0) {
520
- return status;
521
- }
522
- return format === "app" ? "ENABLED" : void 0;
523
- }
524
- var dynamicSearchAdsArgs = {
525
- "dsa-domain": {
526
- type: "string",
527
- description: "Search: the site dynamic ads are built from, as a bare domain (withbaker.com \u2014 no https://, no path)."
528
- },
529
- "dsa-language": {
530
- type: "string",
531
- description: `Search: the language of that site, Google's lowercase code ("en", "es"; "zh_CN" with a region).`
532
- },
533
- "dsa-supplied-urls-only": {
534
- type: "boolean",
535
- description: "Search: build dynamic ads only from the pages a page feed lists, not the whole site."
536
- }
537
- };
538
- function dynamicSearchAdsFromFlags(args) {
539
- return defined({
540
- domainName: str(args, "dsa-domain"),
541
- languageCode: str(args, "dsa-language"),
542
- useSuppliedUrlsOnly: bool(args, "dsa-supplied-urls-only")
543
- });
544
- }
545
- var frequencyCapArgs = {
546
- "frequency-cap": {
547
- type: "string",
548
- description: `Display (and existing Video): how often one person sees the ads \u2014 "<cap>/<day|week|month>[/<campaign|ad-group|ad>][/<impressions|video-views>]", e.g. --frequency-cap 3/day or --frequency-cap 10/week/ad-group. Repeat for several; the list REPLACES the campaign's caps.`
549
- },
550
- "clear-frequency-caps": { type: "boolean", description: "Remove every frequency cap from the campaign." }
551
- };
552
- var CAP_UNITS = { day: "DAY", week: "WEEK", month: "MONTH" };
553
- var CAP_LEVELS = { campaign: "CAMPAIGN", "ad-group": "AD_GROUP", ad: "AD_GROUP_AD" };
554
- var CAP_EVENTS = { impressions: "IMPRESSION", "video-views": "VIDEO_VIEW" };
555
- function parseCap(entry) {
556
- const [count, unit, level = "campaign", event = "impressions"] = entry.split("/").map((part) => part.trim().toLowerCase());
557
- const cap = Number(count);
558
- const timeUnit = CAP_UNITS[unit ?? ""];
559
- if (!Number.isInteger(cap) || cap < 1 || !timeUnit || !CAP_LEVELS[level] || !CAP_EVENTS[event]) {
560
- failWriteValidation(
561
- `--frequency-cap "${entry}" must be <cap>/<day|week|month>[/<campaign|ad-group|ad>][/<impressions|video-views>] (e.g. 3/day)`
562
- );
563
- }
564
- return { level: CAP_LEVELS[level], eventType: CAP_EVENTS[event], timeUnit, cap };
565
- }
566
- function frequencyCapsFromFlags(args, rawArgs) {
567
- const entries = repeatedValues(rawArgs, "frequency-cap", args["frequency-cap"]).filter((v) => v.length > 0);
568
- if (entries.length > 0 && args["clear-frequency-caps"] === true) {
569
- failWriteValidation("--clear-frequency-caps removes every cap \u2014 pass it OR --frequency-cap, not both");
570
- }
571
- if (entries.length === 0) {
572
- return args["clear-frequency-caps"] === true ? [] : void 0;
573
- }
574
- return entries.map(parseCap);
575
- }
576
- var assetAutomationArgs = {
577
- "generated-text": {
578
- type: "boolean",
579
- description: "Performance Max: --generated-text lets Google write text from the landing page and assets; --generated-text=false stops it (needs --url-expansion=false with it)."
580
- },
581
- "url-expansion": {
582
- type: "boolean",
583
- description: "Performance Max: --url-expansion=false keeps every click on the asset groups' final URLs; --url-expansion lets Google send traffic to the most relevant page of the site."
584
- },
585
- "video-enhancement": {
586
- type: "boolean",
587
- description: "Performance Max: Google makes enhanced versions of the campaign's YouTube videos (=false stops it)."
588
- },
589
- "image-enhancement": {
590
- type: "boolean",
591
- description: "Performance Max: Google enhances the campaign's images (=false stops it)."
592
- },
593
- "image-extraction": {
594
- type: "boolean",
595
- description: "Performance Max: Google takes images from the landing page (=false stops it)."
596
- },
597
- "image-design-versions": {
598
- type: "boolean",
599
- description: "Performance Max: Google makes new designs from the campaign's images (=false stops it)."
600
- }
601
- };
602
- function assetAutomationFromFlags(args) {
603
- return defined({
604
- textAssets: bool(args, "generated-text"),
605
- finalUrlExpansion: bool(args, "url-expansion"),
606
- videoEnhancement: bool(args, "video-enhancement"),
607
- imageEnhancement: bool(args, "image-enhancement"),
608
- imageExtraction: bool(args, "image-extraction"),
609
- imageDesignVersions: bool(args, "image-design-versions")
610
- });
611
- }
612
- var brandStyleArgs = {
613
- "main-color": {
614
- type: "string",
615
- description: "Performance Max brand guidelines: main color, #RRGGBB (with --accent-color)."
616
- },
617
- "accent-color": {
618
- type: "string",
619
- description: "Performance Max brand guidelines: accent color, #RRGGBB (with --main-color)."
620
- },
621
- font: {
622
- type: "string",
623
- description: `Performance Max brand guidelines: one of Google's fonts, e.g. "Roboto".`
624
- }
625
- };
626
- var brandGuidelinesCreateArgs = {
627
- "brand-guidelines": {
628
- type: "boolean",
629
- description: "Performance Max: create the campaign with brand guidelines on \u2014 link its business name and a square logo at campaign level in the same draft (assets attach --file with level campaign, fieldType BUSINESS_NAME and LOGO)."
630
- },
631
- ...brandStyleArgs
632
- };
633
- function brandGuidelinesFromFlags(args, mode) {
634
- const style = {
635
- mainColor: str(args, "main-color"),
636
- accentColor: str(args, "accent-color"),
637
- fontFamily: str(args, "font")
638
- };
639
- if (mode === "update") {
640
- return defined(style);
641
- }
642
- const enabled = bool(args, "brand-guidelines");
643
- const stated = defined(style);
644
- if (enabled === void 0 && !stated) {
645
- return void 0;
646
- }
647
- return { enabled: enabled ?? false, ...stated };
648
- }
649
- var list = (args, name) => str(args, name)?.split(",").map((value) => value.trim()).filter((value) => value.length > 0);
650
- var enableBrandGuidelinesArgs = {
651
- "auto-populate": {
652
- type: "boolean",
653
- description: "Let Google take the business name and logo from the campaign's asset groups (needs at least one asset group)."
654
- },
655
- "business-name-asset": {
656
- type: "string",
657
- description: "The business name text asset (id) to link to the campaign."
658
- },
659
- "logo-assets": { type: "string", description: "Comma-separated square logo image asset ids (1\u20135)." },
660
- "landscape-logo-assets": { type: "string", description: "Comma-separated landscape logo image asset ids." },
661
- "final-url-domain": { type: "string", description: "The site's domain, e.g. withbaker.com." },
662
- ...brandStyleArgs
663
- };
664
- function enableBrandGuidelinesFromFlags(args) {
665
- return defined({
666
- autoPopulateBrandAssets: bool(args, "auto-populate"),
667
- businessNameAsset: str(args, "business-name-asset"),
668
- logoAssets: list(args, "logo-assets"),
669
- landscapeLogoAssets: list(args, "landscape-logo-assets"),
670
- finalUriDomain: str(args, "final-url-domain"),
671
- mainColor: str(args, "main-color"),
672
- accentColor: str(args, "accent-color"),
673
- fontFamily: str(args, "font")
674
- }) ?? {};
675
- }
676
-
677
- // src/commands/ads/google/criteria-commands.ts
678
- import { defineCommand as defineCommand3 } from "citty";
679
- var CRITERION_FILE_HELP = 'The `criterion` object is one `criterionType` with its fields, e.g. {"criterionType":"placement","url":"example.com"}, {"criterionType":"ageRange","ageRange":"AGE_RANGE_18_24"}, {"criterionType":"topic","topicConstant":"5"} \u2014 every type with an example: __tooling__/docs/tools/baker/ads-google.md \xA7 Targeting and exclusions.';
680
- var CRITERION_HINTS = [
681
- "Run `baker ads google draft validate` once the targeting is staged: Google's dry run is the only thing that proves a criterion is accepted on this campaign before the user publishes."
682
- ];
683
- var campaignCriteriaCommand = defineCommand3({
684
- meta: {
685
- name: "campaign-criteria",
686
- description: "Stage what a campaign targets or excludes \u2014 locations, languages, ad schedule, devices, a radius, carriers, operating systems, and exclusions (placements, apps, YouTube, topics, demographics, content types, IP addresses, web pages, brand lists) \u2014 or change a criterion's bid adjustment"
687
- },
688
- subCommands: {
689
- add: fileCreateCommand(
690
- "add",
691
- "google.campaignCriterion.add",
692
- `Add a campaign criterion. Start here: --file '{"campaign":"23837707642","negative":true,"criterion":{"criterionType":"placement","url":"example.com"}}'. A bid adjustment rides on the criterion ("bidModifier": 1.2 on a location, schedule, device or radius). Audience lists, interests and custom segments go through \`audiences attach\`. ${CRITERION_FILE_HELP}`,
693
- CRITERION_HINTS
694
- ),
695
- update: defineCommand3({
696
- meta: {
697
- name: "update",
698
- description: "Change a criterion's bid adjustment \u2014 the only way to change a device setting the campaign already has, since Google never lets one be removed. Start here: `campaign-criteria update customers/<cid>/campaignCriteria/<campaignId>~<criterionId> --bid-modifier 1` resets a boost to neutral; --bid-modifier 0 stops ads serving on that device. Use `campaign-criteria add` instead when the campaign has no criterion for that device yet. Read the current ones with `baker ads google campaign-criteria list`."
699
- },
700
- args: {
701
- ...customerIdArg,
702
- id: {
703
- type: "positional",
704
- description: "Criterion resource name (customers/\u2026/campaignCriteria/{campaignId}~{criterionId})",
705
- required: false
706
- },
707
- "bid-modifier": {
708
- type: "string",
709
- description: "1 = no adjustment, 1.25 = bid 25% more, 0.9 = bid 10% less, 0 = don't serve on it (a device only; 0.1\u201310 elsewhere)"
710
- }
711
- },
712
- run: async ({ args }) => {
713
- const customerId = requireCustomerId(args);
714
- const target = requireTarget(args, "campaign criterion");
715
- await stageUpdate("google.campaignCriterion.update", customerId, target, {
716
- bidModifier: bidModifierFlag(args["bid-modifier"])
717
- });
718
- }
719
- }),
720
- remove: defineCommand3({
721
- meta: {
722
- name: "remove",
723
- description: "Stage a campaign criterion remove. Works for what you added \u2014 locations, languages, ad schedules, exclusions. A device setting CANNOT be removed once the campaign has one: use `campaign-criteria update --bid-modifier` to change or neutralise it instead."
724
- },
725
- args: {
726
- ...customerIdArg,
727
- id: { type: "positional", description: "Criterion resource name", required: false }
728
- },
729
- run: async ({ args }) => {
730
- const customerId = requireCustomerId(args);
731
- await stageTarget("google.campaignCriterion.remove", customerId, requireTarget(args, "campaign criterion"));
732
- }
733
- })
734
- }
735
- });
736
- function statusFlag(value) {
737
- if (value === void 0) {
738
- return void 0;
739
- }
740
- if (value !== "ENABLED" && value !== "PAUSED") {
741
- failWriteValidation("--status must be ENABLED or PAUSED");
742
- }
743
- return value;
744
- }
745
- var adGroupCriteriaCommand = defineCommand3({
746
- meta: {
747
- name: "ad-group-criteria",
748
- description: "Stage what an ad group targets or excludes \u2014 placements, apps, YouTube channels and videos, topics, demographics (age, gender, parental status, household income), web pages for Dynamic Search Ads, brand lists, and on Demand Gen its locations, languages and combined audience \u2014 or change one's bid adjustment, max CPC or status"
749
- },
750
- subCommands: {
751
- add: fileCreateCommand(
752
- "add",
753
- "google.adGroupCriterion.add",
754
- `Add an ad group criterion. Start here: --file '{"adGroup":"154000000001","criterion":{"criterionType":"placement","url":"example.com","bidModifier":1.2}}' \u2014 add "negative":true to exclude it instead, "status":"PAUSED" to add it paused, "cpcBidMicros" for a Display placement's own max CPC. On Demand Gen, locations and languages go here, not on the campaign. Audience lists, interests and custom segments go through \`audiences attach\`. ${CRITERION_FILE_HELP}`,
755
- CRITERION_HINTS
756
- ),
757
- update: defineCommand3({
758
- meta: {
759
- name: "update",
760
- description: "Change a live ad group criterion's bid adjustment, own max CPC or status. Start here: `ad-group-criteria update customers/<cid>/adGroupCriteria/<adGroupId>~<criterionId> --bid-modifier 1.3`. What it targets cannot change \u2014 remove it and add the replacement. Read them with `baker ads google ad-group-criteria list`."
761
- },
762
- args: {
763
- ...customerIdArg,
764
- id: {
765
- type: "positional",
766
- description: "Criterion resource name (customers/\u2026/adGroupCriteria/{adGroupId}~{criterionId})",
767
- required: false
768
- },
769
- "bid-modifier": { type: "string", description: "1 = no adjustment, 1.25 = bid 25% more, 0.9 = 10% less" },
770
- "max-cpc": { type: "string", description: "The criterion's own max CPC, in the account currency" },
771
- status: { type: "string", description: "ENABLED | PAUSED" }
772
- },
773
- run: async ({ args }) => {
774
- const customerId = requireCustomerId(args);
775
- const target = requireTarget(args, "ad group criterion");
776
- const payload = {
777
- ...args["bid-modifier"] !== void 0 ? { bidModifier: bidModifierFlag(args["bid-modifier"]) } : {},
778
- ...args["max-cpc"] !== void 0 ? { cpcBidMicros: microsFlag(args["max-cpc"], "--max-cpc") } : {},
779
- ...args.status !== void 0 ? { status: statusFlag(args.status) } : {}
780
- };
781
- if (Object.keys(payload).length === 0) {
782
- failWriteValidation("pass --bid-modifier, --max-cpc or --status");
783
- }
784
- await stageUpdate("google.adGroupCriterion.update", customerId, target, payload);
785
- }
786
- }),
787
- remove: defineCommand3({
788
- meta: { name: "remove", description: "Stage an ad group criterion remove (targeting or exclusion)." },
789
- args: {
790
- ...customerIdArg,
791
- id: {
792
- type: "positional",
793
- description: "Criterion resource name (customers/\u2026/adGroupCriteria/{adGroupId}~{criterionId})",
794
- required: false
795
- }
796
- },
797
- run: async ({ args }) => {
798
- const customerId = requireCustomerId(args);
799
- await stageTarget("google.adGroupCriterion.remove", customerId, requireTarget(args, "ad group criterion"));
800
- }
801
- })
802
- }
803
- });
804
- var DEVICES = ["MOBILE", "TABLET", "DESKTOP", "CONNECTED_TV"];
805
- var adGroupBidModifiersCommand = defineCommand3({
806
- meta: {
807
- name: "ad-group-bid-modifiers",
808
- description: "Stage an ad group's own device bid adjustment (bid more on mobile in this ad group only), change it, or remove it"
809
- },
810
- subCommands: {
811
- add: defineCommand3({
812
- meta: {
813
- name: "add",
814
- description: "Bid differently on one device in this ad group. Start here: `ad-group-bid-modifiers add --customer-id 1234567890 --ad-group 154000000001 --device MOBILE --bid-modifier 1.2`. 0 stops this ad group serving on that device. Search and Shopping take MOBILE, TABLET, DESKTOP; Display also CONNECTED_TV; Demand Gen takes none (set it on the campaign with `campaign-criteria add`)."
815
- },
816
- args: {
817
- ...customerIdArg,
818
- "ad-group": { type: "string", description: "Ad group id or a g_temp_* ref" },
819
- device: { type: "string", description: DEVICES.join(" | ") },
820
- "bid-modifier": { type: "string", description: "1.2 = bid 20% more, 0.8 = 20% less, 0 = don't serve on it" }
821
- },
822
- run: async ({ args }) => {
823
- const customerId = requireCustomerId(args);
824
- const device = requireStringFlag(args.device, "--device");
825
- if (!DEVICES.includes(device)) {
826
- failWriteValidation(`--device must be one of ${DEVICES.join(", ")}`);
827
- }
828
- await stageGoogleOp({
829
- kind: "google.adGroupBidModifier.add",
830
- customerId,
831
- payload: {
832
- adGroup: requireStringFlag(args["ad-group"], "--ad-group"),
833
- device,
834
- bidModifier: bidModifierFlag(args["bid-modifier"])
835
- }
836
- });
837
- }
838
- }),
839
- update: defineCommand3({
840
- meta: {
841
- name: "update",
842
- description: "Change an ad group device bid. Start here: `ad-group-bid-modifiers update customers/<cid>/adGroupBidModifiers/<adGroupId>~<criterionId> --bid-modifier 1`."
843
- },
844
- args: {
845
- ...customerIdArg,
846
- id: {
847
- type: "positional",
848
- description: "customers/\u2026/adGroupBidModifiers/{adGroupId}~{criterionId}",
849
- required: false
850
- },
851
- "bid-modifier": { type: "string", description: "1 = no adjustment, 0 = don't serve on it" }
852
- },
853
- run: async ({ args }) => {
854
- const customerId = requireCustomerId(args);
855
- await stageUpdate(
856
- "google.adGroupBidModifier.update",
857
- customerId,
858
- requireTarget(args, "ad group bid modifier"),
859
- { bidModifier: bidModifierFlag(args["bid-modifier"]) }
860
- );
861
- }
862
- }),
863
- remove: defineCommand3({
864
- meta: {
865
- name: "remove",
866
- description: "Stage an ad group device bid remove \u2014 the ad group bids like its campaign again."
867
- },
868
- args: {
869
- ...customerIdArg,
870
- id: {
871
- type: "positional",
872
- description: "customers/\u2026/adGroupBidModifiers/{adGroupId}~{criterionId}",
873
- required: false
874
- }
875
- },
876
- run: async ({ args }) => {
877
- const customerId = requireCustomerId(args);
878
- await stageTarget("google.adGroupBidModifier.remove", customerId, requireTarget(args, "ad group bid modifier"));
879
- }
880
- })
881
- }
882
- });
883
- function criteriaFromFlags(args, flags) {
884
- return flags.flatMap(({ flag, criterion }) => {
885
- const value = args[flag];
886
- return typeof value === "string" ? value.split(",").map((part) => part.trim()).filter((part) => part.length > 0).map(criterion) : [];
887
- });
888
- }
889
- var PLACEMENT_FLAGS = [
890
- { flag: "placement", criterion: (url) => ({ criterionType: "placement", url }) },
891
- { flag: "youtube-channel", criterion: (channelId) => ({ criterionType: "youtubeChannel", channelId }) },
892
- { flag: "youtube-video", criterion: (videoId) => ({ criterionType: "youtubeVideo", videoId }) },
893
- { flag: "app", criterion: (appId) => ({ criterionType: "mobileApp", appId }) }
894
- ];
895
- var ACCOUNT_EXCLUSION_FLAGS = [
896
- ...PLACEMENT_FLAGS,
897
- { flag: "content-label", criterion: (contentLabel) => ({ criterionType: "contentLabel", contentLabel }) },
898
- { flag: "ip", criterion: (ipAddress) => ({ criterionType: "ipBlock", ipAddress }) }
899
- ];
900
- var LIST_MEMBER_FLAGS = [
901
- ...PLACEMENT_FLAGS,
902
- { flag: "brand", criterion: (entityId) => ({ criterionType: "brand", entityId }) }
903
- ];
904
- function accountExclusionCriteria(args) {
905
- return criteriaFromFlags(args, ACCOUNT_EXCLUSION_FLAGS);
906
- }
907
- function listMemberCriteria(args) {
908
- return criteriaFromFlags(args, LIST_MEMBER_FLAGS);
909
- }
910
- var LIST_MEMBER_ARGS = {
911
- placement: { type: "string", description: "Sites for a NEGATIVE_PLACEMENTS list (example.com), comma-separated" },
912
- "youtube-channel": {
913
- type: "string",
914
- description: "YouTube channel ids for a NEGATIVE_PLACEMENTS list, comma-separated"
915
- },
916
- "youtube-video": { type: "string", description: "YouTube video ids for a NEGATIVE_PLACEMENTS list, comma-separated" },
917
- app: { type: "string", description: "App ids (1-<App Store id> / 2-<package>) for a NEGATIVE_PLACEMENTS list" },
918
- brand: {
919
- type: "string",
920
- description: "Brand entity ids (/g/\u2026) for a BRANDS list, comma-separated \u2014 find them with `baker ads google brands`"
921
- }
922
- };
923
- var accountExclusionsCommand = defineCommand3({
924
- meta: {
925
- name: "account-exclusions",
926
- description: "Stage exclusions for the WHOLE account \u2014 sites, apps, YouTube channels/videos, content types, IP addresses, an account-level negative keyword list \u2014 or remove one. They reach every campaign, Performance Max included (which takes no placement exclusion of its own)."
927
- },
928
- subCommands: {
929
- add: defineCommand3({
930
- meta: {
931
- name: "add",
932
- description: `Exclude across the whole account. Start here: \`account-exclusions add --customer-id 1234567890 --placement "example.com,spam-site.net" --content-label SEXUALLY_SUGGESTIVE\`. Flags take comma-separated values and stage one exclusion each; --file takes {"criterion": {...}} objects (an array for many) for app categories or an account-level negative keyword list ({"criterionType":"negativeKeywordList","sharedSet":"<ACCOUNT_LEVEL_NEGATIVE_KEYWORDS list>"}). Read what is already excluded with \`account-exclusions list\` first \u2014 they apply to every campaign. ${CRITERION_FILE_HELP}`
933
- },
934
- args: {
935
- ...customerIdArg,
936
- ...fileBatchArg,
937
- placement: { type: "string", description: "Sites to exclude (example.com), comma-separated" },
938
- "youtube-channel": { type: "string", description: "YouTube channel ids (UC\u2026), comma-separated" },
939
- "youtube-video": { type: "string", description: "YouTube video ids, comma-separated" },
940
- app: { type: "string", description: "App ids (1-<App Store id> / 2-<package>), comma-separated" },
941
- "content-label": {
942
- type: "string",
943
- description: "Content types: SEXUALLY_SUGGESTIVE, BELOW_THE_FOLD, PARKED_DOMAIN, JUVENILE, PROFANITY, TRAGEDY, VIDEO_RATING_DV_*, EMBEDDED_VIDEO, LIVE_STREAMING_VIDEO, SOCIAL_ISSUES, BRAND_SUITABILITY_* (comma-separated)"
944
- },
945
- ip: { type: "string", description: "IP addresses to exclude, comma-separated" }
946
- },
947
- run: async ({ args }) => {
948
- const customerId = requireCustomerId(args);
949
- const payloads = [
950
- ...args.file ? loadJsonPayloads(args.file) : [],
951
- ...accountExclusionCriteria(args).map((criterion) => ({ criterion }))
952
- ];
953
- if (payloads.length === 0) {
954
- failWriteValidation(
955
- "name what to exclude: --placement, --youtube-channel, --youtube-video, --app, --content-label, --ip or --file"
956
- );
957
- }
958
- await stageGoogleOps(
959
- payloads.map((payload) => ({ kind: "google.customerNegativeCriterion.add", customerId, payload })),
960
- ["Account exclusions reach every campaign in the account \u2014 say so when you report them."]
961
- );
962
- }
963
- }),
964
- remove: defineCommand3({
965
- meta: {
966
- name: "remove",
967
- description: "Stage removing an account exclusion. Start here: `account-exclusions remove customers/<cid>/customerNegativeCriteria/<criterionId>` (read it with `account-exclusions list`)."
968
- },
969
- args: {
970
- ...customerIdArg,
971
- id: { type: "positional", description: "customers/\u2026/customerNegativeCriteria/{criterionId}", required: false }
972
- },
973
- run: async ({ args }) => {
974
- const customerId = requireCustomerId(args);
975
- await stageTarget(
976
- "google.customerNegativeCriterion.remove",
977
- customerId,
978
- requireTarget(args, "account exclusion")
979
- );
980
- }
981
- })
982
- }
983
- });
984
- var ASSET_GROUP_SIGNAL_FLAGS = [
985
- { flag: "search-theme", criterion: (text) => ({ criterionType: "searchTheme", text }) },
986
- { flag: "audience", criterion: (audience) => ({ criterionType: "audience", audience }) }
987
- ];
988
- function assetGroupSignalPayloads(args) {
989
- const assetGroup = args["asset-group"];
990
- return criteriaFromFlags(args, ASSET_GROUP_SIGNAL_FLAGS).map((criterion) => ({ assetGroup, criterion }));
991
- }
992
- var assetGroupSignalsCommand = defineCommand3({
993
- meta: {
994
- name: "asset-group-signals",
995
- description: "Stage a Performance Max asset group's signals \u2014 its search themes and the one combined audience it is pointed at \u2014 or remove one. Signals steer who Google looks for; they narrow nothing."
996
- },
997
- subCommands: {
998
- add: defineCommand3({
999
- meta: {
1000
- name: "add",
1001
- description: 'Add signals to an asset group, live or staged in this chat. Start here: `asset-group-signals add --customer-id 1234567890 --asset-group <id or g_temp_ ref> --search-theme "fulfillment for online stores,shopify logistics"`. Up to 25 search themes per group (\u226480 characters each), phrased the way a buyer searches; skip themes the account\'s Search campaigns already bid on \u2014 Search wins that auction. `--audience <id>` points the group at an existing combined audience (`audiences/{id}`, one per group; Baker cannot build one, the user does in Google Ads). A theme with a comma in it goes through --file: {"assetGroup":"<ref>","criterion":{"criterionType":"searchTheme","text":"\u2026"}} (an array for many). Read what a group already has with `asset-group-signals list`.'
1002
- },
1003
- args: {
1004
- ...customerIdArg,
1005
- ...fileBatchArg,
1006
- "asset-group": { type: "string", description: "Asset group id, resource name, or g_temp_ ref from this chat" },
1007
- "search-theme": { type: "string", description: "Search themes, comma-separated (\u226480 characters each)" },
1008
- audience: {
1009
- type: "string",
1010
- description: "An existing combined audience: its id or customers/\u2026/audiences/{id}"
1011
- }
1012
- },
1013
- run: async ({ args }) => {
1014
- const customerId = requireCustomerId(args);
1015
- const fromFlags = assetGroupSignalPayloads(args);
1016
- if (fromFlags.length > 0 && typeof args["asset-group"] !== "string") {
1017
- failWriteValidation("--asset-group names the asset group the signals go on");
1018
- }
1019
- const payloads = [...args.file ? loadJsonPayloads(args.file) : [], ...fromFlags];
1020
- if (payloads.length === 0) {
1021
- failWriteValidation("name the signals: --search-theme, --audience or --file");
1022
- }
1023
- await stageGoogleOps(
1024
- payloads.map((payload) => ({ kind: "google.assetGroupSignal.add", customerId, payload })),
1025
- CRITERION_HINTS
1026
- );
1027
- }
1028
- }),
1029
- remove: defineCommand3({
1030
- meta: {
1031
- name: "remove",
1032
- description: "Stage removing an asset group signal. Start here: `asset-group-signals remove customers/<cid>/assetGroupSignals/<assetGroupId>~<criterionId>` (read it with `asset-group-signals list`). A signal cannot be edited: remove it and add the replacement."
1033
- },
1034
- args: {
1035
- ...customerIdArg,
1036
- id: {
1037
- type: "positional",
1038
- description: "customers/\u2026/assetGroupSignals/{assetGroupId}~{criterionId}",
1039
- required: false
1040
- }
1041
- },
1042
- run: async ({ args }) => {
1043
- const customerId = requireCustomerId(args);
1044
- await stageTarget("google.assetGroupSignal.remove", customerId, requireTarget(args, "asset group signal"));
1045
- }
1046
- })
1047
- }
1048
- });
1049
-
1050
- // src/commands/ads/google/keyword-list-members.ts
1051
- var MATCH_TYPES = /* @__PURE__ */ new Set(["EXACT", "PHRASE", "BROAD"]);
1052
- function parseTerm(raw) {
1053
- const colon = raw.lastIndexOf(":");
1054
- const suffix = colon > 0 ? raw.slice(colon + 1).trim().toUpperCase() : void 0;
1055
- return suffix && MATCH_TYPES.has(suffix) ? { text: raw.slice(0, colon).trim(), matchType: suffix } : { text: raw.trim() };
1056
- }
1057
- var normalized = (text) => text.trim().replace(/\s+/g, " ").toLowerCase();
1058
- function memberRemovals(rows, terms) {
1059
- const targets = [];
1060
- const missing = [];
1061
- for (const raw of terms) {
1062
- const term = parseTerm(raw);
1063
- const found = rows.filter(
1064
- (row) => normalized(String(row["shared_criterion.keyword.text"] ?? "")) === normalized(term.text) && (!term.matchType || row["shared_criterion.keyword.match_type"] === term.matchType)
1065
- );
1066
- if (found.length === 0) {
1067
- missing.push(raw);
1068
- }
1069
- for (const row of found) {
1070
- const name = String(row["shared_criterion.resource_name"] ?? "");
1071
- if (name && !targets.includes(name)) {
1072
- targets.push(name);
1073
- }
1074
- }
1075
- }
1076
- return { targets, missing };
1077
- }
1078
- function listIdOf(listRef) {
1079
- const id = listRef.split("/").pop() ?? "";
1080
- if (!/^\d+$/.test(id)) {
1081
- failWriteValidation(
1082
- `--list-ref must be the list's id or customers/{cid}/sharedSets/{id} \u2014 a list staged in this chat has no published members yet, so take a term out of it with \`draft remove\` on the member's add instead`
1083
- );
1084
- }
1085
- return id;
1086
- }
1087
- function memberTarget(customerId, listId, value) {
1088
- if (value.startsWith("customers/")) {
1089
- if (!value.includes("/sharedCriteria/")) {
1090
- failWriteValidation(
1091
- `${value} is not a keyword list member \u2014 members are customers/{cid}/sharedCriteria/{listId}~{criterionId}`
1092
- );
1093
- }
1094
- return value;
1095
- }
1096
- if (/^\d+~\d+$/.test(value)) {
1097
- return `customers/${customerId}/sharedCriteria/${value}`;
1098
- }
1099
- if (/^\d+$/.test(value)) {
1100
- return `customers/${customerId}/sharedCriteria/${listId}~${value}`;
1101
- }
1102
- failWriteValidation(
1103
- `"${value}" is not a member resource name, listId~criterionId or criterion id \u2014 pass terms with --text`
1104
- );
1105
- }
1106
- async function readListMembers(customerId, listId) {
1107
- const query = `SELECT shared_criterion.resource_name, shared_criterion.keyword.text, shared_criterion.keyword.match_type FROM shared_criterion WHERE shared_set.id = ${listId}`;
1108
- const managerId = getManagerIdForCustomer(customerId);
1109
- const rows = [];
1110
- let pageToken;
1111
- do {
1112
- const response = await apiPost("/api/ads/google/query", {
1113
- customerId,
1114
- query,
1115
- pageSize: 8192,
1116
- skipCache: true,
1117
- ...managerId ? { managerId } : {},
1118
- ...pageToken ? { pageToken } : {}
1119
- });
1120
- rows.push(...response.rows ?? []);
1121
- pageToken = response.pageToken;
1122
- } while (pageToken);
1123
- return rows;
1124
- }
1125
-
1126
- // src/commands/ads/google/write-commands.ts
1127
- var STAGED_WRITE = "Stages only \u2014 applies to the live account when the chat is published. Field contract: `baker capabilities google-ads`.";
1128
- var BUDGET_DEMAND_HINTS = [
1129
- "Check this daily budget against the search volume you measured for these keywords, not against the plan you had before you measured it. A budget many times larger than the traffic the target pool can absorb never spends, and reads to the client as a number nobody costed.",
1130
- "No volume measured yet? Pull it first \u2014 `baker ads google query --preset search-terms` for what the account already captures, `baker ads google keywords metrics` for the market estimate (those are planner figures, never account performance)."
1131
- ];
1132
- function budgetAmountsFromFlags(args) {
1133
- if (args.amount !== void 0 && args.total !== void 0) {
1134
- failWriteValidation(
1135
- "pass --amount OR --total: a budget is either daily or one total for the campaign's flight, never both"
1136
- );
1137
- }
1138
- const amountMicros = microsFlag(args.amount, "--amount");
1139
- const totalAmountMicros = microsFlag(args.total, "--total");
1140
- return {
1141
- ...amountMicros !== void 0 ? { amountMicros } : {},
1142
- ...totalAmountMicros !== void 0 ? { totalAmountMicros } : {}
1143
- };
1144
- }
1145
- var totalArg = {
1146
- total: {
1147
- type: "string",
1148
- description: "A TOTAL budget instead of a daily one: one amount in major units spent across the campaign's start and end dates (e.g. 300). Search, Performance Max and Demand Gen only; the campaign needs --end-date; never shared. A budget stays daily or total for life."
1149
- }
1150
- };
1151
- var BUDGET_REMOVE_HINTS = [
1152
- "A budget can be removed only once no campaign uses it: staging refuses it while one does, unless this draft removes those campaigns or moves them to another budget (publish sends the campaign changes first)."
1153
- ];
1154
- var budgetsCommand = defineCommand4({
1155
- meta: { name: "budgets", description: "Stage campaign budget create/update/remove" },
1156
- subCommands: {
1157
- // Fires where the budget is actually set, rather than on whatever the chat happened to stage
1158
- // first. A budget several times what the target pool can absorb never spends, and reads to the
1159
- // client as a plan nobody costed.
1160
- create: defineCommand4({
1161
- meta: {
1162
- name: "create",
1163
- description: `Stage a daily campaign budget; campaigns reference it by the g_temp_* ref it returns (--budget-ref). ${STAGED_WRITE}`
1164
- },
1165
- args: {
1166
- ...customerIdArg,
1167
- ...fileArg,
1168
- name: { type: "string", description: 'Budget name as shown in Google Ads (e.g. "Brand search \u2014 daily")' },
1169
- amount: { type: "string", description: "Daily amount in major currency units (e.g. 50)" },
1170
- ...totalArg,
1171
- delivery: {
1172
- type: "string",
1173
- description: "STANDARD \u2014 the only delivery Google still runs (ACCELERATED is refused: Google will not attach it to a campaign)"
1174
- },
1175
- shared: { type: "boolean", description: "Explicitly shared budget" }
1176
- },
1177
- run: async ({ args }) => {
1178
- const customerId = requireCustomerId(args);
1179
- const payload = mergePayload(loadJsonFileArg(args.file), {
1180
- name: args.name,
1181
- ...budgetAmountsFromFlags(args),
1182
- deliveryMethod: args.delivery,
1183
- explicitlyShared: args.shared || void 0
1184
- });
1185
- await stageCreate("google.budget.create", customerId, payload, BUDGET_DEMAND_HINTS);
1186
- }
1187
- }),
1188
- update: defineCommand4({
1189
- meta: {
1190
- name: "update",
1191
- description: `Stage a change to an existing budget's name, daily amount or delivery. ${STAGED_WRITE}`
1192
- },
1193
- args: {
1194
- ...customerIdArg,
1195
- ...fileArg,
1196
- name: { type: "string", description: "New budget name as shown in Google Ads" },
1197
- amount: { type: "string", description: "New daily amount in major currency units" },
1198
- total: { type: "string", description: "A total budget's new total, in major units (total budgets only)" },
1199
- delivery: {
1200
- type: "string",
1201
- description: "STANDARD (ACCELERATED is refused \u2014 Google will not attach it to a campaign)"
1202
- }
1203
- },
1204
- run: async ({ args }) => {
1205
- const customerId = requireCustomerId(args);
1206
- const target = requireTarget(args, "budget");
1207
- const payload = mergePayload(loadJsonFileArg(args.file), {
1208
- name: args.name,
1209
- ...budgetAmountsFromFlags(args),
1210
- deliveryMethod: args.delivery
1211
- });
1212
- await stageUpdate("google.budget.update", customerId, target, payload, BUDGET_DEMAND_HINTS);
1213
- }
1214
- }),
1215
- remove: statusCommand("google.budget.remove", "budget", BUDGET_REMOVE_HINTS)
1216
- }
1217
- });
1218
- var MAX_CPC_STRATEGIES = ["TARGET_IMPRESSION_SHARE", "TARGET_SPEND", "PERCENT_CPC"];
1219
- var STRATEGY_SETTING_FLAGS = ["target-cpa", "target-roas", "impression-share", "impression-share-location"];
1220
- function biddingFromFlags(args) {
1221
- const type = args["bidding-strategy"];
1222
- const maxCpcMicros = microsFlag(args["max-cpc"], "--max-cpc");
1223
- if (!type) {
1224
- if (maxCpcMicros !== void 0) {
1225
- failWriteValidation(
1226
- "--max-cpc needs --bidding-strategy too (the ceiling belongs to a strategy) \u2014 e.g. --bidding-strategy TARGET_IMPRESSION_SHARE --max-cpc 12"
1227
- );
1228
- }
1229
- if (args["target-cpc"] !== void 0) {
1230
- failWriteValidation(
1231
- "--target-cpc needs --bidding-strategy too (the target belongs to a strategy) \u2014 use --bidding-strategy TARGET_CPC --target-cpc 1.5"
1232
- );
1233
- }
1234
- const orphan = STRATEGY_SETTING_FLAGS.find((flag) => args[flag] !== void 0);
1235
- if (orphan) {
1236
- failWriteValidation(
1237
- `--${orphan} needs --bidding-strategy too (it belongs to a strategy) \u2014 e.g. --bidding-strategy TARGET_IMPRESSION_SHARE --impression-share 70, or TARGET_CPA --target-cpa 35`
1238
- );
1239
- }
1240
- return void 0;
1241
- }
1242
- if (maxCpcMicros !== void 0 && !MAX_CPC_STRATEGIES.includes(type.toUpperCase())) {
1243
- failWriteValidation(`${type} does not take --max-cpc \u2014 only ${MAX_CPC_STRATEGIES.join(", ")} carry a bid ceiling`);
1244
- }
1245
- const targetCpcMicros = microsFlag(args["target-cpc"], "--target-cpc");
1246
- if (targetCpcMicros !== void 0 && type.toUpperCase() !== "TARGET_CPC") {
1247
- failWriteValidation(
1248
- `${type} does not take --target-cpc \u2014 pair it with --bidding-strategy TARGET_CPC (Demand Gen campaigns only)`
1249
- );
1250
- }
1251
- return {
1252
- type,
1253
- targetCpaMicros: microsFlag(args["target-cpa"], "--target-cpa"),
1254
- targetRoas: args["target-roas"] !== void 0 ? Number(args["target-roas"]) : void 0,
1255
- targetCpcMicros,
1256
- cpcBidCeilingMicros: maxCpcMicros,
1257
- ...impressionShareGoalFromFlags(args, type)
1258
- };
1259
- }
1260
- function impressionShareGoalFromFlags(args, type) {
1261
- const share = args["impression-share"];
1262
- const location = args["impression-share-location"];
1263
- if (share === void 0 && location === void 0) {
1264
- return {};
1265
- }
1266
- if (type.toUpperCase() !== "TARGET_IMPRESSION_SHARE") {
1267
- failWriteValidation(
1268
- `${type} does not take --impression-share / --impression-share-location \u2014 they set the goal of --bidding-strategy TARGET_IMPRESSION_SHARE`
1269
- );
1270
- }
1271
- const percent = share === void 0 ? void 0 : Number(share);
1272
- if (percent !== void 0 && !(percent > 0 && percent <= 100)) {
1273
- failWriteValidation(`--impression-share is a percentage between 0 and 100 (e.g. 70), got ${String(share)}`);
1274
- }
1275
- return {
1276
- ...typeof location === "string" ? { location: location.toUpperCase() } : {},
1277
- ...percent !== void 0 ? { locationFractionMicros: Math.round(percent * 1e4) } : {}
1278
- };
1279
- }
1280
- var maxCpcArg = {
1281
- "max-cpc": {
1282
- type: "string",
1283
- description: "Max CPC bid ceiling (major units) for TARGET_IMPRESSION_SHARE, TARGET_SPEND or PERCENT_CPC"
1284
- },
1285
- "impression-share": {
1286
- type: "string",
1287
- description: "TARGET_IMPRESSION_SHARE goal: the share of auctions to show in, as a percentage (e.g. 70). A new Target impression share needs this, --impression-share-location and --max-cpc."
1288
- },
1289
- "impression-share-location": {
1290
- type: "string",
1291
- description: "TARGET_IMPRESSION_SHARE goal: ANYWHERE_ON_PAGE | TOP_OF_PAGE | ABSOLUTE_TOP_OF_PAGE"
1292
- }
1293
- };
1294
- var portfolioRefArg = {
1295
- "portfolio-ref": {
1296
- type: "string",
1297
- description: "Put the campaign on a portfolio bid strategy (g_temp_* from `bidding-strategies create`, id, or resource name) instead of its own bidding. Which campaign types join which portfolios is fixed by Google \u2014 staging refuses the rest. To take a campaign OFF its portfolio, stage its own --bidding-strategy: staging clears the portfolio with it and says so."
1298
- }
1299
- };
1300
- var finalUrlSuffixArg = {
1301
- "final-url-suffix": {
1302
- type: "string",
1303
- description: 'Final URL suffix for this campaign \u2014 bare query params, no leading "?" (e.g. "utm_source=google&utm_agency=baker"). REPLACES the account-level suffix for this campaign; pass "" to clear it back to the account value. Account-wide tagging belongs at the account level: --level account stages it there.'
1304
- }
1305
- };
1306
- var urlOptionsArgs = {
1307
- "tracking-template": {
1308
- type: "string",
1309
- description: 'Campaign tracking template \u2014 the click-measurement URL every ad routes through. Must carry the landing page through {lpurl}, e.g. "https://tracker.example/?url={lpurl}". REPLACES the account-level template for this campaign; pass "" to clear it back to the account value.'
1310
- },
1311
- "custom-param": {
1312
- type: "string",
1313
- description: "Custom parameter as key=value, referenced in a template or final URL as {_key} (e.g. --custom-param season=summer). Repeat for several; Google allows 8. REPLACES the campaign's whole set."
1314
- },
1315
- "clear-custom-params": {
1316
- type: "boolean",
1317
- description: "Remove every custom parameter from this campaign (Google replaces the set wholesale)."
1318
- }
1319
- };
1320
- function urlCustomParametersFromFlags(args, rawArgs) {
1321
- const entries = repeatedValues(rawArgs, "custom-param", args["custom-param"]).filter((v) => v.length > 0);
1322
- if (entries.length === 0) {
1323
- return args["clear-custom-params"] === true ? [] : void 0;
1324
- }
1325
- if (args["clear-custom-params"] === true) {
1326
- failWriteValidation("--clear-custom-params removes every parameter \u2014 pass it OR --custom-param, not both");
1327
- }
1328
- return entries.map((entry) => {
1329
- const split = entry.indexOf("=");
1330
- if (split <= 0) {
1331
- failWriteValidation(`--custom-param "${entry}" must be key=value (e.g. --custom-param season=summer)`);
1332
- }
1333
- return { key: entry.slice(0, split), value: entry.slice(split + 1) };
1334
- });
1335
- }
1336
- var aiMaxArgs = {
1337
- "ai-max": {
1338
- type: "boolean",
1339
- description: "AI Max for Search: --ai-max turns it on (Google then matches searches beyond your keywords), --ai-max=false turns it off along with its text customization and URL expansion. Search campaigns only."
1340
- },
1341
- "ai-max-text": {
1342
- type: "boolean",
1343
- description: "AI Max text customization: --ai-max-text lets Google write ad text from your landing page and ads (needs AI Max on); --ai-max-text=false stops it. Required before text guidelines."
1344
- },
1345
- "ai-max-url-expansion": {
1346
- type: "boolean",
1347
- description: "AI Max final URL expansion: --ai-max-url-expansion lets Google send clicks to the most relevant page of your site (needs text customization on); --ai-max-url-expansion=false keeps every click on your final URLs."
1348
- }
1349
- };
1350
- function aiMaxFromFlags(args) {
1351
- const flag = (name) => typeof args[name] === "boolean" ? args[name] : void 0;
1352
- const aiMax = {
1353
- enabled: flag("ai-max"),
1354
- textCustomization: flag("ai-max-text"),
1355
- finalUrlExpansion: flag("ai-max-url-expansion")
1356
- };
1357
- const stated = Object.entries(aiMax).filter(([, v]) => v !== void 0);
1358
- return stated.length > 0 ? Object.fromEntries(stated) : void 0;
1359
- }
1360
- var textGuidelinesArgs = {
1361
- "term-exclusion": {
1362
- type: "string",
1363
- description: `Text guidelines (AI Max Search and Performance Max): a word or phrase Google's generated ad text must never use, up to 30 characters (e.g. --term-exclusion "cheap"). Repeat for several; Google allows 25. REPLACES the campaign's whole list.`
1364
- },
1365
- "messaging-restriction": {
1366
- type: "string",
1367
- description: `Text guidelines (AI Max Search and Performance Max): a plain-language rule for Google's generated ad text, up to 300 characters (e.g. --messaging-restriction "Never promise a delivery date"). Repeat for several; Google allows 40. REPLACES the campaign's whole list.`
1368
- },
1369
- "clear-term-exclusions": {
1370
- type: "boolean",
1371
- description: "Remove every term exclusion from this campaign's text guidelines."
1372
- },
1373
- "clear-messaging-restrictions": {
1374
- type: "boolean",
1375
- description: "Remove every messaging restriction from this campaign's text guidelines."
1376
- }
1377
- };
1378
- function guidelineListFromFlags(args, rawArgs, flag, clearFlag) {
1379
- const values = repeatedValues(rawArgs, flag, args[flag]).filter((v) => v.length > 0);
1380
- if (values.length === 0) {
1381
- return args[clearFlag] === true ? [] : void 0;
1382
- }
1383
- if (args[clearFlag] === true) {
1384
- failWriteValidation(`--${clearFlag} removes the whole list \u2014 pass it OR --${flag}, not both`);
1385
- }
1386
- return values;
1387
- }
1388
- function textGuidelinesFromFlags(args, rawArgs) {
1389
- const termExclusions = guidelineListFromFlags(args, rawArgs, "term-exclusion", "clear-term-exclusions");
1390
- const messagingRestrictions = guidelineListFromFlags(
1391
- args,
1392
- rawArgs,
1393
- "messaging-restriction",
1394
- "clear-messaging-restrictions"
1395
- );
1396
- if (termExclusions === void 0 && messagingRestrictions === void 0) {
1397
- return void 0;
1398
- }
1399
- return {
1400
- ...termExclusions !== void 0 ? { termExclusions } : {},
1401
- ...messagingRestrictions !== void 0 ? { messagingRestrictions } : {}
1402
- };
1403
- }
1404
- var geoTargetTypeArgs = {
1405
- "geo-target-type": {
1406
- type: "string",
1407
- description: 'Location option \u2014 PRESENCE (only people in your targeted locations) or PRESENCE_OR_INTEREST (also people interested in them). Google applies PRESENCE_OR_INTEREST when this is left out, so pass PRESENCE explicitly for local-service, delivery-radius or in-store campaigns. Sets the same "Location options" as the Google Ads UI.'
1408
- },
1409
- "negative-geo-target-type": {
1410
- type: "string",
1411
- description: "How EXCLUDED locations are matched \u2014 PRESENCE (default: excludes people in the location) or PRESENCE_OR_INTEREST (also excludes people interested in it)."
1412
- }
1413
- };
1414
- function enumFlag(value, flag, allowed) {
1415
- if (typeof value !== "string" || value.length === 0) {
1416
- return void 0;
1417
- }
1418
- const upper = value.toUpperCase();
1419
- if (!allowed.includes(upper)) {
1420
- failWriteValidation(`${flag} must be one of ${allowed.join(" | ")}`);
1421
- }
1422
- return upper;
1423
- }
1424
- function geoTargetTypeFromFlags(args) {
1425
- const positiveGeoTargetType = enumFlag(args["geo-target-type"], "--geo-target-type", POSITIVE_GEO_TARGET_TYPES);
1426
- const negativeGeoTargetType = enumFlag(
1427
- args["negative-geo-target-type"],
1428
- "--negative-geo-target-type",
1429
- NEGATIVE_GEO_TARGET_TYPES
1430
- );
1431
- if (positiveGeoTargetType === void 0 && negativeGeoTargetType === void 0) {
1432
- return void 0;
1433
- }
1434
- return Object.fromEntries(
1435
- Object.entries({ positiveGeoTargetType, negativeGeoTargetType }).filter(([, v]) => v !== void 0)
1436
- );
1437
- }
1438
- var NETWORK_SETTING_KEYS = [
1439
- "targetGoogleSearch",
1440
- "targetSearchNetwork",
1441
- "targetContentNetwork",
1442
- "targetPartnerSearchNetwork"
1443
- ];
1444
- var NETWORK_FLAG_VALUES = {
1445
- search: "targetGoogleSearch",
1446
- "search-partners": "targetSearchNetwork",
1447
- partners: "targetSearchNetwork",
1448
- display: "targetContentNetwork",
1449
- "partner-search": "targetPartnerSearchNetwork"
1450
- };
1451
- var networksArg = {
1452
- networks: {
1453
- type: "string",
1454
- description: `Networks to serve on, comma-separated: search | search-partners | display | partner-search. Every network you do not list is turned OFF, so state the whole set. Start here: --networks search \u2014 a new Search campaign left unset publishes on Google Search only, because Google's own default adds Search partners and the Display network, which spends the same budget on surfaces the advertiser did not pick. Sets the same "Networks" as the Google Ads UI.`
1455
- }
1456
- };
1457
- function networkSettingsFromFlags(args) {
1458
- const raw = args.networks;
1459
- if (typeof raw !== "string") {
1460
- return void 0;
1461
- }
1462
- const names = raw.split(",").map((n) => n.trim().toLowerCase()).filter((n) => n.length > 0);
1463
- const allowed = Object.keys(NETWORK_FLAG_VALUES).join(" | ");
1464
- if (names.length === 0) {
1465
- failWriteValidation(`--networks needs at least one of ${allowed}`);
1466
- }
1467
- const settings = Object.fromEntries(NETWORK_SETTING_KEYS.map((k) => [k, false]));
1468
- for (const name of names) {
1469
- const key = NETWORK_FLAG_VALUES[name];
1470
- if (!key) {
1471
- failWriteValidation(`--networks must list only ${allowed}`);
1472
- }
1473
- settings[key] = true;
1474
- }
1475
- return settings;
1476
- }
1477
- function networksHints(payload) {
1478
- if (payload.networkSettings !== void 0) {
1479
- return [];
1480
- }
1481
- if (payload.channelType !== "SEARCH") {
1482
- return [];
1483
- }
1484
- return [
1485
- "No --networks set, so this campaign publishes on Google Search only \u2014 Search partners and the Display network are off. Re-stage with --networks search,search-partners (or add display) to widen it, and tell the user which networks this campaign serves on."
1486
- ];
1487
- }
1488
- function geoTargetTypeHints(payload) {
1489
- if (payload.geoTargetTypeSetting !== void 0) {
1490
- return [];
1491
- }
1492
- return [
1493
- `No --geo-target-type set, so this campaign will use Google's default location option "Presence or interest" \u2014 it reaches people interested in your locations, not only people in them. Re-stage with --geo-target-type PRESENCE if the offer is local (in-store, delivery radius, service area), and tell the user which of the two this campaign uses.`
1494
- ];
1495
- }
1496
- var accountSettingsArgs = {
1497
- "auto-tagging": {
1498
- type: "boolean",
1499
- description: "Auto-tagging: --auto-tagging adds Google's click id (gclid) to every landing page; --auto-tagging=false stops it, and conversion tracking, offline conversion uploads and the Google Analytics link lose the click they match on."
1500
- },
1501
- "tracking-template": {
1502
- type: "string",
1503
- description: 'Account tracking template \u2014 the click-measurement URL every ad routes through unless a campaign, ad group or ad sets its own. Must carry the landing page through {lpurl}, e.g. "{lpurl}?src=google". Pass "" to clear it.'
1504
- },
1505
- "final-url-suffix": {
1506
- type: "string",
1507
- description: 'Account final URL suffix \u2014 bare query params appended to every landing page, no leading "?" (e.g. "utm_source=google&utm_agency=baker"). A campaign, ad group or ad suffix REPLACES it there. Pass "" to clear it.'
1508
- },
1509
- "call-reporting": {
1510
- type: "boolean",
1511
- description: "Call reporting: --call-reporting counts and reports calls from call assets; --call-reporting=false stops it."
1512
- },
1513
- "call-conversions": {
1514
- type: "boolean",
1515
- description: "Whether calls from ads count as conversions: --call-conversions / --call-conversions=false. Needs call reporting on."
1516
- },
1517
- "video-inventory": {
1518
- type: "string",
1519
- description: "Video inventory (brand safety) for YouTube and video placements: EXPANDED | STANDARD | LIMITED \u2014 limited shows ads beside the narrowest, safest range of content."
1520
- }
1521
- };
1522
- var VIDEO_INVENTORY_LEVELS = ["EXPANDED", "STANDARD", "LIMITED"];
1523
- function accountSettingsFromFlags(args) {
1524
- const flag = (name) => typeof args[name] === "boolean" ? args[name] : void 0;
1525
- const text = (name) => typeof args[name] === "string" ? args[name] : void 0;
1526
- const inventory = text("video-inventory")?.toUpperCase().replace(/_INVENTORY$/, "");
1527
- if (inventory !== void 0 && !VIDEO_INVENTORY_LEVELS.includes(inventory)) {
1528
- failWriteValidation(`--video-inventory must be ${VIDEO_INVENTORY_LEVELS.join(" | ")}`);
1529
- }
1530
- const payload = {
1531
- autoTaggingEnabled: flag("auto-tagging"),
1532
- trackingUrlTemplate: text("tracking-template"),
1533
- finalUrlSuffix: text("final-url-suffix"),
1534
- callReportingEnabled: flag("call-reporting"),
1535
- callConversionReportingEnabled: flag("call-conversions"),
1536
- videoBrandSafety: inventory === void 0 ? void 0 : `${inventory}_INVENTORY`
1537
- };
1538
- return Object.fromEntries(Object.entries(payload).filter(([, value]) => value !== void 0));
1539
- }
1540
- var ACCOUNT_LEVEL_URL_FLAGS = {
1541
- "final-url-suffix": "finalUrlSuffix",
1542
- "tracking-template": "trackingUrlTemplate"
1543
- };
1544
- function accountLevelUrlOptions(args) {
1545
- const kebab = (key) => key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
1546
- const ignored = /* @__PURE__ */ new Set(["level", "customer-id", "_", "id", ...Object.keys(ACCOUNT_LEVEL_URL_FLAGS)]);
1547
- const other = [
1548
- ...new Set(
1549
- Object.entries(args).filter(([key, value]) => !ignored.has(kebab(key)) && value !== void 0 && value !== false).map(([key]) => kebab(key))
1550
- )
1551
- ];
1552
- if (other.length > 0) {
1553
- failWriteValidation(
1554
- `--level account stages the account's final URL suffix and tracking template only \u2014 ${other.map((key) => `--${key}`).join(", ")} ${other.length === 1 ? "is a campaign setting" : "are campaign settings"}. Stage the account change alone, and the rest with \`baker ads google campaigns update <campaign-id>\` (or other account settings with \`baker ads google account update\`).`
1555
- );
1556
- }
1557
- const payload = Object.fromEntries(
1558
- Object.entries(ACCOUNT_LEVEL_URL_FLAGS).flatMap(
1559
- ([flag, key]) => typeof args[flag] === "string" ? [[key, args[flag]]] : []
1560
- )
1561
- );
1562
- if (Object.keys(payload).length === 0) {
1563
- failWriteValidation('--level account needs --final-url-suffix or --tracking-template (pass "" to clear one)');
1564
- }
1565
- return payload;
1566
- }
1567
- function accountUrlOptionHints(customerId) {
1568
- return [
1569
- `A campaign, ad group or ad that sets its own suffix or template REPLACES the account one there \u2014 run \`baker ads google url-options --customer-id ${customerId}\` and tell the user which ones will not pick this up.`
1570
- ];
1571
- }
1572
- var accountCommand = defineCommand4({
1573
- meta: {
1574
- name: "account",
1575
- description: "Stage the account's own settings \u2014 auto-tagging, account tracking template and final URL suffix, call reporting, video inventory (brand safety). Start here for an account-wide UTM or agency tag."
1576
- },
1577
- subCommands: {
1578
- update: defineCommand4({
1579
- meta: {
1580
- name: "update",
1581
- description: `Stage a change to the account's settings (Google Ads \u2192 Admin \u2192 Account settings). One op per account; restaging amends it. ${STAGED_WRITE}
1582
-
1583
- Examples:
1584
- baker ads google account update --customer-id 1234567890 --final-url-suffix "utm_source=google&utm_agency=baker"
1585
- baker ads google account update --customer-id 1234567890 --auto-tagging
1586
- baker ads google account update --customer-id 1234567890 --call-reporting --call-conversions
1587
- baker ads google account update --customer-id 1234567890 --video-inventory LIMITED
1588
- baker ads google account update --customer-id 1234567890 --final-url-suffix "" \u2014 clear it`
1589
- },
1590
- args: { ...customerIdArg, ...fileArg, ...accountSettingsArgs },
1591
- run: async ({ args }) => {
1592
- const customerId = requireCustomerId(args);
1593
- const payload = mergePayload(loadJsonFileArg(args.file), accountSettingsFromFlags(args));
1594
- const urlHints = payload.finalUrlSuffix !== void 0 || payload.trackingUrlTemplate !== void 0 ? accountUrlOptionHints(customerId) : [];
1595
- await stageUpdate("google.customer.update", customerId, customerId, payload, urlHints);
1596
- }
1597
- })
1598
- }
1599
- });
1600
- var campaignsCommand = defineCommand4({
1601
- meta: { name: "campaigns", description: "Stage campaign create/update/pause/resume/remove" },
1602
- subCommands: {
1603
- create: defineCommand4({
1604
- meta: {
1605
- name: "create",
1606
- description: `Stage a new campaign on a budget (--budget-ref); it is created paused unless --status ENABLED. ${STAGED_WRITE}`
1607
- },
1608
- args: {
1609
- ...customerIdArg,
1610
- ...fileArg,
1611
- name: { type: "string", description: 'Campaign name, unique in the account (e.g. "Search \u2014 Brand \u2014 ES")' },
1612
- "channel-type": {
1613
- type: "string",
1614
- description: "SEARCH | DISPLAY | PERFORMANCE_MAX | DEMAND_GEN | SHOPPING (--merchant-id) | MULTI_CHANNEL = App (--sub-type APP_CAMPAIGN --app-id --app-store --app-goal) | TRAVEL (--travel-account-id) | HOTEL (--hotel-center-id). Video, Smart and Local campaigns are refused with the reason and the route (video on YouTube \u2192 DEMAND_GEN)."
1615
- },
1616
- "sub-type": {
1617
- type: "string",
1618
- description: "Leave out for a standard campaign. APP_CAMPAIGN (installs) or APP_CAMPAIGN_FOR_ENGAGEMENT on an App campaign (required); DISPLAY_MOBILE_APP on Display. Travel's own sub-type is sent for you."
1619
- },
1620
- "budget-ref": { type: "string", description: "Budget ref (g_temp_*, id, or resource name)" },
1621
- ...portfolioRefArg,
1622
- "bidding-strategy": {
1623
- type: "string",
1624
- description: "MANUAL_CPC | MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | TARGET_IMPRESSION_SHARE | TARGET_CPA | TARGET_ROAS | TARGET_CPC | MANUAL_CPM. Each campaign type takes only some \u2014 staging refuses the rest and names the ones that work."
1625
- },
1626
- "target-cpa": {
1627
- type: "string",
1628
- 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."
1629
- },
1630
- "target-roas": {
1631
- type: "string",
1632
- 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."
1633
- },
1634
- "target-cpc": {
1635
- type: "string",
1636
- description: "Target CPC (major units) for Demand Gen \u2014 pair it with --bidding-strategy TARGET_CPC. Demand Gen only; other channels have no target CPC."
1637
- },
1638
- ...maxCpcArg,
1639
- ...finalUrlSuffixArg,
1640
- ...urlOptionsArgs,
1641
- ...geoTargetTypeArgs,
1642
- ...networksArg,
1643
- ...aiMaxArgs,
1644
- ...shoppingArgs,
1645
- ...appArgs,
1646
- ...linkedAccountArgs,
1647
- ...dynamicSearchAdsArgs,
1648
- ...frequencyCapArgs,
1649
- ...textGuidelinesArgs,
1650
- ...assetAutomationArgs,
1651
- ...brandGuidelinesCreateArgs,
1652
- objective: { type: "string", description: "Advisory UI objective (SALES, LEADS, \u2026)" },
1653
- "start-date": { type: "string", description: "YYYY-MM-DD" },
1654
- "end-date": { type: "string", description: "YYYY-MM-DD" },
1655
- "eu-political-ads": {
1656
- type: "boolean",
1657
- description: "Pass when the campaign contains EU political advertising. Google requires the declaration on every new campaign; omitted stages the campaign as not containing EU political ads."
1658
- },
1659
- status: { type: "string", description: "ENABLED | PAUSED (default PAUSED)" }
1660
- },
1661
- run: async ({ args, rawArgs }) => {
1662
- const customerId = requireCustomerId(args);
1663
- const payload = mergePayload(loadJsonFileArg(args.file), {
1664
- name: args.name,
1665
- channelType: args["channel-type"],
1666
- channelSubType: args["sub-type"],
1667
- budget: args["budget-ref"],
1668
- bidding: biddingFromFlags(args),
1669
- biddingStrategy: args["portfolio-ref"],
1670
- geoTargetTypeSetting: geoTargetTypeFromFlags(args),
1671
- networkSettings: networkSettingsFromFlags(args),
1672
- finalUrlSuffix: args["final-url-suffix"],
1673
- trackingUrlTemplate: args["tracking-template"],
1674
- urlCustomParameters: urlCustomParametersFromFlags(args, rawArgs),
1675
- objective: args.objective,
1676
- startDate: args["start-date"],
1677
- endDate: args["end-date"],
1678
- euPoliticalAds: args["eu-political-ads"],
1679
- aiMax: aiMaxFromFlags(args),
1680
- shoppingSetting: shoppingSettingFromFlags(args),
1681
- ...appSettingsFromFlags(args),
1682
- ...linkedAccountFromFlags(args),
1683
- dynamicSearchAdsSetting: dynamicSearchAdsFromFlags(args),
1684
- frequencyCaps: frequencyCapsFromFlags(args, rawArgs),
1685
- textGuidelines: textGuidelinesFromFlags(args, rawArgs),
1686
- assetAutomation: assetAutomationFromFlags(args),
1687
- brandGuidelines: brandGuidelinesFromFlags(args, "create"),
1688
- status: args.status
1689
- });
1690
- await stageCreate("google.campaign.create", customerId, payload, [
1691
- ...geoTargetTypeHints(payload),
1692
- ...networksHints(payload)
1693
- ]);
1694
- }
1695
- }),
1696
- update: defineCommand4({
1697
- meta: {
1698
- name: "update",
1699
- description: `Stage a change to an existing campaign's name, budget, bidding, settings, AI Max switches or text guidelines (what AI Max and Performance Max ad text must avoid). ${STAGED_WRITE}`
1700
- },
1701
- args: {
1702
- ...customerIdArg,
1703
- ...fileArg,
1704
- name: { type: "string", description: "New campaign name, unique in the account" },
1705
- "budget-ref": { type: "string" },
1706
- ...portfolioRefArg,
1707
- "bidding-strategy": {
1708
- type: "string",
1709
- description: "MANUAL_CPC | MAXIMIZE_CONVERSIONS | MAXIMIZE_CONVERSION_VALUE | TARGET_SPEND | TARGET_IMPRESSION_SHARE | TARGET_CPA | TARGET_ROAS | TARGET_CPC | MANUAL_CPM. Each campaign type takes only some \u2014 staging refuses the rest and names the ones that work."
1710
- },
1711
- "target-cpa": {
1712
- type: "string",
1713
- 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."
1714
- },
1715
- "target-roas": {
1716
- type: "string",
1717
- 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."
1718
- },
1719
- "target-cpc": {
1720
- type: "string",
1721
- description: "Target CPC (major units) for Demand Gen \u2014 pair it with --bidding-strategy TARGET_CPC. Demand Gen only; other channels have no target CPC."
1722
- },
1723
- ...maxCpcArg,
1724
- ...finalUrlSuffixArg,
1725
- ...urlOptionsArgs,
1726
- ...geoTargetTypeArgs,
1727
- ...networksArg,
1728
- ...textGuidelinesArgs,
1729
- ...aiMaxArgs,
1730
- ...shoppingUpdateArgs,
1731
- ...dynamicSearchAdsArgs,
1732
- ...frequencyCapArgs,
1733
- ...assetAutomationArgs,
1734
- ...brandStyleArgs,
1735
- "eu-political-ads": {
1736
- type: "boolean",
1737
- description: "Corrects the campaign's EU political advertising declaration: --eu-political-ads if it contains EU political ads, --eu-political-ads=false if it does not. Existing campaigns without a declaration block location-targeting changes until one is set."
1738
- },
1739
- level: {
1740
- type: "string",
1741
- description: "campaign (default) | account. `account` stages --final-url-suffix / --tracking-template on the ACCOUNT (every campaign without its own inherits it) \u2014 same as `baker ads google account update`."
1742
- },
1743
- status: { type: "string" }
1744
- },
1745
- run: async ({ args, rawArgs }) => {
1746
- const customerId = requireCustomerId(args);
1747
- const level = typeof args.level === "string" && args.level.length > 0 ? args.level : "campaign";
1748
- if (level === "account") {
1749
- const payload2 = accountLevelUrlOptions(args);
1750
- await stageUpdate(
1751
- "google.customer.update",
1752
- customerId,
1753
- customerId,
1754
- payload2,
1755
- accountUrlOptionHints(customerId)
1756
- );
1757
- return;
1758
- }
1759
- if (level !== "campaign") {
1760
- failWriteValidation("--level must be campaign or account");
1761
- }
1762
- const target = requireTarget(args, "campaign");
1763
- const payload = mergePayload(loadJsonFileArg(args.file), {
1764
- name: args.name,
1765
- budget: args["budget-ref"],
1766
- bidding: biddingFromFlags(args),
1767
- biddingStrategy: args["portfolio-ref"],
1768
- geoTargetTypeSetting: geoTargetTypeFromFlags(args),
1769
- networkSettings: networkSettingsFromFlags(args),
1770
- finalUrlSuffix: args["final-url-suffix"],
1771
- trackingUrlTemplate: args["tracking-template"],
1772
- urlCustomParameters: urlCustomParametersFromFlags(args, rawArgs),
1773
- euPoliticalAds: args["eu-political-ads"],
1774
- textGuidelines: textGuidelinesFromFlags(args, rawArgs),
1775
- aiMax: aiMaxFromFlags(args),
1776
- shoppingSetting: shoppingSettingUpdateFromFlags(args),
1777
- dynamicSearchAdsSetting: dynamicSearchAdsFromFlags(args),
1778
- frequencyCaps: frequencyCapsFromFlags(args, rawArgs),
1779
- assetAutomation: assetAutomationFromFlags(args),
1780
- brandGuidelines: brandGuidelinesFromFlags(args, "update"),
1781
- status: args.status
1782
- });
1783
- await stageUpdate("google.campaign.update", customerId, target, payload);
1784
- }
1785
- }),
1786
- pause: statusCommand("google.campaign.pause", "campaign"),
1787
- resume: statusCommand("google.campaign.resume", "campaign"),
1788
- remove: statusCommand("google.campaign.remove", "campaign"),
1789
- "enable-brand-guidelines": defineCommand4({
1790
- meta: {
1791
- name: "enable-brand-guidelines",
1792
- description: `Turn brand guidelines on for an existing Performance Max campaign (Google fixes them at creation otherwise). Start here: \`baker ads google campaigns enable-brand-guidelines <id> --business-name-asset <id> --logo-assets <id> --final-url-domain example.com\`, or \`--auto-populate\` to take them from its asset groups. Applied at publish; \`draft validate\` cannot check it (Google has no dry run for it). ${STAGED_WRITE}`
1793
- },
1794
- args: {
1795
- ...customerIdArg,
1796
- ...fileArg,
1797
- id: { type: "positional", description: "Performance Max campaign id or resource name", required: false },
1798
- ...enableBrandGuidelinesArgs
1799
- },
1800
- run: async ({ args }) => {
1801
- const customerId = requireCustomerId(args);
1802
- const payload = mergePayload(loadJsonFileArg(args.file), enableBrandGuidelinesFromFlags(args));
1803
- await stageUpdate(
1804
- "google.campaign.enableBrandGuidelines",
1805
- customerId,
1806
- requireTarget(args, "campaign"),
1807
- payload
1808
- );
1809
- }
1810
- })
1811
- }
1812
- });
1813
- function statusCommand(kind, entity, hints) {
1814
- return defineCommand4({
1815
- meta: {
1816
- name: kind.split(".")[2],
1817
- description: `Stage a ${entity} ${kind.split(".")[2]}. Several? Stage them in one call with \`baker ads google draft stage --file ops.json\` \u2014 never one command per row.`
1818
- },
1819
- args: {
1820
- ...customerIdArg,
1821
- id: { type: "positional", description: `${entity} resource name or id`, required: false }
1822
- },
1823
- run: async ({ args }) => {
1824
- const customerId = requireCustomerId(args);
1825
- await stageTarget(kind, customerId, requireTarget(args, entity), hints);
1826
- }
1827
- });
1828
- }
1829
- var adGroupsCommand = defineCommand4({
1830
- meta: { name: "ad-groups", description: "Stage ad group create/update/pause/resume/remove" },
1831
- subCommands: {
1832
- create: defineCommand4({
1833
- meta: {
1834
- name: "create",
1835
- description: `Stage a new ad group in a campaign (--campaign-ref); it is created paused unless --status ENABLED. ${STAGED_WRITE}`
1836
- },
1837
- args: {
1838
- ...customerIdArg,
1839
- ...fileArg,
1840
- name: {
1841
- type: "string",
1842
- description: 'Ad group name, unique within its campaign (e.g. "Solar panels \u2014 price")'
1843
- },
1844
- "campaign-ref": { type: "string", description: "Campaign ref (g_temp_*, id, or resource name)" },
1845
- type: {
1846
- type: "string",
1847
- description: "Ad group type \u2014 leave it out and Google derives it from the campaign's channel, which is required on a Demand Gen campaign (there is no Demand Gen ad group type). SEARCH_STANDARD | DISPLAY_STANDARD | SHOPPING_PRODUCT_ADS | VIDEO_*"
1848
- },
1849
- "cpc-bid": { type: "string", description: "Default CPC bid in major units" },
1850
- status: { type: "string" }
1851
- },
1852
- run: async ({ args }) => {
1853
- const customerId = requireCustomerId(args);
1854
- const payload = mergePayload(loadJsonFileArg(args.file), {
1855
- name: args.name,
1856
- campaign: args["campaign-ref"],
1857
- type: args.type,
1858
- cpcBidMicros: microsFlag(args["cpc-bid"], "--cpc-bid"),
1859
- status: args.status
1860
- });
1861
- await stageCreate("google.adGroup.create", customerId, payload);
1862
- }
1863
- }),
1864
- update: defineCommand4({
1865
- meta: {
1866
- name: "update",
1867
- description: `Stage a change to an existing ad group's name, default CPC bid or status. ${STAGED_WRITE}`
1868
- },
1869
- args: {
1870
- ...customerIdArg,
1871
- ...fileArg,
1872
- name: { type: "string", description: "New ad group name, unique within its campaign" },
1873
- "cpc-bid": { type: "string" },
1874
- status: { type: "string" }
1875
- },
1876
- run: async ({ args }) => {
1877
- const customerId = requireCustomerId(args);
1878
- const target = requireTarget(args, "ad group");
1879
- const payload = mergePayload(loadJsonFileArg(args.file), {
1880
- name: args.name,
1881
- cpcBidMicros: microsFlag(args["cpc-bid"], "--cpc-bid"),
1882
- status: args.status
1883
- });
1884
- await stageUpdate("google.adGroup.update", customerId, target, payload);
1885
- }
1886
- }),
1887
- pause: statusCommand("google.adGroup.pause", "ad group"),
1888
- resume: statusCommand("google.adGroup.resume", "ad group"),
1889
- remove: statusCommand("google.adGroup.remove", "ad group")
1890
- }
1891
- });
1892
- var KEYWORD_KILL_HINTS = [
1893
- "Keyword metrics are per ad group. Decide this from keyword_view rows carrying ad_group.id + ad_group_criterion.criterion_id (`--preset keyword-analysis` returns both) \u2014 never from campaign totals or metrics summed across ad groups.",
1894
- "The same keyword text in several ad groups shares ONE criterion id, so an aggregate blends the copy that holds the history with the copies that never served. Compare the copies row by row and keep the one with the impressions/conversions; if the keyword is duplicated and only one copy performs, pause the others, not it."
1895
- ];
1896
- function keywordKillHints(status) {
1897
- const kills = typeof status === "string" && ["PAUSED", "REMOVED"].includes(status.toUpperCase());
1898
- return kills ? KEYWORD_KILL_HINTS : [];
1899
- }
1900
- function keywordFinalUrlHints(finalUrl, count) {
1901
- if (typeof finalUrl !== "string" || finalUrl.length === 0) {
1902
- return [];
1903
- }
1904
- return count > 1 ? [
1905
- `--final-url applied the same landing page to all ${count} keywords \u2014 the flag has no per-keyword form. A keyword-level URL only earns its place when that keyword must land somewhere the ad doesn't, so one URL shared by every keyword belongs on the ad instead: set the ad's final URL to this page and re-stage the keywords without --final-url. Keep it only if this page is genuinely each keyword's own destination and not the ad's.`
1906
- ] : [
1907
- "Keep --final-url only if this keyword's destination differs from the ad's final URL \u2014 otherwise drop it and let the keyword inherit the ad's landing page."
1908
- ];
1909
- }
1910
- function keywordUpdateFinalUrls(args) {
1911
- const finalUrl = args["final-url"];
1912
- const clear = args["clear-final-url"] === true;
1913
- if (typeof finalUrl !== "string" || finalUrl.length === 0) {
1914
- return clear ? [] : void 0;
1915
- }
1916
- if (clear) {
1917
- failWriteValidation(
1918
- "--clear-final-url sends the keyword back to the ad's landing page \u2014 pass it OR --final-url, not both"
1919
- );
1920
- }
1921
- return [finalUrl];
1922
- }
1923
- var keywordWriteSubcommands = {
1924
- add: defineCommand4({
1925
- meta: { name: "add", description: "Add keyword(s) to an ad group \u2014 one --text or a whole batch" },
1926
- args: {
1927
- ...customerIdArg,
1928
- "ad-group-ref": { type: "string", description: "Ad group ref (g_temp_*, id, or resource name)" },
1929
- text: {
1930
- type: "string",
1931
- description: 'Keyword text \u2014 comma-separate for a batch, optional ":EXACT|:PHRASE|:BROAD" suffix per entry'
1932
- },
1933
- file: { type: "string", description: "Text file with one keyword[:MATCH_TYPE] per line" },
1934
- "match-type": { type: "string", description: "Default match type: EXACT | PHRASE | BROAD" },
1935
- "cpc-bid": { type: "string", description: "Keyword CPC bid in major units (applies to all)" },
1936
- "final-url": {
1937
- type: "string",
1938
- description: "Rarely needed: send THIS keyword to a page the ad doesn't go to. Applies to every keyword in the call, so leave it unset unless the destination is keyword-specific \u2014 otherwise set the ad's final URL"
1939
- }
1940
- },
1941
- run: async ({ args, rawArgs }) => {
1942
- const customerId = requireCustomerId(args);
1943
- const adGroup = requireStringFlag(args["ad-group-ref"], "--ad-group-ref");
1944
- const cpcBidMicros = microsFlag(args["cpc-bid"], "--cpc-bid");
1945
- const finalUrls = args["final-url"] ? [args["final-url"]] : void 0;
1946
- const entries = keywordEntries(args, rawArgs);
1947
- await stageGoogleOps(
1948
- entries.map((entry) => ({
1949
- kind: "google.keyword.add",
1950
- customerId,
1951
- payload: { adGroup, text: entry.text, matchType: entry.matchType, cpcBidMicros, finalUrls }
1952
- })),
1953
- keywordFinalUrlHints(args["final-url"], entries.length)
1954
- );
1955
- }
1956
- }),
1957
- update: defineCommand4({
1958
- meta: {
1959
- name: "update",
1960
- description: "Update one keyword's bid, status or final URL. Many keywords? `keywords pause|resume` take a list, and `baker ads google draft stage --file` stages any mix of updates in one call."
1961
- },
1962
- args: {
1963
- ...customerIdArg,
1964
- "cpc-bid": { type: "string" },
1965
- status: { type: "string" },
1966
- "final-url": {
1967
- type: "string",
1968
- description: "Rarely needed: send THIS keyword to a page the ad doesn't go to. Leave unset unless the destination is keyword-specific \u2014 otherwise set the ad's final URL"
1969
- },
1970
- "clear-final-url": {
1971
- type: "boolean",
1972
- description: "Drop this keyword's own landing page so it inherits the ad's again"
1973
- }
1974
- },
1975
- run: async ({ args }) => {
1976
- const customerId = requireCustomerId(args);
1977
- const finalUrls = keywordUpdateFinalUrls(args);
1978
- await stageUpdate(
1979
- "google.keyword.update",
1980
- customerId,
1981
- requireTarget(args, "keyword"),
1982
- { cpcBidMicros: microsFlag(args["cpc-bid"], "--cpc-bid"), status: args.status, finalUrls },
1983
- [...keywordKillHints(args.status), ...keywordFinalUrlHints(args["final-url"], 1)]
1984
- );
1985
- }
1986
- }),
1987
- remove: statusCommand("google.keyword.remove", "keyword", KEYWORD_KILL_HINTS),
1988
- pause: keywordStatusCommand("pause", "PAUSED"),
1989
- resume: keywordStatusCommand("resume", "ENABLED")
1990
- };
1991
- function keywordStatusCommand(verb, status) {
1992
- return defineCommand4({
1993
- meta: {
1994
- name: verb,
1995
- description: `${verb === "pause" ? "Pause" : "Resume"} keyword(s) \u2014 every target in ONE call. Start here:
1996
- baker ads google keywords ${verb} customers/1234567890/adGroupCriteria/111~222 customers/1234567890/adGroupCriteria/111~333 --customer-id 1234567890
1997
- baker ads google keywords ${verb} --file keywords.txt --customer-id 1234567890 # one resource name per line, up to 500
1998
- Take each keyword's resource name (adGroupId~criterionId) from \`--preset keyword-analysis\` rows \u2014 the same text in another ad group is a different keyword. ${STAGED_WRITE}`
1999
- },
2000
- args: {
2001
- ...customerIdArg,
2002
- id: { type: "positional", description: "Keyword resource name(s) \u2014 several allowed", required: false },
2003
- file: { type: "string", description: "Text file with one keyword resource name per line" }
2004
- },
2005
- run: async ({ args }) => {
2006
- const customerId = requireCustomerId(args);
2007
- await stageGoogleOps(
2008
- targetEntries(args, "keyword").map((target) => ({
2009
- kind: "google.keyword.update",
2010
- customerId,
2011
- target,
2012
- payload: { status }
2013
- })),
2014
- keywordKillHints(status)
2015
- );
2016
- }
2017
- });
2018
- }
2019
- var NEGATIVE_COVERAGE_HINTS = [
2020
- "Before publishing, confirm each term isn't already blocked: run `baker ads google query --preset negative-keyword-lists` (shared-list terms) and `--preset negative-keywords` (campaign/ad-group negatives).",
2021
- "If a term is already in a negative list but still shows in search terms, the list likely isn't attached to this campaign (check `--preset negative-list-attachments`) or its match type is narrower than the query \u2014 explain that instead of staging a duplicate negative."
2022
- ];
2023
- var negativeKeywordsCommand = defineCommand4({
2024
- meta: {
2025
- name: "negative-keywords",
2026
- description: "Stage negative keyword add/update/remove (ad-group or campaign level) \u2014 update changes text or match type"
2027
- },
2028
- subCommands: {
2029
- add: defineCommand4({
2030
- meta: { name: "add", description: "Add negative keyword(s) \u2014 one --text or a whole batch" },
2031
- args: {
2032
- ...customerIdArg,
2033
- level: { type: "string", description: "adGroup | campaign" },
2034
- "parent-ref": { type: "string", description: "Ad group or campaign ref" },
2035
- text: {
2036
- type: "string",
2037
- description: 'Keyword text \u2014 comma-separate for a batch, optional ":MATCH_TYPE" suffix per entry'
2038
- },
2039
- file: { type: "string", description: "Text file with one keyword[:MATCH_TYPE] per line" },
2040
- "match-type": { type: "string", description: "Default match type: EXACT | PHRASE | BROAD" }
2041
- },
2042
- run: async ({ args, rawArgs }) => {
2043
- const customerId = requireCustomerId(args);
2044
- const level = requireStringFlag(args.level, "--level");
2045
- const parent = requireStringFlag(args["parent-ref"], "--parent-ref");
2046
- await stageGoogleOps(
2047
- keywordEntries(args, rawArgs).map((entry) => ({
2048
- kind: "google.negativeKeyword.add",
2049
- customerId,
2050
- payload: { level, parent, text: entry.text, matchType: entry.matchType }
2051
- })),
2052
- NEGATIVE_COVERAGE_HINTS
2053
- );
2054
- }
2055
- }),
2056
- update: defineCommand4({
2057
- meta: {
2058
- name: "update",
2059
- description: "Change a negative keyword's text or match type. Start here: `negative-keywords update customers/<cid>/adGroupCriteria/<adGroupId>~<criterionId> --match-type PHRASE`. Google never edits either on a live negative, so this publishes as a replace \u2014 the new negative added and the old one removed together, all or nothing. The field you leave out keeps its live value. Read them with `baker ads google negative-keywords list`."
2060
- },
2061
- args: {
2062
- ...customerIdArg,
2063
- id: {
2064
- type: "positional",
2065
- description: "customers/\u2026/adGroupCriteria/{adGroupId}~{criterionId} or campaignCriteria/{campaignId}~{criterionId}",
2066
- required: false
2067
- },
2068
- text: { type: "string", description: "The new text" },
2069
- "match-type": { type: "string", description: "EXACT | PHRASE | BROAD" }
2070
- },
2071
- run: async ({ args }) => {
2072
- const customerId = requireCustomerId(args);
2073
- const payload = {
2074
- ...args.text !== void 0 ? { text: args.text } : {},
2075
- ...args["match-type"] !== void 0 ? { matchType: args["match-type"] } : {}
2076
- };
2077
- if (Object.keys(payload).length === 0) {
2078
- failWriteValidation("pass --text and/or --match-type");
2079
- }
2080
- await stageUpdate(
2081
- "google.negativeKeyword.update",
2082
- customerId,
2083
- requireTarget(args, "negative keyword"),
2084
- payload
2085
- );
2086
- }
2087
- }),
2088
- remove: statusCommand("google.negativeKeyword.remove", "negative keyword", [
2089
- "Pass the full resource name \u2014 customers/{cid}/campaignCriteria/{campaignId}~{criterionId} or \u2026/adGroupCriteria/{adGroupId}~{criterionId}, read from the row's resource_name; a bare id is refused. A shared keyword list's member (\u2026/sharedCriteria/{listId}~{criterionId}) is staged as a removal from that list, which every campaign the list covers loses."
2090
- ])
2091
- }
2092
- });
2093
- var keywordListsCommand = defineCommand4({
2094
- meta: {
2095
- name: "keyword-lists",
2096
- description: "Stage shared lists \u2014 negative keyword lists, placement exclusion lists (sites, apps, YouTube) and brand lists (create/rename/delete a list; add/remove its members; attach/detach a keyword or placement list on a campaign \u2014 a brand list goes on a campaign as a `brandList` criterion)."
2097
- },
2098
- subCommands: {
2099
- create: defineCommand4({
2100
- meta: {
2101
- name: "create",
2102
- description: "Stage a new shared list \u2014 negative keywords (default), placement exclusions, account-level negative keywords or brands (--type). Applies when the chat is published; returns a temp ref to pass as --list-ref to `keyword-lists add` and `attach`."
2103
- },
2104
- args: {
2105
- ...customerIdArg,
2106
- name: { type: "string", description: "List name (required)" },
2107
- type: {
2108
- type: "string",
2109
- description: "NEGATIVE_KEYWORDS (default) | NEGATIVE_PLACEMENTS (sites, apps, YouTube to exclude) | ACCOUNT_LEVEL_NEGATIVE_KEYWORDS (applied with `account-exclusions add`) | BRANDS (a brand list for brand exclusions / AI Max)"
2110
- }
2111
- },
2112
- run: async ({ args }) => {
2113
- const customerId = requireCustomerId(args);
2114
- await stageCreate("google.sharedSet.create", customerId, {
2115
- name: requireStringFlag(args.name, "--name"),
2116
- type: args.type
2117
- });
2118
- }
2119
- }),
2120
- add: defineCommand4({
2121
- meta: {
2122
- name: "add",
2123
- description: 'Add members to a shared list \u2014 keywords to a negative keyword list (--text / --file), or sites, apps and YouTube to a NEGATIVE_PLACEMENTS list (--placement, --app, --youtube-channel, --youtube-video) and brands to a BRANDS list (--brand). Start here: `keyword-lists add --list-ref <list> --placement "example.com,spam-site.net"`. A member the list type cannot hold is refused at staging.'
2124
- },
2125
- args: {
2126
- ...customerIdArg,
2127
- "list-ref": { type: "string", description: "Shared set ref" },
2128
- text: {
2129
- type: "string",
2130
- description: 'Keyword text \u2014 comma-separate for a batch, optional ":MATCH_TYPE" suffix per entry'
2131
- },
2132
- file: { type: "string", description: "Text file with one keyword[:MATCH_TYPE] per line" },
2133
- "match-type": { type: "string", description: "Default match type: EXACT | PHRASE | BROAD" },
2134
- ...LIST_MEMBER_ARGS
2135
- },
2136
- run: async ({ args, rawArgs }) => {
2137
- const customerId = requireCustomerId(args);
2138
- const sharedSet = requireStringFlag(args["list-ref"], "--list-ref");
2139
- const criteria = listMemberCriteria(args);
2140
- const keywords = criteria.length > 0 && args.text === void 0 && args.file === void 0 ? [] : keywordEntries(args, rawArgs);
2141
- await stageGoogleOps([
2142
- ...keywords.map((entry) => ({
2143
- kind: "google.sharedSetMember.add",
2144
- customerId,
2145
- payload: { sharedSet, text: entry.text, matchType: entry.matchType }
2146
- })),
2147
- ...criteria.map((criterion) => ({
2148
- kind: "google.sharedSetMember.add",
2149
- customerId,
2150
- payload: { sharedSet, criterion }
2151
- }))
2152
- ]);
2153
- }
2154
- }),
2155
- attach: defineCommand4({
2156
- meta: { name: "attach", description: "Attach a keyword list to a campaign" },
2157
- args: { ...customerIdArg, "campaign-ref": { type: "string" }, "list-ref": { type: "string" } },
2158
- run: async ({ args }) => {
2159
- const customerId = requireCustomerId(args);
2160
- await stageCreate("google.campaignSharedSet.attach", customerId, {
2161
- campaign: requireStringFlag(args["campaign-ref"], "--campaign-ref"),
2162
- sharedSet: requireStringFlag(args["list-ref"], "--list-ref")
2163
- });
2164
- }
2165
- }),
2166
- remove: defineCommand4({
2167
- meta: {
2168
- name: "remove",
2169
- description: `Take term(s) out of a shared negative keyword list \u2014 every campaign the list covers stops excluding them. Start here:
2170
- baker ads google keyword-lists remove --list-ref 1234 --text "free,jobs:EXACT" --customer-id 1234567890
2171
- baker ads google keyword-lists remove --list-ref 1234 --file terms.txt --customer-id 1234567890 # one term[:MATCH_TYPE] per line
2172
- Baker reads the list and finds each term (no :MATCH_TYPE = every match type of it); a term the list does not hold is reported, not staged. Members named directly also work: their resource name (customers/{cid}/sharedCriteria/{listId}~{criterionId}), listId~criterionId, or a criterion id. ${STAGED_WRITE}`
2173
- },
2174
- args: {
2175
- ...customerIdArg,
2176
- "list-ref": { type: "string", description: "The list's id or customers/{cid}/sharedSets/{id}" },
2177
- text: { type: "string", description: 'Terms to take out \u2014 comma-separated, optional ":MATCH_TYPE" each' },
2178
- file: { type: "string", description: "Text file with one term[:MATCH_TYPE] per line" },
2179
- id: {
2180
- type: "positional",
2181
- description: "Member resource name(s), listId~criterionId or criterion id(s) \u2014 instead of --text",
2182
- required: false
2183
- }
2184
- },
2185
- run: async ({ args, rawArgs }) => {
2186
- const customerId = requireCustomerId(args);
2187
- const listId = listIdOf(requireStringFlag(args["list-ref"], "--list-ref"));
2188
- const terms = [
2189
- ...repeatedValues(rawArgs, "text", args.text).flatMap((v) => v.split(",")),
2190
- ...typeof args.file === "string" && args.file.length > 0 ? fileLines(args.file) : []
2191
- ].map((v) => v.trim()).filter(Boolean);
2192
- const direct = (Array.isArray(args._) ? args._ : []).filter((v) => typeof v === "string").flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean).map((v) => memberTarget(customerId, listId, v));
2193
- if (terms.length === 0 && direct.length === 0) {
2194
- failWriteValidation("pass the terms to take out with --text / --file, or the members' resource names");
2195
- }
2196
- const found = terms.length > 0 ? memberRemovals(await readListMembersOrExit(customerId, listId), terms) : { targets: [], missing: [] };
2197
- const targets = [.../* @__PURE__ */ new Set([...direct, ...found.targets])];
2198
- if (targets.length === 0) {
2199
- failWriteValidation(
2200
- `list ${listId} holds none of: ${found.missing.join(", ")} \u2014 nothing to remove. Read its terms with \`baker ads google keyword-lists list --members --customer-id ${customerId}\``
2201
- );
2202
- }
2203
- await stageGoogleOps(
2204
- targets.map((target) => ({ kind: "google.sharedSetMember.remove", customerId, target })),
2205
- [
2206
- ...found.missing.length > 0 ? [
2207
- `NOT STAGED \u2014 list ${listId} does not hold: ${found.missing.join(", ")}. Nothing to remove for those; say so.`
2208
- ] : [],
2209
- "Every campaign this list is attached to stops excluding these terms once published \u2014 check `--preset negative-list-attachments` if the user should hear which."
2210
- ]
2211
- );
2212
- }
2213
- }),
2214
- detach: statusCommand("google.campaignSharedSet.detach", "campaign shared set"),
2215
- rename: defineCommand4({
2216
- meta: {
2217
- name: "rename",
2218
- description: `Rename a keyword list (its type never changes). Start here:
2219
- baker ads google keyword-lists rename 12263133655 --name "Junk terms" --customer-id 1234567890
2220
- Names are unique in the account. ${STAGED_WRITE}`
2221
- },
2222
- args: {
2223
- ...customerIdArg,
2224
- id: { type: "positional", description: "The list's id or customers/{cid}/sharedSets/{id}", required: false },
2225
- name: { type: "string", description: "New name \u2014 unique among the account's lists" }
2226
- },
2227
- run: async ({ args }) => {
2228
- const customerId = requireCustomerId(args);
2229
- await stageUpdate("google.sharedSet.update", customerId, requireTarget(args, "keyword list"), {
2230
- name: requireStringFlag(args.name, "--name")
2231
- });
2232
- }
2233
- }),
2234
- delete: defineCommand4({
2235
- meta: {
2236
- name: "delete",
2237
- description: `Remove a whole keyword list (to take terms OUT of a list, use \`keyword-lists remove\`). Start here:
2238
- baker ads google keyword-lists delete 12263133655 --customer-id 1234567890
2239
- Google refuses to remove a list that is still attached \u2014 to a campaign (even one removed in the same publish), to the whole account, or as a campaign's brand list: take it off in the same draft first (\`keyword-lists detach\`, \`account-exclusions remove\`, \`campaign-criteria remove\`) \u2014 staging refuses the delete until then, naming each one. Those campaigns stop excluding its terms; staging says how many. ${STAGED_WRITE}`
2240
- },
2241
- args: {
2242
- ...customerIdArg,
2243
- id: { type: "positional", description: "The list's id or customers/{cid}/sharedSets/{id}", required: false }
2244
- },
2245
- run: async ({ args }) => {
2246
- const customerId = requireCustomerId(args);
2247
- await stageTarget("google.sharedSet.remove", customerId, requireTarget(args, "keyword list"));
2248
- }
2249
- })
2250
- }
2251
- });
2252
- async function readListMembersOrExit(customerId, listId) {
2253
- try {
2254
- return await readListMembers(customerId, listId);
2255
- } catch (err) {
2256
- handleGoogleError(err);
2257
- }
2258
- }
2259
- function rsaContentFromFlags(args) {
2260
- const headlines = copyListFlag(args.headlines, "headlines");
2261
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2262
- if (!headlines || !descriptions) {
2263
- failWriteValidation("responsive search ads need --headlines and --descriptions, or use --file");
2264
- }
2265
- const finalUrls = listFlag(args["final-url"]);
2266
- if (!finalUrls) {
2267
- failWriteValidation("--final-url is required for a responsive search ad");
2268
- }
2269
- return {
2270
- format: "responsiveSearch",
2271
- headlines: headlines.map((text) => ({ text })),
2272
- descriptions: descriptions.map((text) => ({ text })),
2273
- path1: args.path1,
2274
- path2: args.path2,
2275
- finalUrls
2276
- };
2277
- }
2278
- function rdaContentFromFlags(args, base) {
2279
- const content = {
2280
- format: "responsiveDisplay",
2281
- ...base !== null && typeof base === "object" && !Array.isArray(base) ? base : {}
2282
- };
2283
- const headlines = copyListFlag(args.headlines, "headlines");
2284
- if (headlines) {
2285
- content.headlines = headlines.map((text) => ({ text }));
2286
- }
2287
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2288
- if (descriptions) {
2289
- content.descriptions = descriptions.map((text) => ({ text }));
2290
- }
2291
- if (typeof args["long-headline"] === "string") {
2292
- content.longHeadline = { text: args["long-headline"] };
2293
- }
2294
- if (typeof args["business-name"] === "string") {
2295
- content.businessName = args["business-name"];
2296
- }
2297
- const finalUrls = listFlag(args["final-url"]);
2298
- if (finalUrls) {
2299
- content.finalUrls = finalUrls;
2300
- }
2301
- const marketing = listFlag(args["marketing-images"]);
2302
- if (marketing) {
2303
- content.marketingImageAssets = marketing;
2304
- }
2305
- const square = listFlag(args["square-marketing-images"]);
2306
- if (square) {
2307
- content.squareMarketingImageAssets = square;
2308
- }
2309
- const logos = listFlag(args["logo-images"]);
2310
- if (logos) {
2311
- content.logoImageAssets = logos;
2312
- }
2313
- return content;
2314
- }
2315
- function videoContentFromFlags(args, base) {
2316
- const content = {
2317
- format: "video",
2318
- ...base !== null && typeof base === "object" && !Array.isArray(base) ? base : {}
2319
- };
2320
- const videoAssets = listFlag(args["video-assets"]);
2321
- if (videoAssets) {
2322
- content.videoAssets = videoAssets;
2323
- }
2324
- if (typeof args["business-name"] === "string") {
2325
- content.businessName = args["business-name"];
2326
- }
2327
- const logoImages = listFlag(args["logo-image-assets"]);
2328
- if (logoImages) {
2329
- content.logoImageAssets = logoImages;
2330
- }
2331
- const finalUrls = listFlag(args["final-url"]);
2332
- if (finalUrls) {
2333
- content.finalUrls = finalUrls;
2334
- }
2335
- return content;
2336
- }
2337
- function demandGenContentFromFlags(args, base) {
2338
- const content = {
2339
- format: "demandGen",
2340
- ...base !== null && typeof base === "object" && !Array.isArray(base) ? base : {}
2341
- };
2342
- if (typeof args["ad-name"] === "string") {
2343
- content.name = args["ad-name"];
2344
- }
2345
- const headlines = copyListFlag(args.headlines, "headlines");
2346
- if (headlines) {
2347
- content.headlines = headlines.map((text) => ({ text }));
2348
- }
2349
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2350
- if (descriptions) {
2351
- content.descriptions = descriptions.map((text) => ({ text }));
2352
- }
2353
- if (typeof args["business-name"] === "string") {
2354
- content.businessName = args["business-name"];
2355
- }
2356
- const finalUrls = listFlag(args["final-url"]);
2357
- if (finalUrls) {
2358
- content.finalUrls = finalUrls;
2359
- }
2360
- const images = listFlag(args["image-assets"]);
2361
- if (images) {
2362
- content.imageAssets = images;
2363
- }
2364
- const squareImages = listFlag(args["square-image-assets"]);
2365
- if (squareImages) {
2366
- content.squareImageAssets = squareImages;
2367
- }
2368
- const logoImages = listFlag(args["logo-image-assets"]);
2369
- if (logoImages) {
2370
- content.logoImageAssets = logoImages;
2371
- }
2372
- return content;
2373
- }
2374
- function demandGenVideoContentFromFlags(args, base) {
2375
- const content = {
2376
- format: "demandGenVideo",
2377
- ...base !== null && typeof base === "object" && !Array.isArray(base) ? base : {}
2378
- };
2379
- if (typeof args["ad-name"] === "string") {
2380
- content.name = args["ad-name"];
2381
- }
2382
- const headlines = copyListFlag(args.headlines, "headlines");
2383
- if (headlines) {
2384
- content.headlines = headlines.map((text) => ({ text }));
2385
- }
2386
- const longHeadlines = copyListFlag(args["long-headlines"], "long-headlines");
2387
- if (longHeadlines) {
2388
- content.longHeadlines = longHeadlines.map((text) => ({ text }));
2389
- }
2390
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2391
- if (descriptions) {
2392
- content.descriptions = descriptions.map((text) => ({ text }));
2393
- }
2394
- if (typeof args["business-name"] === "string") {
2395
- content.businessName = args["business-name"];
2396
- }
2397
- const finalUrls = listFlag(args["final-url"]);
2398
- if (finalUrls) {
2399
- content.finalUrls = finalUrls;
2400
- }
2401
- const videos = listFlag(args["video-assets"]);
2402
- if (videos) {
2403
- content.videoAssets = videos;
2404
- }
2405
- const logoImages = listFlag(args["logo-image-assets"]);
2406
- if (logoImages) {
2407
- content.logoImageAssets = logoImages;
2408
- }
2409
- const callToActions = listFlag(args["call-to-action-assets"]);
2410
- if (callToActions) {
2411
- content.callToActionAssets = callToActions;
2412
- }
2413
- return content;
2414
- }
2415
- function appContentFromFlags(args, base) {
2416
- const content = {
2417
- format: "app",
2418
- ...base !== null && typeof base === "object" && !Array.isArray(base) ? base : {}
2419
- };
2420
- const headlines = copyListFlag(args.headlines, "headlines");
2421
- if (headlines) {
2422
- content.headlines = headlines.map((text) => ({ text }));
2423
- }
2424
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2425
- if (descriptions) {
2426
- content.descriptions = descriptions.map((text) => ({ text }));
2427
- }
2428
- const images = listFlag(args["image-assets"]);
2429
- if (images) {
2430
- content.images = images;
2431
- }
2432
- const videos = listFlag(args["video-assets"]);
2433
- if (videos) {
2434
- content.youtubeVideos = videos;
2435
- }
2436
- return content;
2437
- }
2438
- var FORMAT_CONTENT_FLAGS = {
2439
- responsiveSearch: ["headlines", "descriptions", "path1", "path2", "final-url"],
2440
- responsiveDisplay: [
2441
- "headlines",
2442
- "descriptions",
2443
- "long-headline",
2444
- "business-name",
2445
- "final-url",
2446
- "marketing-images",
2447
- "square-marketing-images",
2448
- "logo-images"
2449
- ],
2450
- video: ["video-assets", "business-name", "logo-image-assets", "final-url"],
2451
- demandGen: [
2452
- "ad-name",
2453
- "headlines",
2454
- "descriptions",
2455
- "business-name",
2456
- "final-url",
2457
- "image-assets",
2458
- "square-image-assets",
2459
- "logo-image-assets"
2460
- ],
2461
- demandGenVideo: [
2462
- "ad-name",
2463
- "headlines",
2464
- "long-headlines",
2465
- "descriptions",
2466
- "business-name",
2467
- "final-url",
2468
- "video-assets",
2469
- "logo-image-assets",
2470
- "call-to-action-assets"
2471
- ],
2472
- app: ["headlines", "descriptions", "image-assets", "video-assets"],
2473
- // No copy at all: Google builds each product ad from the Merchant Center feed.
2474
- shoppingProduct: []
2475
- };
2476
- function formatsReading(flag) {
2477
- return Object.entries(FORMAT_CONTENT_FLAGS).filter(([, flags]) => flags.includes(flag)).map(([format]) => format);
2478
- }
2479
- function assertFlagsFitFormat(args, format) {
2480
- if (format === "call") {
2481
- failWriteValidation(CALL_AD_RETIRED_MESSAGE);
2482
- }
2483
- const allowed = FORMAT_CONTENT_FLAGS[format];
2484
- if (!allowed) {
2485
- return;
2486
- }
2487
- const stray = Object.keys(adContentArgs).filter(
2488
- (flag) => flag !== "format" && args[flag] !== void 0 && !allowed.includes(flag)
2489
- );
2490
- if (stray.length === 0) {
2491
- return;
2492
- }
2493
- const detail = stray.map((flag) => {
2494
- const elsewhere = formatsReading(flag);
2495
- return elsewhere.length > 0 ? `--${flag} (${elsewhere.join(" / ")})` : `--${flag}`;
2496
- }).join(", ");
2497
- failWriteValidation(
2498
- `a ${format} ad has no ${stray.map((f) => `--${f}`).join(", ")} \u2014 passing it here would stage the change without it. Formats that take it: ${detail}. Check the format with \`baker ads google query "SELECT ad_group_ad.ad.type FROM ad_group_ad WHERE ad_group_ad.ad.id = <id>"\`.`
2499
- );
2500
- }
2501
- function adContentFromFlags(args, format, fileContent) {
2502
- assertFlagsFitFormat(args, format);
2503
- if (format === "responsiveSearch") {
2504
- return fileContent ?? rsaContentFromFlags(args);
2505
- }
2506
- if (format === "responsiveDisplay") {
2507
- return rdaContentFromFlags(args, fileContent);
2508
- }
2509
- if (format === "video") {
2510
- return videoContentFromFlags(args, fileContent);
2511
- }
2512
- if (format === "demandGen") {
2513
- return demandGenContentFromFlags(args, fileContent);
2514
- }
2515
- if (format === "demandGenVideo") {
2516
- return demandGenVideoContentFromFlags(args, fileContent);
2517
- }
2518
- if (format === "app") {
2519
- return appContentFromFlags(args, fileContent);
2520
- }
2521
- if (format === "shoppingProduct") {
2522
- return { format: "shoppingProduct" };
2523
- }
2524
- return fileContent ?? failWriteValidation(`--format ${format} needs --file with the ad content`);
2525
- }
2526
- var adContentArgs = {
2527
- format: {
2528
- type: "string",
2529
- description: "responsiveSearch (default) | responsiveDisplay | app | video | demandGen | demandGenVideo | shoppingProduct (a Shopping ad group's product ad \u2014 no copy flags)"
2530
- },
2531
- headlines: {
2532
- type: "string",
2533
- description: `Headlines (RSA/RDA/demandGen/demandGenVideo/app) \u2014 ${AD_COPY_LIST_USAGE}`
2534
- },
2535
- descriptions: {
2536
- type: "string",
2537
- description: `Descriptions (RSA/RDA/demandGen/demandGenVideo/app) \u2014 ${AD_COPY_LIST_USAGE}`
2538
- },
2539
- path1: { type: "string" },
2540
- path2: { type: "string" },
2541
- "long-headline": { type: "string", description: "Long headline (responsiveDisplay)" },
2542
- "ad-name": {
2543
- type: "string",
2544
- description: `The ad's own name, shown as "Ad name" in Google Ads. REQUIRED on a Demand Gen ad (demandGen/demandGenVideo) and on no other format`
2545
- },
2546
- "long-headlines": {
2547
- type: "string",
2548
- description: `Long headlines, up to 5 of 90 chars (demandGenVideo \u2014 no other format has them) \u2014 ${AD_COPY_LIST_USAGE}`
2549
- },
2550
- "business-name": { type: "string", description: "Business name (responsiveDisplay/demandGen/demandGenVideo/video)" },
2551
- "marketing-images": {
2552
- type: "string",
2553
- description: "Comma-separated marketing image asset refs (responsiveDisplay)"
2554
- },
2555
- "square-marketing-images": {
2556
- type: "string",
2557
- description: "Comma-separated square marketing image asset refs (responsiveDisplay)"
2558
- },
2559
- "logo-images": { type: "string", description: "Comma-separated logo image asset refs (responsiveDisplay)" },
2560
- "video-assets": {
2561
- type: "string",
2562
- description: `Comma-separated video asset refs (video/app/demandGenVideo formats) \u2014 stage the YouTube video as an asset first (assets create --file '{"type":"youtubeVideo",\u2026}')`
2563
- },
2564
- "image-assets": { type: "string", description: "Comma-separated image asset refs (demandGen/app)" },
2565
- "square-image-assets": { type: "string", description: "Comma-separated square image asset refs (demandGen)" },
2566
- "logo-image-assets": {
2567
- type: "string",
2568
- description: "Comma-separated logo image asset refs (demandGen/demandGenVideo/video)"
2569
- },
2570
- "call-to-action-assets": {
2571
- type: "string",
2572
- description: "Comma-separated callToAction asset refs for the ad's button (demandGenVideo)"
2573
- },
2574
- "final-url": { type: "string", description: "Comma-separated final URLs" }
2575
- };
2576
- function assertNoContentFlags(args) {
2577
- const passed = Object.keys(adContentArgs).filter((flag) => flag !== "format" && args[flag] !== void 0);
2578
- if (passed.length > 0) {
2579
- failWriteValidation(
2580
- `${passed.map((flag) => `--${flag}`).join(", ")} only build an ad's content alongside --format (responsiveSearch | responsiveDisplay | app | video | demandGen | demandGenVideo | shoppingProduct) \u2014 add it, or pass --file with the complete content`
2581
- );
2582
- }
2583
- }
2584
- var adsCommand = defineCommand4({
2585
- meta: { name: "ads", description: "Stage ad create/update/pause/resume/remove" },
2586
- subCommands: {
2587
- create: defineCommand4({
2588
- meta: {
2589
- name: "create",
2590
- description: "Stage an ad (responsive search via flags; other formats via --file). RSA needs 3\u201315 headlines and 2\u20134 descriptions \u2014 give Google 8\u201312 varied headlines to test, and stage 2\u20134 ads per ad group. Performance Max has no ad format of its own \u2014 stage its copy with `asset-groups create`."
2591
- },
2592
- args: {
2593
- ...customerIdArg,
2594
- ...fileArg,
2595
- "ad-group-ref": { type: "string", description: "Ad group ref" },
2596
- ...adContentArgs,
2597
- status: { type: "string" }
2598
- },
2599
- run: async ({ args: parsedArgs, rawArgs }) => {
2600
- const args = withRepeatedCopyFlags(parsedArgs, rawArgs);
2601
- const customerId = requireCustomerId(args);
2602
- const file = loadJsonFileArg(args.file);
2603
- const format = args.format ?? "responsiveSearch";
2604
- const content = adContentFromFlags(args, format, file.content);
2605
- await stageCreate(
2606
- "google.ad.create",
2607
- customerId,
2608
- {
2609
- adGroup: requireStringFlag(args["ad-group-ref"] ?? file.adGroup, "--ad-group-ref"),
2610
- status: defaultAdStatus(format, args.status ?? file.status),
2611
- content
2612
- },
2613
- copyListSplitHints(args)
2614
- );
2615
- }
2616
- }),
2617
- update: defineCommand4({
2618
- meta: {
2619
- name: "update",
2620
- description: "Stage an ad update. Any content change needs --format plus EVERY required field of that format (or --file with the complete content) \u2014 a field you send replaces its current value wholesale, so a list you pass must already include the entries you want to keep. Optional asset lists you omit entirely are left untouched on the ad. Status-only changes need neither --format nor content flags."
2621
- },
2622
- args: { ...customerIdArg, ...fileArg, ...adContentArgs, status: { type: "string" } },
2623
- run: async ({ args: parsedArgs, rawArgs }) => {
2624
- const args = withRepeatedCopyFlags(parsedArgs, rawArgs);
2625
- const customerId = requireCustomerId(args);
2626
- const file = loadJsonFileArg(args.file);
2627
- const format = args.format;
2628
- if (!format) {
2629
- assertNoContentFlags(args);
2630
- }
2631
- const payload = mergePayload(file, {
2632
- status: args.status,
2633
- ...format ? { content: adContentFromFlags(args, format, file.content) } : {}
2634
- });
2635
- await stageUpdate("google.ad.update", customerId, requireTarget(args, "ad"), payload, [
2636
- ...payload.content !== void 0 ? [
2637
- "Each content field you sent replaces its current value wholesale at publish \u2014 re-check that every headline, description, final URL and asset you want to KEEP is in this payload, not just the ones you changed."
2638
- ] : [],
2639
- ...format ? copyListSplitHints(args) : []
2640
- ]);
2641
- }
2642
- }),
2643
- pause: statusCommand("google.ad.pause", "ad"),
2644
- resume: statusCommand("google.ad.resume", "ad"),
2645
- remove: statusCommand("google.ad.remove", "ad")
2646
- }
2647
- });
2648
- var assetGroupsCommand = defineCommand4({
2649
- meta: {
2650
- name: "asset-groups",
2651
- description: "Stage Performance Max asset group create/update \u2014 the PMax campaign's copy and images."
2652
- },
2653
- subCommands: {
2654
- create: defineCommand4({
2655
- meta: {
2656
- name: "create",
2657
- description: "Stage a Performance Max asset group: 3\u201315 headlines (\u226430ch), 1\u20135 long headlines (\u226490ch), 2\u20135 descriptions (\u226490ch), a business name, and image refs."
2658
- },
2659
- args: {
2660
- ...customerIdArg,
2661
- ...fileArg,
2662
- "campaign-ref": {
2663
- type: "string",
2664
- description: "Performance Max campaign ref (g_temp_*, id, or resource name)"
2665
- },
2666
- name: { type: "string", description: "Asset group name" },
2667
- "final-urls": { type: "string", description: "Comma-separated final URLs" },
2668
- headlines: { type: "string", description: `Headlines (3\u201315, \u226430 chars) \u2014 ${AD_COPY_LIST_USAGE}` },
2669
- "long-headlines": { type: "string", description: `Long headlines (1\u20135, \u226490 chars) \u2014 ${AD_COPY_LIST_USAGE}` },
2670
- descriptions: { type: "string", description: `Descriptions (2\u20135, \u226490 chars) \u2014 ${AD_COPY_LIST_USAGE}` },
2671
- "business-name": { type: "string" },
2672
- "image-assets": { type: "string", description: "Comma-separated marketing image asset refs (1.91:1)" },
2673
- "square-image-assets": {
2674
- type: "string",
2675
- description: "Comma-separated square marketing image asset refs (1:1)"
2676
- },
2677
- "portrait-image-assets": {
2678
- type: "string",
2679
- description: "Comma-separated portrait marketing image asset refs (4:5)"
2680
- },
2681
- "logo-assets": { type: "string", description: "Comma-separated logo image asset refs" },
2682
- status: { type: "string", description: "ENABLED | PAUSED (default PAUSED)" }
2683
- },
2684
- run: async ({ args: parsedArgs, rawArgs }) => {
2685
- const args = withRepeatedCopyFlags(parsedArgs, rawArgs);
2686
- const customerId = requireCustomerId(args);
2687
- const headlines = copyListFlag(args.headlines, "headlines");
2688
- const longHeadlines = copyListFlag(args["long-headlines"], "long-headlines");
2689
- const descriptions = copyListFlag(args.descriptions, "descriptions");
2690
- const payload = mergePayload(loadJsonFileArg(args.file), {
2691
- campaign: args["campaign-ref"],
2692
- name: args.name,
2693
- finalUrls: listFlag(args["final-urls"]),
2694
- headlines: headlines?.map((text) => ({ text })),
2695
- longHeadlines: longHeadlines?.map((text) => ({ text })),
2696
- descriptions: descriptions?.map((text) => ({ text })),
2697
- businessName: args["business-name"],
2698
- imageAssets: listFlag(args["image-assets"]),
2699
- squareImageAssets: listFlag(args["square-image-assets"]),
2700
- portraitImageAssets: listFlag(args["portrait-image-assets"]),
2701
- logoAssets: listFlag(args["logo-assets"]),
2702
- status: args.status
2703
- });
2704
- await stageCreate("google.assetGroup.create", customerId, payload, [
2705
- ...copyListSplitHints(args),
2706
- "Performance Max has no keywords: give this group its search themes (and its audience signal, when the account has one) with `baker ads google asset-group-signals add --asset-group <its ref>` in this same draft."
2707
- ]);
2708
- }
2709
- }),
2710
- update: defineCommand4({
2711
- meta: { name: "update", description: "Stage a Performance Max asset group update" },
2712
- args: {
2713
- ...customerIdArg,
2714
- ...fileArg,
2715
- name: { type: "string" },
2716
- "final-urls": { type: "string", description: "Comma-separated final URLs" },
2717
- status: { type: "string", description: "ENABLED | PAUSED | REMOVED" }
2718
- },
2719
- run: async ({ args }) => {
2720
- const customerId = requireCustomerId(args);
2721
- const target = requireTarget(args, "asset group");
2722
- const payload = mergePayload(loadJsonFileArg(args.file), {
2723
- name: args.name,
2724
- finalUrls: listFlag(args["final-urls"]),
2725
- status: args.status
2726
- });
2727
- await stageUpdate("google.assetGroup.update", customerId, target, payload);
2728
- }
2729
- }),
2730
- attach: defineCommand4({
2731
- meta: {
2732
- name: "attach",
2733
- description: "Add one existing asset to an existing asset group. Start here to refresh a live PMax group's creatives: attach the new image, then `detach` the old one \u2014 never detach first."
2734
- },
2735
- args: {
2736
- ...customerIdArg,
2737
- ...fileArg,
2738
- "asset-group-ref": { type: "string", description: "Asset group ref (g_temp_*, id, or resource name)" },
2739
- "asset-ref": { type: "string", description: "Asset ref (g_temp_*, id, or resource name)" },
2740
- "field-type": {
2741
- type: "string",
2742
- description: `Slot the asset fills: ${ASSET_GROUP_ASSET_FIELD_TYPES.join(" | ")}`
2743
- }
2744
- },
2745
- run: async ({ args }) => {
2746
- const customerId = requireCustomerId(args);
2747
- const payload = mergePayload(loadJsonFileArg(args.file), {
2748
- assetGroup: args["asset-group-ref"],
2749
- asset: args["asset-ref"],
2750
- fieldType: args["field-type"]
2751
- });
2752
- await stageCreate("google.assetGroupAsset.attach", customerId, payload, [
2753
- "Swapping a creative? Stage the matching `asset-groups detach` for the image this one replaces \u2014 an attach alone grows the group instead of refreshing it.",
2754
- "The field type must match the image's real ratio (1.91:1 \u2192 MARKETING_IMAGE, 1:1 \u2192 SQUARE_MARKETING_IMAGE, 4:5 \u2192 PORTRAIT_MARKETING_IMAGE); Google rejects a mismatch at publish.",
2755
- "Slots have ceilings as well as minimums: BUSINESS_NAME and CALL_TO_ACTION_SELECTION hold 1, LOGO 5, LONG_HEADLINE and DESCRIPTION 5, HEADLINE 15, YOUTUBE_VIDEO 15, images 20. Staging counts what the group holds plus this chat's attaches and detaches, and refuses an attach to a full slot \u2014 stage the detach alongside it; removals are sent after additions. Replacing the business name (exactly 1): stage its detach first, then this attach."
2756
- ]);
2757
- }
2758
- }),
2759
- detach: statusCommand("google.assetGroupAsset.detach", "asset group asset", [
2760
- "Replacing this image? Stage its `asset-groups attach` too \u2014 removals publish after every addition whatever order they are staged in, so the new image is in place before this one leaves and the group never drops below its per-ratio minimum.",
2761
- "Pass the full composite resource name (customers/{cid}/assetGroupAssets/{assetGroupId}~{assetId}~{FIELD_TYPE}) \u2014 read it from `asset_group_asset.resource_name` via `ads google query`, scoping `asset_group_asset.status != 'REMOVED'`: the link carries its own status and Google returns an already-detached one like any other row."
2762
- ])
2763
- }
2764
- });
2765
- function imageAssetHints(payload) {
2766
- if (payload.type !== "image") {
2767
- return [];
2768
- }
2769
- return [
2770
- "This image publishes into the advertiser's Google Ads asset library. Stage the `assets attach` too, with field type AD_IMAGE on the campaign (or ad group) it belongs on: Google opens Search image links per account, so Baker asks Google as you stage \u2014 where the account takes them the link is staged and applies at publish, and where it does not the link is skipped and names the campaign in the handover Task.",
2771
- "Until a link to it is staged, Baker keeps a Task for this image in this chat's changes \u2014 the user adding it to the campaign under Assets \u2014 and withdraws it when an accepted link names the image; do not stage a second one with `baker actions`. If that Task is still there after the attach, tell the user the images are already in their Google Ads account and only need adding to the campaign under Assets, and name them. Never tell them to upload images they already have. (A Performance Max asset group is different \u2014 images link there with `asset-groups attach`.)"
2772
- ];
2773
- }
2774
- var assetsUpdateCommand = defineCommand4({
2775
- meta: {
2776
- name: "update",
2777
- description: "Update a staged or live asset in place (flat partial \u2014 set only the fields that changed). Works across asset types: sitelink (--link-text/--description1/--description2/--final-urls), callout (--callout-text), structured snippet (--header/--values), call-to-action (--cta), text (--text), or --name."
2778
- },
2779
- args: {
2780
- ...customerIdArg,
2781
- ...fileArg,
2782
- name: { type: "string", description: "Asset display name" },
2783
- "link-text": { type: "string", description: "Sitelink link text" },
2784
- description1: { type: "string", description: "Sitelink description line 1" },
2785
- description2: { type: "string", description: "Sitelink description line 2" },
2786
- "final-urls": { type: "string", description: "Comma-separated sitelink final URLs" },
2787
- "callout-text": { type: "string", description: "Callout text" },
2788
- header: { type: "string", description: "Structured snippet header" },
2789
- values: { type: "string", description: "Comma-separated structured snippet values (3-10, max 25 characters each)" },
2790
- cta: { type: "string", description: "Call-to-action text" },
2791
- text: { type: "string", description: "Text asset content" }
2792
- },
2793
- run: async ({ args }) => {
2794
- const customerId = requireCustomerId(args);
2795
- const target = requireTarget(args, "asset");
2796
- const payload = mergePayload(loadJsonFileArg(args.file), {
2797
- name: args.name,
2798
- linkText: args["link-text"],
2799
- description1: args.description1,
2800
- description2: args.description2,
2801
- finalUrls: listFlag(args["final-urls"]),
2802
- calloutText: args["callout-text"],
2803
- header: args.header,
2804
- values: listFlag(args.values),
2805
- callToAction: args.cta,
2806
- text: args.text
2807
- });
2808
- await stageUpdate("google.asset.update", customerId, target, payload);
2809
- }
2810
- });
2811
- var assetsCommand = defineCommand4({
2812
- meta: {
2813
- name: "assets",
2814
- description: "Stage asset create/update + asset-link attach/detach (via --file). For a high-performance Search campaign add \u22654 sitelinks, \u22653 callouts and \u22651 structured snippet per campaign. Image extensions: `create` uploads the image into the advertiser's account, then `attach` links it with field type AD_IMAGE (campaign or ad group). Google opens image links per account, so Baker asks Google as you stage: an account that takes them stages the link like a sitelink; one that does not skips it and stages a handover Task instead \u2014 never tell them to upload anything. The advertiser's logo links as BUSINESS_LOGO, at campaign or customer level, on a verified account."
2815
- },
2816
- subCommands: {
2817
- create: fileCreateCommand(
2818
- "create",
2819
- "google.asset.create",
2820
- "Stage an asset (text/image/sitelink/callout/structuredSnippet/\u2026)",
2821
- imageAssetHints
2822
- ),
2823
- update: assetsUpdateCommand,
2824
- attach: fileCreateCommand("attach", "google.assetLink.attach", "Attach an asset to a campaign/adGroup/customer", [
2825
- 'Search image extensions link as AD_IMAGE, at campaign or ad group level: `{"level":"campaign","parent":"<campaign id>","asset":"<image asset id or g_temp_ ref>","fieldType":"AD_IMAGE"}`. Google opens these per advertiser account, so Baker asks Google (a check that changes nothing) as you stage. The image must be 1.91:1 or 1:1 \u2014 any other shape is sent back to crop. Accepted \u2192 the link is staged and applies at publish. Refused or not confirmed \u2192 it is skipped rather than stored, the rest of a batch is unaffected, and Baker stages the handover Task naming those images and that campaign; then tell the user they are already in their Google Ads account and only need adding to the campaign under Assets, and do not stage a second Task with `baker actions`. MARKETING_IMAGE / SQUARE_MARKETING_IMAGE are Performance Max asset-group slots (`asset-groups attach`), never a Search link. The advertiser\'s logo links as `BUSINESS_LOGO` (campaign or customer level, on a verified account).'
2826
- ]),
2827
- detach: statusCommand("google.assetLink.detach", "asset link", [
2828
- "Pass the resource name Google gave you \u2014 `SELECT campaign_asset.resource_name \u2026 FROM campaign_asset WHERE campaign_asset.status != 'REMOVED'` (or `ad_group_asset` / `customer_asset`) \u2014 never one composed out of an owner id and an asset id. A link's own status is not its campaign's and not its ad group's, so an inventory read scoped only to those lists extensions that are already detached, and a link between an asset and an owner that never held it parses fine and exists nowhere. Either way the target is read back before it is staged, and a detach of a link that is not there is refused here rather than at publish."
2829
- ])
2830
- }
2831
- });
2832
- var audienceModeArg = {
2833
- mode: {
2834
- type: "string",
2835
- description: "observation = the audience only adjusts bids, reach is unchanged | targeting = the ads are shown only to people in the audiences attached to this campaign/ad group"
2836
- }
2837
- };
2838
- function requireAudienceMode(value) {
2839
- const mode = typeof value === "string" ? value.toLowerCase() : void 0;
2840
- if (mode !== "observation" && mode !== "targeting") {
2841
- failWriteValidation(
2842
- `pass --mode observation (the audience adjusts bids and reach is unchanged \u2014 the Google Ads interface's default) or --mode targeting (the ads are shown only to people in the audiences on this campaign/ad group). There is no safe default: the API's own default is targeting, which can cut a campaign's reach to the size of the list.`
2843
- );
2844
- }
2845
- return mode === "observation" ? "OBSERVATION" : "TARGETING";
2846
- }
2847
- function requireAudienceLevel(value) {
2848
- const level = requireStringFlag(value, "--level");
2849
- if (level !== "campaign" && level !== "adGroup") {
2850
- failWriteValidation("--level must be campaign or adGroup");
2851
- }
2852
- return level;
2853
- }
2854
- var AUDIENCE_ATTACH_HINTS = [
2855
- 'Read back what the parent ended up with before you report: `baker ads google query "SELECT campaign.id, campaign.targeting_setting.target_restrictions FROM campaign"` (or the ad_group equivalent). A missing AUDIENCE row means TARGETING \u2014 Google does not serialize an empty setting, so absence is a value, not a gap.',
2856
- "Staging checks the list is big enough to serve on this campaign's network (100 active users on search, display and YouTube) and refuses a targeting attach that is not. It does NOT check delivery afterwards, and Google reports no error when an audience stops a campaign serving \u2014 after publishing, read the campaign's impressions for the hour that follows and say what you saw."
2857
- ];
2858
- var audiencesAttachCommand = defineCommand4({
2859
- meta: {
2860
- name: "attach",
2861
- description: "Target or exclude an audience on a campaign or ad group \u2014 a list (--user-list), an interest or in-market segment (--interest) or a custom segment (--custom-segment). Start here: baker ads google audiences attach --customer-id 1234567890 --level campaign --parent 23837707642 --user-list 9398951971 --mode observation. `--mode` is required for a positive attach and decides whether the list only adjusts bids (observation) or narrows who sees the ads (targeting) \u2014 with --mode observation the audience setting is staged alongside the attach, because Google's API otherwise defaults to targeting."
2862
- },
2863
- args: {
2864
- ...customerIdArg,
2865
- ...fileArg,
2866
- ...audienceModeArg,
2867
- level: { type: "string", description: "campaign | adGroup" },
2868
- parent: { type: "string", description: "Campaign or ad group id (or a g_temp_* ref staged earlier)" },
2869
- "user-list": { type: "string", description: "User list id (or a g_temp_* ref from `audiences create`)" },
2870
- interest: {
2871
- type: "string",
2872
- description: "Interest or in-market segment id (`user_interest.user_interest_id`) \u2014 instead of --user-list"
2873
- },
2874
- "custom-segment": {
2875
- type: "string",
2876
- description: "Custom segment id (`custom_audience.id`) built in Google Ads \u2014 instead of --user-list"
2877
- },
2878
- negative: { type: "boolean", description: "Exclude this audience instead of targeting it" }
2879
- },
2880
- run: async ({ args }) => {
2881
- const customerId = requireCustomerId(args);
2882
- const payload = mergePayload(loadJsonFileArg(args.file), {
2883
- level: args.level,
2884
- parent: args.parent,
2885
- userList: args["user-list"],
2886
- userInterest: args.interest,
2887
- customAudience: args["custom-segment"],
2888
- negative: args.negative
2889
- });
2890
- if (payload.negative === true) {
2891
- if (args.mode !== void 0) {
2892
- failWriteValidation(
2893
- "--mode does not apply to --negative: an excluded audience is excluded under both observation and targeting. Drop --mode, or drop --negative if you meant to target the list."
2894
- );
2895
- }
2896
- await stageGoogleOp({ kind: "google.audienceCriterion.attach", customerId, payload });
2897
- return;
2898
- }
2899
- const ops = audienceAttachOps(customerId, payload, requireAudienceMode(args.mode));
2900
- await stageGoogleOps(ops, AUDIENCE_ATTACH_HINTS);
2901
- }
2902
- });
2903
- function audienceAttachOps(customerId, payload, mode) {
2904
- const attachOp = { kind: "google.audienceCriterion.attach", customerId, payload };
2905
- if (mode === "TARGETING") {
2906
- return [attachOp];
2907
- }
2908
- return [
2909
- {
2910
- kind: "google.targetingSetting.set",
2911
- customerId,
2912
- payload: { level: payload.level, parent: payload.parent, audience: "OBSERVATION" }
2913
- },
2914
- attachOp
2915
- ];
2916
- }
2917
- var audiencesTargetingCommand = defineCommand4({
2918
- meta: {
2919
- name: "targeting",
2920
- description: "Switch the audiences already on a campaign or ad group between observation (they adjust bids only) and targeting (the ads are shown only to people in them) \u2014 the Observation/Targeting selector in the Google Ads interface. Start here: baker ads google audiences targeting 195883284706 --customer-id 1234567890 --level adGroup --mode observation."
2921
- },
2922
- args: {
2923
- ...customerIdArg,
2924
- ...audienceModeArg,
2925
- level: { type: "string", description: "campaign | adGroup" }
2926
- },
2927
- run: async ({ args }) => {
2928
- const customerId = requireCustomerId(args);
2929
- const parent = requireTarget(args, "campaign or ad group");
2930
- await stageGoogleOp({
2931
- kind: "google.targetingSetting.set",
2932
- customerId,
2933
- payload: { level: requireAudienceLevel(args.level), parent, audience: requireAudienceMode(args.mode) }
2934
- });
2935
- }
2936
- });
2937
- var audiencesCommand = defineCommand4({
2938
- meta: {
2939
- name: "audiences",
2940
- description: "Stage audience (user list) create, criterion attach/detach, and the observation/targeting setting the criteria are read under"
2941
- },
2942
- subCommands: {
2943
- create: fileCreateCommand(
2944
- "create",
2945
- "google.audience.create",
2946
- `Stage a user-list audience from --file. Each type carries what Google builds it from. Start here:
2947
- website visitors {"name":"Pricing visitors","type":"RULE_BASED","rule":{"include":[{"conditions":[{"operator":"CONTAINS","value":"/pricing"}],"lookbackWindowDays":30}],"prefill":true}}
2948
- converters {"name":"Buyers","type":"BASIC","conversionActions":["<existing conversion action id>"],"membershipLifeSpanDays":90}
2949
- combined {"name":"Visitors, not buyers","type":"LOGICAL","logic":[{"operator":"ANY","audiences":["<existing id>"]},{"operator":"NONE","audiences":["<existing id>"]}]}
2950
- lookalike {"name":"Like buyers","type":"LOOKALIKE","lookalike":{"seedAudiences":["<existing audience id>"],"expansion":"BALANCED","countryCodes":["ES"]}} (Demand Gen only)
2951
- customer list {"name":"Customers","type":"CRM_BASED","members":[{"email":"\u2026"}]}`
2952
- ),
2953
- attach: audiencesAttachCommand,
2954
- detach: statusCommand("google.audienceCriterion.detach", "audience criterion"),
2955
- targeting: audiencesTargetingCommand
2956
- }
2957
- });
2958
- var PRIMARY_FOR_GOAL_QUERY = 'baker ads google query "SELECT conversion_action.name, conversion_action.primary_for_goal, conversion_action.status FROM conversion_action"';
2959
- var CONVERSION_CREATE_HINTS = [
2960
- `A new conversion action is staged as SECONDARY (reported, not bid toward) unless the payload says \`"primaryForGoal": true\` \u2014 Google otherwise decides for you, and an accidentally-primary action redirects the spend of every Maximize Conversions / Target CPA campaign. Ask the user which they want rather than guessing.`
2961
- ];
2962
- var CONVERSION_ROLE_HINTS = [
2963
- `Primary actions are what Maximize Conversions / Target CPA campaigns bid toward. Before publishing, list what the account will be left with: ${PRIMARY_FOR_GOAL_QUERY} \u2014 and say so if this leaves no primary action, because bidding then has nothing to optimize toward.`
2964
- ];
2965
- function conversionGoalFromFlags(args) {
2966
- const booleanWord = booleanWordPositionalError(args, "conversion goal");
2967
- if (booleanWord) {
2968
- failWriteValidation(booleanWord);
2969
- }
2970
- const category = requireStringFlag(args.category, "--category").toUpperCase();
2971
- const origin = requireStringFlag(args.origin, "--origin").toUpperCase();
2972
- if (typeof args.biddable !== "boolean") {
2973
- failWriteValidation(
2974
- "pass --biddable (this conversion category drives automated bidding) or --no-biddable (it is measured only). There is no safe default \u2014 this changes what the whole account bids toward."
2975
- );
2976
- }
2977
- if (!CONVERSION_ACTION_CATEGORIES.includes(category)) {
2978
- failWriteValidation(`--category must be one of ${CONVERSION_ACTION_CATEGORIES.join(" | ")}`);
2979
- }
2980
- if (!CONVERSION_ORIGINS.includes(origin)) {
2981
- failWriteValidation(`--origin must be one of ${CONVERSION_ORIGINS.join(" | ")}`);
2982
- }
2983
- return { category, origin, biddable: args.biddable };
2984
- }
2985
- var CONVERSION_GOAL_QUERY = 'baker ads google query "SELECT customer_conversion_goal.category, customer_conversion_goal.origin, customer_conversion_goal.biddable FROM customer_conversion_goal"';
2986
- var CONVERSION_GOAL_HINTS = [
2987
- `A conversion drives automated bidding only when BOTH halves are on: the action is primary (\`conversions update --primary\`) AND its category's account-level goal is included (this command). Before publishing, read back what the account will bid toward: ${CONVERSION_GOAL_QUERY} \u2014 and say plainly which conversions this leaves driving spend.`
2988
- ];
2989
- var conversionsCommand = defineCommand4({
2990
- meta: {
2991
- name: "conversions",
2992
- description: "Stage conversion action create/update (via --file), the account-level goal, and manual conversion uploads for a period where tracking was broken"
2993
- },
2994
- subCommands: {
2995
- upload: () => import("./conversion-upload-command-HFZYKVXA.js").then((m) => m.conversionsUploadCommand),
2996
- create: fileCreateCommand(
2997
- "create",
2998
- "google.conversionAction.create",
2999
- "Stage a conversion action (secondary unless the payload sets primaryForGoal)",
3000
- CONVERSION_CREATE_HINTS
3001
- ),
3002
- update: defineCommand4({
3003
- meta: {
3004
- name: "update",
3005
- description: "Stage a conversion action update. --primary makes it a primary action (automated bidding optimizes toward it); --no-primary demotes it to secondary (reported only)."
3006
- },
3007
- args: {
3008
- ...customerIdArg,
3009
- ...fileArg,
3010
- primary: {
3011
- type: "boolean",
3012
- // The spaced form is refused by `booleanWordPositionalError`, shared by every ad surface
3013
- // and the source of truth for this — the description only states the forms that work.
3014
- description: "Primary action \u2014 automated bidding optimizes toward it. Demote to secondary (reported only) with --no-primary or --primary=false."
3015
- }
3016
- },
3017
- run: async ({ args }) => {
3018
- const customerId = requireCustomerId(args);
3019
- const payload = mergePayload(loadJsonFileArg(args.file), { primaryForGoal: args.primary });
3020
- await stageUpdate(
3021
- "google.conversionAction.update",
3022
- customerId,
3023
- requireTarget(args, "conversion action"),
3024
- payload,
3025
- payload.primaryForGoal === void 0 ? void 0 : CONVERSION_ROLE_HINTS
3026
- );
3027
- }
3028
- }),
3029
- goal: defineCommand4({
3030
- meta: {
3031
- name: "goal",
3032
- description: `Stage the ACCOUNT-LEVEL conversion goal for one (category, origin) pair \u2014 Google Ads' "Included in account-level goals" switch. Start here when a conversion action is already Primary but bidding still ignores it: both halves have to be on. One command per pair. --biddable includes the category in bidding; --no-biddable measures it only.`
3033
- },
3034
- args: {
3035
- ...customerIdArg,
3036
- category: {
3037
- type: "string",
3038
- description: `Conversion category, e.g. PURCHASE, SUBMIT_LEAD_FORM, SIGNUP (${CONVERSION_ACTION_CATEGORIES.join(" | ")})`
3039
- },
3040
- origin: {
3041
- type: "string",
3042
- description: `Where the conversion happens (${CONVERSION_ORIGINS.join(" | ")})`
3043
- },
3044
- biddable: {
3045
- type: "boolean",
3046
- // The spaced form is refused by `booleanWordPositionalError` — the description only states
3047
- // the forms that work.
3048
- description: "Include this category in the account's bidding goals. Exclude it (measured only, never bid toward) with --no-biddable or --biddable=false."
3049
- }
3050
- },
3051
- run: async ({ args }) => {
3052
- const customerId = requireCustomerId(args);
3053
- await stageCreate("google.conversionAction.goal", customerId, conversionGoalFromFlags(args), [
3054
- ...CONVERSION_GOAL_HINTS
3055
- ]);
3056
- }
3057
- })
3058
- }
3059
- });
3060
- var biddingStrategiesCommand = defineCommand4({
3061
- meta: {
3062
- name: "bidding-strategies",
3063
- description: "Stage portfolio bidding strategy create/update (via --file) and remove"
3064
- },
3065
- subCommands: {
3066
- create: fileCreateCommand("create", "google.biddingStrategy.create", "Stage a portfolio bidding strategy"),
3067
- update: defineCommand4({
3068
- meta: { name: "update", description: "Stage a portfolio bidding strategy update" },
3069
- args: { ...customerIdArg, ...fileArg },
3070
- run: async ({ args }) => {
3071
- const customerId = requireCustomerId(args);
3072
- await stageUpdate(
3073
- "google.biddingStrategy.update",
3074
- customerId,
3075
- requireTarget(args, "bidding strategy"),
3076
- loadJsonFileArg(args.file)
3077
- );
3078
- }
3079
- }),
3080
- remove: statusCommand("google.biddingStrategy.remove", "portfolio bid strategy", [
3081
- "A portfolio can be removed only once no campaign bids with it: staging refuses it while one does, unless this draft removes those campaigns or moves them to their own bidding or another portfolio."
3082
- ])
3083
- }
3084
- });
3085
- function labelAttachFromFlags(args) {
3086
- return {
3087
- level: requireStringFlag(args.level, "--level"),
3088
- parent: requireStringFlag(args.on, "--on"),
3089
- label: requireStringFlag(args["label-ref"], "--label-ref")
3090
- };
3091
- }
3092
- function labelUpdateFromFlags(args) {
3093
- return {
3094
- name: args.name,
3095
- backgroundColor: args["background-color"],
3096
- description: args.description
3097
- };
3098
- }
3099
- var LABEL_LEVEL_HELP = "campaign | adGroup | ad | keyword. An ad or keyword is named by its full resource name (customers/{cid}/adGroupAds/{adGroupId}~{adId}, customers/{cid}/adGroupCriteria/{adGroupId}~{criterionId}). Google has no labels on assets, and labels on the account itself come only from a manager account \u2014 both are refused.";
3100
- var labelsCommand = defineCommand4({
3101
- meta: {
3102
- name: "labels",
3103
- description: "Stage labels: create, update (name/colour/description), remove, attach to a campaign/ad group/ad/keyword, detach"
3104
- },
3105
- subCommands: {
3106
- create: defineCommand4({
3107
- meta: { name: "create", description: `Create a label. Names are unique in the account. ${STAGED_WRITE}` },
3108
- args: {
3109
- ...customerIdArg,
3110
- name: { type: "string" },
3111
- "background-color": { type: "string", description: "Hex colour, e.g. #1A73E8" },
3112
- description: { type: "string" }
3113
- },
3114
- run: async ({ args }) => {
3115
- const customerId = requireCustomerId(args);
3116
- await stageCreate("google.label.create", customerId, {
3117
- name: requireStringFlag(args.name, "--name"),
3118
- backgroundColor: args["background-color"],
3119
- description: args.description
3120
- });
3121
- }
3122
- }),
3123
- update: defineCommand4({
3124
- meta: {
3125
- name: "update",
3126
- description: `Rename a label or change its colour or description. Start here:
3127
- baker ads google labels update 22297940102 --name "Q4 push" --customer-id 1234567890
3128
- \`--description ""\` clears the description. ${STAGED_WRITE}`
3129
- },
3130
- args: {
3131
- ...customerIdArg,
3132
- id: { type: "positional", description: "Label id or customers/{cid}/labels/{id}", required: false },
3133
- name: { type: "string", description: "New name \u2014 unique in the account" },
3134
- "background-color": { type: "string", description: "Hex colour, e.g. #1A73E8" },
3135
- description: { type: "string", description: 'New description ("" clears it)' }
3136
- },
3137
- run: async ({ args }) => {
3138
- const customerId = requireCustomerId(args);
3139
- await stageUpdate("google.label.update", customerId, requireTarget(args, "label"), labelUpdateFromFlags(args));
3140
- }
3141
- }),
3142
- remove: statusCommand("google.label.remove", "label", [
3143
- "This removes the label itself \u2014 no need to detach it first. To take it off one thing only, use `labels detach <link resource name>`."
3144
- ]),
3145
- attach: defineCommand4({
3146
- meta: {
3147
- name: "attach",
3148
- description: `Put a label on a campaign, ad group, ad or keyword. Start here:
3149
- baker ads google labels attach --level campaign --on 23456789 --label-ref g_temp_\u2026 --customer-id 1234567890
3150
- baker ads google labels attach --level keyword --on customers/1234567890/adGroupCriteria/55~66 --label-ref 22297940102 --customer-id 1234567890
3151
- Many at once: --file labels.json (a JSON array of {level, parent, label}). ${STAGED_WRITE}`
3152
- },
3153
- args: {
3154
- ...customerIdArg,
3155
- ...fileBatchArg,
3156
- level: { type: "string", description: LABEL_LEVEL_HELP },
3157
- on: {
3158
- type: "string",
3159
- description: "What gets the label: campaign/ad group ref, or an ad's/keyword's resource name"
3160
- },
3161
- "label-ref": {
3162
- type: "string",
3163
- description: "The label: g_temp_* from `labels create`, its id, or resource name"
3164
- }
3165
- },
3166
- run: async ({ args }) => {
3167
- const customerId = requireCustomerId(args);
3168
- const payloads = args.file ? loadJsonPayloads(args.file) : [labelAttachFromFlags(args)];
3169
- if (payloads.length > GOOGLE_DRAFT_BATCH_MAX) {
3170
- failWriteValidation(
3171
- `${payloads.length} payloads exceeds the batch limit of ${GOOGLE_DRAFT_BATCH_MAX} \u2014 split the file`
3172
- );
3173
- }
3174
- await stageGoogleOps(payloads.map((payload) => ({ kind: "google.label.attach", customerId, payload })));
3175
- }
3176
- }),
3177
- detach: statusCommand("google.label.detach", "label link", [
3178
- 'A label link is named by what it sits on and the label: customers/{cid}/campaignLabels/{campaignId}~{labelId}, adGroupLabels/{adGroupId}~{labelId}, adGroupAdLabels/{adGroupId}~{adId}~{labelId} or adGroupCriterionLabels/{adGroupId}~{criterionId}~{labelId} \u2014 read it with `baker ads google query "SELECT campaign_label.resource_name, label.name FROM campaign_label"`.'
3179
- ])
3180
- }
3181
- });
3182
- var googleWriteCommands = {
3183
- account: accountCommand,
3184
- budgets: budgetsCommand,
3185
- campaigns: campaignsCommand,
3186
- "ad-groups": adGroupsCommand,
3187
- "negative-keywords": negativeKeywordsCommand,
3188
- "keyword-lists": keywordListsCommand,
3189
- ads: adsCommand,
3190
- assets: assetsCommand,
3191
- "asset-groups": assetGroupsCommand,
3192
- audiences: audiencesCommand,
3193
- conversions: conversionsCommand,
3194
- "bidding-strategies": biddingStrategiesCommand,
3195
- labels: labelsCommand,
3196
- "campaign-criteria": campaignCriteriaCommand,
3197
- "ad-group-criteria": adGroupCriteriaCommand,
3198
- "ad-group-bid-modifiers": adGroupBidModifiersCommand,
3199
- "account-exclusions": accountExclusionsCommand,
3200
- "asset-group-signals": assetGroupSignalsCommand
3201
- };
3202
-
3203
- // src/commands/ads/google/index.ts
3204
- var keywordsWithWrites = defineCommand5({
3205
- meta: keywordsCommand.meta,
3206
- subCommands: {
3207
- ...keywordsCommand.subCommands,
3208
- ...LIST_COMMANDS.keywords ? { list: LIST_COMMANDS.keywords } : {},
3209
- ...keywordWriteSubcommands
3210
- }
3211
- });
3212
- function withList(thing, command) {
3213
- const list2 = LIST_COMMANDS[thing];
3214
- if (!list2) return command;
3215
- return defineCommand5({ meta: command.meta, args: command.args, subCommands: { list: list2, ...command.subCommands } });
3216
- }
3217
- var googleWriteCommandsWithLists = Object.fromEntries(
3218
- Object.entries(googleWriteCommands).map(([thing, command]) => [thing, withList(thing, command)])
3219
- );
3220
- var merchantCenterCommand = defineCommand5({
3221
- meta: { name: "merchant-center", description: "Merchant Center accounts linked to this Google Ads account" },
3222
- subCommands: LIST_COMMANDS["merchant-center"] ? { list: LIST_COMMANDS["merchant-center"] } : {}
3223
- });
3224
- var googleCommand = defineCommand5({
3225
- meta: {
3226
- name: "google",
3227
- description: `Google Ads commands. Query campaigns, keywords, search terms, and more via GAQL.
3228
-
3229
- Start here:
3230
- baker ads google accounts \u2014 list accessible accounts
3231
- baker ads google campaigns list \u2014 what exists, with ids (also ad-groups, keywords, ads, \u2026 list)
3232
- baker ads google query --list-presets \u2014 see available query templates
3233
-
3234
- Examples:
3235
- baker ads google query "SELECT campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_7_DAYS" --customer-id 1234567890
3236
- baker ads google query --preset campaign-performance --customer-id 1234567890
3237
- baker ads google currency --customer-id 1234567890
3238
- baker ads google url-options --customer-id 1234567890 \u2014 UTM / tracking parameters in force
3239
- baker ads google keywords discover --customer-id 1234567890 --seeds "running shoes"
3240
- baker ads google keywords forecast --customer-id 1234567890 --text "running shoes:PHRASE" --max-cpc 1.2
3241
- baker ads google previews --customer-id 1234567890 --asset-groups 111 \u2014 shareable preview link
3242
- baker ads google invoices --customer-id 1234567890 \u2014 last month's invoices
3243
-
3244
- Staged writes (never touch Google until the chat is published):
3245
- baker ads google budgets create --customer-id 1234567890 --name "Search" --amount 50
3246
- baker ads google campaigns create --customer-id 1234567890 --name "Brand" --channel-type SEARCH --budget-ref g_temp_\u2026 --bidding-strategy MANUAL_CPC
3247
- baker ads google keyword-lists create --customer-id 1234567890 --name "Brand exclusions"
3248
- baker ads google draft list \u2014 review staged Google Ads changes
3249
- Full guide: __tooling__/docs/tools/baker/ads-google.md`
3250
- },
3251
- subCommands: {
3252
- accounts: () => import("./accounts-ILVWPJBC.js").then((m) => m.accountsCommand),
3253
- currency: () => import("./currency-CHBV6WIO.js").then((m) => m.currencyCommand),
3254
- "url-options": () => import("./url-options-YZ6UG3NY.js").then((m) => m.urlOptionsCommand),
3255
- changes: () => import("./changes-HXVZUJMH.js").then((m) => m.changesCommand),
3256
- invoices: () => import("./account-reads-X36NPCX5.js").then((m) => m.invoicesCommand),
3257
- "identity-verification": () => import("./account-reads-X36NPCX5.js").then((m) => m.identityVerificationCommand),
3258
- previews: () => import("./account-reads-X36NPCX5.js").then((m) => m.previewsCommand),
3259
- brands: () => import("./account-reads-X36NPCX5.js").then((m) => m.brandsCommand),
3260
- query: () => import("./query-FT2BA3WH.js").then((m) => m.queryCommand),
3261
- keywords: keywordsWithWrites,
3262
- ...googleWriteCommandsWithLists,
3263
- "merchant-center": merchantCenterCommand,
3264
- draft: () => import("./draft-R7BNWMBR.js").then((m) => m.draftCommand)
3265
- }
3266
- });
3267
- export {
3268
- googleCommand
3269
- };
3270
- //# sourceMappingURL=google-JHTOX6WM.js.map