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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (876) hide show
  1. package/dist/account-TOEH3E4V.js +84 -0
  2. package/dist/account-YLJRCKJD.js +82 -0
  3. package/dist/account-reads-QUKBCJ4I.js +231 -0
  4. package/dist/account-users-PRK7NXU4.js +70 -0
  5. package/dist/account-writes-WKG326GF.js +68 -0
  6. package/dist/accounts-HM2MOUCS.js +571 -0
  7. package/dist/accounts-HYSK5RVA.js +122 -0
  8. package/dist/accounts-VXJACI73.js +82 -0
  9. package/dist/actions-J4X5CD5U.js +55 -0
  10. package/dist/activecampaign-7E7FKMA2.js +936 -0
  11. package/dist/ad-group-writes-7D72YSZ3.js +172 -0
  12. package/dist/ad-groups-RKWIK443.js +70 -0
  13. package/dist/ad-writes-MVXTFP3G.js +176 -0
  14. package/dist/add-4EEJRILN.js +663 -0
  15. package/dist/add-CHJQ5W2O.js +109 -0
  16. package/dist/add-VKDDINLM.js +662 -0
  17. package/dist/ads-IZVXCAGD.js +48 -0
  18. package/dist/ads-OXSPFP7L.js +79 -0
  19. package/dist/advertisers-WTKSQCBD.js +155 -0
  20. package/dist/alerts-RC5HDS3D.js +154 -0
  21. package/dist/analytics-G7WXLSAB.js +462 -0
  22. package/dist/analytics-L2HEARYU.js +2805 -0
  23. package/dist/animate-M3NETBDU.js +482 -0
  24. package/dist/assign-NPJZFHPC.js +84 -0
  25. package/dist/audience-size-WKZGMCNU.js +138 -0
  26. package/dist/audiences-GQ3GFJGU.js +280 -0
  27. package/dist/audit-22DQDYDI.js +156 -0
  28. package/dist/autocomplete-YFF4WBEQ.js +118 -0
  29. package/dist/avatars-NLNOFORD.js +38 -0
  30. package/dist/bid-pricing-VVNXSHXS.js +105 -0
  31. package/dist/brief-ZTPOODB7.js +512 -0
  32. package/dist/campaign-groups-TUDQ27PF.js +119 -0
  33. package/dist/campaign-writes-4UXSPUWW.js +170 -0
  34. package/dist/campaign-writes-IYMSDPNS.js +176 -0
  35. package/dist/campaigns-7VPDCXNP.js +111 -0
  36. package/dist/campaigns-FNM4TOFC.js +194 -0
  37. package/dist/campaigns-MRQ6WXG7.js +78 -0
  38. package/dist/canvas-SRHL5ZHR.js +48 -0
  39. package/dist/capabilities-42OXSLHU.js +185 -0
  40. package/dist/catalog-F3HNLFJH.js +90 -0
  41. package/dist/catalogs-HW3VY4KU.js +130 -0
  42. package/dist/changes-6OHBEPGF.js +288 -0
  43. package/dist/chatgpt-2UCND7NY.js +47 -0
  44. package/dist/chats-5UPQ6F34.js +730 -0
  45. package/dist/check-5KREXPY7.js +55 -0
  46. package/dist/chunk-26BRCSWQ.js +155 -0
  47. package/dist/chunk-3HF745ZU.js +405 -0
  48. package/dist/chunk-3HKFU57Z.js +78 -0
  49. package/dist/chunk-3UZA2TVE.js +64 -0
  50. package/dist/chunk-3Z3DQD3S.js +604 -0
  51. package/dist/chunk-4J7GY4V4.js +375 -0
  52. package/dist/chunk-4SYBNYE2.js +170 -0
  53. package/dist/chunk-4VRVRA3E.js +660 -0
  54. package/dist/chunk-5SCUCAPZ.js +863 -0
  55. package/dist/chunk-5VGV7WYL.js +86 -0
  56. package/dist/chunk-655LRQK3.js +63 -0
  57. package/dist/chunk-6FXEUO2G.js +26 -0
  58. package/dist/chunk-6U5P7U2K.js +3378 -0
  59. package/dist/chunk-7KVXTJNE.js +7856 -0
  60. package/dist/chunk-7NKF4JLL.js +10430 -0
  61. package/dist/chunk-AK3TLOI2.js +746 -0
  62. package/dist/chunk-B55CVNVK.js +98 -0
  63. package/dist/chunk-BMCISGEJ.js +262 -0
  64. package/dist/chunk-BMNC4WMK.js +303 -0
  65. package/dist/chunk-BU5M3VGB.js +103 -0
  66. package/dist/chunk-C6HUH6FG.js +430 -0
  67. package/dist/chunk-CF22TBGU.js +6340 -0
  68. package/dist/chunk-CFZDQED4.js +91 -0
  69. package/dist/chunk-CRJKO2GW.js +260 -0
  70. package/dist/chunk-CXUWSUPP.js +685 -0
  71. package/dist/chunk-CXVNM264.js +46 -0
  72. package/dist/chunk-D5VJDPVW.js +915 -0
  73. package/dist/chunk-EJRVEUZW.js +274 -0
  74. package/dist/chunk-FRSG3BBL.js +411 -0
  75. package/dist/chunk-GWMIDTCA.js +723 -0
  76. package/dist/chunk-H2FLV4R7.js +24026 -0
  77. package/dist/chunk-H2FLV4R7.js.map +1 -0
  78. package/dist/chunk-HPCP3RIC.js +89 -0
  79. package/dist/chunk-HQGQW37N.js +1124 -0
  80. package/dist/chunk-HRS4W6A7.js +329 -0
  81. package/dist/chunk-ID2ULDOJ.js +91 -0
  82. package/dist/chunk-KOF2WH6V.js +479 -0
  83. package/dist/chunk-LBN6JRAN.js +51 -0
  84. package/dist/chunk-LGY43BST.js +884 -0
  85. package/dist/chunk-LQPWLCPL.js +175 -0
  86. package/dist/chunk-MOOTQZZB.js +398 -0
  87. package/dist/chunk-MV2HPZMW.js +550 -0
  88. package/dist/chunk-MVNXGETW.js +749 -0
  89. package/dist/chunk-NB5OR67T.js +1883 -0
  90. package/dist/chunk-NCS4E4YX.js +3252 -0
  91. package/dist/chunk-NCS4E4YX.js.map +1 -0
  92. package/dist/chunk-NESWSXLV.js +505 -0
  93. package/dist/chunk-NF5D3VYI.js +337 -0
  94. package/dist/chunk-NGYRPA7Y.js +76 -0
  95. package/dist/chunk-OE57TJBJ.js +9127 -0
  96. package/dist/chunk-OGG7DKN5.js +1577 -0
  97. package/dist/chunk-ONHHXBOH.js +252 -0
  98. package/dist/chunk-ORKQSFNI.js +23 -0
  99. package/dist/chunk-OXYSXFF3.js +285 -0
  100. package/dist/chunk-QI6ALVEZ.js +313 -0
  101. package/dist/chunk-QPLB53AQ.js +224 -0
  102. package/dist/chunk-RRSGZYWO.js +202 -0
  103. package/dist/chunk-S4S54FZU.js +547 -0
  104. package/dist/chunk-TGEE6G6J.js +142 -0
  105. package/dist/chunk-U72TSCKL.js +341 -0
  106. package/dist/chunk-UOWPRJIX.js +732 -0
  107. package/dist/chunk-W736BTE7.js +170 -0
  108. package/dist/chunk-WDC5L2T6.js +1862 -0
  109. package/dist/chunk-WSYTRJN7.js +147 -0
  110. package/dist/chunk-WTWO46FT.js +4655 -0
  111. package/dist/chunk-WTWO46FT.js.map +1 -0
  112. package/dist/chunk-XDOF4LGD.js +163 -0
  113. package/dist/chunk-XHTFXA2A.js +197 -0
  114. package/dist/chunk-XKLJPKZA.js +374 -0
  115. package/dist/chunk-XLCLPLMB.js +423 -0
  116. package/dist/chunk-XPHCG2JN.js +509 -0
  117. package/dist/chunk-ZIJFBEFI.js +127 -0
  118. package/dist/chunk-ZRYKGLSY.js +152 -0
  119. package/dist/claim-HB7CBTJH.js +219 -0
  120. package/dist/cli.js +35 -35
  121. package/dist/companies-HKMERSJP.js +37 -0
  122. package/dist/company-PGWIDFMQ.js +312 -0
  123. package/dist/complete-RMJYSYOL.js +88 -0
  124. package/dist/connect-2KDGUVY5.js +47 -0
  125. package/dist/conversation-VDRLFRMI.js +101 -0
  126. package/dist/conversion-report-RJ5Z6JDW.js +130 -0
  127. package/dist/conversion-upload-command-TCMORMHM.js +459 -0
  128. package/dist/conversion-writes-LYZFMH5I.js +194 -0
  129. package/dist/conversions-ANAJMGHI.js +142 -0
  130. package/dist/conversions-ZLBWAXLT.js +78 -0
  131. package/dist/create-7R6W42ZB.js +66 -0
  132. package/dist/create-CPYP5LGS.js +191 -0
  133. package/dist/create-H43T7PXI.js +220 -0
  134. package/dist/create-QCCLMAPL.js +357 -0
  135. package/dist/creatives-HMFAG44S.js +48 -0
  136. package/dist/creatives-PDDLZQHU.js +236 -0
  137. package/dist/credentials-CWBYEI5M.js +292 -0
  138. package/dist/critique-5FZ35QNP.js +231 -0
  139. package/dist/crm-NZHLWC3H.js +328 -0
  140. package/dist/crm-STN3YKV5.js +419 -0
  141. package/dist/currency-DMVRKQRJ.js +91 -0
  142. package/dist/customers-JMKJA4LI.js +70 -0
  143. package/dist/data-CIPG3EOP.js +665 -0
  144. package/dist/delete-DAMPOWQV.js +72 -0
  145. package/dist/delete-VC4XSYJ6.js +71 -0
  146. package/dist/delete-VNITJJCY.js +61 -0
  147. package/dist/demographics-6QTIHC22.js +146 -0
  148. package/dist/discard-6JBN263B.js +73 -0
  149. package/dist/discover-MXXNEDJC.js +191 -0
  150. package/dist/domain-X2CHPUEN.js +105 -0
  151. package/dist/download-EFRVIWUQ.js +175 -0
  152. package/dist/draft-3TU2DOG4.js +390 -0
  153. package/dist/draft-7QREAYBZ.js +340 -0
  154. package/dist/draft-GGCV5MUR.js +643 -0
  155. package/dist/draft-GGQKDNLL.js +584 -0
  156. package/dist/draft-LXNUTJCQ.js +228 -0
  157. package/dist/draft-PDUPYLHU.js +428 -0
  158. package/dist/engine/index.js +9 -9
  159. package/dist/experiments-327DBJOV.js +242 -0
  160. package/dist/extract-RT7UACSI.js +178 -0
  161. package/dist/facets-DOAWYVYW.js +161 -0
  162. package/dist/feedback-VSKQVHQT.js +154 -0
  163. package/dist/fetch-7ZYOMTQT.js +488 -0
  164. package/dist/fit-M6X35XGV.js +70 -0
  165. package/dist/flows-ZTK45AAV.js +406 -0
  166. package/dist/forecast-DR3XIMIX.js +123 -0
  167. package/dist/forecast-F4HFL5V2.js +190 -0
  168. package/dist/funnel-UOUUAU3D.js +702 -0
  169. package/dist/generate-DWAKBRQJ.js +265 -0
  170. package/dist/get-H4O2BE3W.js +78 -0
  171. package/dist/get-SNNCIKBO.js +115 -0
  172. package/dist/google-EF34XOH6.js +3809 -0
  173. package/dist/google-EQTWYOMA.js +165 -0
  174. package/dist/google-ads-WQMWXVEI.js +231 -0
  175. package/dist/history-U2ZXDZBP.js +156 -0
  176. package/dist/history-XRSQD2R7.js +204 -0
  177. package/dist/history-Y5S4LPC7.js +109 -0
  178. package/dist/hubspot-MIKWDLVS.js +1047 -0
  179. package/dist/ideas-QL7DO5FR.js +50 -0
  180. package/dist/images-U3UK3W5X.js +92 -0
  181. package/dist/ingest-E6NA6MLE.js +163 -0
  182. package/dist/ingest-PDCY7GTG.js +32 -0
  183. package/dist/insights-53JGBSF7.js +151 -0
  184. package/dist/inspect-2SC5HQO4.js +39 -0
  185. package/dist/intent-RCDG2YEC.js +97 -0
  186. package/dist/keyword-gap-RS234V7N.js +173 -0
  187. package/dist/keyword-metrics-PTGZNTVE.js +235 -0
  188. package/dist/keywords-for-site-HPBUYQAE.js +135 -0
  189. package/dist/languages-EHVUCBTM.js +41 -0
  190. package/dist/leads-Q7FG7CDN.js +138 -0
  191. package/dist/learn-WN54VXO6.js +214 -0
  192. package/dist/line-item-writes-ISLEC7ZN.js +213 -0
  193. package/dist/line-items-NRZ24KDM.js +107 -0
  194. package/dist/link-RGLL45F5.js +71 -0
  195. package/dist/linkedin-XBQMI42D.js +1517 -0
  196. package/dist/linkedin-person-3DPYF6L6.js +143 -0
  197. package/dist/list-533GIXG7.js +321 -0
  198. package/dist/list-FZ4NFRRR.js +90 -0
  199. package/dist/list-RWQLAWO3.js +227 -0
  200. package/dist/locations-2NEDMFS5.js +41 -0
  201. package/dist/locations-RHTUYWMC.js +69 -0
  202. package/dist/log-IFLF3DZZ.js +99 -0
  203. package/dist/make-DDMTAGUB.js +1392 -0
  204. package/dist/map-O37XED7M.js +520 -0
  205. package/dist/mcp-MZ3HVDYY.js +1028 -0
  206. package/dist/media-sources-52FXNGXC.js +35 -0
  207. package/dist/members-PDYPCF27.js +51 -0
  208. package/dist/meta-HK5PYNRM.js +152 -0
  209. package/dist/metrics-TSRFLNLI.js +193 -0
  210. package/dist/models-DV4G4A2W.js +155 -0
  211. package/dist/normalize-ONUJO2N4.js +146 -0
  212. package/dist/options-K3N7JI4H.js +127 -0
  213. package/dist/organization-RDZ4FOC4.js +950 -0
  214. package/dist/people-NR7JT5VV.js +162 -0
  215. package/dist/people-RWHZBUJU.js +172 -0
  216. package/dist/performance-UABHGDYV.js +6361 -0
  217. package/dist/performance-XIZ43WKC.js +29 -0
  218. package/dist/pipedrive-IDA44I2X.js +534 -0
  219. package/dist/pixels-T73SVZ4G.js +62 -0
  220. package/dist/preview-PM3SAC4G.js +151 -0
  221. package/dist/promoted-tweet-writes-GW7G3WN5.js +185 -0
  222. package/dist/promoted-tweets-A4BD3ZMR.js +119 -0
  223. package/dist/publish-XGJXWQM3.js +431 -0
  224. package/dist/query-SG6ILF5G.js +68 -0
  225. package/dist/reddit-VVKTK7DX.js +31 -0
  226. package/dist/refresh-QOA6XQ65.js +101 -0
  227. package/dist/release-5ZIDVDEO.js +67 -0
  228. package/dist/relevant-pages-CFBI4BIH.js +101 -0
  229. package/dist/remove-2YY2CCVU.js +55 -0
  230. package/dist/reopen-LKJUT6M2.js +70 -0
  231. package/dist/rerun-RPS5GK62.js +102 -0
  232. package/dist/research-6WCBKLTG.js +267 -0
  233. package/dist/research-EDTPCX3O.js +78 -0
  234. package/dist/reset-J33M64KW.js +59 -0
  235. package/dist/reset-MUH7FKOG.js +59 -0
  236. package/dist/resolve-5HZJEXLJ.js +126 -0
  237. package/dist/retry-32GYJQAF.js +67 -0
  238. package/dist/retry-ZHRDMM4Y.js +67 -0
  239. package/dist/revenue-IRF25ISM.js +100 -0
  240. package/dist/rules-BUPUJ556.js +164 -0
  241. package/dist/run-55JPIRYI.js +74 -0
  242. package/dist/run-Y2RXME5N.js +79 -0
  243. package/dist/scaffold-ad-TK6V3TYJ.js +1604 -0
  244. package/dist/scaffold-static-ad-RQXSGRE2.js +999 -0
  245. package/dist/scaffold-video-KTNSYWMY.js +890 -0
  246. package/dist/schedule-PVUKPBF7.js +66 -0
  247. package/dist/scheduled-agents-J6RTT7HY.js +59 -0
  248. package/dist/schema-7CKXBHF6.js +137 -0
  249. package/dist/schema-RVA6JSZE.js +241 -0
  250. package/dist/search-RC57DNMJ.js +230 -0
  251. package/dist/search-terms-2L6UMZCC.js +413 -0
  252. package/dist/select-YZWK2TON.js +135 -0
  253. package/dist/set-OKT7Q7EC.js +287 -0
  254. package/dist/set-prompt-T6HC54TW.js +205 -0
  255. package/dist/setup-links-EQ6GH6M5.js +146 -0
  256. package/dist/shopify-SC35E5P2.js +4034 -0
  257. package/dist/site-FZOS2U6Q.js +182 -0
  258. package/dist/sources-FTPQFFNW.js +30 -0
  259. package/dist/sources-QNQ6G542.js +491 -0
  260. package/dist/stale-ITQGFBIM.js +93 -0
  261. package/dist/status-XBRPJ4K2.js +69 -0
  262. package/dist/stock-NVJJVJHU.js +214 -0
  263. package/dist/studio-PD4VOHWX.js +49 -0
  264. package/dist/sync-DBNMW75Z.js +59 -0
  265. package/dist/sync-definition-2DVZY5BF.js +75 -0
  266. package/dist/tags-3MY3BEYO.js +25 -0
  267. package/dist/tags-HFUEFAZ3.js +194 -0
  268. package/dist/tags-JZZLDVAL.js +26 -0
  269. package/dist/tags-WT4JEJKW.js +25 -0
  270. package/dist/tags-WYXVFNS6.js +25 -0
  271. package/dist/targeting-criteria-XSHY2DFD.js +113 -0
  272. package/dist/targets-7PEAIBIW.js +111 -0
  273. package/dist/testimonials-FISOPTG7.js +32 -0
  274. package/dist/themes-CUDXWVL5.js +103 -0
  275. package/dist/top-companies-W54NEMWC.js +251 -0
  276. package/dist/transcript-SSNS4QFB.js +169 -0
  277. package/dist/translate-FLHWVGGX.js +608 -0
  278. package/dist/triggers-IDAX2LC2.js +149 -0
  279. package/dist/unlink-4T4VDJKZ.js +74 -0
  280. package/dist/unstage-LGI45U54.js +93 -0
  281. package/dist/update-IWH7W6AN.js +194 -0
  282. package/dist/update-JGDBBM3K.js +70 -0
  283. package/dist/update-NF65Y4D5.js +238 -0
  284. package/dist/update-NQJ5Z25G.js +176 -0
  285. package/dist/upload-QMRLYKE3.js +186 -0
  286. package/dist/url-options-GJANKQRI.js +137 -0
  287. package/dist/url-params-3E7UZLDC.js +103 -0
  288. package/dist/validate-TX55AW42.js +181 -0
  289. package/dist/videos-UB7JKFSO.js +41 -0
  290. package/dist/viewer-check-AJS7WL2T.js +90 -0
  291. package/dist/visuals-T3KWSWNY.js +130 -0
  292. package/dist/web-XBZRZCDY.js +234 -0
  293. package/dist/winning-ads-YS6R4XOV.js +88 -0
  294. package/dist/write-commands-NC2MDQGP.js +1556 -0
  295. package/dist/x-LXXN47TR.js +47 -0
  296. package/package.json +1 -1
  297. package/dist/account-RLE73GWJ.js +0 -82
  298. package/dist/account-ZFVU7HUJ.js +0 -84
  299. package/dist/account-reads-YWE43J72.js +0 -231
  300. package/dist/account-users-WJACFDIO.js +0 -70
  301. package/dist/account-writes-VQG2DIL2.js +0 -68
  302. package/dist/accounts-C4TGANEM.js +0 -82
  303. package/dist/accounts-CBUR4HHR.js +0 -571
  304. package/dist/accounts-P6LTLXVK.js +0 -122
  305. package/dist/actions-P3J7B4UP.js +0 -55
  306. package/dist/activecampaign-E7V5ZV2B.js +0 -936
  307. package/dist/ad-group-writes-6NSPVPO2.js +0 -172
  308. package/dist/ad-groups-XPFBEDTX.js +0 -70
  309. package/dist/ad-writes-ZFT6N6L4.js +0 -176
  310. package/dist/add-6CVZINC7.js +0 -663
  311. package/dist/add-GOJRYHKQ.js +0 -109
  312. package/dist/add-NYLSISGS.js +0 -662
  313. package/dist/ads-HMAJV2UN.js +0 -48
  314. package/dist/ads-MF3RBGLM.js +0 -79
  315. package/dist/advertisers-NJVSXQSR.js +0 -155
  316. package/dist/alerts-EDLS5VAU.js +0 -154
  317. package/dist/analytics-57WA66NO.js +0 -2805
  318. package/dist/analytics-HA35G6NL.js +0 -462
  319. package/dist/animate-ELVOWQD4.js +0 -482
  320. package/dist/assign-VDR2DA4U.js +0 -84
  321. package/dist/audience-size-RH3547ZB.js +0 -138
  322. package/dist/audiences-H54RA555.js +0 -280
  323. package/dist/audit-3PVSCSEG.js +0 -156
  324. package/dist/autocomplete-2T77F4RY.js +0 -118
  325. package/dist/avatars-SP774CYD.js +0 -38
  326. package/dist/bid-pricing-VBYSDSEP.js +0 -105
  327. package/dist/brief-Y2XB2R2U.js +0 -512
  328. package/dist/campaign-groups-2NKPOYGS.js +0 -119
  329. package/dist/campaign-writes-5CEFKZV5.js +0 -176
  330. package/dist/campaign-writes-MYPDHTMJ.js +0 -170
  331. package/dist/campaigns-3YN2T46Q.js +0 -111
  332. package/dist/campaigns-444D7YJ7.js +0 -78
  333. package/dist/campaigns-OPRLK7AW.js +0 -194
  334. package/dist/canvas-VGSK3RJU.js +0 -48
  335. package/dist/capabilities-WBJ3XSM4.js +0 -185
  336. package/dist/catalog-QL3SAL67.js +0 -90
  337. package/dist/catalogs-F33HX4RG.js +0 -130
  338. package/dist/changes-RVAJE4O7.js +0 -288
  339. package/dist/chatgpt-GEBWPTMO.js +0 -47
  340. package/dist/chats-GEGKSN2Z.js +0 -730
  341. package/dist/check-XAA3SAZM.js +0 -55
  342. package/dist/chunk-26PCRPMS.js +0 -142
  343. package/dist/chunk-2GAD2YFD.js +0 -86
  344. package/dist/chunk-2VZQG4XE.js +0 -884
  345. package/dist/chunk-36EP3NUV.js +0 -915
  346. package/dist/chunk-37ZFOL3T.js +0 -285
  347. package/dist/chunk-3CSDJ42F.js +0 -374
  348. package/dist/chunk-3OOZHWBQ.js +0 -9127
  349. package/dist/chunk-46T7QB4V.js +0 -547
  350. package/dist/chunk-5FE2YQHG.js +0 -147
  351. package/dist/chunk-5PU6S4HD.js +0 -170
  352. package/dist/chunk-5ZFH74JL.js +0 -89
  353. package/dist/chunk-66FLBIGF.js +0 -405
  354. package/dist/chunk-7FKNMOLI.js +0 -6340
  355. package/dist/chunk-7J2OSQPE.js +0 -411
  356. package/dist/chunk-7YYB62Q6.js +0 -46
  357. package/dist/chunk-ABSCXA3F.js +0 -505
  358. package/dist/chunk-AQGK3JDK.js +0 -3252
  359. package/dist/chunk-AQGK3JDK.js.map +0 -1
  360. package/dist/chunk-B7NURSEQ.js +0 -98
  361. package/dist/chunk-CLDJNSMW.js +0 -423
  362. package/dist/chunk-CLS5IYAM.js +0 -91
  363. package/dist/chunk-CQGA6W4H.js +0 -26
  364. package/dist/chunk-DMH2KAVE.js +0 -749
  365. package/dist/chunk-E2HXOZS7.js +0 -51
  366. package/dist/chunk-FCLELV6X.js +0 -252
  367. package/dist/chunk-FDJBCRJR.js +0 -3378
  368. package/dist/chunk-FJWR6S7B.js +0 -685
  369. package/dist/chunk-GUU4LC7J.js +0 -4650
  370. package/dist/chunk-GUU4LC7J.js.map +0 -1
  371. package/dist/chunk-HNCWQ6AC.js +0 -329
  372. package/dist/chunk-HO4OU5GT.js +0 -152
  373. package/dist/chunk-IHASMZN7.js +0 -604
  374. package/dist/chunk-IN4F63GP.js +0 -163
  375. package/dist/chunk-J25723H5.js +0 -260
  376. package/dist/chunk-J6LXNKSX.js +0 -63
  377. package/dist/chunk-JC2FE6LU.js +0 -175
  378. package/dist/chunk-KAZNPGB5.js +0 -7856
  379. package/dist/chunk-KK6JTXF7.js +0 -723
  380. package/dist/chunk-LBI25Z6J.js +0 -78
  381. package/dist/chunk-LO7ZELHR.js +0 -398
  382. package/dist/chunk-M7B3NIRG.js +0 -550
  383. package/dist/chunk-MMPSEHVM.js +0 -313
  384. package/dist/chunk-MQ7RLOYT.js +0 -303
  385. package/dist/chunk-NNNASQGG.js +0 -262
  386. package/dist/chunk-NPPE7K7H.js +0 -341
  387. package/dist/chunk-NRDQ4OBD.js +0 -197
  388. package/dist/chunk-NRKMVBXE.js +0 -23
  389. package/dist/chunk-O4HYOXFA.js +0 -863
  390. package/dist/chunk-ODZ6UGC6.js +0 -76
  391. package/dist/chunk-OXC5TCEK.js +0 -1577
  392. package/dist/chunk-PJ6E6KNJ.js +0 -1124
  393. package/dist/chunk-PW4ZDUCA.js +0 -337
  394. package/dist/chunk-R2UE6S4P.js +0 -127
  395. package/dist/chunk-R6OOOA57.js +0 -202
  396. package/dist/chunk-RDOTHEEQ.js +0 -155
  397. package/dist/chunk-RGZ2M2WO.js +0 -509
  398. package/dist/chunk-SPOEU6C6.js +0 -103
  399. package/dist/chunk-T3XWTNBE.js +0 -10430
  400. package/dist/chunk-TDWIAG56.js +0 -170
  401. package/dist/chunk-TW5NVMPZ.js +0 -64
  402. package/dist/chunk-TWE44ERO.js +0 -24026
  403. package/dist/chunk-TWE44ERO.js.map +0 -1
  404. package/dist/chunk-UDQ2DIVY.js +0 -479
  405. package/dist/chunk-UKETWBTK.js +0 -430
  406. package/dist/chunk-UTOVJPFC.js +0 -746
  407. package/dist/chunk-V2F4K63W.js +0 -91
  408. package/dist/chunk-V4LQLLV7.js +0 -1862
  409. package/dist/chunk-V52PW3C3.js +0 -732
  410. package/dist/chunk-VDYAVAVS.js +0 -660
  411. package/dist/chunk-XKNKIZ5R.js +0 -1883
  412. package/dist/chunk-Y42IKJUR.js +0 -274
  413. package/dist/chunk-ZG567LXM.js +0 -375
  414. package/dist/chunk-ZKKAPN3K.js +0 -224
  415. package/dist/claim-UN2J6WIO.js +0 -219
  416. package/dist/companies-DBURSUOC.js +0 -37
  417. package/dist/company-SR7U47X4.js +0 -312
  418. package/dist/complete-Z2D6D6IN.js +0 -88
  419. package/dist/connect-VM5MRQFR.js +0 -47
  420. package/dist/conversation-FU6E5YUO.js +0 -101
  421. package/dist/conversion-report-6DLSLJC5.js +0 -130
  422. package/dist/conversion-upload-command-YFMPFAXF.js +0 -459
  423. package/dist/conversion-writes-4H2LTWBX.js +0 -194
  424. package/dist/conversions-5QVJQE2C.js +0 -142
  425. package/dist/conversions-L37NR2WG.js +0 -78
  426. package/dist/create-DB5EHYOM.js +0 -357
  427. package/dist/create-EZC4XAKH.js +0 -220
  428. package/dist/create-FXZG2ZI3.js +0 -191
  429. package/dist/create-FYMLEBHF.js +0 -66
  430. package/dist/creatives-GCQTDOSR.js +0 -236
  431. package/dist/creatives-R4RCETJG.js +0 -48
  432. package/dist/credentials-U7V2CTFO.js +0 -292
  433. package/dist/critique-Q3PS4PEU.js +0 -231
  434. package/dist/crm-D7IVP2KI.js +0 -419
  435. package/dist/crm-GARQADYL.js +0 -328
  436. package/dist/currency-AZLCACYY.js +0 -91
  437. package/dist/customers-EUZBHVYZ.js +0 -70
  438. package/dist/data-JRLTQ2ZL.js +0 -665
  439. package/dist/delete-CR7E46YF.js +0 -61
  440. package/dist/delete-HYRRPAXX.js +0 -72
  441. package/dist/delete-M6HCS4OQ.js +0 -71
  442. package/dist/demographics-CBL4AQWV.js +0 -146
  443. package/dist/discard-JQRZNY3R.js +0 -73
  444. package/dist/discover-KBGB2T4P.js +0 -191
  445. package/dist/domain-4EO4COCL.js +0 -105
  446. package/dist/download-ZNGNRIIX.js +0 -175
  447. package/dist/draft-6MDRVJFE.js +0 -584
  448. package/dist/draft-AWJAXOSR.js +0 -428
  449. package/dist/draft-JMMX67IN.js +0 -340
  450. package/dist/draft-N6DTG4HM.js +0 -643
  451. package/dist/draft-OGECS4GX.js +0 -390
  452. package/dist/draft-OHVPBP4V.js +0 -228
  453. package/dist/experiments-FGIEJZPV.js +0 -242
  454. package/dist/extract-3JRZ7YLD.js +0 -178
  455. package/dist/facets-WMBQMAMN.js +0 -161
  456. package/dist/feedback-P553UQFJ.js +0 -154
  457. package/dist/fetch-TLH7VG4F.js +0 -488
  458. package/dist/fit-7A3GZNZL.js +0 -70
  459. package/dist/flows-SAMB5BZM.js +0 -406
  460. package/dist/forecast-6M43TIGT.js +0 -123
  461. package/dist/forecast-QSYP6Q5B.js +0 -190
  462. package/dist/funnel-BBGXGVSG.js +0 -702
  463. package/dist/generate-JMB22RBM.js +0 -265
  464. package/dist/get-FP7S3HD2.js +0 -115
  465. package/dist/get-W7MYNRX2.js +0 -78
  466. package/dist/google-3FVRLOUG.js +0 -165
  467. package/dist/google-WDW4LTQZ.js +0 -3809
  468. package/dist/google-ads-RSEBUPMP.js +0 -231
  469. package/dist/history-7VIUDUWI.js +0 -204
  470. package/dist/history-VRY2O64B.js +0 -156
  471. package/dist/history-YMFYXCOA.js +0 -109
  472. package/dist/hubspot-V42TIKKP.js +0 -1047
  473. package/dist/ideas-Q6ESJXI2.js +0 -50
  474. package/dist/images-2DWUQNLR.js +0 -92
  475. package/dist/ingest-ST2VZGCW.js +0 -163
  476. package/dist/ingest-YICQAS7O.js +0 -32
  477. package/dist/insights-E3VPRDIZ.js +0 -151
  478. package/dist/inspect-7KMQJF2H.js +0 -39
  479. package/dist/intent-EVNPBRG5.js +0 -97
  480. package/dist/keyword-gap-ANMM2DBE.js +0 -173
  481. package/dist/keyword-metrics-BG7QTPLV.js +0 -235
  482. package/dist/keywords-for-site-ZPI3O7KF.js +0 -135
  483. package/dist/languages-P2SFZMKV.js +0 -41
  484. package/dist/leads-WU4FCHHD.js +0 -138
  485. package/dist/learn-DH7FWTTD.js +0 -214
  486. package/dist/line-item-writes-22LY7PTP.js +0 -213
  487. package/dist/line-items-M3OH3BEA.js +0 -107
  488. package/dist/link-F4JRMM2V.js +0 -71
  489. package/dist/linkedin-OPCIYMY4.js +0 -1517
  490. package/dist/linkedin-person-LZ2J5PUM.js +0 -143
  491. package/dist/list-2BOGETGJ.js +0 -90
  492. package/dist/list-FWJ5PROQ.js +0 -227
  493. package/dist/list-QDNMJ4N2.js +0 -321
  494. package/dist/locations-L2UPXDZF.js +0 -41
  495. package/dist/locations-ZV6EK2BK.js +0 -69
  496. package/dist/log-5HBYAPWG.js +0 -99
  497. package/dist/make-TIEWBNED.js +0 -1392
  498. package/dist/map-LCBLGR6H.js +0 -520
  499. package/dist/mcp-ECZDK7PR.js +0 -1028
  500. package/dist/media-sources-WHP6DDVS.js +0 -35
  501. package/dist/members-4QJ4NFN5.js +0 -51
  502. package/dist/meta-7XENEZST.js +0 -152
  503. package/dist/metrics-KU5HKZTO.js +0 -193
  504. package/dist/models-TVAUSO3P.js +0 -155
  505. package/dist/normalize-7MQY7OFU.js +0 -146
  506. package/dist/options-GVI7MGCY.js +0 -127
  507. package/dist/organization-LIWWTLDN.js +0 -950
  508. package/dist/people-53RA2YV2.js +0 -162
  509. package/dist/people-T5MCOHLG.js +0 -172
  510. package/dist/performance-CSEBHDAH.js +0 -6361
  511. package/dist/performance-YFJOEFIQ.js +0 -29
  512. package/dist/pipedrive-XISQ2EDT.js +0 -534
  513. package/dist/pixels-NGCNKAV5.js +0 -62
  514. package/dist/preview-6GOFEE53.js +0 -151
  515. package/dist/promoted-tweet-writes-QU2QY2LD.js +0 -185
  516. package/dist/promoted-tweets-DS3M3EZP.js +0 -119
  517. package/dist/publish-CA2H6ZFM.js +0 -431
  518. package/dist/query-B6PJNOJR.js +0 -68
  519. package/dist/reddit-E4XVRGY3.js +0 -31
  520. package/dist/refresh-Q4X32QZ5.js +0 -101
  521. package/dist/release-IOKAJJAG.js +0 -67
  522. package/dist/relevant-pages-PWVMSEEY.js +0 -101
  523. package/dist/remove-VWUW3G2H.js +0 -55
  524. package/dist/reopen-35JFBIJH.js +0 -70
  525. package/dist/rerun-6BMX5OGY.js +0 -102
  526. package/dist/research-5LQIXWT5.js +0 -78
  527. package/dist/research-C7MLB4GD.js +0 -267
  528. package/dist/reset-7OVJE4VP.js +0 -59
  529. package/dist/reset-JIG6DVMC.js +0 -59
  530. package/dist/resolve-53VNKAIE.js +0 -126
  531. package/dist/retry-AJQA4NS6.js +0 -67
  532. package/dist/retry-C2KA32FO.js +0 -67
  533. package/dist/revenue-YHHS334Q.js +0 -100
  534. package/dist/rules-O4AFVB5T.js +0 -164
  535. package/dist/run-CJV4IMUK.js +0 -79
  536. package/dist/run-YBR5DEXL.js +0 -74
  537. package/dist/scaffold-ad-S77BNZNO.js +0 -1604
  538. package/dist/scaffold-static-ad-RKIPMT3C.js +0 -999
  539. package/dist/scaffold-video-Z6KVVMRZ.js +0 -890
  540. package/dist/schedule-LQ3MGDUB.js +0 -66
  541. package/dist/scheduled-agents-Y74VUWHM.js +0 -59
  542. package/dist/schema-QY7GVP64.js +0 -241
  543. package/dist/schema-VFA7XDIJ.js +0 -137
  544. package/dist/search-K2UGFDNL.js +0 -230
  545. package/dist/search-terms-GSPUCEUQ.js +0 -413
  546. package/dist/select-Q75CYXUD.js +0 -135
  547. package/dist/set-VHE7IBC5.js +0 -287
  548. package/dist/set-prompt-RDHWHIIA.js +0 -205
  549. package/dist/setup-links-UK76TGP7.js +0 -146
  550. package/dist/shopify-N22Z2LH7.js +0 -4034
  551. package/dist/site-PX2UP6WJ.js +0 -182
  552. package/dist/sources-W3DYPF7P.js +0 -491
  553. package/dist/sources-XWQMCQKM.js +0 -30
  554. package/dist/stale-LUUDQKHB.js +0 -93
  555. package/dist/status-JKVA6RFG.js +0 -69
  556. package/dist/stock-K24GSGUX.js +0 -214
  557. package/dist/studio-EPR755MN.js +0 -49
  558. package/dist/sync-FA6XW6QW.js +0 -59
  559. package/dist/sync-definition-3ZO3IMHB.js +0 -75
  560. package/dist/tags-IH4JQLOQ.js +0 -194
  561. package/dist/tags-MZI4AUFX.js +0 -25
  562. package/dist/tags-NNQ7ZIFO.js +0 -26
  563. package/dist/tags-QLTH4QXC.js +0 -25
  564. package/dist/tags-XSADREK2.js +0 -25
  565. package/dist/targeting-criteria-INSCNLEY.js +0 -113
  566. package/dist/targets-NEHSCYCW.js +0 -111
  567. package/dist/testimonials-A6GO4I6X.js +0 -32
  568. package/dist/themes-BGOWQB5V.js +0 -103
  569. package/dist/top-companies-XE4VQ4AO.js +0 -251
  570. package/dist/transcript-3L3FCPQG.js +0 -169
  571. package/dist/translate-OONH3P2L.js +0 -608
  572. package/dist/triggers-KZBMLFNY.js +0 -149
  573. package/dist/unlink-Z276IDVH.js +0 -74
  574. package/dist/unstage-V2DWN66K.js +0 -93
  575. package/dist/update-F3FGXY2K.js +0 -70
  576. package/dist/update-O5BW3QS5.js +0 -176
  577. package/dist/update-RJD5NYZL.js +0 -238
  578. package/dist/update-WJ5O7ZIC.js +0 -194
  579. package/dist/upload-VPHUD4TJ.js +0 -186
  580. package/dist/url-options-JAXYCQV6.js +0 -137
  581. package/dist/url-params-5DRKMYKX.js +0 -103
  582. package/dist/validate-FCNVFPBX.js +0 -181
  583. package/dist/videos-FW63565A.js +0 -41
  584. package/dist/viewer-check-THQ5IOLQ.js +0 -90
  585. package/dist/visuals-J2I74TLG.js +0 -130
  586. package/dist/web-PEXBI7YS.js +0 -234
  587. package/dist/winning-ads-6FRQSECL.js +0 -88
  588. package/dist/write-commands-FK4NX7Q7.js +0 -1556
  589. package/dist/x-57FGNEPO.js +0 -47
  590. /package/dist/{account-ZFVU7HUJ.js.map → account-TOEH3E4V.js.map} +0 -0
  591. /package/dist/{account-RLE73GWJ.js.map → account-YLJRCKJD.js.map} +0 -0
  592. /package/dist/{account-reads-YWE43J72.js.map → account-reads-QUKBCJ4I.js.map} +0 -0
  593. /package/dist/{account-users-WJACFDIO.js.map → account-users-PRK7NXU4.js.map} +0 -0
  594. /package/dist/{account-writes-VQG2DIL2.js.map → account-writes-WKG326GF.js.map} +0 -0
  595. /package/dist/{accounts-CBUR4HHR.js.map → accounts-HM2MOUCS.js.map} +0 -0
  596. /package/dist/{accounts-P6LTLXVK.js.map → accounts-HYSK5RVA.js.map} +0 -0
  597. /package/dist/{accounts-C4TGANEM.js.map → accounts-VXJACI73.js.map} +0 -0
  598. /package/dist/{actions-P3J7B4UP.js.map → actions-J4X5CD5U.js.map} +0 -0
  599. /package/dist/{activecampaign-E7V5ZV2B.js.map → activecampaign-7E7FKMA2.js.map} +0 -0
  600. /package/dist/{ad-group-writes-6NSPVPO2.js.map → ad-group-writes-7D72YSZ3.js.map} +0 -0
  601. /package/dist/{ad-groups-XPFBEDTX.js.map → ad-groups-RKWIK443.js.map} +0 -0
  602. /package/dist/{ad-writes-ZFT6N6L4.js.map → ad-writes-MVXTFP3G.js.map} +0 -0
  603. /package/dist/{add-6CVZINC7.js.map → add-4EEJRILN.js.map} +0 -0
  604. /package/dist/{add-GOJRYHKQ.js.map → add-CHJQ5W2O.js.map} +0 -0
  605. /package/dist/{add-NYLSISGS.js.map → add-VKDDINLM.js.map} +0 -0
  606. /package/dist/{ads-HMAJV2UN.js.map → ads-IZVXCAGD.js.map} +0 -0
  607. /package/dist/{ads-MF3RBGLM.js.map → ads-OXSPFP7L.js.map} +0 -0
  608. /package/dist/{advertisers-NJVSXQSR.js.map → advertisers-WTKSQCBD.js.map} +0 -0
  609. /package/dist/{alerts-EDLS5VAU.js.map → alerts-RC5HDS3D.js.map} +0 -0
  610. /package/dist/{analytics-HA35G6NL.js.map → analytics-G7WXLSAB.js.map} +0 -0
  611. /package/dist/{analytics-57WA66NO.js.map → analytics-L2HEARYU.js.map} +0 -0
  612. /package/dist/{animate-ELVOWQD4.js.map → animate-M3NETBDU.js.map} +0 -0
  613. /package/dist/{assign-VDR2DA4U.js.map → assign-NPJZFHPC.js.map} +0 -0
  614. /package/dist/{audience-size-RH3547ZB.js.map → audience-size-WKZGMCNU.js.map} +0 -0
  615. /package/dist/{audiences-H54RA555.js.map → audiences-GQ3GFJGU.js.map} +0 -0
  616. /package/dist/{audit-3PVSCSEG.js.map → audit-22DQDYDI.js.map} +0 -0
  617. /package/dist/{autocomplete-2T77F4RY.js.map → autocomplete-YFF4WBEQ.js.map} +0 -0
  618. /package/dist/{avatars-SP774CYD.js.map → avatars-NLNOFORD.js.map} +0 -0
  619. /package/dist/{bid-pricing-VBYSDSEP.js.map → bid-pricing-VVNXSHXS.js.map} +0 -0
  620. /package/dist/{brief-Y2XB2R2U.js.map → brief-ZTPOODB7.js.map} +0 -0
  621. /package/dist/{campaign-groups-2NKPOYGS.js.map → campaign-groups-TUDQ27PF.js.map} +0 -0
  622. /package/dist/{campaign-writes-MYPDHTMJ.js.map → campaign-writes-4UXSPUWW.js.map} +0 -0
  623. /package/dist/{campaign-writes-5CEFKZV5.js.map → campaign-writes-IYMSDPNS.js.map} +0 -0
  624. /package/dist/{campaigns-3YN2T46Q.js.map → campaigns-7VPDCXNP.js.map} +0 -0
  625. /package/dist/{campaigns-OPRLK7AW.js.map → campaigns-FNM4TOFC.js.map} +0 -0
  626. /package/dist/{campaigns-444D7YJ7.js.map → campaigns-MRQ6WXG7.js.map} +0 -0
  627. /package/dist/{canvas-VGSK3RJU.js.map → canvas-SRHL5ZHR.js.map} +0 -0
  628. /package/dist/{capabilities-WBJ3XSM4.js.map → capabilities-42OXSLHU.js.map} +0 -0
  629. /package/dist/{catalog-QL3SAL67.js.map → catalog-F3HNLFJH.js.map} +0 -0
  630. /package/dist/{catalogs-F33HX4RG.js.map → catalogs-HW3VY4KU.js.map} +0 -0
  631. /package/dist/{changes-RVAJE4O7.js.map → changes-6OHBEPGF.js.map} +0 -0
  632. /package/dist/{chatgpt-GEBWPTMO.js.map → chatgpt-2UCND7NY.js.map} +0 -0
  633. /package/dist/{chats-GEGKSN2Z.js.map → chats-5UPQ6F34.js.map} +0 -0
  634. /package/dist/{check-XAA3SAZM.js.map → check-5KREXPY7.js.map} +0 -0
  635. /package/dist/{chunk-RDOTHEEQ.js.map → chunk-26BRCSWQ.js.map} +0 -0
  636. /package/dist/{chunk-66FLBIGF.js.map → chunk-3HF745ZU.js.map} +0 -0
  637. /package/dist/{chunk-LBI25Z6J.js.map → chunk-3HKFU57Z.js.map} +0 -0
  638. /package/dist/{chunk-TW5NVMPZ.js.map → chunk-3UZA2TVE.js.map} +0 -0
  639. /package/dist/{chunk-IHASMZN7.js.map → chunk-3Z3DQD3S.js.map} +0 -0
  640. /package/dist/{chunk-ZG567LXM.js.map → chunk-4J7GY4V4.js.map} +0 -0
  641. /package/dist/{chunk-TDWIAG56.js.map → chunk-4SYBNYE2.js.map} +0 -0
  642. /package/dist/{chunk-VDYAVAVS.js.map → chunk-4VRVRA3E.js.map} +0 -0
  643. /package/dist/{chunk-O4HYOXFA.js.map → chunk-5SCUCAPZ.js.map} +0 -0
  644. /package/dist/{chunk-2GAD2YFD.js.map → chunk-5VGV7WYL.js.map} +0 -0
  645. /package/dist/{chunk-J6LXNKSX.js.map → chunk-655LRQK3.js.map} +0 -0
  646. /package/dist/{chunk-CQGA6W4H.js.map → chunk-6FXEUO2G.js.map} +0 -0
  647. /package/dist/{chunk-FDJBCRJR.js.map → chunk-6U5P7U2K.js.map} +0 -0
  648. /package/dist/{chunk-KAZNPGB5.js.map → chunk-7KVXTJNE.js.map} +0 -0
  649. /package/dist/{chunk-T3XWTNBE.js.map → chunk-7NKF4JLL.js.map} +0 -0
  650. /package/dist/{chunk-UTOVJPFC.js.map → chunk-AK3TLOI2.js.map} +0 -0
  651. /package/dist/{chunk-B7NURSEQ.js.map → chunk-B55CVNVK.js.map} +0 -0
  652. /package/dist/{chunk-NNNASQGG.js.map → chunk-BMCISGEJ.js.map} +0 -0
  653. /package/dist/{chunk-MQ7RLOYT.js.map → chunk-BMNC4WMK.js.map} +0 -0
  654. /package/dist/{chunk-SPOEU6C6.js.map → chunk-BU5M3VGB.js.map} +0 -0
  655. /package/dist/{chunk-UKETWBTK.js.map → chunk-C6HUH6FG.js.map} +0 -0
  656. /package/dist/{chunk-7FKNMOLI.js.map → chunk-CF22TBGU.js.map} +0 -0
  657. /package/dist/{chunk-V2F4K63W.js.map → chunk-CFZDQED4.js.map} +0 -0
  658. /package/dist/{chunk-J25723H5.js.map → chunk-CRJKO2GW.js.map} +0 -0
  659. /package/dist/{chunk-FJWR6S7B.js.map → chunk-CXUWSUPP.js.map} +0 -0
  660. /package/dist/{chunk-7YYB62Q6.js.map → chunk-CXVNM264.js.map} +0 -0
  661. /package/dist/{chunk-36EP3NUV.js.map → chunk-D5VJDPVW.js.map} +0 -0
  662. /package/dist/{chunk-Y42IKJUR.js.map → chunk-EJRVEUZW.js.map} +0 -0
  663. /package/dist/{chunk-7J2OSQPE.js.map → chunk-FRSG3BBL.js.map} +0 -0
  664. /package/dist/{chunk-KK6JTXF7.js.map → chunk-GWMIDTCA.js.map} +0 -0
  665. /package/dist/{chunk-5ZFH74JL.js.map → chunk-HPCP3RIC.js.map} +0 -0
  666. /package/dist/{chunk-PJ6E6KNJ.js.map → chunk-HQGQW37N.js.map} +0 -0
  667. /package/dist/{chunk-HNCWQ6AC.js.map → chunk-HRS4W6A7.js.map} +0 -0
  668. /package/dist/{chunk-CLS5IYAM.js.map → chunk-ID2ULDOJ.js.map} +0 -0
  669. /package/dist/{chunk-UDQ2DIVY.js.map → chunk-KOF2WH6V.js.map} +0 -0
  670. /package/dist/{chunk-E2HXOZS7.js.map → chunk-LBN6JRAN.js.map} +0 -0
  671. /package/dist/{chunk-2VZQG4XE.js.map → chunk-LGY43BST.js.map} +0 -0
  672. /package/dist/{chunk-JC2FE6LU.js.map → chunk-LQPWLCPL.js.map} +0 -0
  673. /package/dist/{chunk-LO7ZELHR.js.map → chunk-MOOTQZZB.js.map} +0 -0
  674. /package/dist/{chunk-M7B3NIRG.js.map → chunk-MV2HPZMW.js.map} +0 -0
  675. /package/dist/{chunk-DMH2KAVE.js.map → chunk-MVNXGETW.js.map} +0 -0
  676. /package/dist/{chunk-XKNKIZ5R.js.map → chunk-NB5OR67T.js.map} +0 -0
  677. /package/dist/{chunk-ABSCXA3F.js.map → chunk-NESWSXLV.js.map} +0 -0
  678. /package/dist/{chunk-PW4ZDUCA.js.map → chunk-NF5D3VYI.js.map} +0 -0
  679. /package/dist/{chunk-ODZ6UGC6.js.map → chunk-NGYRPA7Y.js.map} +0 -0
  680. /package/dist/{chunk-3OOZHWBQ.js.map → chunk-OE57TJBJ.js.map} +0 -0
  681. /package/dist/{chunk-OXC5TCEK.js.map → chunk-OGG7DKN5.js.map} +0 -0
  682. /package/dist/{chunk-FCLELV6X.js.map → chunk-ONHHXBOH.js.map} +0 -0
  683. /package/dist/{chunk-NRKMVBXE.js.map → chunk-ORKQSFNI.js.map} +0 -0
  684. /package/dist/{chunk-37ZFOL3T.js.map → chunk-OXYSXFF3.js.map} +0 -0
  685. /package/dist/{chunk-MMPSEHVM.js.map → chunk-QI6ALVEZ.js.map} +0 -0
  686. /package/dist/{chunk-ZKKAPN3K.js.map → chunk-QPLB53AQ.js.map} +0 -0
  687. /package/dist/{chunk-R6OOOA57.js.map → chunk-RRSGZYWO.js.map} +0 -0
  688. /package/dist/{chunk-46T7QB4V.js.map → chunk-S4S54FZU.js.map} +0 -0
  689. /package/dist/{chunk-26PCRPMS.js.map → chunk-TGEE6G6J.js.map} +0 -0
  690. /package/dist/{chunk-NPPE7K7H.js.map → chunk-U72TSCKL.js.map} +0 -0
  691. /package/dist/{chunk-V52PW3C3.js.map → chunk-UOWPRJIX.js.map} +0 -0
  692. /package/dist/{chunk-5PU6S4HD.js.map → chunk-W736BTE7.js.map} +0 -0
  693. /package/dist/{chunk-V4LQLLV7.js.map → chunk-WDC5L2T6.js.map} +0 -0
  694. /package/dist/{chunk-5FE2YQHG.js.map → chunk-WSYTRJN7.js.map} +0 -0
  695. /package/dist/{chunk-IN4F63GP.js.map → chunk-XDOF4LGD.js.map} +0 -0
  696. /package/dist/{chunk-NRDQ4OBD.js.map → chunk-XHTFXA2A.js.map} +0 -0
  697. /package/dist/{chunk-3CSDJ42F.js.map → chunk-XKLJPKZA.js.map} +0 -0
  698. /package/dist/{chunk-CLDJNSMW.js.map → chunk-XLCLPLMB.js.map} +0 -0
  699. /package/dist/{chunk-RGZ2M2WO.js.map → chunk-XPHCG2JN.js.map} +0 -0
  700. /package/dist/{chunk-R2UE6S4P.js.map → chunk-ZIJFBEFI.js.map} +0 -0
  701. /package/dist/{chunk-HO4OU5GT.js.map → chunk-ZRYKGLSY.js.map} +0 -0
  702. /package/dist/{claim-UN2J6WIO.js.map → claim-HB7CBTJH.js.map} +0 -0
  703. /package/dist/{companies-DBURSUOC.js.map → companies-HKMERSJP.js.map} +0 -0
  704. /package/dist/{company-SR7U47X4.js.map → company-PGWIDFMQ.js.map} +0 -0
  705. /package/dist/{complete-Z2D6D6IN.js.map → complete-RMJYSYOL.js.map} +0 -0
  706. /package/dist/{connect-VM5MRQFR.js.map → connect-2KDGUVY5.js.map} +0 -0
  707. /package/dist/{conversation-FU6E5YUO.js.map → conversation-VDRLFRMI.js.map} +0 -0
  708. /package/dist/{conversion-report-6DLSLJC5.js.map → conversion-report-RJ5Z6JDW.js.map} +0 -0
  709. /package/dist/{conversion-upload-command-YFMPFAXF.js.map → conversion-upload-command-TCMORMHM.js.map} +0 -0
  710. /package/dist/{conversion-writes-4H2LTWBX.js.map → conversion-writes-LYZFMH5I.js.map} +0 -0
  711. /package/dist/{conversions-5QVJQE2C.js.map → conversions-ANAJMGHI.js.map} +0 -0
  712. /package/dist/{conversions-L37NR2WG.js.map → conversions-ZLBWAXLT.js.map} +0 -0
  713. /package/dist/{create-FYMLEBHF.js.map → create-7R6W42ZB.js.map} +0 -0
  714. /package/dist/{create-FXZG2ZI3.js.map → create-CPYP5LGS.js.map} +0 -0
  715. /package/dist/{create-EZC4XAKH.js.map → create-H43T7PXI.js.map} +0 -0
  716. /package/dist/{create-DB5EHYOM.js.map → create-QCCLMAPL.js.map} +0 -0
  717. /package/dist/{creatives-R4RCETJG.js.map → creatives-HMFAG44S.js.map} +0 -0
  718. /package/dist/{creatives-GCQTDOSR.js.map → creatives-PDDLZQHU.js.map} +0 -0
  719. /package/dist/{credentials-U7V2CTFO.js.map → credentials-CWBYEI5M.js.map} +0 -0
  720. /package/dist/{critique-Q3PS4PEU.js.map → critique-5FZ35QNP.js.map} +0 -0
  721. /package/dist/{crm-GARQADYL.js.map → crm-NZHLWC3H.js.map} +0 -0
  722. /package/dist/{crm-D7IVP2KI.js.map → crm-STN3YKV5.js.map} +0 -0
  723. /package/dist/{currency-AZLCACYY.js.map → currency-DMVRKQRJ.js.map} +0 -0
  724. /package/dist/{customers-EUZBHVYZ.js.map → customers-JMKJA4LI.js.map} +0 -0
  725. /package/dist/{data-JRLTQ2ZL.js.map → data-CIPG3EOP.js.map} +0 -0
  726. /package/dist/{delete-HYRRPAXX.js.map → delete-DAMPOWQV.js.map} +0 -0
  727. /package/dist/{delete-M6HCS4OQ.js.map → delete-VC4XSYJ6.js.map} +0 -0
  728. /package/dist/{delete-CR7E46YF.js.map → delete-VNITJJCY.js.map} +0 -0
  729. /package/dist/{demographics-CBL4AQWV.js.map → demographics-6QTIHC22.js.map} +0 -0
  730. /package/dist/{discard-JQRZNY3R.js.map → discard-6JBN263B.js.map} +0 -0
  731. /package/dist/{discover-KBGB2T4P.js.map → discover-MXXNEDJC.js.map} +0 -0
  732. /package/dist/{domain-4EO4COCL.js.map → domain-X2CHPUEN.js.map} +0 -0
  733. /package/dist/{download-ZNGNRIIX.js.map → download-EFRVIWUQ.js.map} +0 -0
  734. /package/dist/{draft-OGECS4GX.js.map → draft-3TU2DOG4.js.map} +0 -0
  735. /package/dist/{draft-JMMX67IN.js.map → draft-7QREAYBZ.js.map} +0 -0
  736. /package/dist/{draft-N6DTG4HM.js.map → draft-GGCV5MUR.js.map} +0 -0
  737. /package/dist/{draft-6MDRVJFE.js.map → draft-GGQKDNLL.js.map} +0 -0
  738. /package/dist/{draft-OHVPBP4V.js.map → draft-LXNUTJCQ.js.map} +0 -0
  739. /package/dist/{draft-AWJAXOSR.js.map → draft-PDUPYLHU.js.map} +0 -0
  740. /package/dist/{experiments-FGIEJZPV.js.map → experiments-327DBJOV.js.map} +0 -0
  741. /package/dist/{extract-3JRZ7YLD.js.map → extract-RT7UACSI.js.map} +0 -0
  742. /package/dist/{facets-WMBQMAMN.js.map → facets-DOAWYVYW.js.map} +0 -0
  743. /package/dist/{feedback-P553UQFJ.js.map → feedback-VSKQVHQT.js.map} +0 -0
  744. /package/dist/{fetch-TLH7VG4F.js.map → fetch-7ZYOMTQT.js.map} +0 -0
  745. /package/dist/{fit-7A3GZNZL.js.map → fit-M6X35XGV.js.map} +0 -0
  746. /package/dist/{flows-SAMB5BZM.js.map → flows-ZTK45AAV.js.map} +0 -0
  747. /package/dist/{forecast-6M43TIGT.js.map → forecast-DR3XIMIX.js.map} +0 -0
  748. /package/dist/{forecast-QSYP6Q5B.js.map → forecast-F4HFL5V2.js.map} +0 -0
  749. /package/dist/{funnel-BBGXGVSG.js.map → funnel-UOUUAU3D.js.map} +0 -0
  750. /package/dist/{generate-JMB22RBM.js.map → generate-DWAKBRQJ.js.map} +0 -0
  751. /package/dist/{get-W7MYNRX2.js.map → get-H4O2BE3W.js.map} +0 -0
  752. /package/dist/{get-FP7S3HD2.js.map → get-SNNCIKBO.js.map} +0 -0
  753. /package/dist/{google-WDW4LTQZ.js.map → google-EF34XOH6.js.map} +0 -0
  754. /package/dist/{google-3FVRLOUG.js.map → google-EQTWYOMA.js.map} +0 -0
  755. /package/dist/{google-ads-RSEBUPMP.js.map → google-ads-WQMWXVEI.js.map} +0 -0
  756. /package/dist/{history-VRY2O64B.js.map → history-U2ZXDZBP.js.map} +0 -0
  757. /package/dist/{history-7VIUDUWI.js.map → history-XRSQD2R7.js.map} +0 -0
  758. /package/dist/{history-YMFYXCOA.js.map → history-Y5S4LPC7.js.map} +0 -0
  759. /package/dist/{hubspot-V42TIKKP.js.map → hubspot-MIKWDLVS.js.map} +0 -0
  760. /package/dist/{ideas-Q6ESJXI2.js.map → ideas-QL7DO5FR.js.map} +0 -0
  761. /package/dist/{images-2DWUQNLR.js.map → images-U3UK3W5X.js.map} +0 -0
  762. /package/dist/{ingest-ST2VZGCW.js.map → ingest-E6NA6MLE.js.map} +0 -0
  763. /package/dist/{ingest-YICQAS7O.js.map → ingest-PDCY7GTG.js.map} +0 -0
  764. /package/dist/{insights-E3VPRDIZ.js.map → insights-53JGBSF7.js.map} +0 -0
  765. /package/dist/{inspect-7KMQJF2H.js.map → inspect-2SC5HQO4.js.map} +0 -0
  766. /package/dist/{intent-EVNPBRG5.js.map → intent-RCDG2YEC.js.map} +0 -0
  767. /package/dist/{keyword-gap-ANMM2DBE.js.map → keyword-gap-RS234V7N.js.map} +0 -0
  768. /package/dist/{keyword-metrics-BG7QTPLV.js.map → keyword-metrics-PTGZNTVE.js.map} +0 -0
  769. /package/dist/{keywords-for-site-ZPI3O7KF.js.map → keywords-for-site-HPBUYQAE.js.map} +0 -0
  770. /package/dist/{languages-P2SFZMKV.js.map → languages-EHVUCBTM.js.map} +0 -0
  771. /package/dist/{leads-WU4FCHHD.js.map → leads-Q7FG7CDN.js.map} +0 -0
  772. /package/dist/{learn-DH7FWTTD.js.map → learn-WN54VXO6.js.map} +0 -0
  773. /package/dist/{line-item-writes-22LY7PTP.js.map → line-item-writes-ISLEC7ZN.js.map} +0 -0
  774. /package/dist/{line-items-M3OH3BEA.js.map → line-items-NRZ24KDM.js.map} +0 -0
  775. /package/dist/{link-F4JRMM2V.js.map → link-RGLL45F5.js.map} +0 -0
  776. /package/dist/{linkedin-OPCIYMY4.js.map → linkedin-XBQMI42D.js.map} +0 -0
  777. /package/dist/{linkedin-person-LZ2J5PUM.js.map → linkedin-person-3DPYF6L6.js.map} +0 -0
  778. /package/dist/{list-QDNMJ4N2.js.map → list-533GIXG7.js.map} +0 -0
  779. /package/dist/{list-2BOGETGJ.js.map → list-FZ4NFRRR.js.map} +0 -0
  780. /package/dist/{list-FWJ5PROQ.js.map → list-RWQLAWO3.js.map} +0 -0
  781. /package/dist/{locations-L2UPXDZF.js.map → locations-2NEDMFS5.js.map} +0 -0
  782. /package/dist/{locations-ZV6EK2BK.js.map → locations-RHTUYWMC.js.map} +0 -0
  783. /package/dist/{log-5HBYAPWG.js.map → log-IFLF3DZZ.js.map} +0 -0
  784. /package/dist/{make-TIEWBNED.js.map → make-DDMTAGUB.js.map} +0 -0
  785. /package/dist/{map-LCBLGR6H.js.map → map-O37XED7M.js.map} +0 -0
  786. /package/dist/{mcp-ECZDK7PR.js.map → mcp-MZ3HVDYY.js.map} +0 -0
  787. /package/dist/{media-sources-WHP6DDVS.js.map → media-sources-52FXNGXC.js.map} +0 -0
  788. /package/dist/{members-4QJ4NFN5.js.map → members-PDYPCF27.js.map} +0 -0
  789. /package/dist/{meta-7XENEZST.js.map → meta-HK5PYNRM.js.map} +0 -0
  790. /package/dist/{metrics-KU5HKZTO.js.map → metrics-TSRFLNLI.js.map} +0 -0
  791. /package/dist/{models-TVAUSO3P.js.map → models-DV4G4A2W.js.map} +0 -0
  792. /package/dist/{normalize-7MQY7OFU.js.map → normalize-ONUJO2N4.js.map} +0 -0
  793. /package/dist/{options-GVI7MGCY.js.map → options-K3N7JI4H.js.map} +0 -0
  794. /package/dist/{organization-LIWWTLDN.js.map → organization-RDZ4FOC4.js.map} +0 -0
  795. /package/dist/{people-53RA2YV2.js.map → people-NR7JT5VV.js.map} +0 -0
  796. /package/dist/{people-T5MCOHLG.js.map → people-RWHZBUJU.js.map} +0 -0
  797. /package/dist/{performance-CSEBHDAH.js.map → performance-UABHGDYV.js.map} +0 -0
  798. /package/dist/{performance-YFJOEFIQ.js.map → performance-XIZ43WKC.js.map} +0 -0
  799. /package/dist/{pipedrive-XISQ2EDT.js.map → pipedrive-IDA44I2X.js.map} +0 -0
  800. /package/dist/{pixels-NGCNKAV5.js.map → pixels-T73SVZ4G.js.map} +0 -0
  801. /package/dist/{preview-6GOFEE53.js.map → preview-PM3SAC4G.js.map} +0 -0
  802. /package/dist/{promoted-tweet-writes-QU2QY2LD.js.map → promoted-tweet-writes-GW7G3WN5.js.map} +0 -0
  803. /package/dist/{promoted-tweets-DS3M3EZP.js.map → promoted-tweets-A4BD3ZMR.js.map} +0 -0
  804. /package/dist/{publish-CA2H6ZFM.js.map → publish-XGJXWQM3.js.map} +0 -0
  805. /package/dist/{query-B6PJNOJR.js.map → query-SG6ILF5G.js.map} +0 -0
  806. /package/dist/{reddit-E4XVRGY3.js.map → reddit-VVKTK7DX.js.map} +0 -0
  807. /package/dist/{refresh-Q4X32QZ5.js.map → refresh-QOA6XQ65.js.map} +0 -0
  808. /package/dist/{release-IOKAJJAG.js.map → release-5ZIDVDEO.js.map} +0 -0
  809. /package/dist/{relevant-pages-PWVMSEEY.js.map → relevant-pages-CFBI4BIH.js.map} +0 -0
  810. /package/dist/{remove-VWUW3G2H.js.map → remove-2YY2CCVU.js.map} +0 -0
  811. /package/dist/{reopen-35JFBIJH.js.map → reopen-LKJUT6M2.js.map} +0 -0
  812. /package/dist/{rerun-6BMX5OGY.js.map → rerun-RPS5GK62.js.map} +0 -0
  813. /package/dist/{research-C7MLB4GD.js.map → research-6WCBKLTG.js.map} +0 -0
  814. /package/dist/{research-5LQIXWT5.js.map → research-EDTPCX3O.js.map} +0 -0
  815. /package/dist/{reset-7OVJE4VP.js.map → reset-J33M64KW.js.map} +0 -0
  816. /package/dist/{reset-JIG6DVMC.js.map → reset-MUH7FKOG.js.map} +0 -0
  817. /package/dist/{resolve-53VNKAIE.js.map → resolve-5HZJEXLJ.js.map} +0 -0
  818. /package/dist/{retry-C2KA32FO.js.map → retry-32GYJQAF.js.map} +0 -0
  819. /package/dist/{retry-AJQA4NS6.js.map → retry-ZHRDMM4Y.js.map} +0 -0
  820. /package/dist/{revenue-YHHS334Q.js.map → revenue-IRF25ISM.js.map} +0 -0
  821. /package/dist/{rules-O4AFVB5T.js.map → rules-BUPUJ556.js.map} +0 -0
  822. /package/dist/{run-YBR5DEXL.js.map → run-55JPIRYI.js.map} +0 -0
  823. /package/dist/{run-CJV4IMUK.js.map → run-Y2RXME5N.js.map} +0 -0
  824. /package/dist/{scaffold-ad-S77BNZNO.js.map → scaffold-ad-TK6V3TYJ.js.map} +0 -0
  825. /package/dist/{scaffold-static-ad-RKIPMT3C.js.map → scaffold-static-ad-RQXSGRE2.js.map} +0 -0
  826. /package/dist/{scaffold-video-Z6KVVMRZ.js.map → scaffold-video-KTNSYWMY.js.map} +0 -0
  827. /package/dist/{schedule-LQ3MGDUB.js.map → schedule-PVUKPBF7.js.map} +0 -0
  828. /package/dist/{scheduled-agents-Y74VUWHM.js.map → scheduled-agents-J6RTT7HY.js.map} +0 -0
  829. /package/dist/{schema-VFA7XDIJ.js.map → schema-7CKXBHF6.js.map} +0 -0
  830. /package/dist/{schema-QY7GVP64.js.map → schema-RVA6JSZE.js.map} +0 -0
  831. /package/dist/{search-K2UGFDNL.js.map → search-RC57DNMJ.js.map} +0 -0
  832. /package/dist/{search-terms-GSPUCEUQ.js.map → search-terms-2L6UMZCC.js.map} +0 -0
  833. /package/dist/{select-Q75CYXUD.js.map → select-YZWK2TON.js.map} +0 -0
  834. /package/dist/{set-VHE7IBC5.js.map → set-OKT7Q7EC.js.map} +0 -0
  835. /package/dist/{set-prompt-RDHWHIIA.js.map → set-prompt-T6HC54TW.js.map} +0 -0
  836. /package/dist/{setup-links-UK76TGP7.js.map → setup-links-EQ6GH6M5.js.map} +0 -0
  837. /package/dist/{shopify-N22Z2LH7.js.map → shopify-SC35E5P2.js.map} +0 -0
  838. /package/dist/{site-PX2UP6WJ.js.map → site-FZOS2U6Q.js.map} +0 -0
  839. /package/dist/{sources-XWQMCQKM.js.map → sources-FTPQFFNW.js.map} +0 -0
  840. /package/dist/{sources-W3DYPF7P.js.map → sources-QNQ6G542.js.map} +0 -0
  841. /package/dist/{stale-LUUDQKHB.js.map → stale-ITQGFBIM.js.map} +0 -0
  842. /package/dist/{status-JKVA6RFG.js.map → status-XBRPJ4K2.js.map} +0 -0
  843. /package/dist/{stock-K24GSGUX.js.map → stock-NVJJVJHU.js.map} +0 -0
  844. /package/dist/{studio-EPR755MN.js.map → studio-PD4VOHWX.js.map} +0 -0
  845. /package/dist/{sync-FA6XW6QW.js.map → sync-DBNMW75Z.js.map} +0 -0
  846. /package/dist/{sync-definition-3ZO3IMHB.js.map → sync-definition-2DVZY5BF.js.map} +0 -0
  847. /package/dist/{tags-XSADREK2.js.map → tags-3MY3BEYO.js.map} +0 -0
  848. /package/dist/{tags-IH4JQLOQ.js.map → tags-HFUEFAZ3.js.map} +0 -0
  849. /package/dist/{tags-NNQ7ZIFO.js.map → tags-JZZLDVAL.js.map} +0 -0
  850. /package/dist/{tags-QLTH4QXC.js.map → tags-WT4JEJKW.js.map} +0 -0
  851. /package/dist/{tags-MZI4AUFX.js.map → tags-WYXVFNS6.js.map} +0 -0
  852. /package/dist/{targeting-criteria-INSCNLEY.js.map → targeting-criteria-XSHY2DFD.js.map} +0 -0
  853. /package/dist/{targets-NEHSCYCW.js.map → targets-7PEAIBIW.js.map} +0 -0
  854. /package/dist/{testimonials-A6GO4I6X.js.map → testimonials-FISOPTG7.js.map} +0 -0
  855. /package/dist/{themes-BGOWQB5V.js.map → themes-CUDXWVL5.js.map} +0 -0
  856. /package/dist/{top-companies-XE4VQ4AO.js.map → top-companies-W54NEMWC.js.map} +0 -0
  857. /package/dist/{transcript-3L3FCPQG.js.map → transcript-SSNS4QFB.js.map} +0 -0
  858. /package/dist/{translate-OONH3P2L.js.map → translate-FLHWVGGX.js.map} +0 -0
  859. /package/dist/{triggers-KZBMLFNY.js.map → triggers-IDAX2LC2.js.map} +0 -0
  860. /package/dist/{unlink-Z276IDVH.js.map → unlink-4T4VDJKZ.js.map} +0 -0
  861. /package/dist/{unstage-V2DWN66K.js.map → unstage-LGI45U54.js.map} +0 -0
  862. /package/dist/{update-WJ5O7ZIC.js.map → update-IWH7W6AN.js.map} +0 -0
  863. /package/dist/{update-F3FGXY2K.js.map → update-JGDBBM3K.js.map} +0 -0
  864. /package/dist/{update-RJD5NYZL.js.map → update-NF65Y4D5.js.map} +0 -0
  865. /package/dist/{update-O5BW3QS5.js.map → update-NQJ5Z25G.js.map} +0 -0
  866. /package/dist/{upload-VPHUD4TJ.js.map → upload-QMRLYKE3.js.map} +0 -0
  867. /package/dist/{url-options-JAXYCQV6.js.map → url-options-GJANKQRI.js.map} +0 -0
  868. /package/dist/{url-params-5DRKMYKX.js.map → url-params-3E7UZLDC.js.map} +0 -0
  869. /package/dist/{validate-FCNVFPBX.js.map → validate-TX55AW42.js.map} +0 -0
  870. /package/dist/{videos-FW63565A.js.map → videos-UB7JKFSO.js.map} +0 -0
  871. /package/dist/{viewer-check-THQ5IOLQ.js.map → viewer-check-AJS7WL2T.js.map} +0 -0
  872. /package/dist/{visuals-J2I74TLG.js.map → visuals-T3KWSWNY.js.map} +0 -0
  873. /package/dist/{web-PEXBI7YS.js.map → web-XBZRZCDY.js.map} +0 -0
  874. /package/dist/{winning-ads-6FRQSECL.js.map → winning-ads-YS6R4XOV.js.map} +0 -0
  875. /package/dist/{write-commands-FK4NX7Q7.js.map → write-commands-NC2MDQGP.js.map} +0 -0
  876. /package/dist/{x-57FGNEPO.js.map → x-LXXN47TR.js.map} +0 -0
@@ -0,0 +1,1883 @@
1
+ import {
2
+ googlePresetSyncedHint
3
+ } from "./chunk-KZUIVQ52.js";
4
+ import {
5
+ getFieldDescriptions,
6
+ parseCampaignIds
7
+ } from "./chunk-4LP6SOVV.js";
8
+ import {
9
+ LIST_FIELDS,
10
+ NO_OR_EXPLANATION,
11
+ listFieldGuidance,
12
+ parseApiError
13
+ } from "./chunk-5SCUCAPZ.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-MVNXGETW.js";
27
+ import {
28
+ withWindowSpellings
29
+ } from "./chunk-74QGFUZL.js";
30
+ import {
31
+ accountFundsWarnings
32
+ } from "./chunk-4J7GY4V4.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-WTWO46FT.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-NB5OR67T.js.map