@koda-sl/baker-cli 0.852.0-dev.d40dfecc3 → 0.852.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (904) hide show
  1. package/README.md +3 -4
  2. package/dist/account-LYIKZSK6.js +82 -0
  3. package/dist/account-NUMWJW6T.js +83 -0
  4. package/dist/account-reads-XQW6DONK.js +230 -0
  5. package/dist/account-users-HLAIWV56.js +69 -0
  6. package/dist/account-writes-SQNABDXI.js +68 -0
  7. package/dist/accounts-3SJ7MJ2J.js +122 -0
  8. package/dist/accounts-DEE32AAB.js +505 -0
  9. package/dist/accounts-VD3L6PNZ.js +81 -0
  10. package/dist/actions-FRKZVXCV.js +55 -0
  11. package/dist/activecampaign-LEFG3NHR.js +935 -0
  12. package/dist/ad-group-writes-KEFM32CI.js +172 -0
  13. package/dist/ad-groups-LQ43ZKNL.js +70 -0
  14. package/dist/ad-writes-XPHRUOPG.js +176 -0
  15. package/dist/add-AGLSZKII.js +108 -0
  16. package/dist/add-D4LTUMP7.js +662 -0
  17. package/dist/add-SX4AZSWP.js +661 -0
  18. package/dist/ads-ANPWI4VC.js +48 -0
  19. package/dist/ads-IHKW7OPB.js +79 -0
  20. package/dist/advertisers-Y3XOK4KZ.js +126 -0
  21. package/dist/alerts-NIPFX5W7.js +153 -0
  22. package/dist/analytics-56YWZQXD.js +2791 -0
  23. package/dist/analytics-62RX4Y7M.js +461 -0
  24. package/dist/animate-FNBWXIGV.js +482 -0
  25. package/dist/assign-5LY7WGFF.js +83 -0
  26. package/dist/audience-size-QS2KK5LQ.js +77 -0
  27. package/dist/audiences-ICDEHT2G.js +280 -0
  28. package/dist/audit-DGFXEARA.js +155 -0
  29. package/dist/autocomplete-IKXTDPIZ.js +117 -0
  30. package/dist/avatars-7XQ7CHR5.js +38 -0
  31. package/dist/bid-pricing-XQH4KP6G.js +104 -0
  32. package/dist/brief-AJNHUSNI.js +511 -0
  33. package/dist/campaign-groups-2Q5ZY77R.js +118 -0
  34. package/dist/campaign-writes-KN5W3MHP.js +176 -0
  35. package/dist/campaign-writes-ZAI7K5DH.js +169 -0
  36. package/dist/campaigns-3BV5AJWW.js +78 -0
  37. package/dist/campaigns-BECFEETG.js +193 -0
  38. package/dist/campaigns-ZL7H636S.js +111 -0
  39. package/dist/canvas-B5FB2Y4Y.js +48 -0
  40. package/dist/capabilities-YC7R3SC2.js +184 -0
  41. package/dist/catalog-IUC2NDKC.js +89 -0
  42. package/dist/catalogs-OBZ6RBGL.js +130 -0
  43. package/dist/changes-VNVWJDIH.js +288 -0
  44. package/dist/chatgpt-HBHB7HCD.js +47 -0
  45. package/dist/chats-76BSMXGD.js +659 -0
  46. package/dist/check-M7BR7ZE5.js +54 -0
  47. package/dist/chunk-22FIUNKA.js +24026 -0
  48. package/dist/chunk-22FIUNKA.js.map +1 -0
  49. package/dist/chunk-2QW27HOH.js +8382 -0
  50. package/dist/chunk-34HHJJGC.js +685 -0
  51. package/dist/chunk-3E3HCJQW.js +329 -0
  52. package/dist/chunk-4K3RSU2Q.js +224 -0
  53. package/dist/chunk-56ZBWT6K.js +547 -0
  54. package/dist/chunk-5JW4S663.js +64 -0
  55. package/dist/chunk-5X32X4Y4.js +915 -0
  56. package/dist/chunk-7BLFVYVN.js +51 -0
  57. package/dist/chunk-ADAHRMJK.js +46 -0
  58. package/dist/chunk-BSZG36OF.js +98 -0
  59. package/dist/chunk-CA37TFTI.js +1124 -0
  60. package/dist/chunk-CGW6CIGD.js +479 -0
  61. package/dist/chunk-CK5QALZI.js +251 -0
  62. package/dist/chunk-DVAVH7UV.js +103 -0
  63. package/dist/chunk-DWKUYUKC.js +1862 -0
  64. package/dist/chunk-DZE2UHST.js +147 -0
  65. package/dist/chunk-E6UZBNR2.js +61 -0
  66. package/dist/chunk-FCX746P4.js +6340 -0
  67. package/dist/chunk-FGTSDCB4.js +175 -0
  68. package/dist/chunk-H7JSYC4X.js +4416 -0
  69. package/dist/chunk-H7JSYC4X.js.map +1 -0
  70. package/dist/chunk-HHX73JNN.js +313 -0
  71. package/dist/chunk-ICEPT2UY.js +260 -0
  72. package/dist/chunk-IDJKNL7P.js +392 -0
  73. package/dist/chunk-INW3G4P3.js +749 -0
  74. package/dist/chunk-IYMF3GSB.js +396 -0
  75. package/dist/chunk-KLF5K55H.js +732 -0
  76. package/dist/chunk-KQ4XRUMX.js +341 -0
  77. package/dist/chunk-LQ2OYP25.js +1577 -0
  78. package/dist/chunk-LVJTYN5B.js +155 -0
  79. package/dist/chunk-LXDZCFII.js +375 -0
  80. package/dist/chunk-MCAY57W7.js +9127 -0
  81. package/dist/chunk-MCI6ASBE.js +660 -0
  82. package/dist/chunk-MIAAADD3.js +320 -0
  83. package/dist/chunk-MJX6NXSX.js +65 -0
  84. package/dist/chunk-NAF5XSOI.js +430 -0
  85. package/dist/chunk-NLW7LW75.js +91 -0
  86. package/dist/chunk-O27BGGFC.js +152 -0
  87. package/dist/chunk-O7JZT4G3.js +262 -0
  88. package/dist/chunk-ORCAPJDH.js +3378 -0
  89. package/dist/chunk-OTLMQDGW.js +374 -0
  90. package/dist/chunk-P5YJ3EA7.js +202 -0
  91. package/dist/chunk-QAEUP6YB.js +89 -0
  92. package/dist/chunk-QTIPLD3K.js +274 -0
  93. package/dist/chunk-RUCJNF4B.js +423 -0
  94. package/dist/chunk-S3CNDNCK.js +91 -0
  95. package/dist/chunk-SAA4VKF2.js +285 -0
  96. package/dist/chunk-SCN5ZF4U.js +76 -0
  97. package/dist/chunk-SDFVQDNF.js +10430 -0
  98. package/dist/chunk-SDFVQDNF.js.map +1 -0
  99. package/dist/chunk-SELST7KK.js +170 -0
  100. package/dist/chunk-SH5WRHTG.js +78 -0
  101. package/dist/chunk-T7V2OPW2.js +127 -0
  102. package/dist/chunk-V6OAGU3U.js +509 -0
  103. package/dist/chunk-V76H3HWD.js +505 -0
  104. package/dist/chunk-VDS6NSLF.js +877 -0
  105. package/dist/chunk-VPNV2WDD.js +303 -0
  106. package/dist/chunk-VRCUW2J5.js +23 -0
  107. package/dist/chunk-WONTGSXR.js +170 -0
  108. package/dist/chunk-WUYDIH4N.js +142 -0
  109. package/dist/chunk-X6LTFBPF.js +604 -0
  110. package/dist/chunk-X7UGF2LE.js +197 -0
  111. package/dist/chunk-XOQWT2LZ.js +548 -0
  112. package/dist/chunk-XQRMBE6T.js +1883 -0
  113. package/dist/chunk-XTNXJZRK.js +863 -0
  114. package/dist/chunk-XXYRJ5YO.js +411 -0
  115. package/dist/chunk-YL7XIJ43.js +723 -0
  116. package/dist/chunk-YL7XIJ43.js.map +1 -0
  117. package/dist/chunk-YYN6I6L5.js +163 -0
  118. package/dist/chunk-ZJK3PVM2.js +723 -0
  119. package/dist/chunk-ZSC3LYTP.js +3248 -0
  120. package/dist/chunk-ZSC3LYTP.js.map +1 -0
  121. package/dist/chunk-ZVA2BZKM.js +746 -0
  122. package/dist/chunk-ZWANN4QQ.js +163 -0
  123. package/dist/chunk-ZXG5MYV4.js +26 -0
  124. package/dist/claim-W2QLJLKZ.js +218 -0
  125. package/dist/cli.js +38 -38
  126. package/dist/companies-TJR33KNS.js +36 -0
  127. package/dist/company-OGES42WN.js +311 -0
  128. package/dist/complete-FCR3UXSH.js +87 -0
  129. package/dist/connect-KACFSWER.js +46 -0
  130. package/dist/conversation-TLM7HDLK.js +100 -0
  131. package/dist/conversion-report-4WJ5D4FD.js +130 -0
  132. package/dist/conversion-upload-command-REUCOQWP.js +456 -0
  133. package/dist/conversion-writes-2W3RVOJW.js +194 -0
  134. package/dist/conversions-2QHK35VN.js +141 -0
  135. package/dist/conversions-TI3MZYCT.js +78 -0
  136. package/dist/create-5VQBHCGR.js +356 -0
  137. package/dist/create-EAY2FGWT.js +65 -0
  138. package/dist/create-EN2XXE7H.js +190 -0
  139. package/dist/create-TIKC6VNL.js +219 -0
  140. package/dist/creatives-SVNGDC45.js +48 -0
  141. package/dist/creatives-U2CIA6KE.js +235 -0
  142. package/dist/credentials-TSWUQUWC.js +291 -0
  143. package/dist/critique-K3IPZB5P.js +230 -0
  144. package/dist/crm-55ZVWDQF.js +327 -0
  145. package/dist/crm-REPCWBGZ.js +418 -0
  146. package/dist/currency-W5SXMZMS.js +91 -0
  147. package/dist/customers-UN5KGSPW.js +69 -0
  148. package/dist/data-GXAJGTKM.js +665 -0
  149. package/dist/delete-3BHIQWRA.js +60 -0
  150. package/dist/delete-UJTIAYNP.js +71 -0
  151. package/dist/delete-Z2TCOW7K.js +70 -0
  152. package/dist/demographics-EAX6HNK7.js +145 -0
  153. package/dist/discard-BJ4ZSAHC.js +72 -0
  154. package/dist/discover-RHVFYP6K.js +191 -0
  155. package/dist/domain-O5ZO3DND.js +104 -0
  156. package/dist/download-4GPS3IQ7.js +174 -0
  157. package/dist/draft-4A3QXAHP.js +389 -0
  158. package/dist/draft-APO4PJTI.js +427 -0
  159. package/dist/draft-BO5QGZBG.js +153 -0
  160. package/dist/draft-ORRHY3BU.js +227 -0
  161. package/dist/draft-UIFX2SZ4.js +340 -0
  162. package/dist/draft-ULEQPQYF.js +640 -0
  163. package/dist/engine/index.js +9 -9
  164. package/dist/experiments-LMMZJPZU.js +241 -0
  165. package/dist/extract-DJNIQC3V.js +144 -0
  166. package/dist/facets-V2AKFR2X.js +118 -0
  167. package/dist/feedback-6P545EJO.js +115 -0
  168. package/dist/fetch-D7I5WPU5.js +487 -0
  169. package/dist/fit-BMJTIAOF.js +69 -0
  170. package/dist/flows-LCP5GK5X.js +342 -0
  171. package/dist/forecast-BAP5V237.js +189 -0
  172. package/dist/forecast-DTEBUBC2.js +122 -0
  173. package/dist/funnel-HBLIX62B.js +701 -0
  174. package/dist/generate-AQZZ5LHX.js +265 -0
  175. package/dist/get-FPNIXE7U.js +114 -0
  176. package/dist/get-UEL3XOCM.js +77 -0
  177. package/dist/google-EQQN5LVF.js +164 -0
  178. package/dist/google-SO2H3SLF.js +3765 -0
  179. package/dist/google-SO2H3SLF.js.map +1 -0
  180. package/dist/google-ads-AIVV6NDM.js +201 -0
  181. package/dist/history-2SQ5K7SI.js +108 -0
  182. package/dist/history-CH3UMQOA.js +204 -0
  183. package/dist/history-EQO2QAQX.js +155 -0
  184. package/dist/hubspot-FP5F3DF6.js +853 -0
  185. package/dist/ideas-ZZVGRYFM.js +49 -0
  186. package/dist/images-WPECEULY.js +92 -0
  187. package/dist/ingest-IJYPSWBT.js +162 -0
  188. package/dist/ingest-LAONXSXA.js +31 -0
  189. package/dist/insights-FBGRQJZH.js +151 -0
  190. package/dist/inspect-AGYBLEOH.js +38 -0
  191. package/dist/intent-7Z2X4EL6.js +97 -0
  192. package/dist/keyword-gap-4INNXP3Q.js +132 -0
  193. package/dist/keyword-metrics-L2KRRX6S.js +234 -0
  194. package/dist/keywords-for-site-CMVX773Q.js +134 -0
  195. package/dist/languages-I7M63R3S.js +41 -0
  196. package/dist/leads-AZA4XCI6.js +137 -0
  197. package/dist/learn-DR3M4NWV.js +213 -0
  198. package/dist/line-item-writes-HKUDMC7V.js +212 -0
  199. package/dist/line-items-FYEWAYZI.js +107 -0
  200. package/dist/link-I3IJAUDD.js +70 -0
  201. package/dist/linkedin-LDQEX5EI.js +1498 -0
  202. package/dist/linkedin-person-KMCYKTNQ.js +142 -0
  203. package/dist/list-FF4Z7ZSJ.js +89 -0
  204. package/dist/list-IMA2UKN4.js +320 -0
  205. package/dist/list-YLNP2PNI.js +169 -0
  206. package/dist/locations-2XCXK5FB.js +41 -0
  207. package/dist/locations-7UESZZO3.js +69 -0
  208. package/dist/log-6XLS6FF6.js +98 -0
  209. package/dist/make-JBN7RVQC.js +1391 -0
  210. package/dist/map-AH3GT36P.js +519 -0
  211. package/dist/mcp-WOGB4LFO.js +1017 -0
  212. package/dist/media-sources-W7WLORRN.js +35 -0
  213. package/dist/members-PKQM7VME.js +50 -0
  214. package/dist/metrics-RZXAVZWW.js +193 -0
  215. package/dist/models-ELL6ENZ2.js +155 -0
  216. package/dist/normalize-ISMEKGAM.js +145 -0
  217. package/dist/options-LG4TJYZF.js +126 -0
  218. package/dist/organization-5F2UNO53.js +949 -0
  219. package/dist/people-4MXQW22A.js +161 -0
  220. package/dist/people-KJXAYQDE.js +171 -0
  221. package/dist/performance-BZ2D62UE.js +28 -0
  222. package/dist/performance-WDOBJ3NO.js +6294 -0
  223. package/dist/pipedrive-3YC2GR3M.js +533 -0
  224. package/dist/pixels-AWPYUSNW.js +62 -0
  225. package/dist/plan-LVTD6FZI.js +213 -0
  226. package/dist/posts-GX6MUVUG.js +36 -0
  227. package/dist/preview-JSTSQFXH.js +103 -0
  228. package/dist/promoted-tweet-writes-DP6ORCNX.js +184 -0
  229. package/dist/promoted-tweets-VCEY6KCG.js +119 -0
  230. package/dist/publish-A5HHFTWT.js +430 -0
  231. package/dist/query-MAQFFK7H.js +68 -0
  232. package/dist/read-T7HYDHSS.js +166 -0
  233. package/dist/reddit-DOZRSZG2.js +30 -0
  234. package/dist/refresh-TV4644XE.js +100 -0
  235. package/dist/release-LZ3AJFQJ.js +66 -0
  236. package/dist/relevant-pages-FEF5NHMU.js +101 -0
  237. package/dist/remove-QOMG2RPN.js +54 -0
  238. package/dist/reopen-ET5XH2A4.js +69 -0
  239. package/dist/rerun-KE4YQJTZ.js +101 -0
  240. package/dist/research-MJXOZXCS.js +266 -0
  241. package/dist/research-SYXCLMVQ.js +78 -0
  242. package/dist/reset-35CQVJUF.js +58 -0
  243. package/dist/reset-JJ7HESHC.js +58 -0
  244. package/dist/resolve-WPW3WUCU.js +125 -0
  245. package/dist/retry-OGM3ZT64.js +66 -0
  246. package/dist/retry-RZFRN73L.js +66 -0
  247. package/dist/revenue-KPTLBWRO.js +99 -0
  248. package/dist/rules-XX7BZNGH.js +163 -0
  249. package/dist/run-CI6MGV3E.js +73 -0
  250. package/dist/run-XPGJ4N2A.js +78 -0
  251. package/dist/scaffold-ad-EOUMVW77.js +1603 -0
  252. package/dist/scaffold-ad-EOUMVW77.js.map +1 -0
  253. package/dist/scaffold-static-ad-BSVNHRWI.js +998 -0
  254. package/dist/scaffold-video-HV5MA35T.js +889 -0
  255. package/dist/scaffold-video-HV5MA35T.js.map +1 -0
  256. package/dist/schedule-HBHXSZCK.js +65 -0
  257. package/dist/scheduled-agents-TF5NL3EG.js +59 -0
  258. package/dist/schema-G77I7C6X.js +136 -0
  259. package/dist/schema-YAHA75PQ.js +241 -0
  260. package/dist/search-ITIKP5AS.js +192 -0
  261. package/dist/search-terms-4F25WL6Y.js +412 -0
  262. package/dist/select-YH6VBDO5.js +134 -0
  263. package/dist/set-ONJBYEGT.js +286 -0
  264. package/dist/set-ONJBYEGT.js.map +1 -0
  265. package/dist/set-prompt-US7ZKLLB.js +204 -0
  266. package/dist/setup-links-IHQ5WONJ.js +145 -0
  267. package/dist/shopify-6WFQCGUS.js +4032 -0
  268. package/dist/site-M3MBRLZJ.js +181 -0
  269. package/dist/sources-DE7QIZSV.js +30 -0
  270. package/dist/sources-LML63ISG.js +463 -0
  271. package/dist/stale-7QJ2IRW6.js +92 -0
  272. package/dist/status-77OL4B45.js +68 -0
  273. package/dist/stock-KM3WLRHN.js +213 -0
  274. package/dist/studio-RMYKICEJ.js +49 -0
  275. package/dist/sync-L25EVQAI.js +58 -0
  276. package/dist/sync-definition-HIEWNQNI.js +74 -0
  277. package/dist/tag-manager-SL6FDPER.js +43 -0
  278. package/dist/tag-manager-SL6FDPER.js.map +1 -0
  279. package/dist/tags-AXCQCJGZ.js +24 -0
  280. package/dist/tags-KGWISKLB.js +26 -0
  281. package/dist/tags-MZFIIXL5.js +24 -0
  282. package/dist/tags-QQXAAWUY.js +182 -0
  283. package/dist/tags-RTIT7IW2.js +24 -0
  284. package/dist/targeting-criteria-IZ6DPA3L.js +113 -0
  285. package/dist/targets-OGGHIAZI.js +110 -0
  286. package/dist/testimonials-JHB7OKIY.js +32 -0
  287. package/dist/themes-FPIC5RUE.js +102 -0
  288. package/dist/top-companies-ICP6X6KR.js +250 -0
  289. package/dist/transcript-KF736ZJ3.js +168 -0
  290. package/dist/translate-2YFBXM32.js +607 -0
  291. package/dist/triggers-TSNJSHMU.js +148 -0
  292. package/dist/unlink-GH4D444H.js +73 -0
  293. package/dist/unstage-I2NYIM25.js +92 -0
  294. package/dist/update-35NWLUT5.js +237 -0
  295. package/dist/update-HEMI6DKR.js +193 -0
  296. package/dist/update-PFCO5LEE.js +175 -0
  297. package/dist/update-RUBMPMZB.js +69 -0
  298. package/dist/upload-I4WIFYMS.js +185 -0
  299. package/dist/url-options-PBCEEKX6.js +137 -0
  300. package/dist/url-params-T7KQX5FJ.js +102 -0
  301. package/dist/validate-SJAZONOS.js +180 -0
  302. package/dist/videos-P3U53TZL.js +41 -0
  303. package/dist/viewer-check-ZGUCQHTC.js +89 -0
  304. package/dist/visuals-JYOZPGB7.js +129 -0
  305. package/dist/web-SHS6TJWV.js +180 -0
  306. package/dist/winning-ads-L5HVV5OR.js +88 -0
  307. package/dist/write-commands-FUOSA6MJ.js +1555 -0
  308. package/dist/write-commands-M2CV6P4R.js +207 -0
  309. package/dist/x-VG4U3PFE.js +47 -0
  310. package/package.json +1 -1
  311. package/dist/account-Y3IDIJ3T.js +0 -82
  312. package/dist/account-Z62BVYAI.js +0 -83
  313. package/dist/account-reads-XOGHJB3K.js +0 -230
  314. package/dist/account-users-ZDZ7B4BX.js +0 -69
  315. package/dist/account-writes-EP35RCNO.js +0 -68
  316. package/dist/accounts-5ZMP7KU7.js +0 -505
  317. package/dist/accounts-7CHGRXBP.js +0 -122
  318. package/dist/accounts-SUIMNTTA.js +0 -81
  319. package/dist/actions-Q7DDN427.js +0 -55
  320. package/dist/activecampaign-BAWTDTSA.js +0 -935
  321. package/dist/ad-group-writes-EVLV4BRD.js +0 -172
  322. package/dist/ad-groups-UQRBWF2N.js +0 -70
  323. package/dist/ad-writes-EBCZ5DCY.js +0 -176
  324. package/dist/add-3WUVL3MN.js +0 -662
  325. package/dist/add-HBRY2SF6.js +0 -108
  326. package/dist/add-I4DL3DN5.js +0 -661
  327. package/dist/ads-2TOWF4GX.js +0 -79
  328. package/dist/ads-BYETTX2Y.js +0 -48
  329. package/dist/advertisers-AJQEQ3VF.js +0 -126
  330. package/dist/alerts-RJBTQ2OX.js +0 -153
  331. package/dist/analytics-RIZ4RJ6O.js +0 -2791
  332. package/dist/analytics-WLFBQOO4.js +0 -461
  333. package/dist/animate-EN7VTJEI.js +0 -482
  334. package/dist/assign-MAXWMYQ2.js +0 -83
  335. package/dist/audience-size-ISJSPSRW.js +0 -77
  336. package/dist/audiences-EZK4PDB5.js +0 -280
  337. package/dist/audit-EHKSN2WS.js +0 -155
  338. package/dist/autocomplete-I6V2CKI4.js +0 -117
  339. package/dist/avatars-775WMIZF.js +0 -38
  340. package/dist/bid-pricing-HFBQ23DD.js +0 -104
  341. package/dist/brief-LR5YTTVQ.js +0 -511
  342. package/dist/campaign-groups-DKB3K7L4.js +0 -118
  343. package/dist/campaign-writes-4T5DSUMT.js +0 -176
  344. package/dist/campaign-writes-DXV2HPB2.js +0 -169
  345. package/dist/campaigns-5BYWFXHO.js +0 -78
  346. package/dist/campaigns-6OYAQVIE.js +0 -193
  347. package/dist/campaigns-UEPNMAIN.js +0 -111
  348. package/dist/canvas-6CWER4CP.js +0 -48
  349. package/dist/capabilities-U53QPNBQ.js +0 -184
  350. package/dist/catalog-KTAYEWYO.js +0 -89
  351. package/dist/catalogs-YJSOVGDM.js +0 -130
  352. package/dist/changes-6UGDHAZW.js +0 -539
  353. package/dist/changes-6UGDHAZW.js.map +0 -1
  354. package/dist/changes-YOTRCCNB.js +0 -288
  355. package/dist/chatgpt-DPLD452Q.js +0 -47
  356. package/dist/chats-QVGXEYT6.js +0 -659
  357. package/dist/check-3YGJFXU2.js +0 -54
  358. package/dist/chunk-2AW62CH3.js +0 -46
  359. package/dist/chunk-2DGJKIHF.js +0 -78
  360. package/dist/chunk-2N5MQP65.js +0 -127
  361. package/dist/chunk-2Z2AEFVW.js +0 -915
  362. package/dist/chunk-33KRW6HE.js +0 -374
  363. package/dist/chunk-34CJ5QXO.js +0 -91
  364. package/dist/chunk-3HAKK5FO.js +0 -660
  365. package/dist/chunk-433NCHRS.js +0 -4413
  366. package/dist/chunk-433NCHRS.js.map +0 -1
  367. package/dist/chunk-4A2UZ3Q3.js +0 -24026
  368. package/dist/chunk-4A2UZ3Q3.js.map +0 -1
  369. package/dist/chunk-4MIETRE4.js +0 -103
  370. package/dist/chunk-4X6QBNIB.js +0 -320
  371. package/dist/chunk-52V5324M.js +0 -224
  372. package/dist/chunk-5OXVEKML.js +0 -548
  373. package/dist/chunk-5WQ3UHJ2.js +0 -341
  374. package/dist/chunk-624DWMDW.js +0 -8382
  375. package/dist/chunk-63XEBJIX.js +0 -262
  376. package/dist/chunk-7J5XOR5D.js +0 -98
  377. package/dist/chunk-A6B45KSH.js +0 -724
  378. package/dist/chunk-A6B45KSH.js.map +0 -1
  379. package/dist/chunk-B5RLBFMI.js +0 -26
  380. package/dist/chunk-CE6M4VLG.js +0 -1883
  381. package/dist/chunk-CG6BJIHU.js +0 -175
  382. package/dist/chunk-CHPHAPPP.js +0 -547
  383. package/dist/chunk-CPBXSDXS.js +0 -9127
  384. package/dist/chunk-CSOESLNA.js +0 -61
  385. package/dist/chunk-CV74M3H6.js +0 -723
  386. package/dist/chunk-CWYONUBS.js +0 -163
  387. package/dist/chunk-CZWMU2GB.js +0 -142
  388. package/dist/chunk-D7DLBQLS.js +0 -76
  389. package/dist/chunk-DSZ3OLQU.js +0 -65
  390. package/dist/chunk-ECUN7W2Y.js +0 -91
  391. package/dist/chunk-EDDHOHTW.js +0 -285
  392. package/dist/chunk-FCWDXKLI.js +0 -732
  393. package/dist/chunk-G4IFJB4Z.js +0 -863
  394. package/dist/chunk-GJPS6SUI.js +0 -147
  395. package/dist/chunk-HQISXBEX.js +0 -685
  396. package/dist/chunk-HSPOURUB.js +0 -877
  397. package/dist/chunk-J5LG2M5T.js +0 -155
  398. package/dist/chunk-JHPZATWG.js +0 -152
  399. package/dist/chunk-JY5OIBMR.js +0 -3378
  400. package/dist/chunk-KDCPM6W2.js +0 -6340
  401. package/dist/chunk-KUNNKG4S.js +0 -202
  402. package/dist/chunk-MQIO7WLM.js +0 -396
  403. package/dist/chunk-MQZHJAH3.js +0 -197
  404. package/dist/chunk-NOJC3PUZ.js +0 -479
  405. package/dist/chunk-NR5EJ6TC.js +0 -10361
  406. package/dist/chunk-NR5EJ6TC.js.map +0 -1
  407. package/dist/chunk-NZZ7ATO5.js +0 -3248
  408. package/dist/chunk-NZZ7ATO5.js.map +0 -1
  409. package/dist/chunk-OBT55DQA.js +0 -260
  410. package/dist/chunk-P7Q7YO4E.js +0 -170
  411. package/dist/chunk-PA5OJXQ3.js +0 -313
  412. package/dist/chunk-PMK2WXS5.js +0 -411
  413. package/dist/chunk-QSZRATGC.js +0 -746
  414. package/dist/chunk-QYOLOU5G.js +0 -329
  415. package/dist/chunk-RDRWLYFV.js +0 -604
  416. package/dist/chunk-RS4BSY3E.js +0 -509
  417. package/dist/chunk-S2V54TOS.js +0 -170
  418. package/dist/chunk-SY7CUZGW.js +0 -89
  419. package/dist/chunk-TDNOPJXB.js +0 -1124
  420. package/dist/chunk-TWSIY2FS.js +0 -392
  421. package/dist/chunk-TXLSPOLG.js +0 -505
  422. package/dist/chunk-V7T6HAPO.js +0 -375
  423. package/dist/chunk-VELT4JFT.js +0 -274
  424. package/dist/chunk-WE2FY3CF.js +0 -1862
  425. package/dist/chunk-WVXJYBWA.js +0 -251
  426. package/dist/chunk-WYBX53EI.js +0 -164
  427. package/dist/chunk-XBLVA6BC.js +0 -1577
  428. package/dist/chunk-XNTV3QKG.js +0 -64
  429. package/dist/chunk-Y62YTEPM.js +0 -23
  430. package/dist/chunk-YBSRIW5S.js +0 -51
  431. package/dist/chunk-YXYUHTQM.js +0 -423
  432. package/dist/chunk-ZBSG24TQ.js +0 -430
  433. package/dist/chunk-ZDDJTA3H.js +0 -303
  434. package/dist/chunk-ZIZBAKJF.js +0 -749
  435. package/dist/claim-XHSTFNS3.js +0 -218
  436. package/dist/companies-ITNWR5Q4.js +0 -36
  437. package/dist/company-ANL7K7CY.js +0 -311
  438. package/dist/complete-7L3ILPCT.js +0 -87
  439. package/dist/connect-SD7PFKPI.js +0 -46
  440. package/dist/conversation-SKZMGVA5.js +0 -100
  441. package/dist/conversion-report-ZPENZMJF.js +0 -130
  442. package/dist/conversion-upload-command-6TY2DIBM.js +0 -456
  443. package/dist/conversion-writes-NIDUTQHX.js +0 -194
  444. package/dist/conversions-3Q3PEAAN.js +0 -78
  445. package/dist/conversions-IMST22UQ.js +0 -141
  446. package/dist/create-5KE4XHS3.js +0 -65
  447. package/dist/create-NR4WX6PS.js +0 -190
  448. package/dist/create-QBA7VZSZ.js +0 -356
  449. package/dist/create-SPNJBN6K.js +0 -219
  450. package/dist/creatives-3E5BEATB.js +0 -48
  451. package/dist/creatives-42PW2C24.js +0 -235
  452. package/dist/credentials-T7F2PFNY.js +0 -291
  453. package/dist/critique-I2HAOTTX.js +0 -230
  454. package/dist/crm-EVN7PDQE.js +0 -418
  455. package/dist/crm-OO2WO6OG.js +0 -327
  456. package/dist/currency-CLB7ROUV.js +0 -91
  457. package/dist/customers-V7WKKZI2.js +0 -69
  458. package/dist/data-ZDTEJD6A.js +0 -665
  459. package/dist/delete-5P6K4EOJ.js +0 -71
  460. package/dist/delete-7VLK5I4V.js +0 -60
  461. package/dist/delete-TRJMPMN5.js +0 -70
  462. package/dist/demographics-K5WTHZCW.js +0 -145
  463. package/dist/discard-ANRGHE2Z.js +0 -72
  464. package/dist/discover-EAI4WDSL.js +0 -191
  465. package/dist/domain-LQ4VCYC4.js +0 -104
  466. package/dist/download-HVNPTNFN.js +0 -174
  467. package/dist/draft-4DFLYVL6.js +0 -153
  468. package/dist/draft-572T3UNG.js +0 -427
  469. package/dist/draft-IHEEODST.js +0 -340
  470. package/dist/draft-JGEZVDAS.js +0 -389
  471. package/dist/draft-KZKNUQ2I.js +0 -227
  472. package/dist/draft-R3GI7JWY.js +0 -640
  473. package/dist/experiments-C4R65GA6.js +0 -241
  474. package/dist/extract-J7Q6DYE7.js +0 -144
  475. package/dist/facets-GXBTQCAW.js +0 -118
  476. package/dist/feedback-FZTJATY7.js +0 -115
  477. package/dist/fetch-GSMAAL7N.js +0 -487
  478. package/dist/fit-K63JPI3A.js +0 -69
  479. package/dist/flows-C45HCGGB.js +0 -342
  480. package/dist/forecast-NOQNCFTX.js +0 -122
  481. package/dist/forecast-YFCLMXAV.js +0 -189
  482. package/dist/funnel-U47RAS7K.js +0 -701
  483. package/dist/generate-7467FZZH.js +0 -265
  484. package/dist/get-I77O6MRD.js +0 -114
  485. package/dist/get-J2QFYRHW.js +0 -77
  486. package/dist/google-GBGLPAP5.js +0 -3759
  487. package/dist/google-GBGLPAP5.js.map +0 -1
  488. package/dist/google-OYP3AU3I.js +0 -164
  489. package/dist/google-ads-74CPXLIA.js +0 -201
  490. package/dist/history-DD3UWZZ4.js +0 -108
  491. package/dist/history-KBTYILFZ.js +0 -204
  492. package/dist/history-M6VLA7TD.js +0 -155
  493. package/dist/hubspot-W5LYFWTH.js +0 -853
  494. package/dist/ideas-6LZ6VINW.js +0 -49
  495. package/dist/images-TUQEYLFE.js +0 -92
  496. package/dist/ingest-S7I6E2GE.js +0 -31
  497. package/dist/ingest-XJNSFWBC.js +0 -162
  498. package/dist/insights-MZ5DPH5X.js +0 -151
  499. package/dist/inspect-AQBNRV5E.js +0 -38
  500. package/dist/intent-6NJBN3OR.js +0 -97
  501. package/dist/keyword-gap-Y5J2VZDP.js +0 -132
  502. package/dist/keyword-metrics-DSEJ2KDM.js +0 -234
  503. package/dist/keywords-for-site-CYVRXIF5.js +0 -134
  504. package/dist/languages-H4VPFO7Y.js +0 -41
  505. package/dist/leads-ZRHPHJRE.js +0 -137
  506. package/dist/learn-ZR35TBVQ.js +0 -213
  507. package/dist/line-item-writes-L73P5MN7.js +0 -212
  508. package/dist/line-items-KC5PKV2T.js +0 -107
  509. package/dist/link-64FQKM6S.js +0 -70
  510. package/dist/linkedin-BD63QPGK.js +0 -1498
  511. package/dist/linkedin-person-6XXLSFDE.js +0 -142
  512. package/dist/list-KYTLJVHG.js +0 -169
  513. package/dist/list-VQNYW5R4.js +0 -89
  514. package/dist/list-WOCSNSYO.js +0 -320
  515. package/dist/locations-AR4ZTFT4.js +0 -69
  516. package/dist/locations-UPY33JUY.js +0 -41
  517. package/dist/log-LLJ3M63R.js +0 -98
  518. package/dist/make-UM6P6RD3.js +0 -1391
  519. package/dist/map-SKH3NVSQ.js +0 -519
  520. package/dist/mcp-FIBT4HAH.js +0 -1017
  521. package/dist/media-sources-ZY7S74U2.js +0 -35
  522. package/dist/members-PK3Q7AZX.js +0 -50
  523. package/dist/metrics-BNLDV4BU.js +0 -193
  524. package/dist/models-QEB3EOSF.js +0 -155
  525. package/dist/normalize-KEDHUMAB.js +0 -145
  526. package/dist/options-VYRUYL4N.js +0 -126
  527. package/dist/organization-RTJDOJEV.js +0 -949
  528. package/dist/people-3VU3QSRN.js +0 -161
  529. package/dist/people-A3YXUYUR.js +0 -171
  530. package/dist/performance-6I57ZQTD.js +0 -6294
  531. package/dist/performance-OBAWMTVU.js +0 -28
  532. package/dist/pipedrive-7AA7ZD7M.js +0 -533
  533. package/dist/pixels-M2UBKUJI.js +0 -62
  534. package/dist/plan-YP5D6JXM.js +0 -213
  535. package/dist/posts-B5DGAKAC.js +0 -36
  536. package/dist/preview-66BGLU5H.js +0 -103
  537. package/dist/promoted-tweet-writes-ZUFVAVGA.js +0 -184
  538. package/dist/promoted-tweets-3AKHKOI4.js +0 -119
  539. package/dist/publish-JPIOQKB4.js +0 -430
  540. package/dist/query-FZAFUWCX.js +0 -68
  541. package/dist/read-OMNUPQ77.js +0 -166
  542. package/dist/reddit-TKE3IXST.js +0 -30
  543. package/dist/refresh-BE7KEADW.js +0 -100
  544. package/dist/release-EUXHZEO7.js +0 -66
  545. package/dist/relevant-pages-OFFMPMKG.js +0 -101
  546. package/dist/remove-6HAN547O.js +0 -54
  547. package/dist/reopen-HBEWR4CF.js +0 -69
  548. package/dist/rerun-PLS5XYTW.js +0 -101
  549. package/dist/research-B5VHPALW.js +0 -78
  550. package/dist/research-RCD54TCL.js +0 -266
  551. package/dist/reset-DQXYM75W.js +0 -58
  552. package/dist/reset-Y7UWO233.js +0 -58
  553. package/dist/resolve-NVL3FTQU.js +0 -125
  554. package/dist/retry-MMY5H6O6.js +0 -66
  555. package/dist/retry-YCYZPMXM.js +0 -66
  556. package/dist/revenue-C24BDD5A.js +0 -99
  557. package/dist/rules-MGEJJJ4O.js +0 -163
  558. package/dist/run-2RGSNKFH.js +0 -78
  559. package/dist/run-TPAZDCY2.js +0 -73
  560. package/dist/scaffold-ad-UOXDJIVB.js +0 -1600
  561. package/dist/scaffold-ad-UOXDJIVB.js.map +0 -1
  562. package/dist/scaffold-static-ad-ZM3LOIFK.js +0 -998
  563. package/dist/scaffold-video-EBQOBQXI.js +0 -888
  564. package/dist/scaffold-video-EBQOBQXI.js.map +0 -1
  565. package/dist/schedule-IVNAF7NB.js +0 -65
  566. package/dist/scheduled-agents-NODIHKKM.js +0 -59
  567. package/dist/schema-F6QTDMJW.js +0 -136
  568. package/dist/schema-JCAV2D44.js +0 -241
  569. package/dist/search-A4GTDVIE.js +0 -192
  570. package/dist/search-terms-OFLKWSEF.js +0 -412
  571. package/dist/select-HER2THTU.js +0 -134
  572. package/dist/set-MXHNM4NH.js +0 -274
  573. package/dist/set-MXHNM4NH.js.map +0 -1
  574. package/dist/set-prompt-G27JMELE.js +0 -204
  575. package/dist/setup-links-LVJU7KHP.js +0 -145
  576. package/dist/shopify-ZQFONX3R.js +0 -4032
  577. package/dist/site-X43NFWHL.js +0 -181
  578. package/dist/sources-3KYI7TSD.js +0 -30
  579. package/dist/sources-G7QWYL2J.js +0 -463
  580. package/dist/stale-F7UXOYYY.js +0 -92
  581. package/dist/status-7RLJ7ZND.js +0 -68
  582. package/dist/stock-BSMF4FH4.js +0 -213
  583. package/dist/studio-2X6UOCAR.js +0 -49
  584. package/dist/sync-XAWDIOTT.js +0 -58
  585. package/dist/sync-definition-73CCAEDP.js +0 -74
  586. package/dist/tag-manager-YUUNKP7Q.js +0 -45
  587. package/dist/tag-manager-YUUNKP7Q.js.map +0 -1
  588. package/dist/tags-5V3NCHKE.js +0 -26
  589. package/dist/tags-HSLB3YPN.js +0 -24
  590. package/dist/tags-M57YBWGW.js +0 -182
  591. package/dist/tags-MWMY3GRG.js +0 -24
  592. package/dist/tags-QHEJUOHL.js +0 -24
  593. package/dist/targeting-criteria-FIXPSX2K.js +0 -113
  594. package/dist/targets-BVAFNU4K.js +0 -110
  595. package/dist/testimonials-RIL2ARX7.js +0 -32
  596. package/dist/themes-VAKXKG4M.js +0 -102
  597. package/dist/top-companies-KEV55RME.js +0 -250
  598. package/dist/transcript-ZOJWRPZD.js +0 -168
  599. package/dist/translate-WL6KD2X4.js +0 -607
  600. package/dist/triggers-AALSXPLW.js +0 -148
  601. package/dist/unlink-WD5D3XBG.js +0 -73
  602. package/dist/unstage-BVNREABR.js +0 -92
  603. package/dist/update-3YQGAFEX.js +0 -69
  604. package/dist/update-6355E7VP.js +0 -193
  605. package/dist/update-HYZXKLZ7.js +0 -237
  606. package/dist/update-TZLOKZ22.js +0 -175
  607. package/dist/upload-PMKPLLAA.js +0 -185
  608. package/dist/url-options-DOOHH2JE.js +0 -137
  609. package/dist/url-params-CXUAYJBD.js +0 -102
  610. package/dist/validate-YRTGO4UN.js +0 -180
  611. package/dist/videos-KGPDOMSN.js +0 -41
  612. package/dist/viewer-check-PRUOWSNM.js +0 -89
  613. package/dist/visuals-L73TEVWN.js +0 -129
  614. package/dist/web-IVYO7PY6.js +0 -180
  615. package/dist/winning-ads-QRBI3TLN.js +0 -88
  616. package/dist/write-commands-FUXBKDN7.js +0 -1555
  617. package/dist/write-commands-YECHEWMG.js +0 -207
  618. package/dist/x-WVWMOUAQ.js +0 -47
  619. /package/dist/{account-Y3IDIJ3T.js.map → account-LYIKZSK6.js.map} +0 -0
  620. /package/dist/{account-Z62BVYAI.js.map → account-NUMWJW6T.js.map} +0 -0
  621. /package/dist/{account-reads-XOGHJB3K.js.map → account-reads-XQW6DONK.js.map} +0 -0
  622. /package/dist/{account-users-ZDZ7B4BX.js.map → account-users-HLAIWV56.js.map} +0 -0
  623. /package/dist/{account-writes-EP35RCNO.js.map → account-writes-SQNABDXI.js.map} +0 -0
  624. /package/dist/{accounts-7CHGRXBP.js.map → accounts-3SJ7MJ2J.js.map} +0 -0
  625. /package/dist/{accounts-5ZMP7KU7.js.map → accounts-DEE32AAB.js.map} +0 -0
  626. /package/dist/{accounts-SUIMNTTA.js.map → accounts-VD3L6PNZ.js.map} +0 -0
  627. /package/dist/{actions-Q7DDN427.js.map → actions-FRKZVXCV.js.map} +0 -0
  628. /package/dist/{activecampaign-BAWTDTSA.js.map → activecampaign-LEFG3NHR.js.map} +0 -0
  629. /package/dist/{ad-group-writes-EVLV4BRD.js.map → ad-group-writes-KEFM32CI.js.map} +0 -0
  630. /package/dist/{ad-groups-UQRBWF2N.js.map → ad-groups-LQ43ZKNL.js.map} +0 -0
  631. /package/dist/{ad-writes-EBCZ5DCY.js.map → ad-writes-XPHRUOPG.js.map} +0 -0
  632. /package/dist/{add-HBRY2SF6.js.map → add-AGLSZKII.js.map} +0 -0
  633. /package/dist/{add-3WUVL3MN.js.map → add-D4LTUMP7.js.map} +0 -0
  634. /package/dist/{add-I4DL3DN5.js.map → add-SX4AZSWP.js.map} +0 -0
  635. /package/dist/{ads-BYETTX2Y.js.map → ads-ANPWI4VC.js.map} +0 -0
  636. /package/dist/{ads-2TOWF4GX.js.map → ads-IHKW7OPB.js.map} +0 -0
  637. /package/dist/{advertisers-AJQEQ3VF.js.map → advertisers-Y3XOK4KZ.js.map} +0 -0
  638. /package/dist/{alerts-RJBTQ2OX.js.map → alerts-NIPFX5W7.js.map} +0 -0
  639. /package/dist/{analytics-RIZ4RJ6O.js.map → analytics-56YWZQXD.js.map} +0 -0
  640. /package/dist/{analytics-WLFBQOO4.js.map → analytics-62RX4Y7M.js.map} +0 -0
  641. /package/dist/{animate-EN7VTJEI.js.map → animate-FNBWXIGV.js.map} +0 -0
  642. /package/dist/{assign-MAXWMYQ2.js.map → assign-5LY7WGFF.js.map} +0 -0
  643. /package/dist/{audience-size-ISJSPSRW.js.map → audience-size-QS2KK5LQ.js.map} +0 -0
  644. /package/dist/{audiences-EZK4PDB5.js.map → audiences-ICDEHT2G.js.map} +0 -0
  645. /package/dist/{audit-EHKSN2WS.js.map → audit-DGFXEARA.js.map} +0 -0
  646. /package/dist/{autocomplete-I6V2CKI4.js.map → autocomplete-IKXTDPIZ.js.map} +0 -0
  647. /package/dist/{avatars-775WMIZF.js.map → avatars-7XQ7CHR5.js.map} +0 -0
  648. /package/dist/{bid-pricing-HFBQ23DD.js.map → bid-pricing-XQH4KP6G.js.map} +0 -0
  649. /package/dist/{brief-LR5YTTVQ.js.map → brief-AJNHUSNI.js.map} +0 -0
  650. /package/dist/{campaign-groups-DKB3K7L4.js.map → campaign-groups-2Q5ZY77R.js.map} +0 -0
  651. /package/dist/{campaign-writes-4T5DSUMT.js.map → campaign-writes-KN5W3MHP.js.map} +0 -0
  652. /package/dist/{campaign-writes-DXV2HPB2.js.map → campaign-writes-ZAI7K5DH.js.map} +0 -0
  653. /package/dist/{campaigns-5BYWFXHO.js.map → campaigns-3BV5AJWW.js.map} +0 -0
  654. /package/dist/{campaigns-6OYAQVIE.js.map → campaigns-BECFEETG.js.map} +0 -0
  655. /package/dist/{campaigns-UEPNMAIN.js.map → campaigns-ZL7H636S.js.map} +0 -0
  656. /package/dist/{canvas-6CWER4CP.js.map → canvas-B5FB2Y4Y.js.map} +0 -0
  657. /package/dist/{capabilities-U53QPNBQ.js.map → capabilities-YC7R3SC2.js.map} +0 -0
  658. /package/dist/{catalog-KTAYEWYO.js.map → catalog-IUC2NDKC.js.map} +0 -0
  659. /package/dist/{catalogs-YJSOVGDM.js.map → catalogs-OBZ6RBGL.js.map} +0 -0
  660. /package/dist/{changes-YOTRCCNB.js.map → changes-VNVWJDIH.js.map} +0 -0
  661. /package/dist/{chatgpt-DPLD452Q.js.map → chatgpt-HBHB7HCD.js.map} +0 -0
  662. /package/dist/{chats-QVGXEYT6.js.map → chats-76BSMXGD.js.map} +0 -0
  663. /package/dist/{check-3YGJFXU2.js.map → check-M7BR7ZE5.js.map} +0 -0
  664. /package/dist/{chunk-624DWMDW.js.map → chunk-2QW27HOH.js.map} +0 -0
  665. /package/dist/{chunk-HQISXBEX.js.map → chunk-34HHJJGC.js.map} +0 -0
  666. /package/dist/{chunk-QYOLOU5G.js.map → chunk-3E3HCJQW.js.map} +0 -0
  667. /package/dist/{chunk-52V5324M.js.map → chunk-4K3RSU2Q.js.map} +0 -0
  668. /package/dist/{chunk-CHPHAPPP.js.map → chunk-56ZBWT6K.js.map} +0 -0
  669. /package/dist/{chunk-XNTV3QKG.js.map → chunk-5JW4S663.js.map} +0 -0
  670. /package/dist/{chunk-2Z2AEFVW.js.map → chunk-5X32X4Y4.js.map} +0 -0
  671. /package/dist/{chunk-YBSRIW5S.js.map → chunk-7BLFVYVN.js.map} +0 -0
  672. /package/dist/{chunk-2AW62CH3.js.map → chunk-ADAHRMJK.js.map} +0 -0
  673. /package/dist/{chunk-7J5XOR5D.js.map → chunk-BSZG36OF.js.map} +0 -0
  674. /package/dist/{chunk-TDNOPJXB.js.map → chunk-CA37TFTI.js.map} +0 -0
  675. /package/dist/{chunk-NOJC3PUZ.js.map → chunk-CGW6CIGD.js.map} +0 -0
  676. /package/dist/{chunk-WVXJYBWA.js.map → chunk-CK5QALZI.js.map} +0 -0
  677. /package/dist/{chunk-4MIETRE4.js.map → chunk-DVAVH7UV.js.map} +0 -0
  678. /package/dist/{chunk-WE2FY3CF.js.map → chunk-DWKUYUKC.js.map} +0 -0
  679. /package/dist/{chunk-GJPS6SUI.js.map → chunk-DZE2UHST.js.map} +0 -0
  680. /package/dist/{chunk-CSOESLNA.js.map → chunk-E6UZBNR2.js.map} +0 -0
  681. /package/dist/{chunk-KDCPM6W2.js.map → chunk-FCX746P4.js.map} +0 -0
  682. /package/dist/{chunk-CG6BJIHU.js.map → chunk-FGTSDCB4.js.map} +0 -0
  683. /package/dist/{chunk-PA5OJXQ3.js.map → chunk-HHX73JNN.js.map} +0 -0
  684. /package/dist/{chunk-OBT55DQA.js.map → chunk-ICEPT2UY.js.map} +0 -0
  685. /package/dist/{chunk-TWSIY2FS.js.map → chunk-IDJKNL7P.js.map} +0 -0
  686. /package/dist/{chunk-ZIZBAKJF.js.map → chunk-INW3G4P3.js.map} +0 -0
  687. /package/dist/{chunk-MQIO7WLM.js.map → chunk-IYMF3GSB.js.map} +0 -0
  688. /package/dist/{chunk-FCWDXKLI.js.map → chunk-KLF5K55H.js.map} +0 -0
  689. /package/dist/{chunk-5WQ3UHJ2.js.map → chunk-KQ4XRUMX.js.map} +0 -0
  690. /package/dist/{chunk-XBLVA6BC.js.map → chunk-LQ2OYP25.js.map} +0 -0
  691. /package/dist/{chunk-J5LG2M5T.js.map → chunk-LVJTYN5B.js.map} +0 -0
  692. /package/dist/{chunk-V7T6HAPO.js.map → chunk-LXDZCFII.js.map} +0 -0
  693. /package/dist/{chunk-CPBXSDXS.js.map → chunk-MCAY57W7.js.map} +0 -0
  694. /package/dist/{chunk-3HAKK5FO.js.map → chunk-MCI6ASBE.js.map} +0 -0
  695. /package/dist/{chunk-4X6QBNIB.js.map → chunk-MIAAADD3.js.map} +0 -0
  696. /package/dist/{chunk-DSZ3OLQU.js.map → chunk-MJX6NXSX.js.map} +0 -0
  697. /package/dist/{chunk-ZBSG24TQ.js.map → chunk-NAF5XSOI.js.map} +0 -0
  698. /package/dist/{chunk-34CJ5QXO.js.map → chunk-NLW7LW75.js.map} +0 -0
  699. /package/dist/{chunk-JHPZATWG.js.map → chunk-O27BGGFC.js.map} +0 -0
  700. /package/dist/{chunk-63XEBJIX.js.map → chunk-O7JZT4G3.js.map} +0 -0
  701. /package/dist/{chunk-JY5OIBMR.js.map → chunk-ORCAPJDH.js.map} +0 -0
  702. /package/dist/{chunk-33KRW6HE.js.map → chunk-OTLMQDGW.js.map} +0 -0
  703. /package/dist/{chunk-KUNNKG4S.js.map → chunk-P5YJ3EA7.js.map} +0 -0
  704. /package/dist/{chunk-SY7CUZGW.js.map → chunk-QAEUP6YB.js.map} +0 -0
  705. /package/dist/{chunk-VELT4JFT.js.map → chunk-QTIPLD3K.js.map} +0 -0
  706. /package/dist/{chunk-YXYUHTQM.js.map → chunk-RUCJNF4B.js.map} +0 -0
  707. /package/dist/{chunk-ECUN7W2Y.js.map → chunk-S3CNDNCK.js.map} +0 -0
  708. /package/dist/{chunk-EDDHOHTW.js.map → chunk-SAA4VKF2.js.map} +0 -0
  709. /package/dist/{chunk-D7DLBQLS.js.map → chunk-SCN5ZF4U.js.map} +0 -0
  710. /package/dist/{chunk-S2V54TOS.js.map → chunk-SELST7KK.js.map} +0 -0
  711. /package/dist/{chunk-2DGJKIHF.js.map → chunk-SH5WRHTG.js.map} +0 -0
  712. /package/dist/{chunk-2N5MQP65.js.map → chunk-T7V2OPW2.js.map} +0 -0
  713. /package/dist/{chunk-RS4BSY3E.js.map → chunk-V6OAGU3U.js.map} +0 -0
  714. /package/dist/{chunk-TXLSPOLG.js.map → chunk-V76H3HWD.js.map} +0 -0
  715. /package/dist/{chunk-HSPOURUB.js.map → chunk-VDS6NSLF.js.map} +0 -0
  716. /package/dist/{chunk-ZDDJTA3H.js.map → chunk-VPNV2WDD.js.map} +0 -0
  717. /package/dist/{chunk-Y62YTEPM.js.map → chunk-VRCUW2J5.js.map} +0 -0
  718. /package/dist/{chunk-P7Q7YO4E.js.map → chunk-WONTGSXR.js.map} +0 -0
  719. /package/dist/{chunk-CZWMU2GB.js.map → chunk-WUYDIH4N.js.map} +0 -0
  720. /package/dist/{chunk-RDRWLYFV.js.map → chunk-X6LTFBPF.js.map} +0 -0
  721. /package/dist/{chunk-MQZHJAH3.js.map → chunk-X7UGF2LE.js.map} +0 -0
  722. /package/dist/{chunk-5OXVEKML.js.map → chunk-XOQWT2LZ.js.map} +0 -0
  723. /package/dist/{chunk-CE6M4VLG.js.map → chunk-XQRMBE6T.js.map} +0 -0
  724. /package/dist/{chunk-G4IFJB4Z.js.map → chunk-XTNXJZRK.js.map} +0 -0
  725. /package/dist/{chunk-PMK2WXS5.js.map → chunk-XXYRJ5YO.js.map} +0 -0
  726. /package/dist/{chunk-CWYONUBS.js.map → chunk-YYN6I6L5.js.map} +0 -0
  727. /package/dist/{chunk-CV74M3H6.js.map → chunk-ZJK3PVM2.js.map} +0 -0
  728. /package/dist/{chunk-QSZRATGC.js.map → chunk-ZVA2BZKM.js.map} +0 -0
  729. /package/dist/{chunk-WYBX53EI.js.map → chunk-ZWANN4QQ.js.map} +0 -0
  730. /package/dist/{chunk-B5RLBFMI.js.map → chunk-ZXG5MYV4.js.map} +0 -0
  731. /package/dist/{claim-XHSTFNS3.js.map → claim-W2QLJLKZ.js.map} +0 -0
  732. /package/dist/{companies-ITNWR5Q4.js.map → companies-TJR33KNS.js.map} +0 -0
  733. /package/dist/{company-ANL7K7CY.js.map → company-OGES42WN.js.map} +0 -0
  734. /package/dist/{complete-7L3ILPCT.js.map → complete-FCR3UXSH.js.map} +0 -0
  735. /package/dist/{connect-SD7PFKPI.js.map → connect-KACFSWER.js.map} +0 -0
  736. /package/dist/{conversation-SKZMGVA5.js.map → conversation-TLM7HDLK.js.map} +0 -0
  737. /package/dist/{conversion-report-ZPENZMJF.js.map → conversion-report-4WJ5D4FD.js.map} +0 -0
  738. /package/dist/{conversion-upload-command-6TY2DIBM.js.map → conversion-upload-command-REUCOQWP.js.map} +0 -0
  739. /package/dist/{conversion-writes-NIDUTQHX.js.map → conversion-writes-2W3RVOJW.js.map} +0 -0
  740. /package/dist/{conversions-IMST22UQ.js.map → conversions-2QHK35VN.js.map} +0 -0
  741. /package/dist/{conversions-3Q3PEAAN.js.map → conversions-TI3MZYCT.js.map} +0 -0
  742. /package/dist/{create-QBA7VZSZ.js.map → create-5VQBHCGR.js.map} +0 -0
  743. /package/dist/{create-5KE4XHS3.js.map → create-EAY2FGWT.js.map} +0 -0
  744. /package/dist/{create-NR4WX6PS.js.map → create-EN2XXE7H.js.map} +0 -0
  745. /package/dist/{create-SPNJBN6K.js.map → create-TIKC6VNL.js.map} +0 -0
  746. /package/dist/{creatives-3E5BEATB.js.map → creatives-SVNGDC45.js.map} +0 -0
  747. /package/dist/{creatives-42PW2C24.js.map → creatives-U2CIA6KE.js.map} +0 -0
  748. /package/dist/{credentials-T7F2PFNY.js.map → credentials-TSWUQUWC.js.map} +0 -0
  749. /package/dist/{critique-I2HAOTTX.js.map → critique-K3IPZB5P.js.map} +0 -0
  750. /package/dist/{crm-OO2WO6OG.js.map → crm-55ZVWDQF.js.map} +0 -0
  751. /package/dist/{crm-EVN7PDQE.js.map → crm-REPCWBGZ.js.map} +0 -0
  752. /package/dist/{currency-CLB7ROUV.js.map → currency-W5SXMZMS.js.map} +0 -0
  753. /package/dist/{customers-V7WKKZI2.js.map → customers-UN5KGSPW.js.map} +0 -0
  754. /package/dist/{data-ZDTEJD6A.js.map → data-GXAJGTKM.js.map} +0 -0
  755. /package/dist/{delete-7VLK5I4V.js.map → delete-3BHIQWRA.js.map} +0 -0
  756. /package/dist/{delete-5P6K4EOJ.js.map → delete-UJTIAYNP.js.map} +0 -0
  757. /package/dist/{delete-TRJMPMN5.js.map → delete-Z2TCOW7K.js.map} +0 -0
  758. /package/dist/{demographics-K5WTHZCW.js.map → demographics-EAX6HNK7.js.map} +0 -0
  759. /package/dist/{discard-ANRGHE2Z.js.map → discard-BJ4ZSAHC.js.map} +0 -0
  760. /package/dist/{discover-EAI4WDSL.js.map → discover-RHVFYP6K.js.map} +0 -0
  761. /package/dist/{domain-LQ4VCYC4.js.map → domain-O5ZO3DND.js.map} +0 -0
  762. /package/dist/{download-HVNPTNFN.js.map → download-4GPS3IQ7.js.map} +0 -0
  763. /package/dist/{draft-JGEZVDAS.js.map → draft-4A3QXAHP.js.map} +0 -0
  764. /package/dist/{draft-572T3UNG.js.map → draft-APO4PJTI.js.map} +0 -0
  765. /package/dist/{draft-4DFLYVL6.js.map → draft-BO5QGZBG.js.map} +0 -0
  766. /package/dist/{draft-KZKNUQ2I.js.map → draft-ORRHY3BU.js.map} +0 -0
  767. /package/dist/{draft-IHEEODST.js.map → draft-UIFX2SZ4.js.map} +0 -0
  768. /package/dist/{draft-R3GI7JWY.js.map → draft-ULEQPQYF.js.map} +0 -0
  769. /package/dist/{experiments-C4R65GA6.js.map → experiments-LMMZJPZU.js.map} +0 -0
  770. /package/dist/{extract-J7Q6DYE7.js.map → extract-DJNIQC3V.js.map} +0 -0
  771. /package/dist/{facets-GXBTQCAW.js.map → facets-V2AKFR2X.js.map} +0 -0
  772. /package/dist/{feedback-FZTJATY7.js.map → feedback-6P545EJO.js.map} +0 -0
  773. /package/dist/{fetch-GSMAAL7N.js.map → fetch-D7I5WPU5.js.map} +0 -0
  774. /package/dist/{fit-K63JPI3A.js.map → fit-BMJTIAOF.js.map} +0 -0
  775. /package/dist/{flows-C45HCGGB.js.map → flows-LCP5GK5X.js.map} +0 -0
  776. /package/dist/{forecast-YFCLMXAV.js.map → forecast-BAP5V237.js.map} +0 -0
  777. /package/dist/{forecast-NOQNCFTX.js.map → forecast-DTEBUBC2.js.map} +0 -0
  778. /package/dist/{funnel-U47RAS7K.js.map → funnel-HBLIX62B.js.map} +0 -0
  779. /package/dist/{generate-7467FZZH.js.map → generate-AQZZ5LHX.js.map} +0 -0
  780. /package/dist/{get-I77O6MRD.js.map → get-FPNIXE7U.js.map} +0 -0
  781. /package/dist/{get-J2QFYRHW.js.map → get-UEL3XOCM.js.map} +0 -0
  782. /package/dist/{google-OYP3AU3I.js.map → google-EQQN5LVF.js.map} +0 -0
  783. /package/dist/{google-ads-74CPXLIA.js.map → google-ads-AIVV6NDM.js.map} +0 -0
  784. /package/dist/{history-DD3UWZZ4.js.map → history-2SQ5K7SI.js.map} +0 -0
  785. /package/dist/{history-KBTYILFZ.js.map → history-CH3UMQOA.js.map} +0 -0
  786. /package/dist/{history-M6VLA7TD.js.map → history-EQO2QAQX.js.map} +0 -0
  787. /package/dist/{hubspot-W5LYFWTH.js.map → hubspot-FP5F3DF6.js.map} +0 -0
  788. /package/dist/{ideas-6LZ6VINW.js.map → ideas-ZZVGRYFM.js.map} +0 -0
  789. /package/dist/{images-TUQEYLFE.js.map → images-WPECEULY.js.map} +0 -0
  790. /package/dist/{ingest-XJNSFWBC.js.map → ingest-IJYPSWBT.js.map} +0 -0
  791. /package/dist/{ingest-S7I6E2GE.js.map → ingest-LAONXSXA.js.map} +0 -0
  792. /package/dist/{insights-MZ5DPH5X.js.map → insights-FBGRQJZH.js.map} +0 -0
  793. /package/dist/{inspect-AQBNRV5E.js.map → inspect-AGYBLEOH.js.map} +0 -0
  794. /package/dist/{intent-6NJBN3OR.js.map → intent-7Z2X4EL6.js.map} +0 -0
  795. /package/dist/{keyword-gap-Y5J2VZDP.js.map → keyword-gap-4INNXP3Q.js.map} +0 -0
  796. /package/dist/{keyword-metrics-DSEJ2KDM.js.map → keyword-metrics-L2KRRX6S.js.map} +0 -0
  797. /package/dist/{keywords-for-site-CYVRXIF5.js.map → keywords-for-site-CMVX773Q.js.map} +0 -0
  798. /package/dist/{languages-H4VPFO7Y.js.map → languages-I7M63R3S.js.map} +0 -0
  799. /package/dist/{leads-ZRHPHJRE.js.map → leads-AZA4XCI6.js.map} +0 -0
  800. /package/dist/{learn-ZR35TBVQ.js.map → learn-DR3M4NWV.js.map} +0 -0
  801. /package/dist/{line-item-writes-L73P5MN7.js.map → line-item-writes-HKUDMC7V.js.map} +0 -0
  802. /package/dist/{line-items-KC5PKV2T.js.map → line-items-FYEWAYZI.js.map} +0 -0
  803. /package/dist/{link-64FQKM6S.js.map → link-I3IJAUDD.js.map} +0 -0
  804. /package/dist/{linkedin-BD63QPGK.js.map → linkedin-LDQEX5EI.js.map} +0 -0
  805. /package/dist/{linkedin-person-6XXLSFDE.js.map → linkedin-person-KMCYKTNQ.js.map} +0 -0
  806. /package/dist/{list-VQNYW5R4.js.map → list-FF4Z7ZSJ.js.map} +0 -0
  807. /package/dist/{list-WOCSNSYO.js.map → list-IMA2UKN4.js.map} +0 -0
  808. /package/dist/{list-KYTLJVHG.js.map → list-YLNP2PNI.js.map} +0 -0
  809. /package/dist/{locations-UPY33JUY.js.map → locations-2XCXK5FB.js.map} +0 -0
  810. /package/dist/{locations-AR4ZTFT4.js.map → locations-7UESZZO3.js.map} +0 -0
  811. /package/dist/{log-LLJ3M63R.js.map → log-6XLS6FF6.js.map} +0 -0
  812. /package/dist/{make-UM6P6RD3.js.map → make-JBN7RVQC.js.map} +0 -0
  813. /package/dist/{map-SKH3NVSQ.js.map → map-AH3GT36P.js.map} +0 -0
  814. /package/dist/{mcp-FIBT4HAH.js.map → mcp-WOGB4LFO.js.map} +0 -0
  815. /package/dist/{media-sources-ZY7S74U2.js.map → media-sources-W7WLORRN.js.map} +0 -0
  816. /package/dist/{members-PK3Q7AZX.js.map → members-PKQM7VME.js.map} +0 -0
  817. /package/dist/{metrics-BNLDV4BU.js.map → metrics-RZXAVZWW.js.map} +0 -0
  818. /package/dist/{models-QEB3EOSF.js.map → models-ELL6ENZ2.js.map} +0 -0
  819. /package/dist/{normalize-KEDHUMAB.js.map → normalize-ISMEKGAM.js.map} +0 -0
  820. /package/dist/{options-VYRUYL4N.js.map → options-LG4TJYZF.js.map} +0 -0
  821. /package/dist/{organization-RTJDOJEV.js.map → organization-5F2UNO53.js.map} +0 -0
  822. /package/dist/{people-3VU3QSRN.js.map → people-4MXQW22A.js.map} +0 -0
  823. /package/dist/{people-A3YXUYUR.js.map → people-KJXAYQDE.js.map} +0 -0
  824. /package/dist/{performance-OBAWMTVU.js.map → performance-BZ2D62UE.js.map} +0 -0
  825. /package/dist/{performance-6I57ZQTD.js.map → performance-WDOBJ3NO.js.map} +0 -0
  826. /package/dist/{pipedrive-7AA7ZD7M.js.map → pipedrive-3YC2GR3M.js.map} +0 -0
  827. /package/dist/{pixels-M2UBKUJI.js.map → pixels-AWPYUSNW.js.map} +0 -0
  828. /package/dist/{plan-YP5D6JXM.js.map → plan-LVTD6FZI.js.map} +0 -0
  829. /package/dist/{posts-B5DGAKAC.js.map → posts-GX6MUVUG.js.map} +0 -0
  830. /package/dist/{preview-66BGLU5H.js.map → preview-JSTSQFXH.js.map} +0 -0
  831. /package/dist/{promoted-tweet-writes-ZUFVAVGA.js.map → promoted-tweet-writes-DP6ORCNX.js.map} +0 -0
  832. /package/dist/{promoted-tweets-3AKHKOI4.js.map → promoted-tweets-VCEY6KCG.js.map} +0 -0
  833. /package/dist/{publish-JPIOQKB4.js.map → publish-A5HHFTWT.js.map} +0 -0
  834. /package/dist/{query-FZAFUWCX.js.map → query-MAQFFK7H.js.map} +0 -0
  835. /package/dist/{read-OMNUPQ77.js.map → read-T7HYDHSS.js.map} +0 -0
  836. /package/dist/{reddit-TKE3IXST.js.map → reddit-DOZRSZG2.js.map} +0 -0
  837. /package/dist/{refresh-BE7KEADW.js.map → refresh-TV4644XE.js.map} +0 -0
  838. /package/dist/{release-EUXHZEO7.js.map → release-LZ3AJFQJ.js.map} +0 -0
  839. /package/dist/{relevant-pages-OFFMPMKG.js.map → relevant-pages-FEF5NHMU.js.map} +0 -0
  840. /package/dist/{remove-6HAN547O.js.map → remove-QOMG2RPN.js.map} +0 -0
  841. /package/dist/{reopen-HBEWR4CF.js.map → reopen-ET5XH2A4.js.map} +0 -0
  842. /package/dist/{rerun-PLS5XYTW.js.map → rerun-KE4YQJTZ.js.map} +0 -0
  843. /package/dist/{research-RCD54TCL.js.map → research-MJXOZXCS.js.map} +0 -0
  844. /package/dist/{research-B5VHPALW.js.map → research-SYXCLMVQ.js.map} +0 -0
  845. /package/dist/{reset-DQXYM75W.js.map → reset-35CQVJUF.js.map} +0 -0
  846. /package/dist/{reset-Y7UWO233.js.map → reset-JJ7HESHC.js.map} +0 -0
  847. /package/dist/{resolve-NVL3FTQU.js.map → resolve-WPW3WUCU.js.map} +0 -0
  848. /package/dist/{retry-MMY5H6O6.js.map → retry-OGM3ZT64.js.map} +0 -0
  849. /package/dist/{retry-YCYZPMXM.js.map → retry-RZFRN73L.js.map} +0 -0
  850. /package/dist/{revenue-C24BDD5A.js.map → revenue-KPTLBWRO.js.map} +0 -0
  851. /package/dist/{rules-MGEJJJ4O.js.map → rules-XX7BZNGH.js.map} +0 -0
  852. /package/dist/{run-TPAZDCY2.js.map → run-CI6MGV3E.js.map} +0 -0
  853. /package/dist/{run-2RGSNKFH.js.map → run-XPGJ4N2A.js.map} +0 -0
  854. /package/dist/{scaffold-static-ad-ZM3LOIFK.js.map → scaffold-static-ad-BSVNHRWI.js.map} +0 -0
  855. /package/dist/{schedule-IVNAF7NB.js.map → schedule-HBHXSZCK.js.map} +0 -0
  856. /package/dist/{scheduled-agents-NODIHKKM.js.map → scheduled-agents-TF5NL3EG.js.map} +0 -0
  857. /package/dist/{schema-F6QTDMJW.js.map → schema-G77I7C6X.js.map} +0 -0
  858. /package/dist/{schema-JCAV2D44.js.map → schema-YAHA75PQ.js.map} +0 -0
  859. /package/dist/{search-A4GTDVIE.js.map → search-ITIKP5AS.js.map} +0 -0
  860. /package/dist/{search-terms-OFLKWSEF.js.map → search-terms-4F25WL6Y.js.map} +0 -0
  861. /package/dist/{select-HER2THTU.js.map → select-YH6VBDO5.js.map} +0 -0
  862. /package/dist/{set-prompt-G27JMELE.js.map → set-prompt-US7ZKLLB.js.map} +0 -0
  863. /package/dist/{setup-links-LVJU7KHP.js.map → setup-links-IHQ5WONJ.js.map} +0 -0
  864. /package/dist/{shopify-ZQFONX3R.js.map → shopify-6WFQCGUS.js.map} +0 -0
  865. /package/dist/{site-X43NFWHL.js.map → site-M3MBRLZJ.js.map} +0 -0
  866. /package/dist/{sources-3KYI7TSD.js.map → sources-DE7QIZSV.js.map} +0 -0
  867. /package/dist/{sources-G7QWYL2J.js.map → sources-LML63ISG.js.map} +0 -0
  868. /package/dist/{stale-F7UXOYYY.js.map → stale-7QJ2IRW6.js.map} +0 -0
  869. /package/dist/{status-7RLJ7ZND.js.map → status-77OL4B45.js.map} +0 -0
  870. /package/dist/{stock-BSMF4FH4.js.map → stock-KM3WLRHN.js.map} +0 -0
  871. /package/dist/{studio-2X6UOCAR.js.map → studio-RMYKICEJ.js.map} +0 -0
  872. /package/dist/{sync-XAWDIOTT.js.map → sync-L25EVQAI.js.map} +0 -0
  873. /package/dist/{sync-definition-73CCAEDP.js.map → sync-definition-HIEWNQNI.js.map} +0 -0
  874. /package/dist/{tags-HSLB3YPN.js.map → tags-AXCQCJGZ.js.map} +0 -0
  875. /package/dist/{tags-5V3NCHKE.js.map → tags-KGWISKLB.js.map} +0 -0
  876. /package/dist/{tags-MWMY3GRG.js.map → tags-MZFIIXL5.js.map} +0 -0
  877. /package/dist/{tags-M57YBWGW.js.map → tags-QQXAAWUY.js.map} +0 -0
  878. /package/dist/{tags-QHEJUOHL.js.map → tags-RTIT7IW2.js.map} +0 -0
  879. /package/dist/{targeting-criteria-FIXPSX2K.js.map → targeting-criteria-IZ6DPA3L.js.map} +0 -0
  880. /package/dist/{targets-BVAFNU4K.js.map → targets-OGGHIAZI.js.map} +0 -0
  881. /package/dist/{testimonials-RIL2ARX7.js.map → testimonials-JHB7OKIY.js.map} +0 -0
  882. /package/dist/{themes-VAKXKG4M.js.map → themes-FPIC5RUE.js.map} +0 -0
  883. /package/dist/{top-companies-KEV55RME.js.map → top-companies-ICP6X6KR.js.map} +0 -0
  884. /package/dist/{transcript-ZOJWRPZD.js.map → transcript-KF736ZJ3.js.map} +0 -0
  885. /package/dist/{translate-WL6KD2X4.js.map → translate-2YFBXM32.js.map} +0 -0
  886. /package/dist/{triggers-AALSXPLW.js.map → triggers-TSNJSHMU.js.map} +0 -0
  887. /package/dist/{unlink-WD5D3XBG.js.map → unlink-GH4D444H.js.map} +0 -0
  888. /package/dist/{unstage-BVNREABR.js.map → unstage-I2NYIM25.js.map} +0 -0
  889. /package/dist/{update-HYZXKLZ7.js.map → update-35NWLUT5.js.map} +0 -0
  890. /package/dist/{update-6355E7VP.js.map → update-HEMI6DKR.js.map} +0 -0
  891. /package/dist/{update-TZLOKZ22.js.map → update-PFCO5LEE.js.map} +0 -0
  892. /package/dist/{update-3YQGAFEX.js.map → update-RUBMPMZB.js.map} +0 -0
  893. /package/dist/{upload-PMKPLLAA.js.map → upload-I4WIFYMS.js.map} +0 -0
  894. /package/dist/{url-options-DOOHH2JE.js.map → url-options-PBCEEKX6.js.map} +0 -0
  895. /package/dist/{url-params-CXUAYJBD.js.map → url-params-T7KQX5FJ.js.map} +0 -0
  896. /package/dist/{validate-YRTGO4UN.js.map → validate-SJAZONOS.js.map} +0 -0
  897. /package/dist/{videos-KGPDOMSN.js.map → videos-P3U53TZL.js.map} +0 -0
  898. /package/dist/{viewer-check-PRUOWSNM.js.map → viewer-check-ZGUCQHTC.js.map} +0 -0
  899. /package/dist/{visuals-L73TEVWN.js.map → visuals-JYOZPGB7.js.map} +0 -0
  900. /package/dist/{web-IVYO7PY6.js.map → web-SHS6TJWV.js.map} +0 -0
  901. /package/dist/{winning-ads-QRBI3TLN.js.map → winning-ads-L5HVV5OR.js.map} +0 -0
  902. /package/dist/{write-commands-FUXBKDN7.js.map → write-commands-FUOSA6MJ.js.map} +0 -0
  903. /package/dist/{write-commands-YECHEWMG.js.map → write-commands-M2CV6P4R.js.map} +0 -0
  904. /package/dist/{x-WVWMOUAQ.js.map → x-VG4U3PFE.js.map} +0 -0
