@koda-sl/baker-cli 0.887.0 → 0.889.0-dev.c63d3597d

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 (971) hide show
  1. package/README.md +6 -1
  2. package/dist/account-RLE73GWJ.js +82 -0
  3. package/dist/account-ZFVU7HUJ.js +84 -0
  4. package/dist/account-assets-QEIXW7GA.js +298 -0
  5. package/dist/account-level-25RKXCY4.js +615 -0
  6. package/dist/account-reads-YWE43J72.js +231 -0
  7. package/dist/account-users-WJACFDIO.js +70 -0
  8. package/dist/account-writes-VQG2DIL2.js +68 -0
  9. package/dist/accounts-C4TGANEM.js +82 -0
  10. package/dist/accounts-CBUR4HHR.js +571 -0
  11. package/dist/accounts-P6LTLXVK.js +122 -0
  12. package/dist/actions-P3J7B4UP.js +55 -0
  13. package/dist/activecampaign-E7V5ZV2B.js +936 -0
  14. package/dist/ad-group-writes-6NSPVPO2.js +172 -0
  15. package/dist/ad-groups-XPFBEDTX.js +70 -0
  16. package/dist/ad-writes-ZFT6N6L4.js +176 -0
  17. package/dist/add-6CVZINC7.js +663 -0
  18. package/dist/add-GOJRYHKQ.js +109 -0
  19. package/dist/add-NYLSISGS.js +662 -0
  20. package/dist/ads-GT2IXUZB.js +147 -0
  21. package/dist/ads-HMAJV2UN.js +48 -0
  22. package/dist/ads-MF3RBGLM.js +79 -0
  23. package/dist/adsets-ZEQBO3XB.js +216 -0
  24. package/dist/advertisers-NJVSXQSR.js +155 -0
  25. package/dist/alerts-EDLS5VAU.js +154 -0
  26. package/dist/analytics-57WA66NO.js +2805 -0
  27. package/dist/analytics-HA35G6NL.js +462 -0
  28. package/dist/animate-ELVOWQD4.js +482 -0
  29. package/dist/asset-writes-DMI7XKF2.js +54 -0
  30. package/dist/assign-VDR2DA4U.js +84 -0
  31. package/dist/audience-size-RH3547ZB.js +138 -0
  32. package/dist/audience-writes-SV7UWLRK.js +345 -0
  33. package/dist/audiences-AQO2MXT4.js +129 -0
  34. package/dist/audiences-H54RA555.js +280 -0
  35. package/dist/audit-3PVSCSEG.js +156 -0
  36. package/dist/autocomplete-2T77F4RY.js +118 -0
  37. package/dist/avatars-SP774CYD.js +38 -0
  38. package/dist/bid-pricing-VBYSDSEP.js +105 -0
  39. package/dist/brief-Y2XB2R2U.js +512 -0
  40. package/dist/campaign-groups-2NKPOYGS.js +119 -0
  41. package/dist/campaign-writes-5CEFKZV5.js +176 -0
  42. package/dist/campaign-writes-MYPDHTMJ.js +170 -0
  43. package/dist/campaigns-3YN2T46Q.js +111 -0
  44. package/dist/campaigns-444D7YJ7.js +78 -0
  45. package/dist/campaigns-OPRLK7AW.js +194 -0
  46. package/dist/campaigns-TUWJBWTV.js +150 -0
  47. package/dist/canvas-VGSK3RJU.js +48 -0
  48. package/dist/capabilities-WBJ3XSM4.js +185 -0
  49. package/dist/catalog-QL3SAL67.js +90 -0
  50. package/dist/catalogs-F33HX4RG.js +130 -0
  51. package/dist/catalogs-VT6CK7U3.js +786 -0
  52. package/dist/changes-RVAJE4O7.js +288 -0
  53. package/dist/chatgpt-GEBWPTMO.js +47 -0
  54. package/dist/chats-GEGKSN2Z.js +730 -0
  55. package/dist/chats-GEGKSN2Z.js.map +1 -0
  56. package/dist/check-XAA3SAZM.js +55 -0
  57. package/dist/chunk-26PCRPMS.js +142 -0
  58. package/dist/chunk-2GAD2YFD.js +86 -0
  59. package/dist/chunk-2VZQG4XE.js +884 -0
  60. package/dist/chunk-36EP3NUV.js +915 -0
  61. package/dist/chunk-37ZFOL3T.js +285 -0
  62. package/dist/chunk-3CSDJ42F.js +374 -0
  63. package/dist/chunk-3OOZHWBQ.js +9127 -0
  64. package/dist/chunk-46T7QB4V.js +547 -0
  65. package/dist/chunk-5FE2YQHG.js +147 -0
  66. package/dist/chunk-5PU6S4HD.js +170 -0
  67. package/dist/chunk-5ZFH74JL.js +89 -0
  68. package/dist/chunk-66FLBIGF.js +405 -0
  69. package/dist/chunk-7FKNMOLI.js +6340 -0
  70. package/dist/chunk-7J2OSQPE.js +411 -0
  71. package/dist/chunk-7YYB62Q6.js +46 -0
  72. package/dist/chunk-ABSCXA3F.js +505 -0
  73. package/dist/chunk-AQGK3JDK.js +3252 -0
  74. package/dist/chunk-AQGK3JDK.js.map +1 -0
  75. package/dist/chunk-B7NURSEQ.js +98 -0
  76. package/dist/chunk-CLDJNSMW.js +423 -0
  77. package/dist/chunk-CLS5IYAM.js +91 -0
  78. package/dist/chunk-CQGA6W4H.js +26 -0
  79. package/dist/chunk-DMH2KAVE.js +749 -0
  80. package/dist/chunk-E2HXOZS7.js +51 -0
  81. package/dist/chunk-FCLELV6X.js +252 -0
  82. package/dist/chunk-FDJBCRJR.js +3378 -0
  83. package/dist/chunk-FJWR6S7B.js +685 -0
  84. package/dist/chunk-GUU4LC7J.js +4650 -0
  85. package/dist/chunk-GUU4LC7J.js.map +1 -0
  86. package/dist/chunk-HNCWQ6AC.js +329 -0
  87. package/dist/chunk-HO4OU5GT.js +152 -0
  88. package/dist/chunk-IHASMZN7.js +604 -0
  89. package/dist/chunk-IN4F63GP.js +163 -0
  90. package/dist/chunk-J25723H5.js +260 -0
  91. package/dist/chunk-J6LXNKSX.js +63 -0
  92. package/dist/chunk-J6LXNKSX.js.map +1 -0
  93. package/dist/chunk-JC2FE6LU.js +175 -0
  94. package/dist/chunk-K6YOVSDM.js +644 -0
  95. package/dist/chunk-K6YOVSDM.js.map +1 -0
  96. package/dist/chunk-KAZNPGB5.js +7856 -0
  97. package/dist/chunk-KAZNPGB5.js.map +1 -0
  98. package/dist/chunk-KK6JTXF7.js +723 -0
  99. package/dist/chunk-LBI25Z6J.js +78 -0
  100. package/dist/chunk-LO7ZELHR.js +398 -0
  101. package/dist/chunk-M7B3NIRG.js +550 -0
  102. package/dist/chunk-M7B3NIRG.js.map +1 -0
  103. package/dist/chunk-MMPSEHVM.js +313 -0
  104. package/dist/chunk-MQ7RLOYT.js +303 -0
  105. package/dist/chunk-NNNASQGG.js +262 -0
  106. package/dist/chunk-NPPE7K7H.js +341 -0
  107. package/dist/chunk-NRDQ4OBD.js +197 -0
  108. package/dist/chunk-NRKMVBXE.js +23 -0
  109. package/dist/chunk-O4HYOXFA.js +863 -0
  110. package/dist/chunk-ODZ6UGC6.js +76 -0
  111. package/dist/chunk-OXC5TCEK.js +1577 -0
  112. package/dist/chunk-PJ6E6KNJ.js +1124 -0
  113. package/dist/chunk-PMYE6WGA.js +262 -0
  114. package/dist/chunk-PW4ZDUCA.js +337 -0
  115. package/dist/chunk-PZ6KNUAF.js +287 -0
  116. package/dist/chunk-R2UE6S4P.js +127 -0
  117. package/dist/chunk-R6OOOA57.js +202 -0
  118. package/dist/chunk-RDOTHEEQ.js +155 -0
  119. package/dist/chunk-RGZ2M2WO.js +509 -0
  120. package/dist/chunk-SPOEU6C6.js +103 -0
  121. package/dist/chunk-T3XWTNBE.js +10430 -0
  122. package/dist/chunk-T6QQAQ27.js +231 -0
  123. package/dist/chunk-TDWIAG56.js +170 -0
  124. package/dist/chunk-TW5NVMPZ.js +64 -0
  125. package/dist/chunk-TWE44ERO.js +24026 -0
  126. package/dist/chunk-TWE44ERO.js.map +1 -0
  127. package/dist/chunk-UDQ2DIVY.js +479 -0
  128. package/dist/chunk-UKETWBTK.js +430 -0
  129. package/dist/chunk-UTOVJPFC.js +746 -0
  130. package/dist/chunk-V2F4K63W.js +91 -0
  131. package/dist/chunk-V4LQLLV7.js +1862 -0
  132. package/dist/chunk-V52PW3C3.js +732 -0
  133. package/dist/chunk-VBNDU6MU.js +349 -0
  134. package/dist/chunk-VBNDU6MU.js.map +1 -0
  135. package/dist/chunk-VDYAVAVS.js +660 -0
  136. package/dist/chunk-W3RIXRXK.js +219 -0
  137. package/dist/chunk-XKNKIZ5R.js +1883 -0
  138. package/dist/chunk-Y42IKJUR.js +274 -0
  139. package/dist/chunk-ZG567LXM.js +375 -0
  140. package/dist/chunk-ZKKAPN3K.js +224 -0
  141. package/dist/claim-UN2J6WIO.js +219 -0
  142. package/dist/cli.js +36 -36
  143. package/dist/companies-DBURSUOC.js +37 -0
  144. package/dist/company-SR7U47X4.js +312 -0
  145. package/dist/complete-Z2D6D6IN.js +88 -0
  146. package/dist/connect-VM5MRQFR.js +47 -0
  147. package/dist/conversation-FU6E5YUO.js +101 -0
  148. package/dist/conversion-report-6DLSLJC5.js +130 -0
  149. package/dist/conversion-upload-command-YFMPFAXF.js +459 -0
  150. package/dist/conversion-writes-4H2LTWBX.js +194 -0
  151. package/dist/conversions-5QVJQE2C.js +142 -0
  152. package/dist/conversions-L37NR2WG.js +78 -0
  153. package/dist/copy-writes-YVZMTTLV.js +174 -0
  154. package/dist/create-DB5EHYOM.js +357 -0
  155. package/dist/create-EZC4XAKH.js +220 -0
  156. package/dist/create-FXZG2ZI3.js +191 -0
  157. package/dist/create-FYMLEBHF.js +66 -0
  158. package/dist/creatives-2DO5TDDB.js +132 -0
  159. package/dist/creatives-GCQTDOSR.js +236 -0
  160. package/dist/creatives-R4RCETJG.js +48 -0
  161. package/dist/credentials-U7V2CTFO.js +292 -0
  162. package/dist/critique-Q3PS4PEU.js +231 -0
  163. package/dist/crm-D7IVP2KI.js +419 -0
  164. package/dist/crm-GARQADYL.js +328 -0
  165. package/dist/currency-AZLCACYY.js +91 -0
  166. package/dist/custom-conversions-A2ROWOH6.js +140 -0
  167. package/dist/customers-EUZBHVYZ.js +70 -0
  168. package/dist/data-JRLTQ2ZL.js +665 -0
  169. package/dist/delete-CR7E46YF.js +61 -0
  170. package/dist/delete-HYRRPAXX.js +72 -0
  171. package/dist/delete-M6HCS4OQ.js +71 -0
  172. package/dist/demographics-CBL4AQWV.js +146 -0
  173. package/dist/discard-JQRZNY3R.js +73 -0
  174. package/dist/discover-KBGB2T4P.js +191 -0
  175. package/dist/domain-4EO4COCL.js +105 -0
  176. package/dist/download-ZNGNRIIX.js +175 -0
  177. package/dist/draft-6MDRVJFE.js +584 -0
  178. package/dist/draft-AWJAXOSR.js +428 -0
  179. package/dist/draft-JMMX67IN.js +340 -0
  180. package/dist/draft-N6DTG4HM.js +643 -0
  181. package/dist/draft-OGECS4GX.js +390 -0
  182. package/dist/draft-OHVPBP4V.js +228 -0
  183. package/dist/engine/index.js +11 -11
  184. package/dist/experiment-FMMX57VR.js +2123 -0
  185. package/dist/experiments-FGIEJZPV.js +242 -0
  186. package/dist/extract-3JRZ7YLD.js +178 -0
  187. package/dist/facets-WMBQMAMN.js +161 -0
  188. package/dist/feedback-P553UQFJ.js +154 -0
  189. package/dist/fetch-TLH7VG4F.js +488 -0
  190. package/dist/fit-7A3GZNZL.js +70 -0
  191. package/dist/flows-SAMB5BZM.js +406 -0
  192. package/dist/forecast-6M43TIGT.js +123 -0
  193. package/dist/forecast-QSYP6Q5B.js +190 -0
  194. package/dist/funnel-BBGXGVSG.js +702 -0
  195. package/dist/generate-JMB22RBM.js +265 -0
  196. package/dist/get-FP7S3HD2.js +115 -0
  197. package/dist/get-W7MYNRX2.js +78 -0
  198. package/dist/google-3FVRLOUG.js +165 -0
  199. package/dist/google-WDW4LTQZ.js +3809 -0
  200. package/dist/google-WDW4LTQZ.js.map +1 -0
  201. package/dist/google-ads-RSEBUPMP.js +231 -0
  202. package/dist/history-7VIUDUWI.js +204 -0
  203. package/dist/history-VRY2O64B.js +156 -0
  204. package/dist/history-YMFYXCOA.js +109 -0
  205. package/dist/hubspot-V42TIKKP.js +1047 -0
  206. package/dist/ideas-Q6ESJXI2.js +50 -0
  207. package/dist/images-2DWUQNLR.js +92 -0
  208. package/dist/ingest-ST2VZGCW.js +163 -0
  209. package/dist/ingest-YICQAS7O.js +32 -0
  210. package/dist/insights-E3VPRDIZ.js +151 -0
  211. package/dist/inspect-7KMQJF2H.js +39 -0
  212. package/dist/instant-experiences-CN4HND7L.js +268 -0
  213. package/dist/intent-EVNPBRG5.js +97 -0
  214. package/dist/keyword-gap-ANMM2DBE.js +173 -0
  215. package/dist/keyword-metrics-BG7QTPLV.js +235 -0
  216. package/dist/keywords-for-site-ZPI3O7KF.js +135 -0
  217. package/dist/languages-P2SFZMKV.js +41 -0
  218. package/dist/leads-WU4FCHHD.js +138 -0
  219. package/dist/leads-YVNMTGWX.js +575 -0
  220. package/dist/learn-DH7FWTTD.js +214 -0
  221. package/dist/line-item-writes-22LY7PTP.js +213 -0
  222. package/dist/line-items-M3OH3BEA.js +107 -0
  223. package/dist/link-F4JRMM2V.js +71 -0
  224. package/dist/linkedin-OPCIYMY4.js +1517 -0
  225. package/dist/linkedin-person-LZ2J5PUM.js +143 -0
  226. package/dist/list-2BOGETGJ.js +90 -0
  227. package/dist/list-FWJ5PROQ.js +227 -0
  228. package/dist/list-QDNMJ4N2.js +321 -0
  229. package/dist/locations-L2UPXDZF.js +41 -0
  230. package/dist/locations-ZV6EK2BK.js +69 -0
  231. package/dist/log-5HBYAPWG.js +99 -0
  232. package/dist/make-TIEWBNED.js +1392 -0
  233. package/dist/map-LCBLGR6H.js +520 -0
  234. package/dist/mcp-ECZDK7PR.js +1028 -0
  235. package/dist/media-BKRKJBNX.js +18 -0
  236. package/dist/media-sources-WHP6DDVS.js +35 -0
  237. package/dist/members-4QJ4NFN5.js +51 -0
  238. package/dist/meta-7XENEZST.js +152 -0
  239. package/dist/metrics-KU5HKZTO.js +193 -0
  240. package/dist/models-TVAUSO3P.js +155 -0
  241. package/dist/normalize-7MQY7OFU.js +146 -0
  242. package/dist/options-GVI7MGCY.js +127 -0
  243. package/dist/organization-LIWWTLDN.js +950 -0
  244. package/dist/page-photos-MNK3A56N.js +122 -0
  245. package/dist/people-53RA2YV2.js +162 -0
  246. package/dist/people-T5MCOHLG.js +172 -0
  247. package/dist/performance-CSEBHDAH.js +6361 -0
  248. package/dist/performance-YFJOEFIQ.js +29 -0
  249. package/dist/pipedrive-XISQ2EDT.js +534 -0
  250. package/dist/pixels-NGCNKAV5.js +62 -0
  251. package/dist/preview-6GOFEE53.js +151 -0
  252. package/dist/promoted-tweet-writes-QU2QY2LD.js +185 -0
  253. package/dist/promoted-tweets-DS3M3EZP.js +119 -0
  254. package/dist/publish-CA2H6ZFM.js +431 -0
  255. package/dist/query-B6PJNOJR.js +68 -0
  256. package/dist/reddit-E4XVRGY3.js +31 -0
  257. package/dist/refresh-Q4X32QZ5.js +101 -0
  258. package/dist/release-IOKAJJAG.js +67 -0
  259. package/dist/relevant-pages-PWVMSEEY.js +101 -0
  260. package/dist/remove-VWUW3G2H.js +55 -0
  261. package/dist/reopen-35JFBIJH.js +70 -0
  262. package/dist/rerun-6BMX5OGY.js +102 -0
  263. package/dist/research-5LQIXWT5.js +78 -0
  264. package/dist/research-C7MLB4GD.js +267 -0
  265. package/dist/reset-7OVJE4VP.js +59 -0
  266. package/dist/reset-JIG6DVMC.js +59 -0
  267. package/dist/resolve-53VNKAIE.js +126 -0
  268. package/dist/retry-AJQA4NS6.js +67 -0
  269. package/dist/retry-C2KA32FO.js +67 -0
  270. package/dist/revenue-YHHS334Q.js +100 -0
  271. package/dist/rule-writes-NHGM2QAL.js +534 -0
  272. package/dist/rules-G4BNN3K7.js +234 -0
  273. package/dist/rules-O4AFVB5T.js +164 -0
  274. package/dist/run-CJV4IMUK.js +79 -0
  275. package/dist/run-YBR5DEXL.js +74 -0
  276. package/dist/scaffold-ad-S77BNZNO.js +1604 -0
  277. package/dist/scaffold-static-ad-RKIPMT3C.js +999 -0
  278. package/dist/scaffold-video-Z6KVVMRZ.js +890 -0
  279. package/dist/schedule-LQ3MGDUB.js +66 -0
  280. package/dist/scheduled-agents-Y74VUWHM.js +59 -0
  281. package/dist/schema-QY7GVP64.js +241 -0
  282. package/dist/schema-VFA7XDIJ.js +137 -0
  283. package/dist/search-K2UGFDNL.js +230 -0
  284. package/dist/search-terms-GSPUCEUQ.js +413 -0
  285. package/dist/select-Q75CYXUD.js +135 -0
  286. package/dist/set-VHE7IBC5.js +287 -0
  287. package/dist/set-prompt-RDHWHIIA.js +205 -0
  288. package/dist/setup-links-UK76TGP7.js +146 -0
  289. package/dist/shopify-N22Z2LH7.js +4034 -0
  290. package/dist/site-PX2UP6WJ.js +182 -0
  291. package/dist/sources-W3DYPF7P.js +491 -0
  292. package/dist/sources-XWQMCQKM.js +30 -0
  293. package/dist/stale-LUUDQKHB.js +93 -0
  294. package/dist/status-JKVA6RFG.js +69 -0
  295. package/dist/stock-K24GSGUX.js +214 -0
  296. package/dist/studies-LVEZW6OX.js +267 -0
  297. package/dist/studio-EPR755MN.js +49 -0
  298. package/dist/study-writes-YT57VAGI.js +475 -0
  299. package/dist/sync-FA6XW6QW.js +59 -0
  300. package/dist/sync-definition-3ZO3IMHB.js +75 -0
  301. package/dist/tags-IH4JQLOQ.js +194 -0
  302. package/dist/tags-MZI4AUFX.js +25 -0
  303. package/dist/tags-NNQ7ZIFO.js +26 -0
  304. package/dist/tags-QLTH4QXC.js +25 -0
  305. package/dist/tags-XSADREK2.js +25 -0
  306. package/dist/targeting-U25ZHNG5.js +777 -0
  307. package/dist/targeting-criteria-INSCNLEY.js +113 -0
  308. package/dist/targets-NEHSCYCW.js +111 -0
  309. package/dist/testimonials-A6GO4I6X.js +32 -0
  310. package/dist/themes-BGOWQB5V.js +103 -0
  311. package/dist/top-companies-XE4VQ4AO.js +251 -0
  312. package/dist/transcript-3L3FCPQG.js +169 -0
  313. package/dist/translate-OONH3P2L.js +608 -0
  314. package/dist/triggers-KZBMLFNY.js +149 -0
  315. package/dist/unlink-Z276IDVH.js +74 -0
  316. package/dist/unstage-V2DWN66K.js +93 -0
  317. package/dist/update-F3FGXY2K.js +70 -0
  318. package/dist/update-O5BW3QS5.js +176 -0
  319. package/dist/update-RJD5NYZL.js +238 -0
  320. package/dist/update-WJ5O7ZIC.js +194 -0
  321. package/dist/upload-VPHUD4TJ.js +186 -0
  322. package/dist/url-options-JAXYCQV6.js +137 -0
  323. package/dist/url-params-5DRKMYKX.js +103 -0
  324. package/dist/validate-FCNVFPBX.js +181 -0
  325. package/dist/videos-FW63565A.js +41 -0
  326. package/dist/viewer-check-THQ5IOLQ.js +90 -0
  327. package/dist/visuals-J2I74TLG.js +130 -0
  328. package/dist/web-PEXBI7YS.js +234 -0
  329. package/dist/winning-ads-6FRQSECL.js +88 -0
  330. package/dist/write-commands-FK4NX7Q7.js +1556 -0
  331. package/dist/write-commands-KYJPZGGS.js +1261 -0
  332. package/dist/x-57FGNEPO.js +47 -0
  333. package/package.json +1 -1
  334. package/dist/account-GBIEQDAR.js +0 -84
  335. package/dist/account-YLJRCKJD.js +0 -82
  336. package/dist/account-assets-Q2O3FRUE.js +0 -298
  337. package/dist/account-level-NBEQ6R7X.js +0 -615
  338. package/dist/account-reads-7DPRPWBK.js +0 -231
  339. package/dist/account-users-7KCX6RRF.js +0 -70
  340. package/dist/account-writes-WKG326GF.js +0 -68
  341. package/dist/accounts-AE2HVWJI.js +0 -122
  342. package/dist/accounts-CWNHOU2D.js +0 -82
  343. package/dist/accounts-T7DFD2HR.js +0 -571
  344. package/dist/actions-XA2BNQ2M.js +0 -55
  345. package/dist/activecampaign-WGVHI5KJ.js +0 -936
  346. package/dist/ad-group-writes-7D72YSZ3.js +0 -172
  347. package/dist/ad-groups-RKWIK443.js +0 -70
  348. package/dist/ad-writes-MVXTFP3G.js +0 -176
  349. package/dist/add-H5DS3QGP.js +0 -662
  350. package/dist/add-MTWYV5IF.js +0 -663
  351. package/dist/add-TEHN66ZU.js +0 -109
  352. package/dist/ads-EPFWBJ5V.js +0 -48
  353. package/dist/ads-HKPBNXWT.js +0 -147
  354. package/dist/ads-OXSPFP7L.js +0 -79
  355. package/dist/adsets-IBLZP6EM.js +0 -216
  356. package/dist/advertisers-XE5ZIMXU.js +0 -155
  357. package/dist/alerts-QQWPHG3N.js +0 -154
  358. package/dist/analytics-3CGPEWNX.js +0 -462
  359. package/dist/analytics-HFJESHLA.js +0 -2805
  360. package/dist/animate-M3NETBDU.js +0 -482
  361. package/dist/asset-writes-NTEJDVVM.js +0 -54
  362. package/dist/assign-HJJIUFU2.js +0 -84
  363. package/dist/audience-size-3PL7RCFE.js +0 -138
  364. package/dist/audience-writes-DJHKIJP7.js +0 -345
  365. package/dist/audiences-7TGXZS3M.js +0 -129
  366. package/dist/audiences-GQ3GFJGU.js +0 -280
  367. package/dist/audit-55NP5NSG.js +0 -156
  368. package/dist/autocomplete-XXJOQG3B.js +0 -118
  369. package/dist/avatars-C6ZLJ2JS.js +0 -38
  370. package/dist/bid-pricing-DMGB55M2.js +0 -105
  371. package/dist/brief-XXC3J7NB.js +0 -512
  372. package/dist/campaign-groups-DXLJMXO6.js +0 -119
  373. package/dist/campaign-writes-IYMSDPNS.js +0 -176
  374. package/dist/campaign-writes-W7RGAJJM.js +0 -170
  375. package/dist/campaigns-HZDIO72G.js +0 -194
  376. package/dist/campaigns-MRQ6WXG7.js +0 -78
  377. package/dist/campaigns-RITTRJBX.js +0 -111
  378. package/dist/campaigns-VD7UOTRV.js +0 -150
  379. package/dist/canvas-JU6QNTGE.js +0 -48
  380. package/dist/capabilities-5W5GCNPZ.js +0 -185
  381. package/dist/catalog-DEZPDMOD.js +0 -90
  382. package/dist/catalogs-H2T4Z6AS.js +0 -786
  383. package/dist/catalogs-HW3VY4KU.js +0 -130
  384. package/dist/changes-ZUPBYRVW.js +0 -288
  385. package/dist/chatgpt-2UCND7NY.js +0 -47
  386. package/dist/chats-IMZLY4Z5.js +0 -660
  387. package/dist/chats-IMZLY4Z5.js.map +0 -1
  388. package/dist/check-GEF6GXE2.js +0 -55
  389. package/dist/chunk-24DS3ELG.js +0 -660
  390. package/dist/chunk-2I3WYGAE.js +0 -6340
  391. package/dist/chunk-2MTY4FXQ.js +0 -10430
  392. package/dist/chunk-3NOL2JV6.js +0 -155
  393. package/dist/chunk-3Z3DQD3S.js +0 -604
  394. package/dist/chunk-4SYBNYE2.js +0 -170
  395. package/dist/chunk-62GKNMKZ.js +0 -746
  396. package/dist/chunk-6FXEUO2G.js +0 -26
  397. package/dist/chunk-7Z2VGNPU.js +0 -103
  398. package/dist/chunk-A2BOPFBE.js +0 -548
  399. package/dist/chunk-A2BOPFBE.js.map +0 -1
  400. package/dist/chunk-B55CVNVK.js +0 -98
  401. package/dist/chunk-BU2ETMFB.js +0 -479
  402. package/dist/chunk-C6HUH6FG.js +0 -430
  403. package/dist/chunk-CS4VA3GQ.js +0 -349
  404. package/dist/chunk-CS4VA3GQ.js.map +0 -1
  405. package/dist/chunk-CUW3CNOE.js +0 -337
  406. package/dist/chunk-CXVNM264.js +0 -46
  407. package/dist/chunk-D5VJDPVW.js +0 -915
  408. package/dist/chunk-E4XRSTAS.js +0 -1124
  409. package/dist/chunk-EJRVEUZW.js +0 -274
  410. package/dist/chunk-FRWCTFTP.js +0 -884
  411. package/dist/chunk-G7Q43JEZ.js +0 -231
  412. package/dist/chunk-GWMIDTCA.js +0 -723
  413. package/dist/chunk-H2FLV4R7.js +0 -24026
  414. package/dist/chunk-H2FLV4R7.js.map +0 -1
  415. package/dist/chunk-H3JCQYRE.js +0 -7876
  416. package/dist/chunk-H3JCQYRE.js.map +0 -1
  417. package/dist/chunk-HPCP3RIC.js +0 -89
  418. package/dist/chunk-I336DK3M.js +0 -341
  419. package/dist/chunk-IHWF5UAL.js +0 -375
  420. package/dist/chunk-J5PHVZPK.js +0 -197
  421. package/dist/chunk-LLHYNE4C.js +0 -9127
  422. package/dist/chunk-LM663MUK.js +0 -262
  423. package/dist/chunk-LUF2VYOK.js +0 -287
  424. package/dist/chunk-LZ2E3LYO.js +0 -547
  425. package/dist/chunk-LZYJJWRQ.js +0 -1883
  426. package/dist/chunk-MHOM2DGG.js +0 -411
  427. package/dist/chunk-MMIHJYZF.js +0 -51
  428. package/dist/chunk-NCS4E4YX.js +0 -3252
  429. package/dist/chunk-NCS4E4YX.js.map +0 -1
  430. package/dist/chunk-NESWSXLV.js +0 -505
  431. package/dist/chunk-NG4IIZ4K.js +0 -224
  432. package/dist/chunk-NGYRPA7Y.js +0 -76
  433. package/dist/chunk-NM65SWYX.js +0 -175
  434. package/dist/chunk-O2SBMFUX.js +0 -170
  435. package/dist/chunk-OAU7QZC7.js +0 -91
  436. package/dist/chunk-OGG7DKN5.js +0 -1577
  437. package/dist/chunk-OIYSYI5Q.js +0 -303
  438. package/dist/chunk-OXYSXFF3.js +0 -285
  439. package/dist/chunk-PLRRKSPY.js +0 -260
  440. package/dist/chunk-PMI2IYXS.js +0 -4535
  441. package/dist/chunk-PMI2IYXS.js.map +0 -1
  442. package/dist/chunk-PNGXJPM5.js +0 -604
  443. package/dist/chunk-PNGXJPM5.js.map +0 -1
  444. package/dist/chunk-QYGKGAVD.js +0 -749
  445. package/dist/chunk-RUSUYWRU.js +0 -23
  446. package/dist/chunk-S7J2JP3U.js +0 -262
  447. package/dist/chunk-SERZDHRI.js +0 -163
  448. package/dist/chunk-SHWLKMZE.js +0 -91
  449. package/dist/chunk-SJGOHC63.js +0 -147
  450. package/dist/chunk-SNWSES6T.js +0 -61
  451. package/dist/chunk-SNWSES6T.js.map +0 -1
  452. package/dist/chunk-SOTAOT6K.js +0 -863
  453. package/dist/chunk-SZH2WEZK.js +0 -202
  454. package/dist/chunk-TGEE6G6J.js +0 -142
  455. package/dist/chunk-UKTLIIEF.js +0 -685
  456. package/dist/chunk-UMBHBIJM.js +0 -374
  457. package/dist/chunk-UOWPRJIX.js +0 -732
  458. package/dist/chunk-UU7VBU24.js +0 -3378
  459. package/dist/chunk-VHM3GBST.js +0 -423
  460. package/dist/chunk-VPZIWF64.js +0 -86
  461. package/dist/chunk-VVMZ6YT5.js +0 -78
  462. package/dist/chunk-WDC5L2T6.js +0 -1862
  463. package/dist/chunk-WIZU7LR6.js +0 -329
  464. package/dist/chunk-WLTPXRHG.js +0 -398
  465. package/dist/chunk-WVEZYDPS.js +0 -509
  466. package/dist/chunk-WX674RVF.js +0 -252
  467. package/dist/chunk-XBGU4TLF.js +0 -405
  468. package/dist/chunk-YGJI27CJ.js +0 -64
  469. package/dist/chunk-ZAIDSFM6.js +0 -313
  470. package/dist/chunk-ZIJFBEFI.js +0 -127
  471. package/dist/chunk-ZJUUAZKY.js +0 -219
  472. package/dist/chunk-ZRYKGLSY.js +0 -152
  473. package/dist/claim-4EAC6OC4.js +0 -219
  474. package/dist/companies-WMYLPLXH.js +0 -37
  475. package/dist/company-2P5QATU7.js +0 -312
  476. package/dist/complete-XJXZ7U3J.js +0 -88
  477. package/dist/connect-7LAHO3GY.js +0 -47
  478. package/dist/conversation-IJG5T7DZ.js +0 -101
  479. package/dist/conversion-report-RJ5Z6JDW.js +0 -130
  480. package/dist/conversion-upload-command-ZZ5JYMBL.js +0 -459
  481. package/dist/conversion-writes-LYZFMH5I.js +0 -194
  482. package/dist/conversions-GNJQVSY4.js +0 -142
  483. package/dist/conversions-ZLBWAXLT.js +0 -78
  484. package/dist/copy-writes-FGMJ7N75.js +0 -174
  485. package/dist/create-2K7V2ANJ.js +0 -220
  486. package/dist/create-5D2LQU3V.js +0 -66
  487. package/dist/create-QXC34GLK.js +0 -191
  488. package/dist/create-RRUUHOUQ.js +0 -357
  489. package/dist/creatives-67CDPYL7.js +0 -132
  490. package/dist/creatives-ERHP7A7K.js +0 -236
  491. package/dist/creatives-JMKNKRRM.js +0 -48
  492. package/dist/credentials-FOVHUVCM.js +0 -292
  493. package/dist/critique-K2IBVCSM.js +0 -231
  494. package/dist/crm-R7CGIKHO.js +0 -419
  495. package/dist/crm-YFNIOO5E.js +0 -328
  496. package/dist/currency-QUQPGTN5.js +0 -91
  497. package/dist/custom-conversions-RZB2622Q.js +0 -140
  498. package/dist/customers-CH63IGZN.js +0 -70
  499. package/dist/data-CIPG3EOP.js +0 -665
  500. package/dist/delete-D5BNUJNO.js +0 -71
  501. package/dist/delete-JVYS4DKK.js +0 -72
  502. package/dist/delete-KN73PEH7.js +0 -61
  503. package/dist/demographics-QP55Q7QK.js +0 -146
  504. package/dist/discard-JYZGLDE6.js +0 -73
  505. package/dist/discover-Z6XJT3B4.js +0 -191
  506. package/dist/domain-YRFIHEHA.js +0 -105
  507. package/dist/download-EEEUPZN4.js +0 -175
  508. package/dist/draft-3L5UZ3JP.js +0 -643
  509. package/dist/draft-5Q7O4I3S.js +0 -228
  510. package/dist/draft-7QREAYBZ.js +0 -340
  511. package/dist/draft-EJ3THHCM.js +0 -428
  512. package/dist/draft-JPWMFZNZ.js +0 -584
  513. package/dist/draft-TPSWCE72.js +0 -390
  514. package/dist/experiment-YV7TWSRP.js +0 -2123
  515. package/dist/experiments-GQ3OI6P6.js +0 -242
  516. package/dist/extract-WWAZWGPH.js +0 -178
  517. package/dist/facets-QP66Q3NZ.js +0 -161
  518. package/dist/feedback-7QRUJAPJ.js +0 -154
  519. package/dist/fetch-QXFNBREE.js +0 -488
  520. package/dist/fit-FN4NZOAR.js +0 -70
  521. package/dist/flows-HW57AGUR.js +0 -406
  522. package/dist/forecast-5J3UOBEU.js +0 -123
  523. package/dist/forecast-SXZBIHFB.js +0 -190
  524. package/dist/funnel-ZGSOQZ7O.js +0 -702
  525. package/dist/generate-DWAKBRQJ.js +0 -265
  526. package/dist/get-2JKOCCVG.js +0 -115
  527. package/dist/get-GWOL7ZNS.js +0 -78
  528. package/dist/google-F77XV4ZC.js +0 -3809
  529. package/dist/google-F77XV4ZC.js.map +0 -1
  530. package/dist/google-LGNXPWOT.js +0 -165
  531. package/dist/google-ads-GEMKQXBP.js +0 -231
  532. package/dist/history-22WOREYD.js +0 -109
  533. package/dist/history-MUT62IIJ.js +0 -156
  534. package/dist/history-XRSQD2R7.js +0 -204
  535. package/dist/hubspot-2UXMXAXU.js +0 -1047
  536. package/dist/ideas-RXFJ6GPG.js +0 -50
  537. package/dist/images-X6DBJQI6.js +0 -92
  538. package/dist/ingest-2WLUOIHY.js +0 -163
  539. package/dist/ingest-WMVNUXCQ.js +0 -32
  540. package/dist/insights-53JGBSF7.js +0 -151
  541. package/dist/inspect-NN67LFED.js +0 -39
  542. package/dist/instant-experiences-MF2X374W.js +0 -268
  543. package/dist/intent-LJWAVCN6.js +0 -97
  544. package/dist/keyword-gap-YQL7MF3C.js +0 -173
  545. package/dist/keyword-metrics-7TJNVGIA.js +0 -235
  546. package/dist/keywords-for-site-SBGZROQZ.js +0 -135
  547. package/dist/languages-YX6RL4NF.js +0 -41
  548. package/dist/leads-7C6RRGQR.js +0 -138
  549. package/dist/leads-IBXGNXTX.js +0 -575
  550. package/dist/learn-JY33N4NQ.js +0 -214
  551. package/dist/line-item-writes-2H26WMPE.js +0 -213
  552. package/dist/line-items-M3V36TKY.js +0 -107
  553. package/dist/link-TGLEJWPV.js +0 -71
  554. package/dist/linkedin-FWD4I2FS.js +0 -1517
  555. package/dist/linkedin-person-WWHXBBBG.js +0 -143
  556. package/dist/list-5MGA2MWW.js +0 -321
  557. package/dist/list-PULAZQF7.js +0 -227
  558. package/dist/list-QTFLMWXX.js +0 -90
  559. package/dist/locations-RHTUYWMC.js +0 -69
  560. package/dist/locations-SW66CTZU.js +0 -41
  561. package/dist/log-MOJYCEBX.js +0 -99
  562. package/dist/make-6GKWMTPH.js +0 -1392
  563. package/dist/map-AURU4BXW.js +0 -520
  564. package/dist/mcp-M3PAMWYI.js +0 -1028
  565. package/dist/media-YPVGQ535.js +0 -18
  566. package/dist/media-sources-YHJIYD5X.js +0 -35
  567. package/dist/members-NNLATE23.js +0 -51
  568. package/dist/meta-6QC6KAPS.js +0 -152
  569. package/dist/metrics-6BXMR27J.js +0 -193
  570. package/dist/models-DV4G4A2W.js +0 -155
  571. package/dist/normalize-WTHZ66XA.js +0 -146
  572. package/dist/options-MTARVW42.js +0 -127
  573. package/dist/organization-HDS3GG5V.js +0 -950
  574. package/dist/page-photos-BEAMTVP5.js +0 -122
  575. package/dist/people-JZZA6Z36.js +0 -172
  576. package/dist/people-W5UBLCMB.js +0 -162
  577. package/dist/performance-62JPWFKG.js +0 -6361
  578. package/dist/performance-VFDKSSLS.js +0 -29
  579. package/dist/pipedrive-W5CH6RMG.js +0 -534
  580. package/dist/pixels-T73SVZ4G.js +0 -62
  581. package/dist/preview-NAAOUG36.js +0 -151
  582. package/dist/promoted-tweet-writes-BZRKVCYA.js +0 -185
  583. package/dist/promoted-tweets-OKDN6RLV.js +0 -119
  584. package/dist/publish-QSVCGLSG.js +0 -431
  585. package/dist/query-5ADP77DV.js +0 -68
  586. package/dist/reddit-UXLVSY4K.js +0 -31
  587. package/dist/refresh-AVLT5MVM.js +0 -101
  588. package/dist/release-DSRKE2RQ.js +0 -67
  589. package/dist/relevant-pages-MY3LFTDE.js +0 -101
  590. package/dist/remove-UKIA5UFX.js +0 -55
  591. package/dist/reopen-I7KSRGVX.js +0 -70
  592. package/dist/rerun-ZBRGGZ4F.js +0 -102
  593. package/dist/research-I6EUWUU5.js +0 -267
  594. package/dist/research-WYX6VMYS.js +0 -78
  595. package/dist/reset-IFM6VSJZ.js +0 -59
  596. package/dist/reset-LDIXYUZB.js +0 -59
  597. package/dist/resolve-SL4ZPMXN.js +0 -126
  598. package/dist/retry-4MVNBKJ5.js +0 -67
  599. package/dist/retry-O3RJ6GQM.js +0 -67
  600. package/dist/revenue-BNT2JYED.js +0 -100
  601. package/dist/rule-writes-CVP6CH2R.js +0 -534
  602. package/dist/rules-4FDMN3OI.js +0 -164
  603. package/dist/rules-LZ36YNG3.js +0 -234
  604. package/dist/run-IMBVCTRK.js +0 -79
  605. package/dist/run-LFRSK7UI.js +0 -74
  606. package/dist/scaffold-ad-YABEHRY5.js +0 -1604
  607. package/dist/scaffold-static-ad-HNRVTOLV.js +0 -999
  608. package/dist/scaffold-video-7TZQMQGD.js +0 -890
  609. package/dist/schedule-VZWOMF7M.js +0 -66
  610. package/dist/scheduled-agents-IHJERGZW.js +0 -59
  611. package/dist/schema-ACGJJGVM.js +0 -241
  612. package/dist/schema-GFGZ4I4V.js +0 -137
  613. package/dist/search-HY7CZ5LA.js +0 -230
  614. package/dist/search-terms-SWRRTKBV.js +0 -413
  615. package/dist/select-Z4PAJMWG.js +0 -135
  616. package/dist/set-ANZSYUQP.js +0 -287
  617. package/dist/set-prompt-4JTS7PMD.js +0 -205
  618. package/dist/setup-links-AGPYPQXO.js +0 -146
  619. package/dist/shopify-6JBE3LCH.js +0 -4034
  620. package/dist/site-AKJRZEWW.js +0 -182
  621. package/dist/sources-EJKW4LKC.js +0 -491
  622. package/dist/sources-OE4SJKET.js +0 -30
  623. package/dist/stale-VAUJB5M3.js +0 -93
  624. package/dist/status-ELU6Z2NI.js +0 -69
  625. package/dist/stock-7TUIU3J5.js +0 -214
  626. package/dist/studies-Y6PGWT66.js +0 -267
  627. package/dist/studio-PD4VOHWX.js +0 -49
  628. package/dist/study-writes-6F6O6N4E.js +0 -475
  629. package/dist/sync-DTPIOPWD.js +0 -59
  630. package/dist/sync-definition-JDFOLZ3E.js +0 -75
  631. package/dist/tags-CF7ANLPE.js +0 -25
  632. package/dist/tags-ELIVF3ZC.js +0 -25
  633. package/dist/tags-JV644EHH.js +0 -194
  634. package/dist/tags-MNL6DZYK.js +0 -25
  635. package/dist/tags-QCAQH6MA.js +0 -26
  636. package/dist/targeting-FRMVSXXL.js +0 -777
  637. package/dist/targeting-criteria-CNADJCNO.js +0 -113
  638. package/dist/targets-6B7P5OTX.js +0 -111
  639. package/dist/testimonials-O6APSOYR.js +0 -32
  640. package/dist/themes-GMZOWC3X.js +0 -103
  641. package/dist/top-companies-DDJPGBOB.js +0 -251
  642. package/dist/transcript-ZPPQOGN7.js +0 -169
  643. package/dist/translate-OTCGS6MM.js +0 -608
  644. package/dist/triggers-UVNVE2SG.js +0 -149
  645. package/dist/unlink-5RDFYULY.js +0 -74
  646. package/dist/unstage-ZNO7QUM2.js +0 -93
  647. package/dist/update-66CPGD32.js +0 -194
  648. package/dist/update-7EQTWSTE.js +0 -70
  649. package/dist/update-JRKRJX2F.js +0 -238
  650. package/dist/update-SNU6MAJG.js +0 -176
  651. package/dist/upload-DFHVCNVZ.js +0 -186
  652. package/dist/url-options-ZDCGO7VH.js +0 -137
  653. package/dist/url-params-3JUFOS5M.js +0 -103
  654. package/dist/validate-CA3PSA6J.js +0 -181
  655. package/dist/videos-PVQZMLXV.js +0 -41
  656. package/dist/viewer-check-65PWU46D.js +0 -90
  657. package/dist/visuals-YOIO5ET4.js +0 -130
  658. package/dist/web-QVPHHXHU.js +0 -234
  659. package/dist/winning-ads-JYCQNSK3.js +0 -88
  660. package/dist/write-commands-2DBNSTGT.js +0 -1556
  661. package/dist/write-commands-3BMPDY3K.js +0 -1261
  662. package/dist/x-TLVCXW5Y.js +0 -47
  663. /package/dist/{account-YLJRCKJD.js.map → account-RLE73GWJ.js.map} +0 -0
  664. /package/dist/{account-GBIEQDAR.js.map → account-ZFVU7HUJ.js.map} +0 -0
  665. /package/dist/{account-assets-Q2O3FRUE.js.map → account-assets-QEIXW7GA.js.map} +0 -0
  666. /package/dist/{account-level-NBEQ6R7X.js.map → account-level-25RKXCY4.js.map} +0 -0
  667. /package/dist/{account-reads-7DPRPWBK.js.map → account-reads-YWE43J72.js.map} +0 -0
  668. /package/dist/{account-users-7KCX6RRF.js.map → account-users-WJACFDIO.js.map} +0 -0
  669. /package/dist/{account-writes-WKG326GF.js.map → account-writes-VQG2DIL2.js.map} +0 -0
  670. /package/dist/{accounts-CWNHOU2D.js.map → accounts-C4TGANEM.js.map} +0 -0
  671. /package/dist/{accounts-T7DFD2HR.js.map → accounts-CBUR4HHR.js.map} +0 -0
  672. /package/dist/{accounts-AE2HVWJI.js.map → accounts-P6LTLXVK.js.map} +0 -0
  673. /package/dist/{actions-XA2BNQ2M.js.map → actions-P3J7B4UP.js.map} +0 -0
  674. /package/dist/{activecampaign-WGVHI5KJ.js.map → activecampaign-E7V5ZV2B.js.map} +0 -0
  675. /package/dist/{ad-group-writes-7D72YSZ3.js.map → ad-group-writes-6NSPVPO2.js.map} +0 -0
  676. /package/dist/{ad-groups-RKWIK443.js.map → ad-groups-XPFBEDTX.js.map} +0 -0
  677. /package/dist/{ad-writes-MVXTFP3G.js.map → ad-writes-ZFT6N6L4.js.map} +0 -0
  678. /package/dist/{add-MTWYV5IF.js.map → add-6CVZINC7.js.map} +0 -0
  679. /package/dist/{add-TEHN66ZU.js.map → add-GOJRYHKQ.js.map} +0 -0
  680. /package/dist/{add-H5DS3QGP.js.map → add-NYLSISGS.js.map} +0 -0
  681. /package/dist/{ads-HKPBNXWT.js.map → ads-GT2IXUZB.js.map} +0 -0
  682. /package/dist/{ads-EPFWBJ5V.js.map → ads-HMAJV2UN.js.map} +0 -0
  683. /package/dist/{ads-OXSPFP7L.js.map → ads-MF3RBGLM.js.map} +0 -0
  684. /package/dist/{adsets-IBLZP6EM.js.map → adsets-ZEQBO3XB.js.map} +0 -0
  685. /package/dist/{advertisers-XE5ZIMXU.js.map → advertisers-NJVSXQSR.js.map} +0 -0
  686. /package/dist/{alerts-QQWPHG3N.js.map → alerts-EDLS5VAU.js.map} +0 -0
  687. /package/dist/{analytics-HFJESHLA.js.map → analytics-57WA66NO.js.map} +0 -0
  688. /package/dist/{analytics-3CGPEWNX.js.map → analytics-HA35G6NL.js.map} +0 -0
  689. /package/dist/{animate-M3NETBDU.js.map → animate-ELVOWQD4.js.map} +0 -0
  690. /package/dist/{asset-writes-NTEJDVVM.js.map → asset-writes-DMI7XKF2.js.map} +0 -0
  691. /package/dist/{assign-HJJIUFU2.js.map → assign-VDR2DA4U.js.map} +0 -0
  692. /package/dist/{audience-size-3PL7RCFE.js.map → audience-size-RH3547ZB.js.map} +0 -0
  693. /package/dist/{audience-writes-DJHKIJP7.js.map → audience-writes-SV7UWLRK.js.map} +0 -0
  694. /package/dist/{audiences-7TGXZS3M.js.map → audiences-AQO2MXT4.js.map} +0 -0
  695. /package/dist/{audiences-GQ3GFJGU.js.map → audiences-H54RA555.js.map} +0 -0
  696. /package/dist/{audit-55NP5NSG.js.map → audit-3PVSCSEG.js.map} +0 -0
  697. /package/dist/{autocomplete-XXJOQG3B.js.map → autocomplete-2T77F4RY.js.map} +0 -0
  698. /package/dist/{avatars-C6ZLJ2JS.js.map → avatars-SP774CYD.js.map} +0 -0
  699. /package/dist/{bid-pricing-DMGB55M2.js.map → bid-pricing-VBYSDSEP.js.map} +0 -0
  700. /package/dist/{brief-XXC3J7NB.js.map → brief-Y2XB2R2U.js.map} +0 -0
  701. /package/dist/{campaign-groups-DXLJMXO6.js.map → campaign-groups-2NKPOYGS.js.map} +0 -0
  702. /package/dist/{campaign-writes-IYMSDPNS.js.map → campaign-writes-5CEFKZV5.js.map} +0 -0
  703. /package/dist/{campaign-writes-W7RGAJJM.js.map → campaign-writes-MYPDHTMJ.js.map} +0 -0
  704. /package/dist/{campaigns-RITTRJBX.js.map → campaigns-3YN2T46Q.js.map} +0 -0
  705. /package/dist/{campaigns-MRQ6WXG7.js.map → campaigns-444D7YJ7.js.map} +0 -0
  706. /package/dist/{campaigns-HZDIO72G.js.map → campaigns-OPRLK7AW.js.map} +0 -0
  707. /package/dist/{campaigns-VD7UOTRV.js.map → campaigns-TUWJBWTV.js.map} +0 -0
  708. /package/dist/{canvas-JU6QNTGE.js.map → canvas-VGSK3RJU.js.map} +0 -0
  709. /package/dist/{capabilities-5W5GCNPZ.js.map → capabilities-WBJ3XSM4.js.map} +0 -0
  710. /package/dist/{catalog-DEZPDMOD.js.map → catalog-QL3SAL67.js.map} +0 -0
  711. /package/dist/{catalogs-HW3VY4KU.js.map → catalogs-F33HX4RG.js.map} +0 -0
  712. /package/dist/{catalogs-H2T4Z6AS.js.map → catalogs-VT6CK7U3.js.map} +0 -0
  713. /package/dist/{changes-ZUPBYRVW.js.map → changes-RVAJE4O7.js.map} +0 -0
  714. /package/dist/{chatgpt-2UCND7NY.js.map → chatgpt-GEBWPTMO.js.map} +0 -0
  715. /package/dist/{check-GEF6GXE2.js.map → check-XAA3SAZM.js.map} +0 -0
  716. /package/dist/{chunk-TGEE6G6J.js.map → chunk-26PCRPMS.js.map} +0 -0
  717. /package/dist/{chunk-VPZIWF64.js.map → chunk-2GAD2YFD.js.map} +0 -0
  718. /package/dist/{chunk-FRWCTFTP.js.map → chunk-2VZQG4XE.js.map} +0 -0
  719. /package/dist/{chunk-D5VJDPVW.js.map → chunk-36EP3NUV.js.map} +0 -0
  720. /package/dist/{chunk-OXYSXFF3.js.map → chunk-37ZFOL3T.js.map} +0 -0
  721. /package/dist/{chunk-UMBHBIJM.js.map → chunk-3CSDJ42F.js.map} +0 -0
  722. /package/dist/{chunk-LLHYNE4C.js.map → chunk-3OOZHWBQ.js.map} +0 -0
  723. /package/dist/{chunk-LZ2E3LYO.js.map → chunk-46T7QB4V.js.map} +0 -0
  724. /package/dist/{chunk-SJGOHC63.js.map → chunk-5FE2YQHG.js.map} +0 -0
  725. /package/dist/{chunk-O2SBMFUX.js.map → chunk-5PU6S4HD.js.map} +0 -0
  726. /package/dist/{chunk-HPCP3RIC.js.map → chunk-5ZFH74JL.js.map} +0 -0
  727. /package/dist/{chunk-XBGU4TLF.js.map → chunk-66FLBIGF.js.map} +0 -0
  728. /package/dist/{chunk-2I3WYGAE.js.map → chunk-7FKNMOLI.js.map} +0 -0
  729. /package/dist/{chunk-MHOM2DGG.js.map → chunk-7J2OSQPE.js.map} +0 -0
  730. /package/dist/{chunk-CXVNM264.js.map → chunk-7YYB62Q6.js.map} +0 -0
  731. /package/dist/{chunk-NESWSXLV.js.map → chunk-ABSCXA3F.js.map} +0 -0
  732. /package/dist/{chunk-B55CVNVK.js.map → chunk-B7NURSEQ.js.map} +0 -0
  733. /package/dist/{chunk-VHM3GBST.js.map → chunk-CLDJNSMW.js.map} +0 -0
  734. /package/dist/{chunk-SHWLKMZE.js.map → chunk-CLS5IYAM.js.map} +0 -0
  735. /package/dist/{chunk-6FXEUO2G.js.map → chunk-CQGA6W4H.js.map} +0 -0
  736. /package/dist/{chunk-QYGKGAVD.js.map → chunk-DMH2KAVE.js.map} +0 -0
  737. /package/dist/{chunk-MMIHJYZF.js.map → chunk-E2HXOZS7.js.map} +0 -0
  738. /package/dist/{chunk-WX674RVF.js.map → chunk-FCLELV6X.js.map} +0 -0
  739. /package/dist/{chunk-UU7VBU24.js.map → chunk-FDJBCRJR.js.map} +0 -0
  740. /package/dist/{chunk-UKTLIIEF.js.map → chunk-FJWR6S7B.js.map} +0 -0
  741. /package/dist/{chunk-WIZU7LR6.js.map → chunk-HNCWQ6AC.js.map} +0 -0
  742. /package/dist/{chunk-ZRYKGLSY.js.map → chunk-HO4OU5GT.js.map} +0 -0
  743. /package/dist/{chunk-3Z3DQD3S.js.map → chunk-IHASMZN7.js.map} +0 -0
  744. /package/dist/{chunk-SERZDHRI.js.map → chunk-IN4F63GP.js.map} +0 -0
  745. /package/dist/{chunk-PLRRKSPY.js.map → chunk-J25723H5.js.map} +0 -0
  746. /package/dist/{chunk-NM65SWYX.js.map → chunk-JC2FE6LU.js.map} +0 -0
  747. /package/dist/{chunk-GWMIDTCA.js.map → chunk-KK6JTXF7.js.map} +0 -0
  748. /package/dist/{chunk-VVMZ6YT5.js.map → chunk-LBI25Z6J.js.map} +0 -0
  749. /package/dist/{chunk-WLTPXRHG.js.map → chunk-LO7ZELHR.js.map} +0 -0
  750. /package/dist/{chunk-ZAIDSFM6.js.map → chunk-MMPSEHVM.js.map} +0 -0
  751. /package/dist/{chunk-OIYSYI5Q.js.map → chunk-MQ7RLOYT.js.map} +0 -0
  752. /package/dist/{chunk-LM663MUK.js.map → chunk-NNNASQGG.js.map} +0 -0
  753. /package/dist/{chunk-I336DK3M.js.map → chunk-NPPE7K7H.js.map} +0 -0
  754. /package/dist/{chunk-J5PHVZPK.js.map → chunk-NRDQ4OBD.js.map} +0 -0
  755. /package/dist/{chunk-RUSUYWRU.js.map → chunk-NRKMVBXE.js.map} +0 -0
  756. /package/dist/{chunk-SOTAOT6K.js.map → chunk-O4HYOXFA.js.map} +0 -0
  757. /package/dist/{chunk-NGYRPA7Y.js.map → chunk-ODZ6UGC6.js.map} +0 -0
  758. /package/dist/{chunk-OGG7DKN5.js.map → chunk-OXC5TCEK.js.map} +0 -0
  759. /package/dist/{chunk-E4XRSTAS.js.map → chunk-PJ6E6KNJ.js.map} +0 -0
  760. /package/dist/{chunk-S7J2JP3U.js.map → chunk-PMYE6WGA.js.map} +0 -0
  761. /package/dist/{chunk-CUW3CNOE.js.map → chunk-PW4ZDUCA.js.map} +0 -0
  762. /package/dist/{chunk-LUF2VYOK.js.map → chunk-PZ6KNUAF.js.map} +0 -0
  763. /package/dist/{chunk-ZIJFBEFI.js.map → chunk-R2UE6S4P.js.map} +0 -0
  764. /package/dist/{chunk-SZH2WEZK.js.map → chunk-R6OOOA57.js.map} +0 -0
  765. /package/dist/{chunk-3NOL2JV6.js.map → chunk-RDOTHEEQ.js.map} +0 -0
  766. /package/dist/{chunk-WVEZYDPS.js.map → chunk-RGZ2M2WO.js.map} +0 -0
  767. /package/dist/{chunk-7Z2VGNPU.js.map → chunk-SPOEU6C6.js.map} +0 -0
  768. /package/dist/{chunk-2MTY4FXQ.js.map → chunk-T3XWTNBE.js.map} +0 -0
  769. /package/dist/{chunk-G7Q43JEZ.js.map → chunk-T6QQAQ27.js.map} +0 -0
  770. /package/dist/{chunk-4SYBNYE2.js.map → chunk-TDWIAG56.js.map} +0 -0
  771. /package/dist/{chunk-YGJI27CJ.js.map → chunk-TW5NVMPZ.js.map} +0 -0
  772. /package/dist/{chunk-BU2ETMFB.js.map → chunk-UDQ2DIVY.js.map} +0 -0
  773. /package/dist/{chunk-C6HUH6FG.js.map → chunk-UKETWBTK.js.map} +0 -0
  774. /package/dist/{chunk-62GKNMKZ.js.map → chunk-UTOVJPFC.js.map} +0 -0
  775. /package/dist/{chunk-OAU7QZC7.js.map → chunk-V2F4K63W.js.map} +0 -0
  776. /package/dist/{chunk-WDC5L2T6.js.map → chunk-V4LQLLV7.js.map} +0 -0
  777. /package/dist/{chunk-UOWPRJIX.js.map → chunk-V52PW3C3.js.map} +0 -0
  778. /package/dist/{chunk-24DS3ELG.js.map → chunk-VDYAVAVS.js.map} +0 -0
  779. /package/dist/{chunk-ZJUUAZKY.js.map → chunk-W3RIXRXK.js.map} +0 -0
  780. /package/dist/{chunk-LZYJJWRQ.js.map → chunk-XKNKIZ5R.js.map} +0 -0
  781. /package/dist/{chunk-EJRVEUZW.js.map → chunk-Y42IKJUR.js.map} +0 -0
  782. /package/dist/{chunk-IHWF5UAL.js.map → chunk-ZG567LXM.js.map} +0 -0
  783. /package/dist/{chunk-NG4IIZ4K.js.map → chunk-ZKKAPN3K.js.map} +0 -0
  784. /package/dist/{claim-4EAC6OC4.js.map → claim-UN2J6WIO.js.map} +0 -0
  785. /package/dist/{companies-WMYLPLXH.js.map → companies-DBURSUOC.js.map} +0 -0
  786. /package/dist/{company-2P5QATU7.js.map → company-SR7U47X4.js.map} +0 -0
  787. /package/dist/{complete-XJXZ7U3J.js.map → complete-Z2D6D6IN.js.map} +0 -0
  788. /package/dist/{connect-7LAHO3GY.js.map → connect-VM5MRQFR.js.map} +0 -0
  789. /package/dist/{conversation-IJG5T7DZ.js.map → conversation-FU6E5YUO.js.map} +0 -0
  790. /package/dist/{conversion-report-RJ5Z6JDW.js.map → conversion-report-6DLSLJC5.js.map} +0 -0
  791. /package/dist/{conversion-upload-command-ZZ5JYMBL.js.map → conversion-upload-command-YFMPFAXF.js.map} +0 -0
  792. /package/dist/{conversion-writes-LYZFMH5I.js.map → conversion-writes-4H2LTWBX.js.map} +0 -0
  793. /package/dist/{conversions-GNJQVSY4.js.map → conversions-5QVJQE2C.js.map} +0 -0
  794. /package/dist/{conversions-ZLBWAXLT.js.map → conversions-L37NR2WG.js.map} +0 -0
  795. /package/dist/{copy-writes-FGMJ7N75.js.map → copy-writes-YVZMTTLV.js.map} +0 -0
  796. /package/dist/{create-RRUUHOUQ.js.map → create-DB5EHYOM.js.map} +0 -0
  797. /package/dist/{create-2K7V2ANJ.js.map → create-EZC4XAKH.js.map} +0 -0
  798. /package/dist/{create-QXC34GLK.js.map → create-FXZG2ZI3.js.map} +0 -0
  799. /package/dist/{create-5D2LQU3V.js.map → create-FYMLEBHF.js.map} +0 -0
  800. /package/dist/{creatives-67CDPYL7.js.map → creatives-2DO5TDDB.js.map} +0 -0
  801. /package/dist/{creatives-ERHP7A7K.js.map → creatives-GCQTDOSR.js.map} +0 -0
  802. /package/dist/{creatives-JMKNKRRM.js.map → creatives-R4RCETJG.js.map} +0 -0
  803. /package/dist/{credentials-FOVHUVCM.js.map → credentials-U7V2CTFO.js.map} +0 -0
  804. /package/dist/{critique-K2IBVCSM.js.map → critique-Q3PS4PEU.js.map} +0 -0
  805. /package/dist/{crm-R7CGIKHO.js.map → crm-D7IVP2KI.js.map} +0 -0
  806. /package/dist/{crm-YFNIOO5E.js.map → crm-GARQADYL.js.map} +0 -0
  807. /package/dist/{currency-QUQPGTN5.js.map → currency-AZLCACYY.js.map} +0 -0
  808. /package/dist/{custom-conversions-RZB2622Q.js.map → custom-conversions-A2ROWOH6.js.map} +0 -0
  809. /package/dist/{customers-CH63IGZN.js.map → customers-EUZBHVYZ.js.map} +0 -0
  810. /package/dist/{data-CIPG3EOP.js.map → data-JRLTQ2ZL.js.map} +0 -0
  811. /package/dist/{delete-KN73PEH7.js.map → delete-CR7E46YF.js.map} +0 -0
  812. /package/dist/{delete-JVYS4DKK.js.map → delete-HYRRPAXX.js.map} +0 -0
  813. /package/dist/{delete-D5BNUJNO.js.map → delete-M6HCS4OQ.js.map} +0 -0
  814. /package/dist/{demographics-QP55Q7QK.js.map → demographics-CBL4AQWV.js.map} +0 -0
  815. /package/dist/{discard-JYZGLDE6.js.map → discard-JQRZNY3R.js.map} +0 -0
  816. /package/dist/{discover-Z6XJT3B4.js.map → discover-KBGB2T4P.js.map} +0 -0
  817. /package/dist/{domain-YRFIHEHA.js.map → domain-4EO4COCL.js.map} +0 -0
  818. /package/dist/{download-EEEUPZN4.js.map → download-ZNGNRIIX.js.map} +0 -0
  819. /package/dist/{draft-JPWMFZNZ.js.map → draft-6MDRVJFE.js.map} +0 -0
  820. /package/dist/{draft-EJ3THHCM.js.map → draft-AWJAXOSR.js.map} +0 -0
  821. /package/dist/{draft-7QREAYBZ.js.map → draft-JMMX67IN.js.map} +0 -0
  822. /package/dist/{draft-3L5UZ3JP.js.map → draft-N6DTG4HM.js.map} +0 -0
  823. /package/dist/{draft-TPSWCE72.js.map → draft-OGECS4GX.js.map} +0 -0
  824. /package/dist/{draft-5Q7O4I3S.js.map → draft-OHVPBP4V.js.map} +0 -0
  825. /package/dist/{experiment-YV7TWSRP.js.map → experiment-FMMX57VR.js.map} +0 -0
  826. /package/dist/{experiments-GQ3OI6P6.js.map → experiments-FGIEJZPV.js.map} +0 -0
  827. /package/dist/{extract-WWAZWGPH.js.map → extract-3JRZ7YLD.js.map} +0 -0
  828. /package/dist/{facets-QP66Q3NZ.js.map → facets-WMBQMAMN.js.map} +0 -0
  829. /package/dist/{feedback-7QRUJAPJ.js.map → feedback-P553UQFJ.js.map} +0 -0
  830. /package/dist/{fetch-QXFNBREE.js.map → fetch-TLH7VG4F.js.map} +0 -0
  831. /package/dist/{fit-FN4NZOAR.js.map → fit-7A3GZNZL.js.map} +0 -0
  832. /package/dist/{flows-HW57AGUR.js.map → flows-SAMB5BZM.js.map} +0 -0
  833. /package/dist/{forecast-5J3UOBEU.js.map → forecast-6M43TIGT.js.map} +0 -0
  834. /package/dist/{forecast-SXZBIHFB.js.map → forecast-QSYP6Q5B.js.map} +0 -0
  835. /package/dist/{funnel-ZGSOQZ7O.js.map → funnel-BBGXGVSG.js.map} +0 -0
  836. /package/dist/{generate-DWAKBRQJ.js.map → generate-JMB22RBM.js.map} +0 -0
  837. /package/dist/{get-2JKOCCVG.js.map → get-FP7S3HD2.js.map} +0 -0
  838. /package/dist/{get-GWOL7ZNS.js.map → get-W7MYNRX2.js.map} +0 -0
  839. /package/dist/{google-LGNXPWOT.js.map → google-3FVRLOUG.js.map} +0 -0
  840. /package/dist/{google-ads-GEMKQXBP.js.map → google-ads-RSEBUPMP.js.map} +0 -0
  841. /package/dist/{history-XRSQD2R7.js.map → history-7VIUDUWI.js.map} +0 -0
  842. /package/dist/{history-MUT62IIJ.js.map → history-VRY2O64B.js.map} +0 -0
  843. /package/dist/{history-22WOREYD.js.map → history-YMFYXCOA.js.map} +0 -0
  844. /package/dist/{hubspot-2UXMXAXU.js.map → hubspot-V42TIKKP.js.map} +0 -0
  845. /package/dist/{ideas-RXFJ6GPG.js.map → ideas-Q6ESJXI2.js.map} +0 -0
  846. /package/dist/{images-X6DBJQI6.js.map → images-2DWUQNLR.js.map} +0 -0
  847. /package/dist/{ingest-2WLUOIHY.js.map → ingest-ST2VZGCW.js.map} +0 -0
  848. /package/dist/{ingest-WMVNUXCQ.js.map → ingest-YICQAS7O.js.map} +0 -0
  849. /package/dist/{insights-53JGBSF7.js.map → insights-E3VPRDIZ.js.map} +0 -0
  850. /package/dist/{inspect-NN67LFED.js.map → inspect-7KMQJF2H.js.map} +0 -0
  851. /package/dist/{instant-experiences-MF2X374W.js.map → instant-experiences-CN4HND7L.js.map} +0 -0
  852. /package/dist/{intent-LJWAVCN6.js.map → intent-EVNPBRG5.js.map} +0 -0
  853. /package/dist/{keyword-gap-YQL7MF3C.js.map → keyword-gap-ANMM2DBE.js.map} +0 -0
  854. /package/dist/{keyword-metrics-7TJNVGIA.js.map → keyword-metrics-BG7QTPLV.js.map} +0 -0
  855. /package/dist/{keywords-for-site-SBGZROQZ.js.map → keywords-for-site-ZPI3O7KF.js.map} +0 -0
  856. /package/dist/{languages-YX6RL4NF.js.map → languages-P2SFZMKV.js.map} +0 -0
  857. /package/dist/{leads-7C6RRGQR.js.map → leads-WU4FCHHD.js.map} +0 -0
  858. /package/dist/{leads-IBXGNXTX.js.map → leads-YVNMTGWX.js.map} +0 -0
  859. /package/dist/{learn-JY33N4NQ.js.map → learn-DH7FWTTD.js.map} +0 -0
  860. /package/dist/{line-item-writes-2H26WMPE.js.map → line-item-writes-22LY7PTP.js.map} +0 -0
  861. /package/dist/{line-items-M3V36TKY.js.map → line-items-M3OH3BEA.js.map} +0 -0
  862. /package/dist/{link-TGLEJWPV.js.map → link-F4JRMM2V.js.map} +0 -0
  863. /package/dist/{linkedin-FWD4I2FS.js.map → linkedin-OPCIYMY4.js.map} +0 -0
  864. /package/dist/{linkedin-person-WWHXBBBG.js.map → linkedin-person-LZ2J5PUM.js.map} +0 -0
  865. /package/dist/{list-QTFLMWXX.js.map → list-2BOGETGJ.js.map} +0 -0
  866. /package/dist/{list-PULAZQF7.js.map → list-FWJ5PROQ.js.map} +0 -0
  867. /package/dist/{list-5MGA2MWW.js.map → list-QDNMJ4N2.js.map} +0 -0
  868. /package/dist/{locations-SW66CTZU.js.map → locations-L2UPXDZF.js.map} +0 -0
  869. /package/dist/{locations-RHTUYWMC.js.map → locations-ZV6EK2BK.js.map} +0 -0
  870. /package/dist/{log-MOJYCEBX.js.map → log-5HBYAPWG.js.map} +0 -0
  871. /package/dist/{make-6GKWMTPH.js.map → make-TIEWBNED.js.map} +0 -0
  872. /package/dist/{map-AURU4BXW.js.map → map-LCBLGR6H.js.map} +0 -0
  873. /package/dist/{mcp-M3PAMWYI.js.map → mcp-ECZDK7PR.js.map} +0 -0
  874. /package/dist/{media-YPVGQ535.js.map → media-BKRKJBNX.js.map} +0 -0
  875. /package/dist/{media-sources-YHJIYD5X.js.map → media-sources-WHP6DDVS.js.map} +0 -0
  876. /package/dist/{members-NNLATE23.js.map → members-4QJ4NFN5.js.map} +0 -0
  877. /package/dist/{meta-6QC6KAPS.js.map → meta-7XENEZST.js.map} +0 -0
  878. /package/dist/{metrics-6BXMR27J.js.map → metrics-KU5HKZTO.js.map} +0 -0
  879. /package/dist/{models-DV4G4A2W.js.map → models-TVAUSO3P.js.map} +0 -0
  880. /package/dist/{normalize-WTHZ66XA.js.map → normalize-7MQY7OFU.js.map} +0 -0
  881. /package/dist/{options-MTARVW42.js.map → options-GVI7MGCY.js.map} +0 -0
  882. /package/dist/{organization-HDS3GG5V.js.map → organization-LIWWTLDN.js.map} +0 -0
  883. /package/dist/{page-photos-BEAMTVP5.js.map → page-photos-MNK3A56N.js.map} +0 -0
  884. /package/dist/{people-W5UBLCMB.js.map → people-53RA2YV2.js.map} +0 -0
  885. /package/dist/{people-JZZA6Z36.js.map → people-T5MCOHLG.js.map} +0 -0
  886. /package/dist/{performance-62JPWFKG.js.map → performance-CSEBHDAH.js.map} +0 -0
  887. /package/dist/{performance-VFDKSSLS.js.map → performance-YFJOEFIQ.js.map} +0 -0
  888. /package/dist/{pipedrive-W5CH6RMG.js.map → pipedrive-XISQ2EDT.js.map} +0 -0
  889. /package/dist/{pixels-T73SVZ4G.js.map → pixels-NGCNKAV5.js.map} +0 -0
  890. /package/dist/{preview-NAAOUG36.js.map → preview-6GOFEE53.js.map} +0 -0
  891. /package/dist/{promoted-tweet-writes-BZRKVCYA.js.map → promoted-tweet-writes-QU2QY2LD.js.map} +0 -0
  892. /package/dist/{promoted-tweets-OKDN6RLV.js.map → promoted-tweets-DS3M3EZP.js.map} +0 -0
  893. /package/dist/{publish-QSVCGLSG.js.map → publish-CA2H6ZFM.js.map} +0 -0
  894. /package/dist/{query-5ADP77DV.js.map → query-B6PJNOJR.js.map} +0 -0
  895. /package/dist/{reddit-UXLVSY4K.js.map → reddit-E4XVRGY3.js.map} +0 -0
  896. /package/dist/{refresh-AVLT5MVM.js.map → refresh-Q4X32QZ5.js.map} +0 -0
  897. /package/dist/{release-DSRKE2RQ.js.map → release-IOKAJJAG.js.map} +0 -0
  898. /package/dist/{relevant-pages-MY3LFTDE.js.map → relevant-pages-PWVMSEEY.js.map} +0 -0
  899. /package/dist/{remove-UKIA5UFX.js.map → remove-VWUW3G2H.js.map} +0 -0
  900. /package/dist/{reopen-I7KSRGVX.js.map → reopen-35JFBIJH.js.map} +0 -0
  901. /package/dist/{rerun-ZBRGGZ4F.js.map → rerun-6BMX5OGY.js.map} +0 -0
  902. /package/dist/{research-WYX6VMYS.js.map → research-5LQIXWT5.js.map} +0 -0
  903. /package/dist/{research-I6EUWUU5.js.map → research-C7MLB4GD.js.map} +0 -0
  904. /package/dist/{reset-IFM6VSJZ.js.map → reset-7OVJE4VP.js.map} +0 -0
  905. /package/dist/{reset-LDIXYUZB.js.map → reset-JIG6DVMC.js.map} +0 -0
  906. /package/dist/{resolve-SL4ZPMXN.js.map → resolve-53VNKAIE.js.map} +0 -0
  907. /package/dist/{retry-4MVNBKJ5.js.map → retry-AJQA4NS6.js.map} +0 -0
  908. /package/dist/{retry-O3RJ6GQM.js.map → retry-C2KA32FO.js.map} +0 -0
  909. /package/dist/{revenue-BNT2JYED.js.map → revenue-YHHS334Q.js.map} +0 -0
  910. /package/dist/{rule-writes-CVP6CH2R.js.map → rule-writes-NHGM2QAL.js.map} +0 -0
  911. /package/dist/{rules-LZ36YNG3.js.map → rules-G4BNN3K7.js.map} +0 -0
  912. /package/dist/{rules-4FDMN3OI.js.map → rules-O4AFVB5T.js.map} +0 -0
  913. /package/dist/{run-IMBVCTRK.js.map → run-CJV4IMUK.js.map} +0 -0
  914. /package/dist/{run-LFRSK7UI.js.map → run-YBR5DEXL.js.map} +0 -0
  915. /package/dist/{scaffold-ad-YABEHRY5.js.map → scaffold-ad-S77BNZNO.js.map} +0 -0
  916. /package/dist/{scaffold-static-ad-HNRVTOLV.js.map → scaffold-static-ad-RKIPMT3C.js.map} +0 -0
  917. /package/dist/{scaffold-video-7TZQMQGD.js.map → scaffold-video-Z6KVVMRZ.js.map} +0 -0
  918. /package/dist/{schedule-VZWOMF7M.js.map → schedule-LQ3MGDUB.js.map} +0 -0
  919. /package/dist/{scheduled-agents-IHJERGZW.js.map → scheduled-agents-Y74VUWHM.js.map} +0 -0
  920. /package/dist/{schema-ACGJJGVM.js.map → schema-QY7GVP64.js.map} +0 -0
  921. /package/dist/{schema-GFGZ4I4V.js.map → schema-VFA7XDIJ.js.map} +0 -0
  922. /package/dist/{search-HY7CZ5LA.js.map → search-K2UGFDNL.js.map} +0 -0
  923. /package/dist/{search-terms-SWRRTKBV.js.map → search-terms-GSPUCEUQ.js.map} +0 -0
  924. /package/dist/{select-Z4PAJMWG.js.map → select-Q75CYXUD.js.map} +0 -0
  925. /package/dist/{set-ANZSYUQP.js.map → set-VHE7IBC5.js.map} +0 -0
  926. /package/dist/{set-prompt-4JTS7PMD.js.map → set-prompt-RDHWHIIA.js.map} +0 -0
  927. /package/dist/{setup-links-AGPYPQXO.js.map → setup-links-UK76TGP7.js.map} +0 -0
  928. /package/dist/{shopify-6JBE3LCH.js.map → shopify-N22Z2LH7.js.map} +0 -0
  929. /package/dist/{site-AKJRZEWW.js.map → site-PX2UP6WJ.js.map} +0 -0
  930. /package/dist/{sources-EJKW4LKC.js.map → sources-W3DYPF7P.js.map} +0 -0
  931. /package/dist/{sources-OE4SJKET.js.map → sources-XWQMCQKM.js.map} +0 -0
  932. /package/dist/{stale-VAUJB5M3.js.map → stale-LUUDQKHB.js.map} +0 -0
  933. /package/dist/{status-ELU6Z2NI.js.map → status-JKVA6RFG.js.map} +0 -0
  934. /package/dist/{stock-7TUIU3J5.js.map → stock-K24GSGUX.js.map} +0 -0
  935. /package/dist/{studies-Y6PGWT66.js.map → studies-LVEZW6OX.js.map} +0 -0
  936. /package/dist/{studio-PD4VOHWX.js.map → studio-EPR755MN.js.map} +0 -0
  937. /package/dist/{study-writes-6F6O6N4E.js.map → study-writes-YT57VAGI.js.map} +0 -0
  938. /package/dist/{sync-DTPIOPWD.js.map → sync-FA6XW6QW.js.map} +0 -0
  939. /package/dist/{sync-definition-JDFOLZ3E.js.map → sync-definition-3ZO3IMHB.js.map} +0 -0
  940. /package/dist/{tags-JV644EHH.js.map → tags-IH4JQLOQ.js.map} +0 -0
  941. /package/dist/{tags-MNL6DZYK.js.map → tags-MZI4AUFX.js.map} +0 -0
  942. /package/dist/{tags-QCAQH6MA.js.map → tags-NNQ7ZIFO.js.map} +0 -0
  943. /package/dist/{tags-ELIVF3ZC.js.map → tags-QLTH4QXC.js.map} +0 -0
  944. /package/dist/{tags-CF7ANLPE.js.map → tags-XSADREK2.js.map} +0 -0
  945. /package/dist/{targeting-FRMVSXXL.js.map → targeting-U25ZHNG5.js.map} +0 -0
  946. /package/dist/{targeting-criteria-CNADJCNO.js.map → targeting-criteria-INSCNLEY.js.map} +0 -0
  947. /package/dist/{targets-6B7P5OTX.js.map → targets-NEHSCYCW.js.map} +0 -0
  948. /package/dist/{testimonials-O6APSOYR.js.map → testimonials-A6GO4I6X.js.map} +0 -0
  949. /package/dist/{themes-GMZOWC3X.js.map → themes-BGOWQB5V.js.map} +0 -0
  950. /package/dist/{top-companies-DDJPGBOB.js.map → top-companies-XE4VQ4AO.js.map} +0 -0
  951. /package/dist/{transcript-ZPPQOGN7.js.map → transcript-3L3FCPQG.js.map} +0 -0
  952. /package/dist/{translate-OTCGS6MM.js.map → translate-OONH3P2L.js.map} +0 -0
  953. /package/dist/{triggers-UVNVE2SG.js.map → triggers-KZBMLFNY.js.map} +0 -0
  954. /package/dist/{unlink-5RDFYULY.js.map → unlink-Z276IDVH.js.map} +0 -0
  955. /package/dist/{unstage-ZNO7QUM2.js.map → unstage-V2DWN66K.js.map} +0 -0
  956. /package/dist/{update-7EQTWSTE.js.map → update-F3FGXY2K.js.map} +0 -0
  957. /package/dist/{update-SNU6MAJG.js.map → update-O5BW3QS5.js.map} +0 -0
  958. /package/dist/{update-JRKRJX2F.js.map → update-RJD5NYZL.js.map} +0 -0
  959. /package/dist/{update-66CPGD32.js.map → update-WJ5O7ZIC.js.map} +0 -0
  960. /package/dist/{upload-DFHVCNVZ.js.map → upload-VPHUD4TJ.js.map} +0 -0
  961. /package/dist/{url-options-ZDCGO7VH.js.map → url-options-JAXYCQV6.js.map} +0 -0
  962. /package/dist/{url-params-3JUFOS5M.js.map → url-params-5DRKMYKX.js.map} +0 -0
  963. /package/dist/{validate-CA3PSA6J.js.map → validate-FCNVFPBX.js.map} +0 -0
  964. /package/dist/{videos-PVQZMLXV.js.map → videos-FW63565A.js.map} +0 -0
  965. /package/dist/{viewer-check-65PWU46D.js.map → viewer-check-THQ5IOLQ.js.map} +0 -0
  966. /package/dist/{visuals-YOIO5ET4.js.map → visuals-J2I74TLG.js.map} +0 -0
  967. /package/dist/{web-QVPHHXHU.js.map → web-PEXBI7YS.js.map} +0 -0
  968. /package/dist/{winning-ads-JYCQNSK3.js.map → winning-ads-6FRQSECL.js.map} +0 -0
  969. /package/dist/{write-commands-2DBNSTGT.js.map → write-commands-FK4NX7Q7.js.map} +0 -0
  970. /package/dist/{write-commands-3BMPDY3K.js.map → write-commands-KYJPZGGS.js.map} +0 -0
  971. /package/dist/{x-TLVCXW5Y.js.map → x-57FGNEPO.js.map} +0 -0
@@ -1,1883 +0,0 @@
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-SOTAOT6K.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-QYGKGAVD.js";
27
- import {
28
- withWindowSpellings
29
- } from "./chunk-74QGFUZL.js";
30
- import {
31
- accountFundsWarnings
32
- } from "./chunk-IHWF5UAL.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-7W5KGO5H.js";
45
- import {
46
- GOOGLE_ADS_QUERY_MAX_PAGE_SIZE
47
- } from "./chunk-PMI2IYXS.js";
48
- import {
49
- ApiError,
50
- apiPost
51
- } from "./chunk-NRJ6A3IF.js";
52
- import {
53
- optionalTargetCompany
54
- } from "./chunk-7AEQWLLO.js";
55
- import {
56
- maskEnvelope,
57
- registerSchema
58
- } from "./chunk-WZDUKGGN.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-LZYJJWRQ.js.map