@koda-sl/baker-cli 0.851.0-dev.9afc75982 → 0.851.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 (887) hide show
  1. package/README.md +3 -7
  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-2KNBZMU6.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-2QW27HOH.js.map +1 -0
  51. package/dist/chunk-34HHJJGC.js +685 -0
  52. package/dist/chunk-56ZBWT6K.js +547 -0
  53. package/dist/chunk-5JW4S663.js +64 -0
  54. package/dist/chunk-5RV3FV3C.js +660 -0
  55. package/dist/chunk-5X32X4Y4.js +915 -0
  56. package/dist/chunk-7BLFVYVN.js +51 -0
  57. package/dist/chunk-A4WTEJUI.js +91 -0
  58. package/dist/chunk-ADAHRMJK.js +46 -0
  59. package/dist/chunk-BSZG36OF.js +98 -0
  60. package/dist/chunk-CA37TFTI.js +1124 -0
  61. package/dist/chunk-CAPYJQDN.js +224 -0
  62. package/dist/chunk-CGW6CIGD.js +479 -0
  63. package/dist/chunk-CK5QALZI.js +251 -0
  64. package/dist/chunk-CNVV272P.js +106 -0
  65. package/dist/chunk-CNVV272P.js.map +1 -0
  66. package/dist/chunk-DVAVH7UV.js +103 -0
  67. package/dist/chunk-DWKUYUKC.js +1862 -0
  68. package/dist/chunk-DZE2UHST.js +147 -0
  69. package/dist/chunk-E6UZBNR2.js +61 -0
  70. package/dist/chunk-ELNXADRL.js +91 -0
  71. package/dist/chunk-FCX746P4.js +6340 -0
  72. package/dist/chunk-FGTSDCB4.js +175 -0
  73. package/dist/chunk-GHQ365RX.js +3378 -0
  74. package/dist/chunk-H7JSYC4X.js +4416 -0
  75. package/dist/chunk-H7JSYC4X.js.map +1 -0
  76. package/dist/chunk-HHX73JNN.js +313 -0
  77. package/dist/chunk-ICEPT2UY.js +260 -0
  78. package/dist/chunk-IDJKNL7P.js +392 -0
  79. package/dist/chunk-INW3G4P3.js +749 -0
  80. package/dist/chunk-IYMF3GSB.js +396 -0
  81. package/dist/chunk-J4Z2AP32.js +47 -0
  82. package/dist/chunk-J4Z2AP32.js.map +1 -0
  83. package/dist/chunk-KLF5K55H.js +732 -0
  84. package/dist/chunk-KQ4XRUMX.js +341 -0
  85. package/dist/chunk-LQ2OYP25.js +1577 -0
  86. package/dist/chunk-LVJTYN5B.js +155 -0
  87. package/dist/chunk-LXDZCFII.js +375 -0
  88. package/dist/chunk-M565FRON.js +329 -0
  89. package/dist/chunk-MCAY57W7.js +9127 -0
  90. package/dist/chunk-MIAAADD3.js +320 -0
  91. package/dist/chunk-MJX6NXSX.js +65 -0
  92. package/dist/chunk-NAF5XSOI.js +430 -0
  93. package/dist/chunk-O27BGGFC.js +152 -0
  94. package/dist/chunk-O7JZT4G3.js +262 -0
  95. package/dist/chunk-OTLMQDGW.js +374 -0
  96. package/dist/chunk-QAEUP6YB.js +89 -0
  97. package/dist/chunk-QTIPLD3K.js +274 -0
  98. package/dist/chunk-QZKXZX26.js +411 -0
  99. package/dist/chunk-RUCJNF4B.js +423 -0
  100. package/dist/chunk-SAA4VKF2.js +285 -0
  101. package/dist/chunk-SCN5ZF4U.js +76 -0
  102. package/dist/chunk-SELST7KK.js +170 -0
  103. package/dist/chunk-SH5WRHTG.js +78 -0
  104. package/dist/chunk-T7V2OPW2.js +127 -0
  105. package/dist/chunk-URX6OGYP.js +202 -0
  106. package/dist/chunk-V6OAGU3U.js +509 -0
  107. package/dist/chunk-V76H3HWD.js +505 -0
  108. package/dist/chunk-VDS6NSLF.js +877 -0
  109. package/dist/chunk-VPNV2WDD.js +303 -0
  110. package/dist/chunk-VRCUW2J5.js +23 -0
  111. package/dist/chunk-WONTGSXR.js +170 -0
  112. package/dist/chunk-WUYDIH4N.js +142 -0
  113. package/dist/chunk-X6LTFBPF.js +604 -0
  114. package/dist/chunk-X7UGF2LE.js +197 -0
  115. package/dist/chunk-XOQWT2LZ.js +548 -0
  116. package/dist/chunk-XQRMBE6T.js +1883 -0
  117. package/dist/chunk-XTNXJZRK.js +863 -0
  118. package/dist/chunk-YIQ6VJ4H.js +10361 -0
  119. package/dist/chunk-YYN6I6L5.js +163 -0
  120. package/dist/chunk-ZJK3PVM2.js +723 -0
  121. package/dist/chunk-ZSC3LYTP.js +3248 -0
  122. package/dist/chunk-ZSC3LYTP.js.map +1 -0
  123. package/dist/chunk-ZVA2BZKM.js +746 -0
  124. package/dist/chunk-ZXG5MYV4.js +26 -0
  125. package/dist/claim-W2QLJLKZ.js +218 -0
  126. package/dist/cli.js +35 -35
  127. package/dist/companies-TJR33KNS.js +36 -0
  128. package/dist/company-OGES42WN.js +311 -0
  129. package/dist/complete-FCR3UXSH.js +87 -0
  130. package/dist/connect-KACFSWER.js +46 -0
  131. package/dist/conversation-TLM7HDLK.js +100 -0
  132. package/dist/conversion-report-4WJ5D4FD.js +130 -0
  133. package/dist/conversion-upload-command-REUCOQWP.js +456 -0
  134. package/dist/conversion-writes-2W3RVOJW.js +194 -0
  135. package/dist/conversions-2QHK35VN.js +141 -0
  136. package/dist/conversions-TI3MZYCT.js +78 -0
  137. package/dist/create-5VQBHCGR.js +356 -0
  138. package/dist/create-EAY2FGWT.js +65 -0
  139. package/dist/create-EN2XXE7H.js +190 -0
  140. package/dist/create-TIKC6VNL.js +219 -0
  141. package/dist/creatives-U2CIA6KE.js +235 -0
  142. package/dist/creatives-UHWKNFHM.js +48 -0
  143. package/dist/credentials-TSWUQUWC.js +291 -0
  144. package/dist/critique-KZH23SLS.js +230 -0
  145. package/dist/crm-55ZVWDQF.js +327 -0
  146. package/dist/crm-REPCWBGZ.js +418 -0
  147. package/dist/currency-W5SXMZMS.js +91 -0
  148. package/dist/customers-UN5KGSPW.js +69 -0
  149. package/dist/data-GXAJGTKM.js +665 -0
  150. package/dist/delete-3BHIQWRA.js +60 -0
  151. package/dist/delete-UJTIAYNP.js +71 -0
  152. package/dist/delete-Z2TCOW7K.js +70 -0
  153. package/dist/demographics-EAX6HNK7.js +145 -0
  154. package/dist/discard-BJ4ZSAHC.js +72 -0
  155. package/dist/discover-RHVFYP6K.js +191 -0
  156. package/dist/domain-O5ZO3DND.js +104 -0
  157. package/dist/download-4GPS3IQ7.js +174 -0
  158. package/dist/draft-4A3QXAHP.js +389 -0
  159. package/dist/draft-APO4PJTI.js +427 -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-G5QSLYQQ.js +64 -0
  205. package/dist/list-G5QSLYQQ.js.map +1 -0
  206. package/dist/list-IMA2UKN4.js +320 -0
  207. package/dist/list-YLNP2PNI.js +169 -0
  208. package/dist/list-YLNP2PNI.js.map +1 -0
  209. package/dist/locations-2XCXK5FB.js +41 -0
  210. package/dist/locations-7UESZZO3.js +69 -0
  211. package/dist/log-6XLS6FF6.js +98 -0
  212. package/dist/make-H36SC6HA.js +1391 -0
  213. package/dist/map-AH3GT36P.js +519 -0
  214. package/dist/mcp-WOGB4LFO.js +1017 -0
  215. package/dist/media-sources-W7WLORRN.js +35 -0
  216. package/dist/members-PKQM7VME.js +50 -0
  217. package/dist/metrics-RZXAVZWW.js +193 -0
  218. package/dist/models-ELL6ENZ2.js +155 -0
  219. package/dist/normalize-ISMEKGAM.js +145 -0
  220. package/dist/options-LG4TJYZF.js +126 -0
  221. package/dist/organization-5F2UNO53.js +949 -0
  222. package/dist/people-4MXQW22A.js +161 -0
  223. package/dist/people-KJXAYQDE.js +171 -0
  224. package/dist/performance-BZ2D62UE.js +28 -0
  225. package/dist/performance-WDOBJ3NO.js +6294 -0
  226. package/dist/pipedrive-3YC2GR3M.js +533 -0
  227. package/dist/pixels-AWPYUSNW.js +62 -0
  228. package/dist/preview-JSTSQFXH.js +103 -0
  229. package/dist/promoted-tweet-writes-DP6ORCNX.js +184 -0
  230. package/dist/promoted-tweets-VCEY6KCG.js +119 -0
  231. package/dist/publish-A5HHFTWT.js +430 -0
  232. package/dist/query-MAQFFK7H.js +68 -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-2YHAQMZ6.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-4DEZ54GA.js +78 -0
  250. package/dist/run-CI6MGV3E.js +73 -0
  251. package/dist/scaffold-ad-X4QQ5HSR.js +1600 -0
  252. package/dist/scaffold-static-ad-UWCRDNVI.js +998 -0
  253. package/dist/scaffold-video-4MXIJ64P.js +888 -0
  254. package/dist/schedule-HBHXSZCK.js +65 -0
  255. package/dist/scheduled-agents-TF5NL3EG.js +59 -0
  256. package/dist/schema-G77I7C6X.js +136 -0
  257. package/dist/schema-YAHA75PQ.js +241 -0
  258. package/dist/search-ITIKP5AS.js +192 -0
  259. package/dist/search-ITIKP5AS.js.map +1 -0
  260. package/dist/search-terms-4F25WL6Y.js +412 -0
  261. package/dist/select-7BD4B6VZ.js +134 -0
  262. package/dist/set-GIOOD7K7.js +274 -0
  263. package/dist/set-prompt-L3EKRWN7.js +204 -0
  264. package/dist/setup-links-IHQ5WONJ.js +145 -0
  265. package/dist/shopify-6WFQCGUS.js +4032 -0
  266. package/dist/site-M3MBRLZJ.js +181 -0
  267. package/dist/sources-DE7QIZSV.js +30 -0
  268. package/dist/sources-LML63ISG.js +463 -0
  269. package/dist/stale-APSUW4OJ.js +92 -0
  270. package/dist/status-77OL4B45.js +68 -0
  271. package/dist/stock-KM3WLRHN.js +213 -0
  272. package/dist/studio-RMYKICEJ.js +49 -0
  273. package/dist/sync-L25EVQAI.js +58 -0
  274. package/dist/sync-definition-D2OIDCSI.js +74 -0
  275. package/dist/tags-AXCQCJGZ.js +24 -0
  276. package/dist/tags-KGWISKLB.js +26 -0
  277. package/dist/tags-MZFIIXL5.js +24 -0
  278. package/dist/tags-QQXAAWUY.js +182 -0
  279. package/dist/tags-RTIT7IW2.js +24 -0
  280. package/dist/targeting-criteria-IZ6DPA3L.js +113 -0
  281. package/dist/targets-OGGHIAZI.js +110 -0
  282. package/dist/testimonials-JHB7OKIY.js +32 -0
  283. package/dist/themes-FPIC5RUE.js +102 -0
  284. package/dist/top-companies-ICP6X6KR.js +250 -0
  285. package/dist/transcript-KF736ZJ3.js +168 -0
  286. package/dist/translate-5QHIX5EW.js +607 -0
  287. package/dist/triggers-TSNJSHMU.js +148 -0
  288. package/dist/unlink-GH4D444H.js +73 -0
  289. package/dist/unstage-I2NYIM25.js +92 -0
  290. package/dist/update-35NWLUT5.js +237 -0
  291. package/dist/update-HEMI6DKR.js +193 -0
  292. package/dist/update-PFCO5LEE.js +175 -0
  293. package/dist/update-RUBMPMZB.js +69 -0
  294. package/dist/upload-I4WIFYMS.js +185 -0
  295. package/dist/url-options-PBCEEKX6.js +137 -0
  296. package/dist/url-params-T7KQX5FJ.js +102 -0
  297. package/dist/validate-3EGFWTFS.js +180 -0
  298. package/dist/videos-P3U53TZL.js +41 -0
  299. package/dist/viewer-check-ZGUCQHTC.js +89 -0
  300. package/dist/visuals-JYOZPGB7.js +129 -0
  301. package/dist/web-SHS6TJWV.js +180 -0
  302. package/dist/winning-ads-L5HVV5OR.js +88 -0
  303. package/dist/write-commands-FUOSA6MJ.js +1555 -0
  304. package/dist/x-VG4U3PFE.js +47 -0
  305. package/package.json +1 -1
  306. package/dist/account-LMDIUOJG.js +0 -83
  307. package/dist/account-Y3IDIJ3T.js +0 -82
  308. package/dist/account-reads-XOGHJB3K.js +0 -230
  309. package/dist/account-users-6RC5HDP3.js +0 -69
  310. package/dist/account-writes-EP35RCNO.js +0 -68
  311. package/dist/accounts-7CHGRXBP.js +0 -122
  312. package/dist/accounts-LIGSG5NQ.js +0 -505
  313. package/dist/accounts-YMDEDCHU.js +0 -81
  314. package/dist/actions-U4QMVB4H.js +0 -55
  315. package/dist/activecampaign-WPHFFOGW.js +0 -935
  316. package/dist/ad-group-writes-EVLV4BRD.js +0 -172
  317. package/dist/ad-groups-UQRBWF2N.js +0 -70
  318. package/dist/ad-writes-EBCZ5DCY.js +0 -176
  319. package/dist/add-AFPBNJDW.js +0 -108
  320. package/dist/add-M3YT32OX.js +0 -661
  321. package/dist/add-UJOKKBPM.js +0 -662
  322. package/dist/ads-2TOWF4GX.js +0 -79
  323. package/dist/ads-T42GRQ7H.js +0 -48
  324. package/dist/advertisers-NJE6DBLG.js +0 -126
  325. package/dist/alerts-CQ34OPCP.js +0 -153
  326. package/dist/analytics-54QRGO5T.js +0 -461
  327. package/dist/analytics-HW6SG6ZE.js +0 -2791
  328. package/dist/animate-EN7VTJEI.js +0 -482
  329. package/dist/assign-WIIL5VY7.js +0 -83
  330. package/dist/audience-size-2KL27ETQ.js +0 -77
  331. package/dist/audiences-EZK4PDB5.js +0 -280
  332. package/dist/audit-EPWNTRPE.js +0 -155
  333. package/dist/autocomplete-JWML26GX.js +0 -117
  334. package/dist/avatars-D7S43BGZ.js +0 -38
  335. package/dist/bid-pricing-MD7ROXQT.js +0 -104
  336. package/dist/brief-JWYWQXOP.js +0 -511
  337. package/dist/campaign-groups-ZT3ZHZFF.js +0 -118
  338. package/dist/campaign-writes-4T5DSUMT.js +0 -176
  339. package/dist/campaign-writes-72H332R4.js +0 -169
  340. package/dist/campaigns-5BYWFXHO.js +0 -78
  341. package/dist/campaigns-Q363NCWU.js +0 -111
  342. package/dist/campaigns-TDR6VKYL.js +0 -193
  343. package/dist/canvas-T6ALQYZT.js +0 -48
  344. package/dist/capabilities-N52A6X2S.js +0 -184
  345. package/dist/catalog-WKBCL56H.js +0 -89
  346. package/dist/catalogs-YJSOVGDM.js +0 -130
  347. package/dist/changes-YOTRCCNB.js +0 -288
  348. package/dist/chatgpt-DPLD452Q.js +0 -47
  349. package/dist/chats-D5TGNPFK.js +0 -659
  350. package/dist/check-6QZ2U6WJ.js +0 -54
  351. package/dist/chunk-2AW62CH3.js +0 -46
  352. package/dist/chunk-2BRVIOKO.js +0 -197
  353. package/dist/chunk-2FBSB7UF.js +0 -64
  354. package/dist/chunk-2N5MQP65.js +0 -127
  355. package/dist/chunk-2XKSMHDO.js +0 -10361
  356. package/dist/chunk-2Z2AEFVW.js +0 -915
  357. package/dist/chunk-3TWET6OD.js +0 -396
  358. package/dist/chunk-433NCHRS.js +0 -4413
  359. package/dist/chunk-433NCHRS.js.map +0 -1
  360. package/dist/chunk-4A2UZ3Q3.js +0 -24026
  361. package/dist/chunk-4A2UZ3Q3.js.map +0 -1
  362. package/dist/chunk-6H6BJBBS.js +0 -329
  363. package/dist/chunk-6XOAPUW4.js +0 -509
  364. package/dist/chunk-7J5XOR5D.js +0 -98
  365. package/dist/chunk-ACIBARQU.js +0 -251
  366. package/dist/chunk-AQHT2XKB.js +0 -3378
  367. package/dist/chunk-ATUFMGY3.js +0 -320
  368. package/dist/chunk-B43NI7QF.js +0 -52
  369. package/dist/chunk-B43NI7QF.js.map +0 -1
  370. package/dist/chunk-B5RLBFMI.js +0 -26
  371. package/dist/chunk-BDULC6LM.js +0 -479
  372. package/dist/chunk-BPUNOSXM.js +0 -548
  373. package/dist/chunk-CE6M4VLG.js +0 -1883
  374. package/dist/chunk-CPRSVECH.js +0 -303
  375. package/dist/chunk-CV74M3H6.js +0 -723
  376. package/dist/chunk-CZWMU2GB.js +0 -142
  377. package/dist/chunk-D7DLBQLS.js +0 -76
  378. package/dist/chunk-DIOKO2YD.js +0 -660
  379. package/dist/chunk-DZUYNVKJ.js +0 -423
  380. package/dist/chunk-E2BFPWA5.js +0 -175
  381. package/dist/chunk-EDDHOHTW.js +0 -285
  382. package/dist/chunk-EMZ6P2KH.js +0 -6340
  383. package/dist/chunk-F7DCEGAA.js +0 -392
  384. package/dist/chunk-FCWDXKLI.js +0 -732
  385. package/dist/chunk-FEP257NO.js +0 -65
  386. package/dist/chunk-G4IFJB4Z.js +0 -863
  387. package/dist/chunk-GB2U76OM.js +0 -224
  388. package/dist/chunk-GJPS6SUI.js +0 -147
  389. package/dist/chunk-HSPOURUB.js +0 -877
  390. package/dist/chunk-I3HEOUZT.js +0 -1124
  391. package/dist/chunk-IDBREOFA.js +0 -106
  392. package/dist/chunk-IDBREOFA.js.map +0 -1
  393. package/dist/chunk-INY6DR2Y.js +0 -374
  394. package/dist/chunk-JHPZATWG.js +0 -152
  395. package/dist/chunk-JY2NBRHH.js +0 -78
  396. package/dist/chunk-KN2UAGSU.js +0 -91
  397. package/dist/chunk-LDF2VXPC.js +0 -155
  398. package/dist/chunk-LRWUQABW.js +0 -262
  399. package/dist/chunk-MJ5JHMLF.js +0 -163
  400. package/dist/chunk-NLWOT26L.js +0 -411
  401. package/dist/chunk-NZZ7ATO5.js +0 -3248
  402. package/dist/chunk-NZZ7ATO5.js.map +0 -1
  403. package/dist/chunk-O2YPJPMO.js +0 -547
  404. package/dist/chunk-ODDHGVQE.js +0 -51
  405. package/dist/chunk-P6Z44HNW.js +0 -9127
  406. package/dist/chunk-P7Q7YO4E.js +0 -170
  407. package/dist/chunk-PSPSKOQR.js +0 -341
  408. package/dist/chunk-QLIJ4NRV.js +0 -8418
  409. package/dist/chunk-QLIJ4NRV.js.map +0 -1
  410. package/dist/chunk-QNPOFQV5.js +0 -170
  411. package/dist/chunk-QZMBPEUW.js +0 -202
  412. package/dist/chunk-RDRWLYFV.js +0 -604
  413. package/dist/chunk-RKGYVC2C.js +0 -685
  414. package/dist/chunk-SBP7CF7S.js +0 -260
  415. package/dist/chunk-SY7CUZGW.js +0 -89
  416. package/dist/chunk-TJZKZKCQ.js +0 -91
  417. package/dist/chunk-TVZCWBC5.js +0 -61
  418. package/dist/chunk-TXLSPOLG.js +0 -505
  419. package/dist/chunk-V7T6HAPO.js +0 -375
  420. package/dist/chunk-VELT4JFT.js +0 -274
  421. package/dist/chunk-WCCFBAH4.js +0 -23
  422. package/dist/chunk-WE2FY3CF.js +0 -1862
  423. package/dist/chunk-XBLVA6BC.js +0 -1577
  424. package/dist/chunk-XDFXSMPX.js +0 -103
  425. package/dist/chunk-XFARJ2SL.js +0 -313
  426. package/dist/chunk-YNVE62WW.js +0 -746
  427. package/dist/chunk-ZBSG24TQ.js +0 -430
  428. package/dist/chunk-ZIZBAKJF.js +0 -749
  429. package/dist/claim-QGYCSESF.js +0 -218
  430. package/dist/companies-VM4DJCIO.js +0 -36
  431. package/dist/company-BPFVTGZK.js +0 -311
  432. package/dist/complete-NNDVV6CH.js +0 -87
  433. package/dist/connect-4G722CGF.js +0 -46
  434. package/dist/conversation-TRXRUTL6.js +0 -100
  435. package/dist/conversion-report-ZPENZMJF.js +0 -130
  436. package/dist/conversion-upload-command-6TY2DIBM.js +0 -456
  437. package/dist/conversion-writes-NIDUTQHX.js +0 -194
  438. package/dist/conversions-3Q3PEAAN.js +0 -78
  439. package/dist/conversions-4RQGCY3I.js +0 -141
  440. package/dist/create-4DUUV34B.js +0 -356
  441. package/dist/create-GAKJO6RX.js +0 -65
  442. package/dist/create-NUV6C7T7.js +0 -219
  443. package/dist/create-TSB2ED7G.js +0 -190
  444. package/dist/creatives-D2756SYZ.js +0 -48
  445. package/dist/creatives-FRNDPYD2.js +0 -235
  446. package/dist/credentials-VDUQOSAI.js +0 -291
  447. package/dist/critique-GCLEP53N.js +0 -230
  448. package/dist/crm-6KBBEU5D.js +0 -327
  449. package/dist/crm-MUVL3BHT.js +0 -418
  450. package/dist/currency-CLB7ROUV.js +0 -91
  451. package/dist/customers-6X6LULB6.js +0 -69
  452. package/dist/data-ZDTEJD6A.js +0 -665
  453. package/dist/delete-FJPGJ2HP.js +0 -71
  454. package/dist/delete-M5Z5QXVO.js +0 -60
  455. package/dist/delete-P66UBMWB.js +0 -70
  456. package/dist/demographics-TEDAJJDS.js +0 -145
  457. package/dist/discard-UXSFTA6C.js +0 -72
  458. package/dist/discover-EAI4WDSL.js +0 -191
  459. package/dist/domain-Y3BKIFLA.js +0 -104
  460. package/dist/download-P2XHLRNA.js +0 -174
  461. package/dist/draft-63RF6RKQ.js +0 -427
  462. package/dist/draft-IHEEODST.js +0 -340
  463. package/dist/draft-N2MVECRV.js +0 -227
  464. package/dist/draft-OJQT5H3E.js +0 -389
  465. package/dist/draft-R3GI7JWY.js +0 -640
  466. package/dist/experiments-BFVLG54V.js +0 -241
  467. package/dist/extract-YH5VKD7W.js +0 -144
  468. package/dist/facets-VJOSK5UL.js +0 -118
  469. package/dist/feedback-ATORZ5XJ.js +0 -115
  470. package/dist/fetch-UDAWFZXZ.js +0 -487
  471. package/dist/fit-4CVULFD2.js +0 -69
  472. package/dist/flows-QXTZHPB6.js +0 -342
  473. package/dist/forecast-DJ67NT6P.js +0 -122
  474. package/dist/forecast-YFCLMXAV.js +0 -189
  475. package/dist/funnel-2C6Z5VA2.js +0 -701
  476. package/dist/generate-7467FZZH.js +0 -265
  477. package/dist/get-GFVZKATP.js +0 -114
  478. package/dist/get-JSO4YJFR.js +0 -77
  479. package/dist/google-GBGLPAP5.js +0 -3759
  480. package/dist/google-GBGLPAP5.js.map +0 -1
  481. package/dist/google-H4KVIAL5.js +0 -164
  482. package/dist/google-ads-KCK27DGG.js +0 -201
  483. package/dist/history-AIZX672U.js +0 -155
  484. package/dist/history-KBTYILFZ.js +0 -204
  485. package/dist/history-LYUJTPSP.js +0 -108
  486. package/dist/hubspot-BZSQ3WMQ.js +0 -853
  487. package/dist/ideas-HHWTU7F2.js +0 -49
  488. package/dist/images-BB6BYS54.js +0 -92
  489. package/dist/ingest-S6HP4LXI.js +0 -31
  490. package/dist/ingest-Z3DRI6A3.js +0 -162
  491. package/dist/insights-MZ5DPH5X.js +0 -151
  492. package/dist/inspect-KC5LTH4E.js +0 -38
  493. package/dist/intent-6NJBN3OR.js +0 -97
  494. package/dist/keyword-gap-Y5J2VZDP.js +0 -132
  495. package/dist/keyword-metrics-VGZIQBSG.js +0 -234
  496. package/dist/keywords-for-site-3HREQUQU.js +0 -134
  497. package/dist/languages-H4VPFO7Y.js +0 -41
  498. package/dist/leads-AKF42B23.js +0 -137
  499. package/dist/learn-6D45W6YN.js +0 -213
  500. package/dist/line-item-writes-SB6B75MY.js +0 -212
  501. package/dist/line-items-22S6PURM.js +0 -107
  502. package/dist/link-CLMY2YW5.js +0 -70
  503. package/dist/linkedin-GTYWIRDX.js +0 -1498
  504. package/dist/linkedin-person-LBU3VGNY.js +0 -142
  505. package/dist/list-MWGLVZR3.js +0 -89
  506. package/dist/list-MXUPVC2W.js +0 -64
  507. package/dist/list-MXUPVC2W.js.map +0 -1
  508. package/dist/list-P6IN6K26.js +0 -226
  509. package/dist/list-P6IN6K26.js.map +0 -1
  510. package/dist/list-SZKENQ2B.js +0 -320
  511. package/dist/locations-AR4ZTFT4.js +0 -69
  512. package/dist/locations-UPY33JUY.js +0 -41
  513. package/dist/log-XOYBG7KX.js +0 -98
  514. package/dist/make-ZBUVEPHX.js +0 -1391
  515. package/dist/map-VBYQNHJR.js +0 -519
  516. package/dist/mcp-RSB47JCJ.js +0 -1017
  517. package/dist/media-sources-ZCXMQCSE.js +0 -35
  518. package/dist/members-QL5TXGND.js +0 -50
  519. package/dist/metrics-BNLDV4BU.js +0 -193
  520. package/dist/models-QEB3EOSF.js +0 -155
  521. package/dist/normalize-YWNW62HI.js +0 -145
  522. package/dist/options-5RRLBIVY.js +0 -126
  523. package/dist/organization-FZUYEBEE.js +0 -949
  524. package/dist/people-FO6OCDP5.js +0 -171
  525. package/dist/people-XGMOJZTE.js +0 -161
  526. package/dist/performance-7AXRRE5J.js +0 -28
  527. package/dist/performance-USJY2HVB.js +0 -6294
  528. package/dist/pipedrive-LWAH5BTV.js +0 -533
  529. package/dist/pixels-M2UBKUJI.js +0 -62
  530. package/dist/preview-5ZMTNYCI.js +0 -103
  531. package/dist/promoted-tweet-writes-VW6XCOL3.js +0 -184
  532. package/dist/promoted-tweets-5Y6RGBJS.js +0 -119
  533. package/dist/publish-ERJPN3EL.js +0 -430
  534. package/dist/query-FZAFUWCX.js +0 -68
  535. package/dist/reddit-OKEJ7EIX.js +0 -30
  536. package/dist/refresh-ACG34ZRD.js +0 -100
  537. package/dist/release-XYWQM7DE.js +0 -66
  538. package/dist/relevant-pages-OFFMPMKG.js +0 -101
  539. package/dist/remove-NJQM5BGF.js +0 -54
  540. package/dist/reopen-BO6G2RRS.js +0 -69
  541. package/dist/rerun-BVUWQCAR.js +0 -101
  542. package/dist/research-2V6WG3XG.js +0 -266
  543. package/dist/research-G7BDWYEG.js +0 -78
  544. package/dist/reset-2DDLUZGB.js +0 -58
  545. package/dist/reset-JPOOEIX7.js +0 -58
  546. package/dist/resolve-J4TIUP3W.js +0 -125
  547. package/dist/retry-MNGVR37L.js +0 -66
  548. package/dist/retry-Y4FLZQVK.js +0 -66
  549. package/dist/revenue-AVLQNUT2.js +0 -99
  550. package/dist/rules-UBZ32MQY.js +0 -163
  551. package/dist/run-VGOXHEO5.js +0 -78
  552. package/dist/run-XJXE63QH.js +0 -73
  553. package/dist/scaffold-ad-6PZGNV3I.js +0 -1600
  554. package/dist/scaffold-static-ad-2QFZLGHK.js +0 -998
  555. package/dist/scaffold-video-5RUBD5YB.js +0 -888
  556. package/dist/schedule-G2AETZEM.js +0 -65
  557. package/dist/scheduled-agents-JJAT2UDK.js +0 -59
  558. package/dist/schema-CCGBDISR.js +0 -136
  559. package/dist/schema-WEIPH4ND.js +0 -241
  560. package/dist/search-7GBSNW7V.js +0 -229
  561. package/dist/search-7GBSNW7V.js.map +0 -1
  562. package/dist/search-terms-OFLKWSEF.js +0 -412
  563. package/dist/select-OQQ6DG2X.js +0 -134
  564. package/dist/set-HOITXI2N.js +0 -274
  565. package/dist/set-prompt-ZR2FYPQW.js +0 -204
  566. package/dist/setup-links-R55MLOHW.js +0 -145
  567. package/dist/shopify-GGDNTMXH.js +0 -4032
  568. package/dist/site-QM6WTCDR.js +0 -181
  569. package/dist/sources-E2EM2SNG.js +0 -30
  570. package/dist/sources-RI4IBRB3.js +0 -463
  571. package/dist/stale-MBQ37TKC.js +0 -92
  572. package/dist/status-FVVTWIY7.js +0 -68
  573. package/dist/stock-FT4NHZXJ.js +0 -213
  574. package/dist/studio-2X6UOCAR.js +0 -49
  575. package/dist/sync-FZQUMCEN.js +0 -58
  576. package/dist/sync-definition-AQVZ3JWE.js +0 -74
  577. package/dist/tags-35NZJVQH.js +0 -24
  578. package/dist/tags-FOPSMF5B.js +0 -24
  579. package/dist/tags-GHXYLYCU.js +0 -26
  580. package/dist/tags-OPUZMCDP.js +0 -182
  581. package/dist/tags-XYNTGG5R.js +0 -24
  582. package/dist/targeting-criteria-HJGUXYDZ.js +0 -113
  583. package/dist/targets-ALLAKOF4.js +0 -110
  584. package/dist/testimonials-RJGFPCWC.js +0 -32
  585. package/dist/themes-VAKXKG4M.js +0 -102
  586. package/dist/top-companies-54CSTO3Q.js +0 -250
  587. package/dist/transcript-P4VCJV4Y.js +0 -168
  588. package/dist/translate-FFNWW66Z.js +0 -607
  589. package/dist/triggers-VX4QYB7T.js +0 -148
  590. package/dist/unlink-FFH7O6HU.js +0 -73
  591. package/dist/unstage-RAWC4IZG.js +0 -92
  592. package/dist/update-6GLFLB2Z.js +0 -175
  593. package/dist/update-OJ3OZCJP.js +0 -69
  594. package/dist/update-TZ7D7JGT.js +0 -193
  595. package/dist/update-ZD5O3VU7.js +0 -237
  596. package/dist/upload-QA3ZAQ7I.js +0 -185
  597. package/dist/url-options-DOOHH2JE.js +0 -137
  598. package/dist/url-params-D3QZKPUJ.js +0 -102
  599. package/dist/validate-AHDXK4NQ.js +0 -180
  600. package/dist/videos-J45JFDMU.js +0 -41
  601. package/dist/viewer-check-NXF23BG5.js +0 -89
  602. package/dist/visuals-YCW3QLUS.js +0 -129
  603. package/dist/web-4AI7PPJ6.js +0 -180
  604. package/dist/winning-ads-WRAW2TC5.js +0 -88
  605. package/dist/write-commands-Z2PWVPT6.js +0 -1555
  606. package/dist/x-KQMYVN43.js +0 -47
  607. /package/dist/{account-Y3IDIJ3T.js.map → account-LYIKZSK6.js.map} +0 -0
  608. /package/dist/{account-LMDIUOJG.js.map → account-NUMWJW6T.js.map} +0 -0
  609. /package/dist/{account-reads-XOGHJB3K.js.map → account-reads-XQW6DONK.js.map} +0 -0
  610. /package/dist/{account-users-6RC5HDP3.js.map → account-users-HLAIWV56.js.map} +0 -0
  611. /package/dist/{account-writes-EP35RCNO.js.map → account-writes-SQNABDXI.js.map} +0 -0
  612. /package/dist/{accounts-7CHGRXBP.js.map → accounts-3SJ7MJ2J.js.map} +0 -0
  613. /package/dist/{accounts-LIGSG5NQ.js.map → accounts-DEE32AAB.js.map} +0 -0
  614. /package/dist/{accounts-YMDEDCHU.js.map → accounts-VD3L6PNZ.js.map} +0 -0
  615. /package/dist/{actions-U4QMVB4H.js.map → actions-FRKZVXCV.js.map} +0 -0
  616. /package/dist/{activecampaign-WPHFFOGW.js.map → activecampaign-LEFG3NHR.js.map} +0 -0
  617. /package/dist/{ad-group-writes-EVLV4BRD.js.map → ad-group-writes-KEFM32CI.js.map} +0 -0
  618. /package/dist/{ad-groups-UQRBWF2N.js.map → ad-groups-LQ43ZKNL.js.map} +0 -0
  619. /package/dist/{ad-writes-EBCZ5DCY.js.map → ad-writes-XPHRUOPG.js.map} +0 -0
  620. /package/dist/{add-AFPBNJDW.js.map → add-AGLSZKII.js.map} +0 -0
  621. /package/dist/{add-UJOKKBPM.js.map → add-D4LTUMP7.js.map} +0 -0
  622. /package/dist/{add-M3YT32OX.js.map → add-SX4AZSWP.js.map} +0 -0
  623. /package/dist/{ads-T42GRQ7H.js.map → ads-ANPWI4VC.js.map} +0 -0
  624. /package/dist/{ads-2TOWF4GX.js.map → ads-IHKW7OPB.js.map} +0 -0
  625. /package/dist/{advertisers-NJE6DBLG.js.map → advertisers-Y3XOK4KZ.js.map} +0 -0
  626. /package/dist/{alerts-CQ34OPCP.js.map → alerts-NIPFX5W7.js.map} +0 -0
  627. /package/dist/{analytics-HW6SG6ZE.js.map → analytics-56YWZQXD.js.map} +0 -0
  628. /package/dist/{analytics-54QRGO5T.js.map → analytics-62RX4Y7M.js.map} +0 -0
  629. /package/dist/{animate-EN7VTJEI.js.map → animate-FNBWXIGV.js.map} +0 -0
  630. /package/dist/{assign-WIIL5VY7.js.map → assign-5LY7WGFF.js.map} +0 -0
  631. /package/dist/{audience-size-2KL27ETQ.js.map → audience-size-QS2KK5LQ.js.map} +0 -0
  632. /package/dist/{audiences-EZK4PDB5.js.map → audiences-ICDEHT2G.js.map} +0 -0
  633. /package/dist/{audit-EPWNTRPE.js.map → audit-DGFXEARA.js.map} +0 -0
  634. /package/dist/{autocomplete-JWML26GX.js.map → autocomplete-IKXTDPIZ.js.map} +0 -0
  635. /package/dist/{avatars-D7S43BGZ.js.map → avatars-7XQ7CHR5.js.map} +0 -0
  636. /package/dist/{bid-pricing-MD7ROXQT.js.map → bid-pricing-XQH4KP6G.js.map} +0 -0
  637. /package/dist/{brief-JWYWQXOP.js.map → brief-AJNHUSNI.js.map} +0 -0
  638. /package/dist/{campaign-groups-ZT3ZHZFF.js.map → campaign-groups-2Q5ZY77R.js.map} +0 -0
  639. /package/dist/{campaign-writes-4T5DSUMT.js.map → campaign-writes-KN5W3MHP.js.map} +0 -0
  640. /package/dist/{campaign-writes-72H332R4.js.map → campaign-writes-ZAI7K5DH.js.map} +0 -0
  641. /package/dist/{campaigns-5BYWFXHO.js.map → campaigns-3BV5AJWW.js.map} +0 -0
  642. /package/dist/{campaigns-TDR6VKYL.js.map → campaigns-BECFEETG.js.map} +0 -0
  643. /package/dist/{campaigns-Q363NCWU.js.map → campaigns-ZL7H636S.js.map} +0 -0
  644. /package/dist/{canvas-T6ALQYZT.js.map → canvas-2KNBZMU6.js.map} +0 -0
  645. /package/dist/{capabilities-N52A6X2S.js.map → capabilities-YC7R3SC2.js.map} +0 -0
  646. /package/dist/{catalog-WKBCL56H.js.map → catalog-IUC2NDKC.js.map} +0 -0
  647. /package/dist/{catalogs-YJSOVGDM.js.map → catalogs-OBZ6RBGL.js.map} +0 -0
  648. /package/dist/{changes-YOTRCCNB.js.map → changes-VNVWJDIH.js.map} +0 -0
  649. /package/dist/{chatgpt-DPLD452Q.js.map → chatgpt-HBHB7HCD.js.map} +0 -0
  650. /package/dist/{chats-D5TGNPFK.js.map → chats-76BSMXGD.js.map} +0 -0
  651. /package/dist/{check-6QZ2U6WJ.js.map → check-M7BR7ZE5.js.map} +0 -0
  652. /package/dist/{chunk-RKGYVC2C.js.map → chunk-34HHJJGC.js.map} +0 -0
  653. /package/dist/{chunk-O2YPJPMO.js.map → chunk-56ZBWT6K.js.map} +0 -0
  654. /package/dist/{chunk-2FBSB7UF.js.map → chunk-5JW4S663.js.map} +0 -0
  655. /package/dist/{chunk-DIOKO2YD.js.map → chunk-5RV3FV3C.js.map} +0 -0
  656. /package/dist/{chunk-2Z2AEFVW.js.map → chunk-5X32X4Y4.js.map} +0 -0
  657. /package/dist/{chunk-ODDHGVQE.js.map → chunk-7BLFVYVN.js.map} +0 -0
  658. /package/dist/{chunk-KN2UAGSU.js.map → chunk-A4WTEJUI.js.map} +0 -0
  659. /package/dist/{chunk-2AW62CH3.js.map → chunk-ADAHRMJK.js.map} +0 -0
  660. /package/dist/{chunk-7J5XOR5D.js.map → chunk-BSZG36OF.js.map} +0 -0
  661. /package/dist/{chunk-I3HEOUZT.js.map → chunk-CA37TFTI.js.map} +0 -0
  662. /package/dist/{chunk-GB2U76OM.js.map → chunk-CAPYJQDN.js.map} +0 -0
  663. /package/dist/{chunk-BDULC6LM.js.map → chunk-CGW6CIGD.js.map} +0 -0
  664. /package/dist/{chunk-ACIBARQU.js.map → chunk-CK5QALZI.js.map} +0 -0
  665. /package/dist/{chunk-XDFXSMPX.js.map → chunk-DVAVH7UV.js.map} +0 -0
  666. /package/dist/{chunk-WE2FY3CF.js.map → chunk-DWKUYUKC.js.map} +0 -0
  667. /package/dist/{chunk-GJPS6SUI.js.map → chunk-DZE2UHST.js.map} +0 -0
  668. /package/dist/{chunk-TVZCWBC5.js.map → chunk-E6UZBNR2.js.map} +0 -0
  669. /package/dist/{chunk-TJZKZKCQ.js.map → chunk-ELNXADRL.js.map} +0 -0
  670. /package/dist/{chunk-EMZ6P2KH.js.map → chunk-FCX746P4.js.map} +0 -0
  671. /package/dist/{chunk-E2BFPWA5.js.map → chunk-FGTSDCB4.js.map} +0 -0
  672. /package/dist/{chunk-AQHT2XKB.js.map → chunk-GHQ365RX.js.map} +0 -0
  673. /package/dist/{chunk-XFARJ2SL.js.map → chunk-HHX73JNN.js.map} +0 -0
  674. /package/dist/{chunk-SBP7CF7S.js.map → chunk-ICEPT2UY.js.map} +0 -0
  675. /package/dist/{chunk-F7DCEGAA.js.map → chunk-IDJKNL7P.js.map} +0 -0
  676. /package/dist/{chunk-ZIZBAKJF.js.map → chunk-INW3G4P3.js.map} +0 -0
  677. /package/dist/{chunk-3TWET6OD.js.map → chunk-IYMF3GSB.js.map} +0 -0
  678. /package/dist/{chunk-FCWDXKLI.js.map → chunk-KLF5K55H.js.map} +0 -0
  679. /package/dist/{chunk-PSPSKOQR.js.map → chunk-KQ4XRUMX.js.map} +0 -0
  680. /package/dist/{chunk-XBLVA6BC.js.map → chunk-LQ2OYP25.js.map} +0 -0
  681. /package/dist/{chunk-LDF2VXPC.js.map → chunk-LVJTYN5B.js.map} +0 -0
  682. /package/dist/{chunk-V7T6HAPO.js.map → chunk-LXDZCFII.js.map} +0 -0
  683. /package/dist/{chunk-6H6BJBBS.js.map → chunk-M565FRON.js.map} +0 -0
  684. /package/dist/{chunk-P6Z44HNW.js.map → chunk-MCAY57W7.js.map} +0 -0
  685. /package/dist/{chunk-ATUFMGY3.js.map → chunk-MIAAADD3.js.map} +0 -0
  686. /package/dist/{chunk-FEP257NO.js.map → chunk-MJX6NXSX.js.map} +0 -0
  687. /package/dist/{chunk-ZBSG24TQ.js.map → chunk-NAF5XSOI.js.map} +0 -0
  688. /package/dist/{chunk-JHPZATWG.js.map → chunk-O27BGGFC.js.map} +0 -0
  689. /package/dist/{chunk-LRWUQABW.js.map → chunk-O7JZT4G3.js.map} +0 -0
  690. /package/dist/{chunk-INY6DR2Y.js.map → chunk-OTLMQDGW.js.map} +0 -0
  691. /package/dist/{chunk-SY7CUZGW.js.map → chunk-QAEUP6YB.js.map} +0 -0
  692. /package/dist/{chunk-VELT4JFT.js.map → chunk-QTIPLD3K.js.map} +0 -0
  693. /package/dist/{chunk-NLWOT26L.js.map → chunk-QZKXZX26.js.map} +0 -0
  694. /package/dist/{chunk-DZUYNVKJ.js.map → chunk-RUCJNF4B.js.map} +0 -0
  695. /package/dist/{chunk-EDDHOHTW.js.map → chunk-SAA4VKF2.js.map} +0 -0
  696. /package/dist/{chunk-D7DLBQLS.js.map → chunk-SCN5ZF4U.js.map} +0 -0
  697. /package/dist/{chunk-QNPOFQV5.js.map → chunk-SELST7KK.js.map} +0 -0
  698. /package/dist/{chunk-JY2NBRHH.js.map → chunk-SH5WRHTG.js.map} +0 -0
  699. /package/dist/{chunk-2N5MQP65.js.map → chunk-T7V2OPW2.js.map} +0 -0
  700. /package/dist/{chunk-QZMBPEUW.js.map → chunk-URX6OGYP.js.map} +0 -0
  701. /package/dist/{chunk-6XOAPUW4.js.map → chunk-V6OAGU3U.js.map} +0 -0
  702. /package/dist/{chunk-TXLSPOLG.js.map → chunk-V76H3HWD.js.map} +0 -0
  703. /package/dist/{chunk-HSPOURUB.js.map → chunk-VDS6NSLF.js.map} +0 -0
  704. /package/dist/{chunk-CPRSVECH.js.map → chunk-VPNV2WDD.js.map} +0 -0
  705. /package/dist/{chunk-WCCFBAH4.js.map → chunk-VRCUW2J5.js.map} +0 -0
  706. /package/dist/{chunk-P7Q7YO4E.js.map → chunk-WONTGSXR.js.map} +0 -0
  707. /package/dist/{chunk-CZWMU2GB.js.map → chunk-WUYDIH4N.js.map} +0 -0
  708. /package/dist/{chunk-RDRWLYFV.js.map → chunk-X6LTFBPF.js.map} +0 -0
  709. /package/dist/{chunk-2BRVIOKO.js.map → chunk-X7UGF2LE.js.map} +0 -0
  710. /package/dist/{chunk-BPUNOSXM.js.map → chunk-XOQWT2LZ.js.map} +0 -0
  711. /package/dist/{chunk-CE6M4VLG.js.map → chunk-XQRMBE6T.js.map} +0 -0
  712. /package/dist/{chunk-G4IFJB4Z.js.map → chunk-XTNXJZRK.js.map} +0 -0
  713. /package/dist/{chunk-2XKSMHDO.js.map → chunk-YIQ6VJ4H.js.map} +0 -0
  714. /package/dist/{chunk-MJ5JHMLF.js.map → chunk-YYN6I6L5.js.map} +0 -0
  715. /package/dist/{chunk-CV74M3H6.js.map → chunk-ZJK3PVM2.js.map} +0 -0
  716. /package/dist/{chunk-YNVE62WW.js.map → chunk-ZVA2BZKM.js.map} +0 -0
  717. /package/dist/{chunk-B5RLBFMI.js.map → chunk-ZXG5MYV4.js.map} +0 -0
  718. /package/dist/{claim-QGYCSESF.js.map → claim-W2QLJLKZ.js.map} +0 -0
  719. /package/dist/{companies-VM4DJCIO.js.map → companies-TJR33KNS.js.map} +0 -0
  720. /package/dist/{company-BPFVTGZK.js.map → company-OGES42WN.js.map} +0 -0
  721. /package/dist/{complete-NNDVV6CH.js.map → complete-FCR3UXSH.js.map} +0 -0
  722. /package/dist/{connect-4G722CGF.js.map → connect-KACFSWER.js.map} +0 -0
  723. /package/dist/{conversation-TRXRUTL6.js.map → conversation-TLM7HDLK.js.map} +0 -0
  724. /package/dist/{conversion-report-ZPENZMJF.js.map → conversion-report-4WJ5D4FD.js.map} +0 -0
  725. /package/dist/{conversion-upload-command-6TY2DIBM.js.map → conversion-upload-command-REUCOQWP.js.map} +0 -0
  726. /package/dist/{conversion-writes-NIDUTQHX.js.map → conversion-writes-2W3RVOJW.js.map} +0 -0
  727. /package/dist/{conversions-4RQGCY3I.js.map → conversions-2QHK35VN.js.map} +0 -0
  728. /package/dist/{conversions-3Q3PEAAN.js.map → conversions-TI3MZYCT.js.map} +0 -0
  729. /package/dist/{create-4DUUV34B.js.map → create-5VQBHCGR.js.map} +0 -0
  730. /package/dist/{create-GAKJO6RX.js.map → create-EAY2FGWT.js.map} +0 -0
  731. /package/dist/{create-TSB2ED7G.js.map → create-EN2XXE7H.js.map} +0 -0
  732. /package/dist/{create-NUV6C7T7.js.map → create-TIKC6VNL.js.map} +0 -0
  733. /package/dist/{creatives-FRNDPYD2.js.map → creatives-U2CIA6KE.js.map} +0 -0
  734. /package/dist/{creatives-D2756SYZ.js.map → creatives-UHWKNFHM.js.map} +0 -0
  735. /package/dist/{credentials-VDUQOSAI.js.map → credentials-TSWUQUWC.js.map} +0 -0
  736. /package/dist/{critique-GCLEP53N.js.map → critique-KZH23SLS.js.map} +0 -0
  737. /package/dist/{crm-6KBBEU5D.js.map → crm-55ZVWDQF.js.map} +0 -0
  738. /package/dist/{crm-MUVL3BHT.js.map → crm-REPCWBGZ.js.map} +0 -0
  739. /package/dist/{currency-CLB7ROUV.js.map → currency-W5SXMZMS.js.map} +0 -0
  740. /package/dist/{customers-6X6LULB6.js.map → customers-UN5KGSPW.js.map} +0 -0
  741. /package/dist/{data-ZDTEJD6A.js.map → data-GXAJGTKM.js.map} +0 -0
  742. /package/dist/{delete-M5Z5QXVO.js.map → delete-3BHIQWRA.js.map} +0 -0
  743. /package/dist/{delete-FJPGJ2HP.js.map → delete-UJTIAYNP.js.map} +0 -0
  744. /package/dist/{delete-P66UBMWB.js.map → delete-Z2TCOW7K.js.map} +0 -0
  745. /package/dist/{demographics-TEDAJJDS.js.map → demographics-EAX6HNK7.js.map} +0 -0
  746. /package/dist/{discard-UXSFTA6C.js.map → discard-BJ4ZSAHC.js.map} +0 -0
  747. /package/dist/{discover-EAI4WDSL.js.map → discover-RHVFYP6K.js.map} +0 -0
  748. /package/dist/{domain-Y3BKIFLA.js.map → domain-O5ZO3DND.js.map} +0 -0
  749. /package/dist/{download-P2XHLRNA.js.map → download-4GPS3IQ7.js.map} +0 -0
  750. /package/dist/{draft-OJQT5H3E.js.map → draft-4A3QXAHP.js.map} +0 -0
  751. /package/dist/{draft-63RF6RKQ.js.map → draft-APO4PJTI.js.map} +0 -0
  752. /package/dist/{draft-N2MVECRV.js.map → draft-ORRHY3BU.js.map} +0 -0
  753. /package/dist/{draft-IHEEODST.js.map → draft-UIFX2SZ4.js.map} +0 -0
  754. /package/dist/{draft-R3GI7JWY.js.map → draft-ULEQPQYF.js.map} +0 -0
  755. /package/dist/{experiments-BFVLG54V.js.map → experiments-LMMZJPZU.js.map} +0 -0
  756. /package/dist/{extract-YH5VKD7W.js.map → extract-DJNIQC3V.js.map} +0 -0
  757. /package/dist/{facets-VJOSK5UL.js.map → facets-V2AKFR2X.js.map} +0 -0
  758. /package/dist/{feedback-ATORZ5XJ.js.map → feedback-6P545EJO.js.map} +0 -0
  759. /package/dist/{fetch-UDAWFZXZ.js.map → fetch-D7I5WPU5.js.map} +0 -0
  760. /package/dist/{fit-4CVULFD2.js.map → fit-BMJTIAOF.js.map} +0 -0
  761. /package/dist/{flows-QXTZHPB6.js.map → flows-LCP5GK5X.js.map} +0 -0
  762. /package/dist/{forecast-YFCLMXAV.js.map → forecast-BAP5V237.js.map} +0 -0
  763. /package/dist/{forecast-DJ67NT6P.js.map → forecast-DTEBUBC2.js.map} +0 -0
  764. /package/dist/{funnel-2C6Z5VA2.js.map → funnel-HBLIX62B.js.map} +0 -0
  765. /package/dist/{generate-7467FZZH.js.map → generate-AQZZ5LHX.js.map} +0 -0
  766. /package/dist/{get-GFVZKATP.js.map → get-FPNIXE7U.js.map} +0 -0
  767. /package/dist/{get-JSO4YJFR.js.map → get-UEL3XOCM.js.map} +0 -0
  768. /package/dist/{google-H4KVIAL5.js.map → google-EQQN5LVF.js.map} +0 -0
  769. /package/dist/{google-ads-KCK27DGG.js.map → google-ads-AIVV6NDM.js.map} +0 -0
  770. /package/dist/{history-LYUJTPSP.js.map → history-2SQ5K7SI.js.map} +0 -0
  771. /package/dist/{history-KBTYILFZ.js.map → history-CH3UMQOA.js.map} +0 -0
  772. /package/dist/{history-AIZX672U.js.map → history-EQO2QAQX.js.map} +0 -0
  773. /package/dist/{hubspot-BZSQ3WMQ.js.map → hubspot-FP5F3DF6.js.map} +0 -0
  774. /package/dist/{ideas-HHWTU7F2.js.map → ideas-ZZVGRYFM.js.map} +0 -0
  775. /package/dist/{images-BB6BYS54.js.map → images-WPECEULY.js.map} +0 -0
  776. /package/dist/{ingest-Z3DRI6A3.js.map → ingest-IJYPSWBT.js.map} +0 -0
  777. /package/dist/{ingest-S6HP4LXI.js.map → ingest-LAONXSXA.js.map} +0 -0
  778. /package/dist/{insights-MZ5DPH5X.js.map → insights-FBGRQJZH.js.map} +0 -0
  779. /package/dist/{inspect-KC5LTH4E.js.map → inspect-AGYBLEOH.js.map} +0 -0
  780. /package/dist/{intent-6NJBN3OR.js.map → intent-7Z2X4EL6.js.map} +0 -0
  781. /package/dist/{keyword-gap-Y5J2VZDP.js.map → keyword-gap-4INNXP3Q.js.map} +0 -0
  782. /package/dist/{keyword-metrics-VGZIQBSG.js.map → keyword-metrics-L2KRRX6S.js.map} +0 -0
  783. /package/dist/{keywords-for-site-3HREQUQU.js.map → keywords-for-site-CMVX773Q.js.map} +0 -0
  784. /package/dist/{languages-H4VPFO7Y.js.map → languages-I7M63R3S.js.map} +0 -0
  785. /package/dist/{leads-AKF42B23.js.map → leads-AZA4XCI6.js.map} +0 -0
  786. /package/dist/{learn-6D45W6YN.js.map → learn-DR3M4NWV.js.map} +0 -0
  787. /package/dist/{line-item-writes-SB6B75MY.js.map → line-item-writes-HKUDMC7V.js.map} +0 -0
  788. /package/dist/{line-items-22S6PURM.js.map → line-items-FYEWAYZI.js.map} +0 -0
  789. /package/dist/{link-CLMY2YW5.js.map → link-I3IJAUDD.js.map} +0 -0
  790. /package/dist/{linkedin-GTYWIRDX.js.map → linkedin-LDQEX5EI.js.map} +0 -0
  791. /package/dist/{linkedin-person-LBU3VGNY.js.map → linkedin-person-KMCYKTNQ.js.map} +0 -0
  792. /package/dist/{list-MWGLVZR3.js.map → list-FF4Z7ZSJ.js.map} +0 -0
  793. /package/dist/{list-SZKENQ2B.js.map → list-IMA2UKN4.js.map} +0 -0
  794. /package/dist/{locations-UPY33JUY.js.map → locations-2XCXK5FB.js.map} +0 -0
  795. /package/dist/{locations-AR4ZTFT4.js.map → locations-7UESZZO3.js.map} +0 -0
  796. /package/dist/{log-XOYBG7KX.js.map → log-6XLS6FF6.js.map} +0 -0
  797. /package/dist/{make-ZBUVEPHX.js.map → make-H36SC6HA.js.map} +0 -0
  798. /package/dist/{map-VBYQNHJR.js.map → map-AH3GT36P.js.map} +0 -0
  799. /package/dist/{mcp-RSB47JCJ.js.map → mcp-WOGB4LFO.js.map} +0 -0
  800. /package/dist/{media-sources-ZCXMQCSE.js.map → media-sources-W7WLORRN.js.map} +0 -0
  801. /package/dist/{members-QL5TXGND.js.map → members-PKQM7VME.js.map} +0 -0
  802. /package/dist/{metrics-BNLDV4BU.js.map → metrics-RZXAVZWW.js.map} +0 -0
  803. /package/dist/{models-QEB3EOSF.js.map → models-ELL6ENZ2.js.map} +0 -0
  804. /package/dist/{normalize-YWNW62HI.js.map → normalize-ISMEKGAM.js.map} +0 -0
  805. /package/dist/{options-5RRLBIVY.js.map → options-LG4TJYZF.js.map} +0 -0
  806. /package/dist/{organization-FZUYEBEE.js.map → organization-5F2UNO53.js.map} +0 -0
  807. /package/dist/{people-XGMOJZTE.js.map → people-4MXQW22A.js.map} +0 -0
  808. /package/dist/{people-FO6OCDP5.js.map → people-KJXAYQDE.js.map} +0 -0
  809. /package/dist/{performance-7AXRRE5J.js.map → performance-BZ2D62UE.js.map} +0 -0
  810. /package/dist/{performance-USJY2HVB.js.map → performance-WDOBJ3NO.js.map} +0 -0
  811. /package/dist/{pipedrive-LWAH5BTV.js.map → pipedrive-3YC2GR3M.js.map} +0 -0
  812. /package/dist/{pixels-M2UBKUJI.js.map → pixels-AWPYUSNW.js.map} +0 -0
  813. /package/dist/{preview-5ZMTNYCI.js.map → preview-JSTSQFXH.js.map} +0 -0
  814. /package/dist/{promoted-tweet-writes-VW6XCOL3.js.map → promoted-tweet-writes-DP6ORCNX.js.map} +0 -0
  815. /package/dist/{promoted-tweets-5Y6RGBJS.js.map → promoted-tweets-VCEY6KCG.js.map} +0 -0
  816. /package/dist/{publish-ERJPN3EL.js.map → publish-A5HHFTWT.js.map} +0 -0
  817. /package/dist/{query-FZAFUWCX.js.map → query-MAQFFK7H.js.map} +0 -0
  818. /package/dist/{reddit-OKEJ7EIX.js.map → reddit-DOZRSZG2.js.map} +0 -0
  819. /package/dist/{refresh-ACG34ZRD.js.map → refresh-TV4644XE.js.map} +0 -0
  820. /package/dist/{release-XYWQM7DE.js.map → release-LZ3AJFQJ.js.map} +0 -0
  821. /package/dist/{relevant-pages-OFFMPMKG.js.map → relevant-pages-FEF5NHMU.js.map} +0 -0
  822. /package/dist/{remove-NJQM5BGF.js.map → remove-QOMG2RPN.js.map} +0 -0
  823. /package/dist/{reopen-BO6G2RRS.js.map → reopen-ET5XH2A4.js.map} +0 -0
  824. /package/dist/{rerun-BVUWQCAR.js.map → rerun-2YHAQMZ6.js.map} +0 -0
  825. /package/dist/{research-2V6WG3XG.js.map → research-MJXOZXCS.js.map} +0 -0
  826. /package/dist/{research-G7BDWYEG.js.map → research-SYXCLMVQ.js.map} +0 -0
  827. /package/dist/{reset-2DDLUZGB.js.map → reset-35CQVJUF.js.map} +0 -0
  828. /package/dist/{reset-JPOOEIX7.js.map → reset-JJ7HESHC.js.map} +0 -0
  829. /package/dist/{resolve-J4TIUP3W.js.map → resolve-WPW3WUCU.js.map} +0 -0
  830. /package/dist/{retry-MNGVR37L.js.map → retry-OGM3ZT64.js.map} +0 -0
  831. /package/dist/{retry-Y4FLZQVK.js.map → retry-RZFRN73L.js.map} +0 -0
  832. /package/dist/{revenue-AVLQNUT2.js.map → revenue-KPTLBWRO.js.map} +0 -0
  833. /package/dist/{rules-UBZ32MQY.js.map → rules-XX7BZNGH.js.map} +0 -0
  834. /package/dist/{run-VGOXHEO5.js.map → run-4DEZ54GA.js.map} +0 -0
  835. /package/dist/{run-XJXE63QH.js.map → run-CI6MGV3E.js.map} +0 -0
  836. /package/dist/{scaffold-ad-6PZGNV3I.js.map → scaffold-ad-X4QQ5HSR.js.map} +0 -0
  837. /package/dist/{scaffold-static-ad-2QFZLGHK.js.map → scaffold-static-ad-UWCRDNVI.js.map} +0 -0
  838. /package/dist/{scaffold-video-5RUBD5YB.js.map → scaffold-video-4MXIJ64P.js.map} +0 -0
  839. /package/dist/{schedule-G2AETZEM.js.map → schedule-HBHXSZCK.js.map} +0 -0
  840. /package/dist/{scheduled-agents-JJAT2UDK.js.map → scheduled-agents-TF5NL3EG.js.map} +0 -0
  841. /package/dist/{schema-CCGBDISR.js.map → schema-G77I7C6X.js.map} +0 -0
  842. /package/dist/{schema-WEIPH4ND.js.map → schema-YAHA75PQ.js.map} +0 -0
  843. /package/dist/{search-terms-OFLKWSEF.js.map → search-terms-4F25WL6Y.js.map} +0 -0
  844. /package/dist/{select-OQQ6DG2X.js.map → select-7BD4B6VZ.js.map} +0 -0
  845. /package/dist/{set-HOITXI2N.js.map → set-GIOOD7K7.js.map} +0 -0
  846. /package/dist/{set-prompt-ZR2FYPQW.js.map → set-prompt-L3EKRWN7.js.map} +0 -0
  847. /package/dist/{setup-links-R55MLOHW.js.map → setup-links-IHQ5WONJ.js.map} +0 -0
  848. /package/dist/{shopify-GGDNTMXH.js.map → shopify-6WFQCGUS.js.map} +0 -0
  849. /package/dist/{site-QM6WTCDR.js.map → site-M3MBRLZJ.js.map} +0 -0
  850. /package/dist/{sources-E2EM2SNG.js.map → sources-DE7QIZSV.js.map} +0 -0
  851. /package/dist/{sources-RI4IBRB3.js.map → sources-LML63ISG.js.map} +0 -0
  852. /package/dist/{stale-MBQ37TKC.js.map → stale-APSUW4OJ.js.map} +0 -0
  853. /package/dist/{status-FVVTWIY7.js.map → status-77OL4B45.js.map} +0 -0
  854. /package/dist/{stock-FT4NHZXJ.js.map → stock-KM3WLRHN.js.map} +0 -0
  855. /package/dist/{studio-2X6UOCAR.js.map → studio-RMYKICEJ.js.map} +0 -0
  856. /package/dist/{sync-FZQUMCEN.js.map → sync-L25EVQAI.js.map} +0 -0
  857. /package/dist/{sync-definition-AQVZ3JWE.js.map → sync-definition-D2OIDCSI.js.map} +0 -0
  858. /package/dist/{tags-XYNTGG5R.js.map → tags-AXCQCJGZ.js.map} +0 -0
  859. /package/dist/{tags-GHXYLYCU.js.map → tags-KGWISKLB.js.map} +0 -0
  860. /package/dist/{tags-35NZJVQH.js.map → tags-MZFIIXL5.js.map} +0 -0
  861. /package/dist/{tags-OPUZMCDP.js.map → tags-QQXAAWUY.js.map} +0 -0
  862. /package/dist/{tags-FOPSMF5B.js.map → tags-RTIT7IW2.js.map} +0 -0
  863. /package/dist/{targeting-criteria-HJGUXYDZ.js.map → targeting-criteria-IZ6DPA3L.js.map} +0 -0
  864. /package/dist/{targets-ALLAKOF4.js.map → targets-OGGHIAZI.js.map} +0 -0
  865. /package/dist/{testimonials-RJGFPCWC.js.map → testimonials-JHB7OKIY.js.map} +0 -0
  866. /package/dist/{themes-VAKXKG4M.js.map → themes-FPIC5RUE.js.map} +0 -0
  867. /package/dist/{top-companies-54CSTO3Q.js.map → top-companies-ICP6X6KR.js.map} +0 -0
  868. /package/dist/{transcript-P4VCJV4Y.js.map → transcript-KF736ZJ3.js.map} +0 -0
  869. /package/dist/{translate-FFNWW66Z.js.map → translate-5QHIX5EW.js.map} +0 -0
  870. /package/dist/{triggers-VX4QYB7T.js.map → triggers-TSNJSHMU.js.map} +0 -0
  871. /package/dist/{unlink-FFH7O6HU.js.map → unlink-GH4D444H.js.map} +0 -0
  872. /package/dist/{unstage-RAWC4IZG.js.map → unstage-I2NYIM25.js.map} +0 -0
  873. /package/dist/{update-ZD5O3VU7.js.map → update-35NWLUT5.js.map} +0 -0
  874. /package/dist/{update-TZ7D7JGT.js.map → update-HEMI6DKR.js.map} +0 -0
  875. /package/dist/{update-6GLFLB2Z.js.map → update-PFCO5LEE.js.map} +0 -0
  876. /package/dist/{update-OJ3OZCJP.js.map → update-RUBMPMZB.js.map} +0 -0
  877. /package/dist/{upload-QA3ZAQ7I.js.map → upload-I4WIFYMS.js.map} +0 -0
  878. /package/dist/{url-options-DOOHH2JE.js.map → url-options-PBCEEKX6.js.map} +0 -0
  879. /package/dist/{url-params-D3QZKPUJ.js.map → url-params-T7KQX5FJ.js.map} +0 -0
  880. /package/dist/{validate-AHDXK4NQ.js.map → validate-3EGFWTFS.js.map} +0 -0
  881. /package/dist/{videos-J45JFDMU.js.map → videos-P3U53TZL.js.map} +0 -0
  882. /package/dist/{viewer-check-NXF23BG5.js.map → viewer-check-ZGUCQHTC.js.map} +0 -0
  883. /package/dist/{visuals-YCW3QLUS.js.map → visuals-JYOZPGB7.js.map} +0 -0
  884. /package/dist/{web-4AI7PPJ6.js.map → web-SHS6TJWV.js.map} +0 -0
  885. /package/dist/{winning-ads-WRAW2TC5.js.map → winning-ads-L5HVV5OR.js.map} +0 -0
  886. /package/dist/{write-commands-Z2PWVPT6.js.map → write-commands-FUOSA6MJ.js.map} +0 -0
  887. /package/dist/{x-KQMYVN43.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