@@ -0,0 +1,1883 @@
1
+ import {
2
+ googlePresetSyncedHint
3
+ } from "./chunk-KZUIVQ52.js";
4
+ import {
5
+ getFieldDescriptions,
6
+ parseCampaignIds
7
+ } from "./chunk-4LP6SOVV.js";
8
+ import {
9
+ LIST_FIELDS,
10
+ NO_OR_EXPLANATION,
11
+ listFieldGuidance,
12
+ parseApiError
13
+ } from "./chunk-XTNXJZRK.js";
14
+ import {
15
+ PRESETS,
16
+ SERVING_CHAINS,
17
+ duringLiteralExplanation,
18
+ equivalentBetween,
19
+ expandPreset,
20
+ getPreset,
21
+ isCampaignScoped,
22
+ isDuringLiteral,
23
+ isInventoryPreset,
24
+ isSearchable,
25
+ leanRows
26
+ } from "./chunk-INW3G4P3.js";
27
+ import {
28
+ withWindowSpellings
29
+ } from "./chunk-74QGFUZL.js";
30
+ import {
31
+ accountFundsWarnings
32
+ } from "./chunk-LXDZCFII.js";
33
+ import {
34
+ buildQueryCacheKey,
35
+ cacheGet,
36
+ cacheSet,
37
+ getManagerIdForCustomer,
38
+ getQueryTtl,
39
+ resolveCustomerId,
40
+ rowsFileHolds,
41
+ toCsvRow,
42
+ writeAdsJson,
43
+ writeJsonEnvelope
44
+ } from "./chunk-65QWF5C5.js";
45
+ import {
46
+ GOOGLE_ADS_QUERY_MAX_PAGE_SIZE
47
+ } from "./chunk-H7JSYC4X.js";
48
+ import {
49
+ ApiError,
50
+ apiPost
51
+ } from "./chunk-SZCEKDLE.js";
52
+ import {
53
+ optionalTargetCompany
54
+ } from "./chunk-XQIAWIO5.js";
55
+ import {
56
+ maskEnvelope,
57
+ registerSchema
58
+ } from "./chunk-2TEZDAAR.js";
59
+
60
+ // src/commands/ads/google/query.ts
61
+ import { appendFileSync, existsSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
62
+ import { resolve } from "path";
63
+
64
+ // ../api/src/ads-google/conversion-tags.ts
65
+ var TAG_SNIPPETS_FIELD = "conversion_action.tag_snippets";
66
+ var SEND_TO_FIELD = "conversion_action.send_to";
67
+ var SEND_TO_PATTERN = /AW-\d+\/[\w-]+/;
68
+ function snippetSendTo(snippets) {
69
+ if (!Array.isArray(snippets)) return void 0;
70
+ for (const snippet of snippets) {
71
+ const text = typeof snippet?.eventSnippet === "string" ? snippet.eventSnippet : "";
72
+ const sendTo = SEND_TO_PATTERN.exec(text)?.[0];
73
+ if (sendTo !== void 0) return sendTo;
74
+ }
75
+ return void 0;
76
+ }
77
+ function withSendTo(row, keepSnippets) {
78
+ if (!(TAG_SNIPPETS_FIELD in row)) return row;
79
+ const sendTo = snippetSendTo(row[TAG_SNIPPETS_FIELD]);
80
+ if (sendTo === void 0) return row;
81
+ const { [TAG_SNIPPETS_FIELD]: snippets, ...rest } = row;
82
+ return { ...rest, [SEND_TO_FIELD]: sendTo, ...keepSnippets ? { [TAG_SNIPPETS_FIELD]: snippets } : {} };
83
+ }
84
+
85
+ // src/commands/ads/google/query.ts
86
+ import { defineCommand } from "citty";
87
+ import { parse as parseCsv } from "csv-parse/sync";
88
+ import { quote as quoteShell } from "shell-quote";
89
+
90
+ // src/commands/ads/google/preflight.ts
91
+ function buildCommand(query, customerId) {
92
+ return `baker ads google query "${query}" --customer-id ${customerId}`;
93
+ }
94
+ var RUNG_PIN_FIELDS = {
95
+ "campaign.status": ["campaign.id", "campaign.resource_name"],
96
+ "ad_group.status": ["ad_group.id", "ad_group.resource_name"],
97
+ "ad_group_criterion.status": ["ad_group_criterion.criterion_id", "ad_group_criterion.resource_name"],
98
+ "ad_group_ad.status": ["ad_group_ad.ad.id", "ad_group_ad.resource_name"],
99
+ "asset_group.status": ["asset_group.id", "asset_group.resource_name"],
100
+ "asset_group_asset.status": ["asset_group_asset.resource_name"],
101
+ "campaign_asset.status": ["campaign_asset.resource_name"],
102
+ "ad_group_asset.status": ["ad_group_asset.resource_name"]
103
+ };
104
+ function blankQuotedValues(query) {
105
+ return query.replace(
106
+ /'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g,
107
+ (value) => `${value[0]}${" ".repeat(value.length - 2)}${value[0]}`
108
+ );
109
+ }
110
+ function whereClause(query) {
111
+ const blanked = blankQuotedValues(query);
112
+ const match = blanked.match(/\bWHERE\b([\s\S]*)$/i);
113
+ if (match?.index === void 0 || !match[1]) return "";
114
+ const start = match.index + match[0].length - match[1].length;
115
+ let end = blanked.length;
116
+ for (const trailing of [/\bORDER\s+BY\b/i, /\bLIMIT\b/i, /\bPARAMETERS\b/i]) {
117
+ const idx = match[1].search(trailing);
118
+ if (idx !== -1) end = Math.min(end, start + idx);
119
+ }
120
+ return query.slice(start, end);
121
+ }
122
+ function selectClause(query) {
123
+ return query.split(/\bFROM\b/i)[0] ?? "";
124
+ }
125
+ function mentions(clause, field) {
126
+ return new RegExp(`(?<![\\w.])${field.replace(/\./g, "\\.")}\\b`, "i").test(clause);
127
+ }
128
+ function analyzeServingChain(query) {
129
+ const resource = fromResource(query);
130
+ const chain = resource ? SERVING_CHAINS[resource] : void 0;
131
+ if (!chain) return null;
132
+ const where = whereClause(query);
133
+ if (/ad_group_criterion\.negative\s*=\s*TRUE/i.test(where)) return null;
134
+ const unscoped = chain.filter((rung) => {
135
+ if (mentions(where, rung)) return false;
136
+ return !(RUNG_PIN_FIELDS[rung] ?? []).some((pin) => mentions(where, pin));
137
+ });
138
+ const assertsServing = chain.some(
139
+ (rung) => new RegExp(`${rung.replace(/\./g, "\\.")}\\s*=\\s*'ENABLED'`, "i").test(where)
140
+ );
141
+ return { chain, unscoped, assertsServing };
142
+ }
143
+ function rejectPartialChain(query, customerId, analysis) {
144
+ if (!analysis.assertsServing || analysis.unscoped.length === 0) return null;
145
+ const added = analysis.unscoped.map((rung) => `${rung} = 'ENABLED'`).join(" AND ");
146
+ const fixed = addRequiredAncestorFields(query.replace(/\bWHERE\b/i, `WHERE ${added} AND`)).query;
147
+ return {
148
+ ok: false,
149
+ error: {
150
+ code: "INCOMPLETE_STATUS_CHAIN",
151
+ message: `This query filters on serving status but leaves ${analysis.unscoped.join(", ")} unscoped. Google Ads has no single serving flag \u2014 a row is live only when its whole chain (${analysis.chain.join(" \u2192 ")}) is ENABLED, so rows under a paused parent will come back looking live.`,
152
+ fix: {
153
+ action: "retry_with_modified_query",
154
+ correctedCommand: buildCommand(fixed, customerId),
155
+ explanation: `Add the missing rungs: ${added}. To look at paused entities on purpose, scope every rung explicitly instead (e.g. ${analysis.unscoped.map((rung) => `${rung} != 'REMOVED'`).join(" AND ")}), or use --preset ... --include-paused.`
156
+ },
157
+ retryable: false
158
+ }
159
+ };
160
+ }
161
+ function annotateUnscopedChain(query, analysis) {
162
+ if (analysis.assertsServing || analysis.unscoped.length === 0) return { query, warnings: [] };
163
+ const select = selectClause(query);
164
+ const missing = analysis.unscoped.filter((rung) => !mentions(select, rung));
165
+ if (missing.length === 0) return { query, warnings: [] };
166
+ return {
167
+ query: query.replace(/SELECT\s+/i, `SELECT ${missing.join(", ")}, `),
168
+ warnings: [
169
+ {
170
+ code: "SERVING_STATUS_ADDED",
171
+ message: `Added ${missing.join(", ")} to SELECT \u2014 this query does not scope ${analysis.unscoped.join(", ")}, so it returns paused-parent rows that are not serving. Read those columns before calling any row live; filter every rung = 'ENABLED' to get serving rows only.`
172
+ }
173
+ ]
174
+ };
175
+ }
176
+ var SINGLE_ROW_RESOURCES = ["customer"];
177
+ function fromResource(query) {
178
+ const match = query.match(/\bFROM\s+([A-Za-z_][A-Za-z0-9_]*)/i);
179
+ return match?.[1]?.toLowerCase() ?? null;
180
+ }
181
+ function isSingleRowRead(query) {
182
+ const resource = fromResource(query);
183
+ if (!resource || !SINGLE_ROW_RESOURCES.includes(resource)) return false;
184
+ return !/\bsegments\./i.test(selectClause(query));
185
+ }
186
+ var SEGMENTING_ANCESTORS = {
187
+ campaign_budget: ["campaign"],
188
+ campaign_asset: ["campaign"],
189
+ ad_group_asset: ["campaign", "ad_group"]
190
+ };
191
+ function missingRequiredSelectFields(query) {
192
+ const ancestors = SEGMENTING_ANCESTORS[fromResource(query) ?? ""];
193
+ if (!ancestors) return [];
194
+ const select = selectClause(query);
195
+ const where = query.split(/\bWHERE\b/i)[1] ?? "";
196
+ const filtered = ancestors.flatMap(
197
+ (ancestor) => where.match(new RegExp(`(?<![\\w.])${ancestor}\\.[\\w.]+`, "g")) ?? []
198
+ );
199
+ return [...new Set(filtered)].filter((field) => !mentions(select, field));
200
+ }
201
+ function addRequiredAncestorFields(query) {
202
+ const missing = missingRequiredSelectFields(query);
203
+ if (missing.length === 0) return { query, warnings: [] };
204
+ return {
205
+ query: query.replace(/SELECT\s+/i, `SELECT ${missing.join(", ")}, `),
206
+ warnings: [
207
+ {
208
+ code: "REQUIRED_FIELD_ADDED",
209
+ message: `Added ${missing.join(", ")} to SELECT \u2014 ${fromResource(query)} queries must select the ancestor fields used in WHERE`
210
+ }
211
+ ]
212
+ };
213
+ }
214
+ function applyAutoFixes(query) {
215
+ let corrected = query;
216
+ const warnings = [];
217
+ if (/(?<![\w.])keyword\.text\b/.test(corrected)) {
218
+ corrected = corrected.replace(/(?<![\w.])keyword\.text\b/g, "ad_group_criterion.keyword.text");
219
+ warnings.push({ code: "FIELD_RENAMED", message: "keyword.text \u2192 ad_group_criterion.keyword.text" });
220
+ }
221
+ if (/(?<![\w.])keyword\.match_type\b/.test(corrected)) {
222
+ corrected = corrected.replace(/(?<![\w.])keyword\.match_type\b/g, "ad_group_criterion.keyword.match_type");
223
+ warnings.push({ code: "FIELD_RENAMED", message: "keyword.match_type \u2192 ad_group_criterion.keyword.match_type" });
224
+ }
225
+ if (/shopping_performance_view\.product_\w+/.test(corrected)) {
226
+ corrected = corrected.replace(/shopping_performance_view\.product_(\w+)/g, "segments.product_$1");
227
+ warnings.push({ code: "FIELD_RENAMED", message: "shopping_performance_view.product_* \u2192 segments.product_*" });
228
+ }
229
+ if (/asset\.\w+_asset\.final_(mobile_)?urls\b/.test(corrected)) {
230
+ corrected = corrected.replace(/asset\.\w+_asset\.final_(mobile_)?urls\b/g, "asset.final_$1urls");
231
+ warnings.push({ code: "FIELD_RENAMED", message: "asset.<type>_asset.final_urls \u2192 asset.final_urls" });
232
+ }
233
+ const ancestorFix = addRequiredAncestorFields(corrected);
234
+ corrected = ancestorFix.query;
235
+ warnings.push(...ancestorFix.warnings);
236
+ if (/campaign\.status\s*=\s*'ACTIVE'/i.test(corrected)) {
237
+ corrected = corrected.replace(/campaign\.status\s*=\s*'ACTIVE'/gi, "campaign.status = 'ENABLED'");
238
+ warnings.push({ code: "ENUM_CORRECTED", message: "campaign.status ACTIVE \u2192 ENABLED" });
239
+ }
240
+ if (/ad_group\.status\s*=\s*'ACTIVE'/i.test(corrected)) {
241
+ corrected = corrected.replace(/ad_group\.status\s*=\s*'ACTIVE'/gi, "ad_group.status = 'ENABLED'");
242
+ warnings.push({ code: "ENUM_CORRECTED", message: "ad_group.status ACTIVE \u2192 ENABLED" });
243
+ }
244
+ return { query: corrected, warnings };
245
+ }
246
+ var DURING_CLAUSE = /(?<=[a-z_]\.[a-z_.]+\s+)DURING\s+([A-Za-z0-9_]+)/gi;
247
+ function rejectUnsupportedDuring(query, customerId) {
248
+ const unsupported = [...query.matchAll(DURING_CLAUSE)].map((match) => match[1] ?? "").filter((literal2) => !isDuringLiteral(literal2));
249
+ const literal = unsupported[0];
250
+ if (literal === void 0) return null;
251
+ const now = /* @__PURE__ */ new Date();
252
+ const between = equivalentBetween(literal, now);
253
+ const fixed = unsupported.every((l) => equivalentBetween(l, now) !== null) ? query.replace(
254
+ DURING_CLAUSE,
255
+ (clause, l) => isDuringLiteral(l) ? clause : equivalentBetween(l, now) ?? clause
256
+ ) : void 0;
257
+ return {
258
+ ok: false,
259
+ error: {
260
+ code: "INVALID_DATE_RANGE",
261
+ message: `DURING ${literal} is not a Google Ads date range, so Google would refuse this query.`,
262
+ fix: {
263
+ action: "narrow_date_range",
264
+ ...fixed ? { correctedCommand: buildCommand(fixed, customerId) } : {},
265
+ explanation: duringLiteralExplanation(literal, between)
266
+ },
267
+ retryable: false
268
+ }
269
+ };
270
+ }
271
+ var WHERE_OPERATOR = /(?<![\w.])([a-z_]+(?:\.[a-z_]+)+)\s*(CONTAINS\s+(?:ALL|ANY|NONE)|IS\s+NOT\s+NULL|IS\s+NULL|NOT\s+LIKE|NOT\s+IN|NOT\s+REGEXP_MATCH|REGEXP_MATCH|LIKE|IN|BETWEEN|DURING|!=|<=|>=|=|<|>)/gi;
272
+ function escapeRegExp(text) {
273
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
274
+ }
275
+ function withoutNullTest(query, field) {
276
+ const test = `${escapeRegExp(field)}\\s+IS\\s+(?:NOT\\s+)?NULL\\b`;
277
+ const dropped = query.replace(new RegExp(`\\bWHERE\\s+${test}\\s+AND\\s+`, "i"), "WHERE ").replace(new RegExp(`\\s+AND\\s+${test}`, "i"), "").replace(new RegExp(`\\s*\\bWHERE\\s+${test}`, "i"), "");
278
+ return mentions(selectClause(dropped), field) ? dropped : dropped.replace(/SELECT\s+/i, `SELECT ${field}, `);
279
+ }
280
+ function asListCondition(query, field) {
281
+ const condition = new RegExp(
282
+ `(?<![\\w.])${escapeRegExp(field)}\\s*(NOT\\s+IN\\b|IN\\b|!=|=)\\s*('[^']*'|\\([^)]*\\))`,
283
+ "i"
284
+ );
285
+ const match = query.match(condition);
286
+ if (!match) return null;
287
+ const [, operator = "", value = ""] = match;
288
+ const contains = /^(=|IN)$/i.test(operator.trim()) ? "CONTAINS ANY" : "CONTAINS NONE";
289
+ const values = value.startsWith("(") ? value : `(${value})`;
290
+ return query.replace(condition, `${field} ${contains} ${values}`);
291
+ }
292
+ function rejectListFieldOperator(query, customerId) {
293
+ const where = whereClause(query).replace(/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g, "''");
294
+ const refusals = [...where.matchAll(WHERE_OPERATOR)].map(([, field = "", operator = ""]) => ({
295
+ field: field.toLowerCase(),
296
+ operator: operator.toUpperCase().replace(/\s+/g, " ")
297
+ })).filter(({ field, operator }) => LIST_FIELDS.has(field) && !operator.startsWith("CONTAINS"));
298
+ const first = refusals[0];
299
+ if (!first) return null;
300
+ const fixed = refusals.reduce(
301
+ (corrected, { field, operator }) => corrected === null ? null : operator.startsWith("IS ") ? withoutNullTest(corrected, field) : asListCondition(corrected, field),
302
+ query
303
+ );
304
+ return {
305
+ ok: false,
306
+ error: {
307
+ code: "INVALID_OPERATOR",
308
+ message: `${first.operator} cannot be used on ${first.field}: it is a list field, so Google would refuse this query.`,
309
+ fix: {
310
+ action: "change_operator",
311
+ ...fixed ? { correctedCommand: buildCommand(fixed, customerId) } : {},
312
+ explanation: listFieldGuidance(first.field)
313
+ },
314
+ retryable: false
315
+ }
316
+ };
317
+ }
318
+ function rejectContainsCall(query, customerId) {
319
+ const containsMatch = query.match(/CONTAINS\s*\(\s*([^,]+),\s*'([^']+)'\s*\)/i);
320
+ if (!containsMatch) return null;
321
+ const field = containsMatch[1]?.trim();
322
+ const value = containsMatch[2] ?? "";
323
+ const fixed = query.replace(/CONTAINS\s*\(\s*[^,]+,\s*'[^']+'\s*\)/i, `${field} LIKE '%${value}%'`);
324
+ return {
325
+ ok: false,
326
+ error: {
327
+ code: "INVALID_OPERATOR",
328
+ message: "GAQL does not support CONTAINS. Use LIKE with % wildcards.",
329
+ fix: {
330
+ action: "change_operator",
331
+ correctedCommand: buildCommand(fixed, customerId),
332
+ explanation: "GAQL uses LIKE '%value%' for substring matching, not CONTAINS()"
333
+ },
334
+ retryable: false
335
+ }
336
+ };
337
+ }
338
+ function rejectOrCondition(query) {
339
+ const where = whereClause(query).replace(/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g, "''");
340
+ const hasOr = /(?<![\w.])OR(?![\w.])/i.test(where);
341
+ const hasGroup = /(?:^|\bAND|\bNOT)\s*\(/i.test(where);
342
+ if (!hasOr && !hasGroup) return null;
343
+ return {
344
+ ok: false,
345
+ error: {
346
+ code: "INVALID_SYNTAX",
347
+ message: `${hasOr ? "OR" : "A parenthesised condition"} in WHERE: Google would refuse this query.`,
348
+ fix: { action: "retry_with_modified_query", explanation: NO_OR_EXPLANATION },
349
+ retryable: false
350
+ }
351
+ };
352
+ }
353
+ function validatePreflight(query, customerId) {
354
+ const warnings = [];
355
+ const corrected = query;
356
+ const firstWord = corrected.trim().split(/\s+/)[0]?.toUpperCase();
357
+ if (firstWord && firstWord !== "SELECT") {
358
+ return {
359
+ valid: false,
360
+ warnings: [],
361
+ error: {
362
+ ok: false,
363
+ error: {
364
+ code: "READ_ONLY",
365
+ message: `Only SELECT queries are allowed. Got: ${firstWord}`,
366
+ fix: {
367
+ action: "reject",
368
+ explanation: "This CLI only supports GAQL SELECT queries for reading data"
369
+ },
370
+ retryable: false
371
+ }
372
+ }
373
+ };
374
+ }
375
+ const openDateMatch = corrected.match(/segments\.date\s*>=\s*'(\d{4}-\d{2}-\d{2})'/i);
376
+ if (openDateMatch && !/BETWEEN/i.test(corrected)) {
377
+ const startDate = openDateMatch[1] ?? "";
378
+ const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
379
+ const fixed = corrected.replace(
380
+ /segments\.date\s*>=\s*'(\d{4}-\d{2}-\d{2})'/i,
381
+ `segments.date BETWEEN '${startDate}' AND '${today}'`
382
+ );
383
+ return {
384
+ valid: false,
385
+ warnings: [],
386
+ error: {
387
+ ok: false,
388
+ error: {
389
+ code: "OPEN_ENDED_DATE",
390
+ message: "Open-ended date ranges are not supported. Use BETWEEN or DURING.",
391
+ fix: {
392
+ action: "narrow_date_range",
393
+ correctedCommand: buildCommand(fixed, customerId),
394
+ explanation: "Use BETWEEN with explicit start and end dates"
395
+ },
396
+ retryable: false
397
+ }
398
+ }
399
+ };
400
+ }
401
+ for (const reject of [rejectContainsCall, rejectOrCondition, rejectListFieldOperator, rejectUnsupportedDuring]) {
402
+ const rejection2 = reject(corrected, customerId);
403
+ if (rejection2) return { valid: false, warnings: [], error: rejection2 };
404
+ }
405
+ if (/\bsegments\.conversion_action_name\b/i.test(corrected) && /\bmetrics\.cost_micros\b/i.test(corrected)) {
406
+ return {
407
+ valid: false,
408
+ warnings: [],
409
+ error: {
410
+ ok: false,
411
+ error: {
412
+ code: "INCOMPATIBLE_FIELDS",
413
+ message: "segments.conversion_action_name cannot be selected with metrics.cost_micros in one GAQL query.",
414
+ fix: {
415
+ action: "split_query",
416
+ explanation: "Run one campaign spend query with metrics.cost_micros and a separate conversion-action query without cost metrics, then join the results by campaign."
417
+ },
418
+ retryable: false
419
+ }
420
+ }
421
+ };
422
+ }
423
+ if (/FROM\s+ad_group_criterion\b/i.test(corrected) && !/ad_group_criterion\.negative/i.test(corrected)) {
424
+ warnings.push({
425
+ code: "NEGATIVE_FIELD_MISSING",
426
+ message: "ad_group_criterion returns BOTH positive and negative keywords. Add ad_group_criterion.negative to SELECT or filter with WHERE ad_group_criterion.negative = FALSE (positives) / TRUE (negatives). Use --preset positive-keywords or negative-keywords instead."
427
+ });
428
+ }
429
+ const { query: autoFixed, warnings: autoFixWarnings } = applyAutoFixes(corrected);
430
+ warnings.push(...autoFixWarnings);
431
+ const analysis = analyzeServingChain(autoFixed);
432
+ if (!analysis) return { valid: true, correctedQuery: autoFixed, warnings };
433
+ const rejection = rejectPartialChain(autoFixed, customerId, analysis);
434
+ if (rejection) return { valid: false, warnings: [], error: rejection };
435
+ const annotated = annotateUnscopedChain(autoFixed, analysis);
436
+ warnings.push(...annotated.warnings);
437
+ return { valid: true, correctedQuery: annotated.query, warnings };
438
+ }
439
+
440
+ // src/commands/ads/google/conversion-mix.ts
441
+ var CONVERSION_METRICS = [
442
+ "METRICS.CONVERSIONS",
443
+ "METRICS.ALL_CONVERSIONS",
444
+ "METRICS.CONVERSIONS_VALUE",
445
+ "METRICS.ALL_CONVERSIONS_VALUE",
446
+ "METRICS.COST_PER_CONVERSION",
447
+ "METRICS.COST_PER_ALL_CONVERSIONS",
448
+ "METRICS.CONVERSIONS_FROM_INTERACTIONS_RATE",
449
+ "METRICS.ALL_CONVERSIONS_FROM_INTERACTIONS_RATE",
450
+ "METRICS.VALUE_PER_CONVERSION",
451
+ "METRICS.VALUE_PER_ALL_CONVERSIONS"
452
+ ];
453
+ var CONVERSION_SEGMENTS = ["SEGMENTS.CONVERSION_ACTION_NAME", "SEGMENTS.CONVERSION_ACTION="];
454
+ var SELECTED_ACTION_SEGMENT = /\bSEGMENTS\.CONVERSION_ACTION(_NAME)?\b/;
455
+ function selectClause2(upperQuery) {
456
+ const fromIdx = upperQuery.indexOf(" FROM ");
457
+ return fromIdx === -1 ? upperQuery : upperQuery.slice(0, fromIdx);
458
+ }
459
+ var CAMPAIGN_EQUALITY = /\bCAMPAIGN\.(ID|NAME|RESOURCE_NAME)\s*=/;
460
+ function whereClause2(upperQuery) {
461
+ const whereIdx = upperQuery.indexOf(" WHERE ");
462
+ if (whereIdx === -1) return "";
463
+ let rest = upperQuery.slice(whereIdx + 7);
464
+ for (const trailing of [" ORDER BY ", " GROUP BY ", " LIMIT ", " PARAMETERS "]) {
465
+ const idx = rest.indexOf(trailing);
466
+ if (idx !== -1) rest = rest.slice(0, idx);
467
+ }
468
+ return rest;
469
+ }
470
+ function isConversionMetric(field) {
471
+ const upper = field.toUpperCase();
472
+ return CONVERSION_METRICS.some((metric) => upper.startsWith(metric));
473
+ }
474
+ var ACCOUNT_WIDE_RESOURCES = [
475
+ "customer",
476
+ "landing_page_view",
477
+ "expanded_landing_page_view",
478
+ "geographic_view",
479
+ "user_location_view",
480
+ "shopping_performance_view",
481
+ "bidding_strategy",
482
+ "campaign_budget"
483
+ ];
484
+ function hasConversions(row) {
485
+ return Object.entries(row).some(
486
+ ([field, value]) => isConversionMetric(field) && value !== void 0 && value !== null && Number(value) !== 0
487
+ );
488
+ }
489
+ function foldConvertingRows(rows, into = { campaigns: /* @__PURE__ */ new Set(), byNameOnly: 0, unnamed: 0 }) {
490
+ for (const row of rows) {
491
+ if (!hasConversions(row)) continue;
492
+ const campaign = row["campaign.id"] ?? row["campaign.resource_name"];
493
+ const adGroup = row["ad_group.id"] ?? row["ad_group.resource_name"];
494
+ if (campaign != null) into.campaigns.add(`campaign:${String(campaign)}`);
495
+ else if (adGroup != null) into.campaigns.add(`ad_group:${String(adGroup)}`);
496
+ else if (row["campaign.name"] != null) into.byNameOnly += 1;
497
+ else into.unnamed += 1;
498
+ }
499
+ return into;
500
+ }
501
+ function conversionMixWarnings(finalQuery, converting) {
502
+ const upper = ` ${finalQuery.toUpperCase().replace(/\s+/g, " ")} `;
503
+ const readsConversions = CONVERSION_METRICS.some((metric) => upper.includes(metric));
504
+ if (!readsConversions) return [];
505
+ if (CONVERSION_SEGMENTS.some((segment) => upper.includes(segment))) return [];
506
+ if (SELECTED_ACTION_SEGMENT.test(selectClause2(upper))) return [];
507
+ if (CAMPAIGN_EQUALITY.test(whereClause2(upper))) return [];
508
+ if (converting && clearedByRows(finalQuery, converting)) return [];
509
+ return [
510
+ {
511
+ code: "CONVERSION_MIX",
512
+ message: "MIXED CONVERSION ACTIONS \u2014 each campaign counts its own primary actions, so totals across these rows add different events and conversion rates do not compare. Re-run by segments.conversion_action_name before comparing, and tell the user."
513
+ }
514
+ ];
515
+ }
516
+ function clearedByRows(finalQuery, { campaigns, byNameOnly, unnamed }) {
517
+ if (unnamed > 0 && ACCOUNT_WIDE_RESOURCES.includes(fromResource(finalQuery) ?? "")) return false;
518
+ return campaigns.size + byNameOnly + unnamed < 2;
519
+ }
520
+
521
+ // src/commands/ads/google/keyword-serving.ts
522
+ var BELOW_FIRST_PAGE_BID = "AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID";
523
+ var ACTIONABLE_REASONS = {
524
+ [BELOW_FIRST_PAGE_BID]: {
525
+ label: "Below first page bid",
526
+ advice: "raise the max CPC (keywords update --cpc-bid) to at least the first-page estimate, or move the ad group onto a smart bidding strategy that sets the bid itself"
527
+ },
528
+ AD_GROUP_CRITERION_LOW_QUALITY: {
529
+ label: "Low quality score",
530
+ advice: "a bid raise does not lift quality \u2014 tighten ad relevance to the keyword and the landing page it points at (ad_group_criterion.quality_info.* breaks the score into its three parts)"
531
+ },
532
+ AD_GROUP_CRITERION_RARELY_SERVED: {
533
+ label: "Rarely served",
534
+ advice: "too few people search this term \u2014 broaden the match type or drop it, don't bid it up"
535
+ },
536
+ AD_GROUP_CRITERION_DISAPPROVED: {
537
+ label: "Disapproved",
538
+ advice: "select ad_group_criterion.disapproval_reasons to see which policy blocked it"
539
+ },
540
+ AD_GROUP_CRITERION_RESTRICTED: {
541
+ label: "Restricted",
542
+ advice: "policy limits where and to whom this keyword may show"
543
+ },
544
+ AD_GROUP_CRITERION_UNDER_REVIEW: {
545
+ label: "Under review",
546
+ advice: "waiting on Google's review \u2014 nothing to change yet"
547
+ },
548
+ AD_GROUP_CRITERION_PENDING_REVIEW: {
549
+ label: "Pending review",
550
+ advice: "waiting on Google's review \u2014 nothing to change yet"
551
+ },
552
+ AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY: {
553
+ label: "Auto-paused for low activity",
554
+ advice: "Google paused it after prolonged low serving \u2014 resume it only alongside a change that gives it traffic"
555
+ }
556
+ };
557
+ var REASON_ORDER = Object.keys(ACTIONABLE_REASONS);
558
+ var MAX_NAMED_KEYWORDS = 5;
559
+ function toMicros(value) {
560
+ if (typeof value === "number" && Number.isFinite(value)) return value;
561
+ if (typeof value === "string" && value.trim() !== "" && Number.isFinite(Number(value))) return Number(value);
562
+ return null;
563
+ }
564
+ function formatMoney(micros) {
565
+ return (micros / 1e6).toFixed(2);
566
+ }
567
+ function keywordLabel(row) {
568
+ const text = row["ad_group_criterion.keyword.text"];
569
+ const id = row["ad_group_criterion.criterion_id"];
570
+ const name = typeof text === "string" && text !== "" ? text : id == null ? "(unnamed keyword)" : `criterion ${id}`;
571
+ const adGroup = row["ad_group.name"];
572
+ return typeof adGroup === "string" && adGroup !== "" ? `${name} (ad group ${adGroup})` : name;
573
+ }
574
+ function keywordKey(row) {
575
+ const adGroup = row["ad_group.id"] ?? row["ad_group.name"] ?? "";
576
+ const criterion = row["ad_group_criterion.criterion_id"] ?? row["ad_group_criterion.keyword.text"] ?? "";
577
+ return `${String(adGroup)}~${String(criterion)}` === "~" ? keywordLabel(row) : `${adGroup}~${criterion}`;
578
+ }
579
+ function reasonsOn(row) {
580
+ const raw = row["ad_group_criterion.primary_status_reasons"];
581
+ if (!Array.isArray(raw)) return null;
582
+ return raw.filter((r) => typeof r === "string");
583
+ }
584
+ function bidShortfall(row) {
585
+ const bid = toMicros(row["ad_group_criterion.effective_cpc_bid_micros"] ?? row["ad_group_criterion.cpc_bid_micros"]);
586
+ const firstPage = toMicros(row["ad_group_criterion.position_estimates.first_page_cpc_micros"]);
587
+ if (bid == null || firstPage == null || bid >= firstPage) return null;
588
+ return `bids ${formatMoney(bid)} against a ${formatMoney(firstPage)} first-page estimate`;
589
+ }
590
+ function limitsOn(row, options) {
591
+ const reasons = reasonsOn(row);
592
+ const shortfall = bidShortfall(row);
593
+ const label = keywordLabel(row);
594
+ const applicable = reasons ? reasons.filter((reason) => reason in ACTIONABLE_REASONS) : options.statusReasonsSelected || shortfall === null ? [] : [BELOW_FIRST_PAGE_BID];
595
+ return applicable.map((reason) => ({
596
+ reason,
597
+ detail: reason === BELOW_FIRST_PAGE_BID && shortfall ? `"${label}" ${shortfall}` : `"${label}"`
598
+ }));
599
+ }
600
+ function describeLimit(reason, details) {
601
+ const named = details.slice(0, MAX_NAMED_KEYWORDS).join("; ");
602
+ const rest = details.length > MAX_NAMED_KEYWORDS ? ` (+${details.length - MAX_NAMED_KEYWORDS} more)` : "";
603
+ const { label, advice } = ACTIONABLE_REASONS[reason];
604
+ return `${label} \u2014 ${details.length}: ${named}${rest}. Fix: ${advice}.`;
605
+ }
606
+ function collectKeywordLimits(rows, options, acc = { detailsByReason: /* @__PURE__ */ new Map(), keywords: /* @__PURE__ */ new Set() }) {
607
+ for (const row of rows) {
608
+ const limits = limitsOn(row, options);
609
+ if (limits.length === 0) continue;
610
+ acc.keywords.add(keywordKey(row));
611
+ for (const { reason, detail } of limits) {
612
+ const bucket = acc.detailsByReason.get(reason);
613
+ if (bucket) bucket.push(detail);
614
+ else acc.detailsByReason.set(reason, [detail]);
615
+ }
616
+ }
617
+ return acc;
618
+ }
619
+ function renderKeywordLimits(limits) {
620
+ if (limits.detailsByReason.size === 0) return [];
621
+ const sentences = REASON_ORDER.filter((reason) => limits.detailsByReason.has(reason)).map(
622
+ (reason) => describeLimit(reason, limits.detailsByReason.get(reason) ?? [])
623
+ );
624
+ const count = limits.keywords.size;
625
+ return [
626
+ {
627
+ code: "KEYWORD_SERVING_LIMITED",
628
+ message: `${count} ${count === 1 ? "keyword is" : "keywords are"} limited and not getting the traffic they could. ${sentences.join(" ")} Amounts are in the account currency (baker ads google currency).`
629
+ }
630
+ ];
631
+ }
632
+ function keywordServingWarnings(rows, options) {
633
+ return renderKeywordLimits(collectKeywordLimits(rows, options));
634
+ }
635
+
636
+ // src/commands/ads/google/money-units.ts
637
+ function isSettingMicros(field) {
638
+ return field.endsWith("_micros") && !field.startsWith("metrics.") && !field.endsWith("_fraction_micros");
639
+ }
640
+ function moneyExample(rows) {
641
+ for (const row of rows) {
642
+ for (const [field, value] of Object.entries(row)) {
643
+ if (!isSettingMicros(field)) continue;
644
+ if ((typeof value === "string" || typeof value === "number") && Number.isFinite(Number(value))) {
645
+ return { field, micros: String(value) };
646
+ }
647
+ }
648
+ }
649
+ return void 0;
650
+ }
651
+ function moneyUnitWarnings(example) {
652
+ if (!example) return [];
653
+ const units = Number(example.micros) / 1e6;
654
+ return [
655
+ {
656
+ code: "MONEY_IN_MICROS",
657
+ message: `Budgets and bids here are in micros (${example.field} ${example.micros} is ${units}); write flags take whole currency: --amount ${units}.`
658
+ }
659
+ ];
660
+ }
661
+
662
+ // src/commands/ads/google/stable-order.ts
663
+ var ROW_KEYS = {
664
+ customer: ["customer.id"],
665
+ campaign: ["campaign.id"],
666
+ campaign_budget: ["campaign_budget.id"],
667
+ campaign_criterion: ["campaign.id", "campaign_criterion.criterion_id"],
668
+ ad_group: ["ad_group.id"],
669
+ ad_group_ad: ["ad_group.id", "ad_group_ad.ad.id"],
670
+ ad_group_criterion: ["ad_group.id", "ad_group_criterion.criterion_id"],
671
+ keyword_view: ["ad_group.id", "ad_group_criterion.criterion_id"],
672
+ search_term_view: ["ad_group.id", "search_term_view.search_term"],
673
+ asset: ["asset.id"],
674
+ asset_group: ["asset_group.id"],
675
+ detail_placement_view: ["ad_group.id", "detail_placement_view.placement"],
676
+ performance_max_placement_view: ["performance_max_placement_view.placement"],
677
+ landing_page_view: ["landing_page_view.unexpanded_final_url"],
678
+ campaign_asset: ["campaign.id", "asset.id", "campaign_asset.field_type"],
679
+ asset_group_asset: ["asset_group.id", "asset.id", "asset_group_asset.field_type"],
680
+ shared_criterion: ["shared_set.id", "shared_criterion.criterion_id"],
681
+ campaign_shared_set: ["campaign.id", "shared_set.id"]
682
+ };
683
+ var UNSORTABLE_SEGMENTS = /* @__PURE__ */ new Set([
684
+ "segments.ad_group",
685
+ "segments.asset_group",
686
+ "segments.campaign",
687
+ "segments.experiment_arm",
688
+ "segments.keyword.ad_group_criterion",
689
+ "segments.search_subcategory",
690
+ "segments.search_term",
691
+ "segments.webpage"
692
+ ]);
693
+ function masked(gaql) {
694
+ return gaql.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g, (quoted) => " ".repeat(quoted.length));
695
+ }
696
+ function listOf(clause) {
697
+ return clause.split(",").map((term) => term.trim().split(/\s+/)[0]?.toLowerCase() ?? "").filter(Boolean);
698
+ }
699
+ function rowKeysOf(gaql) {
700
+ const from = /\bFROM\s+([a-z_]+)/i.exec(masked(gaql));
701
+ return ROW_KEYS[from?.[1]?.toLowerCase() ?? ""] ?? [];
702
+ }
703
+ function stableOrderQuery(gaql) {
704
+ const plain = masked(gaql);
705
+ const from = /\bFROM\s+([a-z_]+)/i.exec(plain);
706
+ if (!from) return { query: gaql, unorderable: [] };
707
+ const keys = ROW_KEYS[from[1]?.toLowerCase() ?? ""] ?? [];
708
+ const selected = listOf(plain.slice(/\bSELECT\b/i.exec(plain)?.index ?? 0, from.index).replace(/^\s*SELECT\b/i, ""));
709
+ const tail = /\b(?:LIMIT|PARAMETERS)\b/i.exec(plain);
710
+ const end = tail ? tail.index : gaql.length;
711
+ const orderBy = /\bORDER\s+BY\b/i.exec(plain);
712
+ const ordered = orderBy ? listOf(plain.slice(orderBy.index + orderBy[0].length, end)) : [];
713
+ const ids = selected.filter((field) => /^[a-z_]+\.id$/.test(field));
714
+ const segments = selected.filter((field) => field.startsWith("segments."));
715
+ const unorderable = segments.filter((field) => UNSORTABLE_SEGMENTS.has(field));
716
+ const sortable = segments.filter((field) => !UNSORTABLE_SEGMENTS.has(field));
717
+ const wanted = [.../* @__PURE__ */ new Set([...keys, ...ids, ...sortable])];
718
+ const missing = wanted.filter((field) => !ordered.includes(field));
719
+ if (missing.length === 0) return { query: gaql, unorderable };
720
+ const unselected = keys.filter((field) => !selected.includes(field));
721
+ const head = gaql.slice(0, from.index).trimEnd();
722
+ const select = unselected.length > 0 ? `${head}, ${unselected.join(", ")} ` : gaql.slice(0, from.index);
723
+ const body = gaql.slice(from.index, end).trimEnd();
724
+ const order = orderBy ? `${body}, ${missing.join(", ")}` : `${body} ORDER BY ${missing.join(", ")}`;
725
+ const rest = gaql.slice(end).trim();
726
+ return { query: `${select}${order}${rest ? ` ${rest}` : ""}`, unorderable };
727
+ }
728
+
729
+ // src/commands/ads/google/query.ts
730
+ registerSchema({
731
+ command: "ads.google.query",
732
+ routes: ["POST /api/ads/google/query"],
733
+ effect: "read_live",
734
+ description: "Run a GAQL (Google Ads Query Language) query, one page at a time. Start here: `baker ads google query --preset campaign-performance` (--list-presets for all). Each read returns one page of --limit rows and, when the account holds more, `pagination.cursor` \u2014 pass it back with --cursor for the next page, or use --all --out <file> to read every page. A LIMIT in your own GAQL caps the whole read.",
735
+ args: {
736
+ query: { type: "positional", description: "GAQL SELECT statement (or pass it with --gaql)", required: false },
737
+ gaql: {
738
+ type: "string",
739
+ description: 'GAQL SELECT statement as a flag \u2014 same as the positional, for when quoting a positional is awkward: --gaql "SELECT campaign.name FROM campaign"',
740
+ required: false
741
+ },
742
+ "customer-id": {
743
+ type: "string",
744
+ description: "Google Ads customer ID (10 digits; dashes are fine). Falls back to BAKER_GOOGLE_ADS_CUSTOMER_ID env var.",
745
+ required: false
746
+ },
747
+ preset: {
748
+ type: "string",
749
+ description: `Named query preset (--list-presets shows each one's GAQL and page size): ${PRESETS.map((p) => p.name).join(", ")}. Presets return only actually-serving entities (enabled campaign AND ad group AND ad) by default \u2014 pass --include-paused to include paused ones.`,
750
+ required: false
751
+ },
752
+ "date-range": {
753
+ type: "string",
754
+ description: "Date range for presets: a Google date literal (TODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH \u2026) or BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'. Google has no LAST_90_DAYS \u2014 use BETWEEN for any other window.",
755
+ required: false
756
+ },
757
+ since: {
758
+ type: "string",
759
+ description: `For a preset: first day, YYYY-MM-DD, with --until (also --start/--end, --start-date/--end-date) \u2014 the same window as --date-range "BETWEEN 'since' AND 'until'". Your own GAQL carries its window in its WHERE.`,
760
+ required: false
761
+ },
762
+ until: { type: "string", description: "For a preset: last day, YYYY-MM-DD, with --since", required: false },
763
+ "include-paused": {
764
+ type: "boolean",
765
+ description: "Include paused entities in preset results. Off by default: presets return only actually-serving entities. Google Ads has no single serving flag \u2014 an entity serves only when its whole chain (campaign, ad group, ad) is ENABLED, so recommendations should target serving entities unless the user asks about paused ones.",
766
+ required: false
767
+ },
768
+ "campaign-id": {
769
+ type: "string",
770
+ description: "For a preset: only these campaigns, comma-separated ids (--campaign-id 123,456), filtered in Google. Start here for any one-campaign question instead of reading the account and filtering the rows. --list-presets says which presets take it (campaignScoped).",
771
+ required: false
772
+ },
773
+ search: {
774
+ type: "string",
775
+ description: "For a keyword or search-term preset: only rows whose text contains any of these, comma-separated, case-insensitive (--search masia,paellero), filtered in Google. Start here for any question about a few terms (are they already negatives? what did AI Max match for them?) instead of reading every row and grepping. --list-presets says which presets take it (searchable).",
776
+ required: false
777
+ },
778
+ limit: {
779
+ type: "number",
780
+ description: `Rows per page (default: the preset's page size, else 200; with --all, ${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE}; a larger value is read at ${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE}). A page size, not a cap: when more rows exist the read returns a cursor, and --all keeps paging.`,
781
+ required: false
782
+ },
783
+ "list-presets": { type: "boolean", description: "List all available query presets", required: false },
784
+ cursor: {
785
+ type: "string",
786
+ description: "Resume after a previous page: pass its pagination.cursor with the same query and --limit",
787
+ required: false
788
+ },
789
+ all: {
790
+ type: "boolean",
791
+ description: `Follow every page until the account has no more rows (use with --out for large reads), ${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE} rows per page unless --limit says otherwise. Needed for any read you will count or total. Only a LIMIT written in the GAQL itself can stop it early.`,
792
+ required: false
793
+ },
794
+ out: {
795
+ type: "string",
796
+ description: "Write the rows alone to a file, not the envelope (format from extension: .csv, .jsonl, .json \u2014 a bare array of rows). The file appears only once the read is over; until then, and after a read that stopped part way, the rows are in <file>.partial.",
797
+ required: false
798
+ },
799
+ append: {
800
+ type: "boolean",
801
+ description: "Append to existing file (skip CSV headers). With --cursor, carries on a read that stopped in the <file>.partial it left (error.partial names the cursor).",
802
+ required: false
803
+ },
804
+ output: {
805
+ type: "string",
806
+ description: "Output format: json|csv|jsonl|md. Default json, except --preset conversion-actions (and conversions list), which answers with an md table of each action's id, send_to and name unless a format, --fields or --full is asked for.",
807
+ required: false,
808
+ enum: ["json", "csv", "jsonl", "md"]
809
+ },
810
+ fields: {
811
+ type: "string",
812
+ description: "Only these columns, comma-separated, by their dotted names (--fields campaign.name,campaign.status); a resource name keeps all of its columns (--fields campaign). Every format; a column Google omitted still reads (omitted).",
813
+ required: false
814
+ },
815
+ "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false },
816
+ full: {
817
+ type: "boolean",
818
+ description: "Include the field description glossary in the JSON envelope, and a conversion action's tag_snippets whole (the Google tag and event snippet to put on a site) beside its send_to. Off by default \u2014 rows already carry the data, and a conversion action reads as its send_to (AW-<id>/<label>) alone; only ask for this when you need a field's meaning explained or the code itself.",
819
+ required: false
820
+ }
821
+ }
822
+ });
823
+ function extractFields(rows) {
824
+ const keys = /* @__PURE__ */ new Set();
825
+ foldObservedFields(rows, keys);
826
+ return [...keys];
827
+ }
828
+ function resultColumns(gaql, rows, keepSnippets = false) {
829
+ const observed = extractFields(rows);
830
+ const columns = observed.includes("level") ? ["level"] : [];
831
+ for (const field of parseSelectedFields(gaql)) {
832
+ const leaves = observed.filter((key) => key.startsWith(`${field}.`));
833
+ if (field === TAG_SNIPPETS_FIELD) {
834
+ columns.push(SEND_TO_FIELD);
835
+ if (keepSnippets || observed.includes(field)) columns.push(field);
836
+ } else columns.push(...leaves.length > 0 ? leaves : [field]);
837
+ }
838
+ for (const key of observed) columns.push(key);
839
+ return [...new Set(columns)];
840
+ }
841
+ function isCsvPath(filePath) {
842
+ return filePath.split(".").pop()?.toLowerCase() === "csv";
843
+ }
844
+ function fileColumnsFor(file, gaql, rows, append, keepSnippets) {
845
+ if (append && isCsvPath(file.target) && existsSync(file.partial)) {
846
+ const [header] = parseCsv(readFileSync(file.partial, "utf-8"), {
847
+ relax_column_count: true,
848
+ skip_empty_lines: true,
849
+ to_line: 1
850
+ });
851
+ if (header && header.length > 0) return header;
852
+ }
853
+ return resultColumns(gaql, rows, keepSnippets);
854
+ }
855
+ function writeRowsToFile(filePath, target, rows, fields, append) {
856
+ if (isCsvPath(target)) {
857
+ if (!append || !existsSync(filePath)) {
858
+ writeFileSync(filePath, `${toCsvRow(fields)}
859
+ `, "utf-8");
860
+ }
861
+ const csvRows = rows.map((row) => toCsvRow(fields.map((f) => cellText(row[f]))));
862
+ appendFileSync(filePath, `${csvRows.join("\n")}
863
+ `, "utf-8");
864
+ } else if (target.split(".").pop()?.toLowerCase() === "jsonl") {
865
+ const lines = rows.map((row) => JSON.stringify(row));
866
+ if (append && existsSync(filePath)) {
867
+ appendFileSync(filePath, `${lines.join("\n")}
868
+ `, "utf-8");
869
+ } else {
870
+ writeFileSync(filePath, `${lines.join("\n")}
871
+ `, "utf-8");
872
+ }
873
+ } else if (append && existsSync(filePath)) {
874
+ const existing = JSON.parse(readFileSync(filePath, "utf-8"));
875
+ writeFileSync(filePath, JSON.stringify([...existing, ...rows], null, 2), "utf-8");
876
+ } else {
877
+ writeFileSync(filePath, JSON.stringify(rows, null, 2), "utf-8");
878
+ }
879
+ }
880
+ function effectiveRowLimit(finalQuery) {
881
+ if (isSingleRowRead(finalQuery)) return void 0;
882
+ const match = blankQuotedValues(finalQuery).match(/\bLIMIT\s+(\d+)/i);
883
+ return match?.[1] ? Number(match[1]) : void 0;
884
+ }
885
+ function warningLines(warnings, format) {
886
+ return warnings.map((w) => {
887
+ const message = w.message.replace(/\s*\n\s*/g, " ");
888
+ if (format === "jsonl") return JSON.stringify({ _baker_warning: { code: w.code, message } });
889
+ if (format === "md") return `> **${w.code}** \u2014 ${message}`;
890
+ return `# baker ${w.code}: ${message}`;
891
+ });
892
+ }
893
+ function completenessWarnings(read) {
894
+ const cap = read.effectiveLimit;
895
+ const filledTheCap = cap !== void 0 && cap > 0 && read.rowCount >= cap;
896
+ if (!read.hasMore && !filledTheCap) return [];
897
+ const [cause, fix] = read.hasMore ? [
898
+ "More rows are waiting: the account returned a next-page cursor this run did not follow.",
899
+ "Re-run with --all --out <file> to read every page, or pass --cursor <pagination.cursor> (same query, same --limit) for the next page."
900
+ ] : [
901
+ `The ${read.rowCount} rows returned exactly fill the LIMIT in the statement (${cap}).`,
902
+ `Raise the LIMIT in the statement above ${cap}, or drop it \u2014 without a LIMIT, --all pages through every row.`
903
+ ];
904
+ return [
905
+ {
906
+ code: "TRUNCATED_RESULTS",
907
+ message: `INCOMPLETE READ \u2014 ${cause} These rows are a page, not the data set. Don't count, total or describe them as the whole picture. ${fix}`
908
+ }
909
+ ];
910
+ }
911
+ function buildQueryEnvelope(rows, fieldDescs, warnings, options) {
912
+ const notice = summariseWarnings(warnings);
913
+ return {
914
+ ok: true,
915
+ ...options.cached ? { cached: true } : {},
916
+ ...warnings.length > 0 ? { warnings } : {},
917
+ ...options.nextCursor ? { pagination: { hasMore: true, cursor: options.nextCursor } } : {},
918
+ data: rows,
919
+ ...options.full && Object.keys(fieldDescs).length > 0 ? { fields: fieldDescs } : {},
920
+ ...notice ? { notice } : {}
921
+ };
922
+ }
923
+ function summariseWarnings(warnings) {
924
+ if (warnings.length === 0) return void 0;
925
+ const codes = [...new Set(warnings.map((w) => w.code))].join(", ");
926
+ return `Read the "warnings" above before using these rows: ${codes}.`;
927
+ }
928
+ function buildFileSummary(input) {
929
+ const notice = summariseWarnings(input.warnings);
930
+ return {
931
+ ok: true,
932
+ fields: {},
933
+ file: input.file,
934
+ holds: rowsFileHolds(input.file),
935
+ rows: input.rows,
936
+ complete: input.complete,
937
+ ...input.warnings.length > 0 ? { warnings: input.warnings } : {},
938
+ ...notice ? { notice } : {}
939
+ };
940
+ }
941
+ var REPEAT_NOTICE_ABOVE_ROWS = 20;
942
+ function cellText(value) {
943
+ return typeof value === "object" && value !== null ? JSON.stringify(value) : String(value ?? "");
944
+ }
945
+ function writeLine(line) {
946
+ process.stdout.write(`${line}
947
+ `);
948
+ }
949
+ var writeCsvRows = (rows, fields, notices) => {
950
+ writeLine(toCsvRow(fields));
951
+ for (const line of notices) writeLine(line);
952
+ for (const row of rows) writeLine(toCsvRow(fields.map((f) => cellText(row[f]))));
953
+ };
954
+ var writeJsonlRows = (rows, _fields, notices) => {
955
+ for (const line of notices) writeLine(line);
956
+ for (const row of rows) writeLine(JSON.stringify(row));
957
+ };
958
+ var OMITTED = "(omitted)";
959
+ var OMITTED_FALSE = `false ${OMITTED}`;
960
+ var OMITTED_LEGEND = `> ${OMITTED} = Google left this field off the row, which is how it sends false, 0 and "not set": the field WAS read. A field with no column here was not read.`;
961
+ function mdCell(row, field, booleanColumns) {
962
+ if (!(field in row)) return booleanColumns.has(field) ? OMITTED_FALSE : OMITTED;
963
+ return cellText(row[field]).replace(/\|/g, "\\|");
964
+ }
965
+ var writeMdRows = (rows, fields, notices) => {
966
+ const booleanColumns = new Set(fields.filter((f) => rows.some((row) => typeof row[f] === "boolean")));
967
+ for (const line of notices) writeLine(line);
968
+ writeLine(`| ${fields.join(" | ")} |`);
969
+ writeLine(`| ${fields.map(() => "---").join(" | ")} |`);
970
+ for (const row of rows) writeLine(`| ${fields.map((f) => mdCell(row, f, booleanColumns)).join(" | ")} |`);
971
+ if (rows.some((row) => fields.some((f) => !(f in row)))) writeLine(OMITTED_LEGEND);
972
+ };
973
+ var ROW_WRITERS = { csv: writeCsvRows, jsonl: writeJsonlRows, md: writeMdRows };
974
+ var REPEATED_IN_FULL = "TRUNCATED_RESULTS";
975
+ function tailWarnings(warnings) {
976
+ const repeated = warnings.filter((w) => w.code === REPEATED_IN_FULL);
977
+ const named = [...new Set(warnings.filter((w) => w.code !== REPEATED_IN_FULL).map((w) => w.code))];
978
+ if (named.length === 0) return repeated;
979
+ return [...repeated, { code: named.join(", "), message: "printed in full at the start of this output." }];
980
+ }
981
+ function writeRows(format, rows, columns, warnings) {
982
+ const write = ROW_WRITERS[format] ?? writeMdRows;
983
+ write(rows, columns, warningLines(warnings, format));
984
+ if (rows.length > REPEAT_NOTICE_ABOVE_ROWS) {
985
+ for (const line of warningLines(tailWarnings(warnings), format)) writeLine(line);
986
+ }
987
+ }
988
+ function requestedFields(args) {
989
+ if (typeof args.fields !== "string") return null;
990
+ const fields = args.fields.split(",").map((field) => field.trim()).filter((field) => field.length > 0);
991
+ return fields.length > 0 ? fields : null;
992
+ }
993
+ function chosenColumns(columns, fields) {
994
+ const chosen = [];
995
+ const unmatched = [];
996
+ for (const field of fields) {
997
+ const matched = columns.filter((column) => column === field || column.startsWith(`${field}.`));
998
+ if (matched.length === 0) unmatched.push(field);
999
+ chosen.push(...matched);
1000
+ }
1001
+ return { columns: [...new Set(chosen)], unmatched };
1002
+ }
1003
+ function writeNarrowed(envelope, fields) {
1004
+ if (fields) writeJsonEnvelope(maskEnvelope({ ...envelope }, fields));
1005
+ else writeAdsJson(envelope);
1006
+ }
1007
+ function pickColumns(row, columns) {
1008
+ return Object.fromEntries(columns.filter((column) => column in row).map((column) => [column, row[column]]));
1009
+ }
1010
+ function leanView(args) {
1011
+ if (args.full || args.output !== void 0 || requestedFields(args) || typeof args.preset !== "string")
1012
+ return void 0;
1013
+ return getPreset(args.preset)?.lean;
1014
+ }
1015
+ function outputResults(readRows, fieldDescs, warnings, args, cached, read) {
1016
+ const format = args.output || "json";
1017
+ const rows = readRows.map((row) => withSendTo(row, Boolean(args.full)));
1018
+ const allWarnings = [
1019
+ ...warnings,
1020
+ ...completenessWarnings({
1021
+ rowCount: rows.length,
1022
+ effectiveLimit: read.effectiveLimit,
1023
+ hasMore: Boolean(read.nextCursor)
1024
+ })
1025
+ ];
1026
+ const fields = requestedFields(args);
1027
+ const lean = leanView(args);
1028
+ if (lean) {
1029
+ writeRows("md", leanRows(lean, rows), lean.columns, allWarnings);
1030
+ writeLine(`> ${lean.note} Every column, as JSON: --output json.`);
1031
+ if (read.nextCursor) writeLine(`> Next page: the same command plus --cursor ${read.nextCursor}`);
1032
+ return;
1033
+ }
1034
+ const columns = resultColumns(read.gaql, rows, Boolean(args.full));
1035
+ const chosen = fields ? chosenColumns(columns, fields) : { columns, unmatched: [] };
1036
+ const unmatched = chosen.unmatched.length > 0 ? [
1037
+ {
1038
+ code: "FIELDS_UNMATCHED",
1039
+ message: `--fields matched no column for: ${chosen.unmatched.join(", ")}. The columns are: ${columns.join(", ")}.`
1040
+ }
1041
+ ] : [];
1042
+ const narrowed = fields ? rows.map((row) => pickColumns(row, chosen.columns)) : rows;
1043
+ if (format === "json") {
1044
+ writeAdsJson(
1045
+ buildQueryEnvelope(narrowed, fieldDescs, [...unmatched, ...allWarnings], {
1046
+ full: Boolean(args.full),
1047
+ cached,
1048
+ nextCursor: read.nextCursor
1049
+ })
1050
+ );
1051
+ return;
1052
+ }
1053
+ writeRows(format, narrowed, chosen.columns, [...unmatched, ...allWarnings]);
1054
+ }
1055
+ function resolveGaqlInput(args) {
1056
+ const positional = typeof args.query === "string" ? args.query.trim() : "";
1057
+ const flag = typeof args.gaql === "string" ? args.gaql.trim() : "";
1058
+ if (positional && flag && positional !== flag) {
1059
+ return { ok: false, message: "Pass the GAQL statement once \u2014 as the positional or as --gaql, not both." };
1060
+ }
1061
+ return { ok: true, gaql: positional || flag };
1062
+ }
1063
+ function searchTerms(value) {
1064
+ return typeof value === "string" ? value.split(",") : void 0;
1065
+ }
1066
+ function refuseCampaignIdOnGaql(value) {
1067
+ const campaigns = parseCampaignIds(value);
1068
+ const ids = campaigns.ok && campaigns.ids ? campaigns.ids.join(", ") : "<id>";
1069
+ writeAdsJson({
1070
+ ok: false,
1071
+ error: {
1072
+ code: "VALIDATION_ERROR",
1073
+ message: `--campaign-id narrows a --preset; your own GAQL is sent as written. Put the campaigns in its WHERE instead: campaign.id IN (${ids}).`
1074
+ }
1075
+ });
1076
+ }
1077
+ function presetDateRange(args) {
1078
+ const range = typeof args["date-range"] === "string" ? args["date-range"] : void 0;
1079
+ const since = typeof args.since === "string" && args.since !== "" ? args.since : void 0;
1080
+ const until = typeof args.until === "string" && args.until !== "" ? args.until : void 0;
1081
+ if (since === void 0 && until === void 0) return { ok: true, dateRange: range, paired: false };
1082
+ if (range !== void 0) {
1083
+ return { ok: false, message: "Pass the window once \u2014 as --since/--until or as --date-range, not both." };
1084
+ }
1085
+ if (since === void 0 || until === void 0) {
1086
+ return { ok: false, message: "A date window needs both ends: --since YYYY-MM-DD --until YYYY-MM-DD." };
1087
+ }
1088
+ return { ok: true, dateRange: `BETWEEN '${since}' AND '${until}'`, paired: true };
1089
+ }
1090
+ function refusedWindowOnGaql(args) {
1091
+ const window = presetDateRange(args);
1092
+ if (window.ok && !window.paired) return false;
1093
+ writeAdsJson({
1094
+ ok: false,
1095
+ error: {
1096
+ code: "VALIDATION_ERROR",
1097
+ message: window.ok ? `A date window narrows a --preset; your own GAQL is sent as written. Put it in its WHERE instead: segments.date ${window.dateRange}.` : window.message
1098
+ }
1099
+ });
1100
+ return true;
1101
+ }
1102
+ function resolvePresetRead(args) {
1103
+ const preset = getPreset(args.preset);
1104
+ if (!preset) {
1105
+ const available = PRESETS.map((p) => p.name).join(", ");
1106
+ writeAdsJson({
1107
+ ok: false,
1108
+ error: { code: "VALIDATION_ERROR", message: `Unknown preset: "${args.preset}". Available: ${available}` }
1109
+ });
1110
+ return null;
1111
+ }
1112
+ const campaigns = parseCampaignIds(args["campaign-id"]);
1113
+ if (!campaigns.ok) {
1114
+ writeAdsJson({ ok: false, error: campaigns.error });
1115
+ return null;
1116
+ }
1117
+ const window = presetDateRange(args);
1118
+ if (!window.ok) {
1119
+ writeAdsJson({ ok: false, error: { code: "VALIDATION_ERROR", message: window.message } });
1120
+ return null;
1121
+ }
1122
+ const expanded = expandPreset(preset, {
1123
+ dateRange: window.dateRange,
1124
+ includePaused: Boolean(args["include-paused"]),
1125
+ campaignIds: campaigns.ids,
1126
+ search: searchTerms(args.search)
1127
+ });
1128
+ if (expanded.error) {
1129
+ writeAdsJson({
1130
+ ok: false,
1131
+ error: { code: "VALIDATION_ERROR", message: expanded.error }
1132
+ });
1133
+ return null;
1134
+ }
1135
+ return { query: expanded.query, levels: expanded.levels };
1136
+ }
1137
+ function resolveGaql(args) {
1138
+ if (args.preset) return resolvePresetRead(args);
1139
+ const input = resolveGaqlInput(args);
1140
+ if (input.ok && input.gaql && refusedWindowOnGaql(args)) return null;
1141
+ if (input.ok && input.gaql && args["campaign-id"] !== void 0) {
1142
+ refuseCampaignIdOnGaql(args["campaign-id"]);
1143
+ return null;
1144
+ }
1145
+ if (input.ok && input.gaql && typeof args.search === "string") {
1146
+ writeAdsJson({
1147
+ ok: false,
1148
+ error: {
1149
+ code: "VALIDATION_ERROR",
1150
+ message: `--search narrows a --preset; your own GAQL is sent as written. Put the terms in its WHERE instead: <text field> REGEXP_MATCH "(?i).*(term1|term2).*".`
1151
+ }
1152
+ });
1153
+ return null;
1154
+ }
1155
+ if (!input.ok || !input.gaql) {
1156
+ writeAdsJson({
1157
+ ok: false,
1158
+ error: {
1159
+ code: "VALIDATION_ERROR",
1160
+ message: input.ok ? "Provide a GAQL query (positional or --gaql) or use --preset. Run --list-presets to see options." : input.message
1161
+ }
1162
+ });
1163
+ return null;
1164
+ }
1165
+ return { query: input.gaql };
1166
+ }
1167
+ var SERVING_HIERARCHY_RESOURCES = [
1168
+ "campaign",
1169
+ "ad_group",
1170
+ "ad_group_ad",
1171
+ "ad_group_criterion",
1172
+ "keyword_view",
1173
+ "search_term_view",
1174
+ "shopping_performance_view",
1175
+ "asset_group_asset"
1176
+ ].filter((resource) => !(resource in SERVING_CHAINS));
1177
+ function whereClause3(upperQuery) {
1178
+ const where = /\bWHERE\b/.exec(upperQuery);
1179
+ if (!where) return "";
1180
+ const rest = upperQuery.slice(where.index + where[0].length);
1181
+ const trailing = /\b(?:ORDER\s+BY|GROUP\s+BY|LIMIT|PARAMETERS)\b/.exec(rest);
1182
+ return trailing ? rest.slice(0, trailing.index) : rest;
1183
+ }
1184
+ function servingScopeWarnings(args, finalQuery) {
1185
+ if (args.preset) {
1186
+ const name = String(args.preset);
1187
+ if (!args["include-paused"] || isInventoryPreset(name) || !getPreset(name)?.statusFields?.length) return [];
1188
+ return [
1189
+ {
1190
+ code: "SERVING_SCOPE",
1191
+ message: "Paused entities are included (--include-paused). Only recommend changes for actually-serving entities (enabled campaign, ad group, and ad) unless the user asked about paused ones."
1192
+ }
1193
+ ];
1194
+ }
1195
+ const upper = finalQuery.toUpperCase();
1196
+ const fromMatch = upper.match(/\bFROM\s+([A-Z_]+)/);
1197
+ const resource = fromMatch?.[1]?.toLowerCase();
1198
+ const hierarchical = resource ? SERVING_HIERARCHY_RESOURCES.includes(resource) : false;
1199
+ const where = whereClause3(upper);
1200
+ const filtersStatus = where.includes(".STATUS");
1201
+ const pinnedById = resource ? new RegExp(`\\b${resource.toUpperCase()}\\.ID\\s*(=|IN\\b)`).test(where) : false;
1202
+ if (hierarchical && !filtersStatus && !pinnedById) {
1203
+ return [
1204
+ {
1205
+ code: "SERVING_SCOPE",
1206
+ message: "This query has no status filter, so it may return paused entities that aren't actually serving. Google Ads has no single serving flag \u2014 an entity serves only when its whole chain is ENABLED. Add campaign.status = 'ENABLED' AND ad_group.status = 'ENABLED' AND ad_group_ad.status = 'ENABLED' (as applicable), or use a --preset, unless you intend to include paused entities."
1207
+ }
1208
+ ];
1209
+ }
1210
+ return [];
1211
+ }
1212
+ function syncedCopyWarnings(args) {
1213
+ const preset = typeof args.preset === "string" ? getPreset(args.preset) : void 0;
1214
+ const window = presetDateRange(args);
1215
+ if (preset === void 0 || !window.ok) return [];
1216
+ const hint = googlePresetSyncedHint(preset.name, window.dateRange ?? preset.defaultDateRange);
1217
+ return hint ? [{ code: "SYNCED_COPY", message: hint }] : [];
1218
+ }
1219
+ function parseSelectedFields(gaql) {
1220
+ return [...new Set(selectStatements(gaql).flatMap((statement) => statement.fields))];
1221
+ }
1222
+ function selectStatements(gaql) {
1223
+ return [...masked(gaql).matchAll(/\bSELECT\b([\s\S]*?)\bFROM\b\s*([A-Za-z_]*)/gi)].map((match) => ({
1224
+ resource: (match[2] ?? "").toLowerCase(),
1225
+ fields: (match[1] ?? "").split(",").map((field) => field.trim()).filter((field) => /^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z0-9_]+)*$/.test(field))
1226
+ }));
1227
+ }
1228
+ function foldObservedFields(rows, observed) {
1229
+ for (const row of rows) {
1230
+ for (const key of Object.keys(row)) observed.add(key);
1231
+ }
1232
+ }
1233
+ function unobservedSelectedFields(gaql, rows) {
1234
+ const observed = /* @__PURE__ */ new Set();
1235
+ foldObservedFields(rows, observed);
1236
+ return unobservedFields(gaql, observed);
1237
+ }
1238
+ function unobservedFields(gaql, observed) {
1239
+ const statements = selectStatements(gaql);
1240
+ const answered = statements.length < 2 ? statements : statements.filter((statement) => [...observed].some((key) => key.startsWith(`${statement.resource}.`)));
1241
+ const selected = [...new Set(answered.flatMap((statement) => statement.fields))];
1242
+ return selected.filter((field) => {
1243
+ if (field.endsWith(".resource_name")) return false;
1244
+ if (observed.has(field)) return false;
1245
+ if (unionPartners(field).some((partner) => observed.has(partner))) return false;
1246
+ if (field === TAG_SNIPPETS_FIELD) return false;
1247
+ return ![...observed].some((key) => key.startsWith(`${field}.`));
1248
+ });
1249
+ }
1250
+ var UNION_ARMS = [
1251
+ ["spending_limit_micros", "spending_limit_type"],
1252
+ ["end_date_time", "end_time_type"]
1253
+ ];
1254
+ var PROPOSAL_START_ARMS = [
1255
+ "account_budget_proposal.proposed_start_date_time",
1256
+ "account_budget_proposal.proposed_start_time_type"
1257
+ ];
1258
+ function unionPartners(field) {
1259
+ const partners = [];
1260
+ for (const [a, b] of UNION_ARMS) {
1261
+ if (field.endsWith(a)) partners.push(`${field.slice(0, -a.length)}${b}`);
1262
+ if (field.endsWith(b)) partners.push(`${field.slice(0, -b.length)}${a}`);
1263
+ }
1264
+ const [startDate, startType] = PROPOSAL_START_ARMS;
1265
+ if (field === startDate) partners.push(startType);
1266
+ if (field === startType) partners.push(startDate);
1267
+ if (field === "account_budget.adjusted_spending_limit_micros")
1268
+ partners.push("account_budget.approved_spending_limit_type");
1269
+ return partners;
1270
+ }
1271
+ function missingFieldWarnings(gaql, rows) {
1272
+ const observed = /* @__PURE__ */ new Set();
1273
+ foldObservedFields(rows, observed);
1274
+ return missingFieldWarningsFor(gaql, observed, rows.length);
1275
+ }
1276
+ function missingFieldWarningsFor(gaql, observed, rowCount) {
1277
+ if (rowCount === 0) return [];
1278
+ const missing = unobservedFields(gaql, observed);
1279
+ if (missing.length === 0) return [];
1280
+ return [
1281
+ {
1282
+ code: "MISSING_FIELDS",
1283
+ message: `These SELECTed fields came back on no row: ${missing.join(", ")}. Google omits empty fields, so this does NOT mean the setting is empty: check the level that owns it.`
1284
+ }
1285
+ ];
1286
+ }
1287
+ function unwrittenColumnWarnings(header, observed, read) {
1288
+ const written = /* @__PURE__ */ new Set([...header, ...read?.appended ? rowKeysOf(read.gaql) : []]);
1289
+ const unwritten = [...observed].filter((key) => !written.has(key));
1290
+ if (unwritten.length === 0) return [];
1291
+ return [
1292
+ {
1293
+ code: "UNWRITTEN_COLUMNS",
1294
+ message: `The file has no column for ${unwritten.join(", ")}: the header was fixed on the first page, which carried none of them, so their values from later pages are NOT in the file. Do not read those columns as empty. SELECT these fields by name instead of their parent, or write to a .jsonl file, then re-run.`
1295
+ }
1296
+ ];
1297
+ }
1298
+ function keywordServingOptions(gaql) {
1299
+ return { statusReasonsSelected: parseSelectedFields(gaql).includes("ad_group_criterion.primary_status_reasons") };
1300
+ }
1301
+ function baseFileOf(partial) {
1302
+ return `${partial}.base`;
1303
+ }
1304
+ function startPartialFile(target, args) {
1305
+ const partial = `${target}.partial`;
1306
+ if (args.append && args.cursor && existsSync(partial)) {
1307
+ rmSync(target, { force: true });
1308
+ const baseFile = baseFileOf(partial);
1309
+ const base = existsSync(baseFile) ? Number(readFileSync(baseFile, "utf-8")) || 0 : 0;
1310
+ return { partial, target, rowsBefore: rowsInFile(partial, target), resumes: true, movedTarget: false, base };
1311
+ }
1312
+ rmSync(partial, { force: true });
1313
+ rmSync(baseFileOf(partial), { force: true });
1314
+ if (args.append && existsSync(target)) {
1315
+ const rowsBefore = rowsInFile(target, target);
1316
+ renameSync(target, partial);
1317
+ return { partial, target, rowsBefore, resumes: false, movedTarget: true, base: rowsBefore };
1318
+ }
1319
+ rmSync(target, { force: true });
1320
+ return { partial, target, rowsBefore: 0, resumes: false, movedTarget: false, base: 0 };
1321
+ }
1322
+ function keepFirstRows(file, target, rows) {
1323
+ const text = readFileSync(file, "utf-8");
1324
+ if (isCsvPath(target)) {
1325
+ const records = parseCsv(text, { relax_column_count: true, skip_empty_lines: true });
1326
+ writeFileSync(
1327
+ file,
1328
+ records.map((record) => `${toCsvRow(record)}
1329
+ `).slice(0, rows + 1).join(""),
1330
+ "utf-8"
1331
+ );
1332
+ } else if (target.split(".").pop()?.toLowerCase() === "jsonl") {
1333
+ const lines = text.split("\n").filter((line) => line.trim());
1334
+ writeFileSync(file, `${lines.slice(0, rows).join("\n")}
1335
+ `, "utf-8");
1336
+ } else {
1337
+ const all = JSON.parse(text);
1338
+ writeFileSync(file, JSON.stringify(all.slice(0, rows), null, 2), "utf-8");
1339
+ }
1340
+ }
1341
+ function rowsInFile(file, target) {
1342
+ const text = readFileSync(file, "utf-8");
1343
+ if (isCsvPath(target)) {
1344
+ const records = parseCsv(text, { relax_column_count: true, skip_empty_lines: true });
1345
+ return Math.max(records.length - 1, 0);
1346
+ }
1347
+ if (target.split(".").pop()?.toLowerCase() === "jsonl") return text.split("\n").filter((line) => line.trim()).length;
1348
+ const rows = JSON.parse(text);
1349
+ return Array.isArray(rows) ? rows.length : 0;
1350
+ }
1351
+ var StoppedRead = class extends Error {
1352
+ constructor(failure, partial) {
1353
+ super(failure instanceof Error ? failure.message : "The read stopped");
1354
+ this.failure = failure;
1355
+ this.partial = partial;
1356
+ }
1357
+ };
1358
+ async function fetchAllPages(gaql, body, args, servingOptions) {
1359
+ const target = args.out ? resolve(args.out) : void 0;
1360
+ const file = target ? startPartialFile(target, args) : void 0;
1361
+ const progress = { rowsRead: 0, held: [], cursor: args.cursor };
1362
+ try {
1363
+ const read = await readPages(gaql, body, args, servingOptions, file, progress);
1364
+ if (file) {
1365
+ renameSync(file.partial, file.target);
1366
+ rmSync(baseFileOf(file.partial), { force: true });
1367
+ }
1368
+ return {
1369
+ ...read,
1370
+ totalRowsWritten: (file?.rowsBefore ?? 0) + read.totalRowsWritten,
1371
+ rowsOfThisRead: (file?.resumes ? file.rowsBefore : 0) + read.totalRowsWritten
1372
+ };
1373
+ } catch (err) {
1374
+ throw readStopped(err, file, progress);
1375
+ }
1376
+ }
1377
+ function readStopped(err, file, progress) {
1378
+ const cursor = progress.cursor ? { cursor: progress.cursor } : {};
1379
+ if (!file) {
1380
+ if (progress.rowsRead === 0) return err;
1381
+ return new StoppedRead(err, { data: progress.held, rows: progress.rowsRead, complete: false, ...cursor });
1382
+ }
1383
+ if (file.base > 0 && err instanceof ApiError && err.code === "CONFLICT") {
1384
+ keepFirstRows(file.partial, file.target, file.base);
1385
+ renameSync(file.partial, file.target);
1386
+ rmSync(baseFileOf(file.partial), { force: true });
1387
+ return err;
1388
+ }
1389
+ if (file.resumes || progress.rowsRead > 0) {
1390
+ if (file.base > 0) writeFileSync(baseFileOf(file.partial), String(file.base), "utf-8");
1391
+ return new StoppedRead(err, {
1392
+ file: file.partial,
1393
+ rows: file.rowsBefore + progress.rowsRead,
1394
+ complete: false,
1395
+ ...cursor
1396
+ });
1397
+ }
1398
+ if (file.movedTarget) renameSync(file.partial, file.target);
1399
+ else rmSync(file.partial, { force: true });
1400
+ return err;
1401
+ }
1402
+ function isBudgetRow(row) {
1403
+ return Object.keys(row).some((key) => key.startsWith("account_budget."));
1404
+ }
1405
+ async function readPages(gaql, body, args, servingOptions, file, progress) {
1406
+ let pageToken = args.cursor;
1407
+ const convertingRows = foldConvertingRows([]);
1408
+ let keywordLimits;
1409
+ const observedFields = /* @__PURE__ */ new Set();
1410
+ let fileColumns;
1411
+ let budgetRows = [];
1412
+ let moneySample;
1413
+ do {
1414
+ const requestBody = { ...body };
1415
+ if (pageToken) requestBody.pageToken = pageToken;
1416
+ const response = await apiPost("/api/ads/google/query", requestBody);
1417
+ const rows = response.rows ?? [];
1418
+ pageToken = response.pageToken;
1419
+ foldConvertingRows(rows, convertingRows);
1420
+ if (file) {
1421
+ const shouldAppend = args.append || progress.rowsRead > 0;
1422
+ const written = rows.map((row) => withSendTo(row, Boolean(args.full)));
1423
+ fileColumns ??= fileColumnsFor(file, gaql, written, shouldAppend, Boolean(args.full));
1424
+ writeRowsToFile(file.partial, file.target, written, fileColumns, shouldAppend);
1425
+ keywordLimits = collectKeywordLimits(rows, servingOptions, keywordLimits);
1426
+ foldObservedFields(written, observedFields);
1427
+ budgetRows = budgetRows.concat(rows.filter(isBudgetRow));
1428
+ moneySample ??= moneyExample(rows);
1429
+ } else {
1430
+ progress.held = progress.held.concat(rows);
1431
+ }
1432
+ progress.rowsRead += rows.length;
1433
+ progress.cursor = pageToken;
1434
+ if (!args.all) break;
1435
+ } while (pageToken);
1436
+ return {
1437
+ allRows: progress.held,
1438
+ lastPageToken: pageToken,
1439
+ totalRowsWritten: file ? progress.rowsRead : 0,
1440
+ rowsOfThisRead: file ? progress.rowsRead : 0,
1441
+ convertingRows,
1442
+ keywordLimits: keywordLimits ?? collectKeywordLimits([], servingOptions),
1443
+ observedFields,
1444
+ fileColumns: fileColumns ?? [],
1445
+ budgetRows,
1446
+ moneySample
1447
+ };
1448
+ }
1449
+ function pageCacheKey(customerId, query, pageSize, cursor) {
1450
+ return buildQueryCacheKey(customerId, `${query}\0page=${pageSize}\0cursor=${cursor ?? ""}\0cut=steady`);
1451
+ }
1452
+ async function executeQuery(finalQuery, args, customerId, limit, warnings, useCache, cacheKey, levels) {
1453
+ const body = {
1454
+ customerId,
1455
+ ...levels ? { levels } : { query: finalQuery },
1456
+ pageSize: limit
1457
+ };
1458
+ const managerId = getManagerIdForCustomer(customerId);
1459
+ if (managerId) body.managerId = managerId;
1460
+ if (!useCache) body.skipCache = true;
1461
+ const servingOptions = keywordServingOptions(finalQuery);
1462
+ const {
1463
+ allRows,
1464
+ lastPageToken,
1465
+ totalRowsWritten,
1466
+ rowsOfThisRead,
1467
+ convertingRows,
1468
+ keywordLimits,
1469
+ observedFields,
1470
+ fileColumns,
1471
+ budgetRows,
1472
+ moneySample
1473
+ } = await fetchAllPages(finalQuery, body, args, servingOptions);
1474
+ const readWhole = !args.cursor && !lastPageToken;
1475
+ if (args.out) {
1476
+ const truncation = completenessWarnings({
1477
+ rowCount: rowsOfThisRead,
1478
+ effectiveLimit: effectiveRowLimit(finalQuery),
1479
+ hasMore: Boolean(lastPageToken)
1480
+ });
1481
+ const fileWarnings = [
1482
+ ...warnings,
1483
+ ...renderKeywordLimits(keywordLimits),
1484
+ ...missingFieldWarningsFor(finalQuery, observedFields, totalRowsWritten),
1485
+ // Only a CSV has a header to fall out of; json and jsonl files carry every row whole.
1486
+ ...isCsvPath(args.out) ? unwrittenColumnWarnings(fileColumns, observedFields, { gaql: finalQuery, appended: args.append === true }) : [],
1487
+ ...accountFundsWarnings(parseSelectedFields(finalQuery), budgetRows),
1488
+ ...conversionMixWarnings(finalQuery, readWhole ? convertingRows : void 0),
1489
+ ...moneyUnitWarnings(moneySample),
1490
+ ...truncation
1491
+ ];
1492
+ const summary = buildFileSummary({
1493
+ file: resolve(args.out),
1494
+ rows: totalRowsWritten,
1495
+ warnings: fileWarnings,
1496
+ complete: truncation.length === 0
1497
+ });
1498
+ writeNarrowed(summary, requestedFields(args));
1499
+ return;
1500
+ }
1501
+ if (useCache && !args.all && allRows.length > 0) {
1502
+ const page = { rows: allRows, ...lastPageToken ? { cursor: lastPageToken } : {} };
1503
+ cacheSet("queries", cacheKey, page, getQueryTtl(finalQuery), getFieldDescriptions(extractFields(allRows)));
1504
+ }
1505
+ const fields = extractFields(allRows);
1506
+ outputResults(
1507
+ allRows,
1508
+ getFieldDescriptions(fields),
1509
+ [
1510
+ ...warnings,
1511
+ ...missingFieldWarnings(finalQuery, allRows),
1512
+ ...keywordServingWarnings(allRows, servingOptions),
1513
+ ...accountFundsWarnings(parseSelectedFields(finalQuery), allRows),
1514
+ ...conversionMixWarnings(finalQuery, readWhole ? convertingRows : void 0),
1515
+ ...moneyUnitWarnings(moneyExample(allRows))
1516
+ ],
1517
+ args,
1518
+ false,
1519
+ {
1520
+ gaql: finalQuery,
1521
+ effectiveLimit: effectiveRowLimit(finalQuery),
1522
+ nextCursor: lastPageToken
1523
+ }
1524
+ );
1525
+ }
1526
+ function shouldReadCache(args) {
1527
+ return !args["no-cache"] && !args.out && !args.all;
1528
+ }
1529
+ var DEFAULT_QUERY_LIMIT = 200;
1530
+ function parseQueryLimit(raw, fallback = DEFAULT_QUERY_LIMIT) {
1531
+ if (raw === void 0 || raw === null || raw === "") return { ok: true, limit: fallback };
1532
+ const limit = Number(raw);
1533
+ if (Number.isInteger(limit) && limit > GOOGLE_ADS_QUERY_MAX_PAGE_SIZE) {
1534
+ return { ok: true, limit: GOOGLE_ADS_QUERY_MAX_PAGE_SIZE, clampedFrom: limit };
1535
+ }
1536
+ if (Number.isInteger(limit) && limit >= 1) return { ok: true, limit };
1537
+ return {
1538
+ ok: false,
1539
+ error: {
1540
+ ok: false,
1541
+ error: {
1542
+ code: "VALIDATION_ERROR",
1543
+ message: `--limit must be a whole number from 1 to ${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE}, got '${String(raw)}'.`,
1544
+ fix: {
1545
+ action: "retry_with_flag",
1546
+ explanation: `--limit is the size of one page, at most ${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE} rows. For more rows, add --all --out <file>: it reads every page.`
1547
+ },
1548
+ retryable: false
1549
+ }
1550
+ }
1551
+ };
1552
+ }
1553
+ function queryPageSize(args) {
1554
+ if (args.all) return parseQueryLimit(args.limit, GOOGLE_ADS_QUERY_MAX_PAGE_SIZE);
1555
+ const preset = typeof args.preset === "string" ? getPreset(args.preset) : void 0;
1556
+ return parseQueryLimit(args.limit, preset?.defaultLimit ?? DEFAULT_QUERY_LIMIT);
1557
+ }
1558
+ function clampWarnings(parsed) {
1559
+ if (parsed.clampedFrom === void 0) return [];
1560
+ return [
1561
+ {
1562
+ code: "LIMIT_CLAMPED",
1563
+ message: `--limit ${parsed.clampedFrom} is above the largest page (${GOOGLE_ADS_QUERY_MAX_PAGE_SIZE} rows), so pages were read at ${parsed.limit}. That changes only how many rows one call carries: --all still reads every page.`
1564
+ }
1565
+ ];
1566
+ }
1567
+ async function validateArgs(args) {
1568
+ const parsedLimit = queryPageSize(args);
1569
+ if (!parsedLimit.ok) {
1570
+ writeAdsJson(parsedLimit.error);
1571
+ process.exit(1);
1572
+ }
1573
+ const { limit } = parsedLimit;
1574
+ const customerId = await resolveCustomerId(args);
1575
+ const read = resolveGaql(args);
1576
+ if (!read) {
1577
+ process.exit(1);
1578
+ }
1579
+ const statements = read.levels?.map((part) => part.query) ?? [read.query];
1580
+ const preflights = statements.map((statement) => validatePreflight(statement, customerId));
1581
+ const refused = preflights.find((preflight) => !preflight.valid && preflight.error);
1582
+ if (refused?.error) {
1583
+ writeAdsJson(refused.error);
1584
+ process.exit(1);
1585
+ }
1586
+ const corrected = statements.map((statement, index) => preflights[index]?.correctedQuery ?? statement);
1587
+ const levels = read.levels?.map((part, index) => ({ ...part, query: corrected[index] ?? part.query }));
1588
+ const finalQuery = corrected.join("\n");
1589
+ return {
1590
+ customerId,
1591
+ limit,
1592
+ finalQuery,
1593
+ levels,
1594
+ warnings: [
1595
+ ...clampWarnings(parsedLimit),
1596
+ ...preflights.flatMap((preflight) => preflight.warnings),
1597
+ ...servingScopeWarnings(args, finalQuery),
1598
+ ...syncedCopyWarnings(args)
1599
+ ],
1600
+ useCache: !args["no-cache"],
1601
+ // A level read once per campaign reads the campaigns its listing names: they are part of the read.
1602
+ cacheKey: pageCacheKey(
1603
+ customerId,
1604
+ [finalQuery, ...(levels ?? []).flatMap((part) => part.eachCampaignOf ?? [])].join("\n"),
1605
+ limit,
1606
+ args.cursor
1607
+ )
1608
+ };
1609
+ }
1610
+ function handleQueryError(thrown, finalQuery, levels, customerId, limit, args) {
1611
+ const err = thrown instanceof StoppedRead ? thrown.failure : thrown;
1612
+ const envelope = err instanceof ApiError ? parseApiError(err.message, finalQuery, customerId, err.code) : {
1613
+ ok: false,
1614
+ error: {
1615
+ code: "NETWORK_ERROR",
1616
+ message: err instanceof Error ? err.message : "Unexpected error",
1617
+ fix: { action: "wait_and_retry", explanation: "Network error \u2014 check connectivity and retry" },
1618
+ retryable: true
1619
+ }
1620
+ };
1621
+ envelope.error.gaqlExecuted = finalQuery;
1622
+ if (err instanceof ApiError && err.code === "CONFLICT") {
1623
+ envelope.error.fix = conflictFix(envelope.error.fix, finalQuery, levels, customerId, limit, args);
1624
+ }
1625
+ if (thrown instanceof StoppedRead) {
1626
+ const partial = printedPartial(partialReadFor(thrown.partial, err), Boolean(args.full));
1627
+ envelope.error.partial = partial;
1628
+ envelope.error.fix.explanation += ` ${partialReadAdvice(partial)}`;
1629
+ if (partial.cursor) {
1630
+ const resume = "file" in partial ? ["--append", "--out", partial.file.replace(/\.partial$/, "")] : [];
1631
+ envelope.error.fix.correctedCommand = rerunCommand(rerunRead(finalQuery, levels, args), customerId, limit, args, [
1632
+ "--cursor",
1633
+ partial.cursor,
1634
+ ...resume
1635
+ ]);
1636
+ }
1637
+ }
1638
+ writeAdsJson(envelope);
1639
+ process.exitCode = 1;
1640
+ }
1641
+ function conflictFix(fix, finalQuery, levels, customerId, limit, args) {
1642
+ const out = typeof args.out === "string" ? [...args.append ? ["--append"] : [], "--out", args.out] : [];
1643
+ const stable = levels ? void 0 : stableOrderQuery(finalQuery);
1644
+ const unorderable = levels ? [...new Set(levels.flatMap((level) => stableOrderQuery(level.query).unorderable))] : stable?.unorderable ?? [];
1645
+ let explanation = fix.explanation;
1646
+ if (unorderable.length > 0) {
1647
+ explanation += ` Google cannot order by ${unorderable.join(", ")}, so its rows can still move between pages: leave it out of the SELECT, or read a shorter date range per call.`;
1648
+ }
1649
+ if (args.append && typeof args.out === "string") {
1650
+ explanation += ` ${args.out} is back as it was before this read.`;
1651
+ }
1652
+ return {
1653
+ ...fix,
1654
+ explanation,
1655
+ correctedCommand: rerunCommand(rerunRead(stable?.query ?? finalQuery, levels, args), customerId, limit, args, [
1656
+ "--no-cache",
1657
+ ...out
1658
+ ])
1659
+ };
1660
+ }
1661
+ function rerunRead(gaql, levels, args) {
1662
+ if (!levels) return [gaql];
1663
+ const words = ["--preset", String(args.preset)];
1664
+ if (args["campaign-id"] !== void 0 && args["campaign-id"] !== "") {
1665
+ words.push("--campaign-id", String(args["campaign-id"]));
1666
+ }
1667
+ if (typeof args.search === "string" && args.search !== "") words.push("--search", args.search);
1668
+ const window = presetDateRange(args);
1669
+ if (window.ok && window.dateRange !== void 0) words.push("--date-range", window.dateRange);
1670
+ if (args["include-paused"]) words.push("--include-paused");
1671
+ return words;
1672
+ }
1673
+ function rerunCommand(read, customerId, limit, args, extra) {
1674
+ const words = ["baker", "ads", "google", "query", ...read, "--customer-id", customerId, "--limit", String(limit)];
1675
+ if (args.all) words.push("--all");
1676
+ if (args.full) words.push("--full");
1677
+ if (typeof args.output === "string" && args.output !== "json") words.push("--output", args.output);
1678
+ const company = optionalTargetCompany();
1679
+ if (company) words.push("--company", company);
1680
+ return quoteShell([...words, ...extra]);
1681
+ }
1682
+ function printedPartial(partial, keepSnippets) {
1683
+ if (!("data" in partial)) return partial;
1684
+ return { ...partial, data: partial.data.map((row) => withSendTo(row, keepSnippets)) };
1685
+ }
1686
+ function partialReadFor(partial, err) {
1687
+ if (err instanceof ApiError && err.code === "CONFLICT") {
1688
+ const { cursor: _unresumable, ...rest } = partial;
1689
+ return rest;
1690
+ }
1691
+ return partial;
1692
+ }
1693
+ function partialReadAdvice(partial) {
1694
+ if (!("file" in partial)) {
1695
+ const kept2 = `The ${partial.rows} rows read before it stopped are in error.partial.data, which is NOT the whole read \u2014 never count or total from them.`;
1696
+ if (!partial.cursor) return `${kept2} Read again from the first page.`;
1697
+ return `${kept2} Read the rest with the same command plus --cursor "${partial.cursor}", or read everything again with --all --out <file>.`;
1698
+ }
1699
+ const kept = `${partial.file} holds the ${partial.rows} rows read before it stopped, which is NOT the whole read \u2014 never count or total from it.`;
1700
+ if (!partial.cursor) return `${kept} Read again from the first page.`;
1701
+ const out = quoteShell([partial.file.replace(/\.partial$/, "")]);
1702
+ return `${kept} Resume with the same command plus --cursor "${partial.cursor}" --append --out ${out}: it carries on in that file and names it ${out} once the last page is in.`;
1703
+ }
1704
+ async function runQuery(args) {
1705
+ const validated = await validateArgs(args);
1706
+ if (!validated) return;
1707
+ const { customerId, limit, finalQuery, levels, warnings, useCache, cacheKey } = validated;
1708
+ if (shouldReadCache(args)) {
1709
+ const cached = cacheGet("queries", cacheKey);
1710
+ if (cached && Array.isArray(cached.data.rows)) {
1711
+ const rows = cached.data.rows;
1712
+ outputResults(
1713
+ rows,
1714
+ cached.fields ?? getFieldDescriptions(extractFields(rows)),
1715
+ [
1716
+ ...warnings,
1717
+ ...missingFieldWarnings(finalQuery, rows),
1718
+ ...keywordServingWarnings(rows, keywordServingOptions(finalQuery)),
1719
+ ...accountFundsWarnings(parseSelectedFields(finalQuery), rows),
1720
+ // A cached page is whole only when it starts at the first row and has no page after it.
1721
+ ...conversionMixWarnings(
1722
+ finalQuery,
1723
+ args.cursor || cached.data.cursor ? void 0 : foldConvertingRows(rows)
1724
+ ),
1725
+ ...moneyUnitWarnings(moneyExample(rows))
1726
+ ],
1727
+ args,
1728
+ true,
1729
+ { gaql: finalQuery, effectiveLimit: effectiveRowLimit(finalQuery), nextCursor: cached.data.cursor }
1730
+ );
1731
+ return;
1732
+ }
1733
+ }
1734
+ try {
1735
+ await executeQuery(finalQuery, args, customerId, limit, warnings, useCache, cacheKey, levels);
1736
+ } catch (err) {
1737
+ handleQueryError(err, finalQuery, levels, customerId, limit, args);
1738
+ }
1739
+ }
1740
+ var queryCommand = defineCommand({
1741
+ meta: {
1742
+ name: "query",
1743
+ description: `Run GAQL against Google Ads, one page at a time. Supports raw GAQL, presets, paging, file export, and caching.
1744
+
1745
+ Start here:
1746
+ baker ads google query --list-presets
1747
+ baker ads google query --preset campaign-performance --customer-id 1234567890
1748
+
1749
+ Each read returns one page (--limit rows; the preset's page size by default, else 200). When the
1750
+ account holds more, the envelope carries pagination.cursor: pass it with --cursor for the next page,
1751
+ or read everything with --all --out <file>, which pages at 8192 rows. A LIMIT written in the GAQL
1752
+ caps the whole read.
1753
+
1754
+ An --out file appears only once the read is over; until then the rows are in <file>.partial. A read
1755
+ that stops part way exits with error.partial: the .partial file (or, without --out, the rows read)
1756
+ and the cursor to carry on from with --cursor <it> --append --out <same file>; error.fix.correctedCommand
1757
+ is that command. BUDGET_EXCEEDED and TIMEOUT (a page ran out of time or memory) and PAGINATION_CONFLICT
1758
+ (rows moved between pages; its command reads again from page 1 with a unique ORDER BY) are retryable.
1759
+
1760
+ Examples:
1761
+ baker ads google query "SELECT campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_7_DAYS" --customer-id 1234567890
1762
+ baker ads google query --gaql "SELECT ad_group.name FROM ad_group WHERE ad_group.status = 'ENABLED'" --customer-id 1234567890
1763
+ baker ads google query --preset search-terms --customer-id 1234567890 --date-range LAST_7_DAYS --all --out terms.csv
1764
+ baker ads google query --preset negative-keywords --customer-id 1234567890 --campaign-id 23886044838
1765
+ baker ads google query --preset negative-keywords --customer-id 1234567890 --search masia,paellero
1766
+ baker ads google query --preset ai-max-search-terms --customer-id 1234567890 --search birra,cerveza --all --out aimax.csv
1767
+ baker ads google query --preset keyword-serving --customer-id 1234567890 --cursor <pagination.cursor>`
1768
+ },
1769
+ args: withWindowSpellings({
1770
+ query: { type: "positional", description: "GAQL SELECT statement", required: false },
1771
+ gaql: {
1772
+ type: "string",
1773
+ description: "GAQL SELECT statement as a flag (instead of the positional)",
1774
+ required: false
1775
+ },
1776
+ "customer-id": {
1777
+ type: "string",
1778
+ description: "Google Ads customer ID (10 digits; dashes are fine)",
1779
+ required: false
1780
+ },
1781
+ preset: { type: "string", description: "Named query preset", required: false },
1782
+ "date-range": { type: "string", description: "Date range override for presets", required: false },
1783
+ since: { type: "string", description: "For a preset: first day, YYYY-MM-DD (with --until)", required: false },
1784
+ until: { type: "string", description: "For a preset: last day, YYYY-MM-DD (with --since)", required: false },
1785
+ "include-paused": {
1786
+ type: "boolean",
1787
+ description: "Include paused entities in preset results (default: serving entities only)",
1788
+ required: false
1789
+ },
1790
+ "campaign-id": {
1791
+ type: "string",
1792
+ description: "For a preset: only these campaigns, comma-separated ids (--campaign-id 123,456)",
1793
+ required: false
1794
+ },
1795
+ search: {
1796
+ type: "string",
1797
+ description: "For a keyword or search-term preset: only rows whose text contains any of these, comma-separated, case-insensitive (--search masia,paellero)",
1798
+ required: false
1799
+ },
1800
+ limit: {
1801
+ type: "string",
1802
+ description: "Rows per page (default: the preset's page size, else 200; 8192 with --all)",
1803
+ required: false
1804
+ },
1805
+ "list-presets": { type: "boolean", description: "List available presets", required: false },
1806
+ cursor: { type: "string", description: "pagination.cursor from the previous page", required: false },
1807
+ all: { type: "boolean", description: "Follow every page (use with --out for large reads)", required: false },
1808
+ out: {
1809
+ type: "string",
1810
+ description: "Write the rows alone to this file (not the envelope); it appears once the read is over, until then the rows are in <file>.partial",
1811
+ required: false
1812
+ },
1813
+ append: {
1814
+ type: "boolean",
1815
+ description: "Append to file; with --cursor, carries on a stopped read in the <file>.partial it left",
1816
+ required: false
1817
+ },
1818
+ output: {
1819
+ type: "string",
1820
+ description: "Format: json|csv|jsonl|md (default json; --preset conversion-actions: an md table of id, send_to and name unless a format, --fields or --full is asked for)",
1821
+ required: false
1822
+ },
1823
+ fields: {
1824
+ type: "string",
1825
+ description: "Only these columns, comma-separated (--fields campaign.name,campaign.status); every format",
1826
+ required: false
1827
+ },
1828
+ "no-cache": { type: "boolean", description: "Skip cache", required: false },
1829
+ full: {
1830
+ type: "boolean",
1831
+ description: "Include the field description glossary, and conversion tag snippets whole beside their send_to",
1832
+ required: false
1833
+ }
1834
+ }),
1835
+ run: async ({ args }) => {
1836
+ if (args["list-presets"]) {
1837
+ writeAdsJson({
1838
+ ok: true,
1839
+ data: PRESETS.map((p) => ({
1840
+ name: p.name,
1841
+ description: p.description,
1842
+ defaultDateRange: p.defaultDateRange,
1843
+ pageSize: p.defaultLimit,
1844
+ servingOnly: (p.statusFields?.length ?? 0) > 0,
1845
+ campaignScoped: isCampaignScoped(p),
1846
+ searchable: isSearchable(p),
1847
+ gaql: expandPreset(p, {}).query
1848
+ }))
1849
+ });
1850
+ return;
1851
+ }
1852
+ await runQuery(args);
1853
+ }
1854
+ });
1855
+
1856
+ export {
1857
+ resultColumns,
1858
+ effectiveRowLimit,
1859
+ warningLines,
1860
+ completenessWarnings,
1861
+ buildQueryEnvelope,
1862
+ summariseWarnings,
1863
+ buildFileSummary,
1864
+ chosenColumns,
1865
+ outputResults,
1866
+ resolveGaqlInput,
1867
+ presetDateRange,
1868
+ servingScopeWarnings,
1869
+ parseSelectedFields,
1870
+ unobservedSelectedFields,
1871
+ unobservedFields,
1872
+ missingFieldWarnings,
1873
+ missingFieldWarningsFor,
1874
+ unwrittenColumnWarnings,
1875
+ keywordServingOptions,
1876
+ pageCacheKey,
1877
+ shouldReadCache,
1878
+ parseQueryLimit,
1879
+ queryPageSize,
1880
+ runQuery,
1881
+ queryCommand
1882
+ };
1883
+ //# sourceMappingURL=chunk-XQRMBE6T.js.map