cf 1.0.0-beta.1 → 1.0.0-beta.2

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 (350) hide show
  1. package/README.md +11 -0
  2. package/dist/_meta/commands.json +9993 -10535
  3. package/dist/_meta/hand-written-commands.json +515 -0
  4. package/dist/_meta/schemas.json +6429 -7062
  5. package/dist/{abuse-reports-Dd6kJM7r.mjs → abuse-reports-JcwSaW-c.mjs} +11 -11
  6. package/dist/access-B3TvAe5h.mjs +27 -0
  7. package/dist/{account-CZ9SPVdz.mjs → account-CLsfIk5j.mjs} +5 -5
  8. package/dist/{account-tags-DAf-hq1m.mjs → account-tags-BJdDiyDi.mjs} +4 -4
  9. package/dist/{accounts-BDIKjiG2.mjs → accounts-6eXqIqSW.mjs} +59 -59
  10. package/dist/{acm-D-q1FVWJ.mjs → acm-ChNLnPqM.mjs} +3 -3
  11. package/dist/{addressing-0w2U1NEy.mjs → addressing-z8ei_TCh.mjs} +49 -49
  12. package/dist/agent-context-GRiQ4zRU.mjs +2 -0
  13. package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-Un0usAVF.mjs} +15 -15
  14. package/dist/{ai-ARwLeQ1O.mjs → ai-Bj8kgDf7.mjs} +14 -14
  15. package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-FR6QuDK_.mjs} +1 -1
  16. package/dist/{ai-gateway-DNY4FPF2.mjs → ai-gateway-DrQhTvKf.mjs} +68 -68
  17. package/dist/{ai-search-B5l4IDSR.mjs → ai-search-BvMeOKK6.mjs} +37 -37
  18. package/dist/{ai-security-C7_IGDDl.mjs → ai-security-BHvDKoM1.mjs} +1 -1
  19. package/dist/{alerting-B6m1Rhf4.mjs → alerting-DmRZCAjg.mjs} +26 -26
  20. package/dist/{analytics-nnzFBB_7.mjs → analytics-DqidJ4qc.mjs} +9 -9
  21. package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-I7N0I6yP.mjs} +2 -2
  22. package/dist/{api-security-B9IozS2a.mjs → api-security-BMNhdDyR.mjs} +61 -61
  23. package/dist/{argo-C_QcqR6P.mjs → argo-U5TIBcub.mjs} +1 -1
  24. package/dist/args-CXgkQKK7.mjs +2 -0
  25. package/dist/{artifacts-DDFNpYBz.mjs → artifacts-Byw1W73U.mjs} +20 -20
  26. package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-C6zyFeKM.mjs} +2 -2
  27. package/dist/auth-B5p3SIhO.mjs +8 -0
  28. package/dist/auth-CosaKfuk.mjs +2 -0
  29. package/dist/autoconfig-DED3bWob.mjs +511 -0
  30. package/dist/banner-Xk4xBN8U.mjs +2 -0
  31. package/dist/{billing-DU2X-q-x.mjs → billing-BS1raRJt.mjs} +10 -10
  32. package/dist/{bot-management-BHAAoZOh.mjs → bot-management-Cn6xfGzJ.mjs} +1 -1
  33. package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-DtWOPNfw.mjs} +5 -5
  34. package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-BcEQ66bT.mjs} +13 -13
  35. package/dist/browser-extension-D_siSsD9.mjs +2 -0
  36. package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-RZ7ZPRop.mjs} +23 -23
  37. package/dist/build-DG8NfVjJ.mjs +2 -0
  38. package/dist/build-kgS7iKwi.mjs +2 -0
  39. package/dist/{builds-CO0MmSd3.mjs → builds-AOCMH4CE.mjs} +31 -31
  40. package/dist/{cache-XxusQxXe.mjs → cache-D_EBxDff.mjs} +1 -1
  41. package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-B6rtjuaT.mjs} +1 -1
  42. package/dist/cf--3tGe71B.mjs +18 -0
  43. package/dist/chunk-M77HNR46-BqG3fjQz.mjs +2 -0
  44. package/dist/chunk-RV27PEH3-C8_6bMgi.mjs +97 -0
  45. package/dist/chunk-U6NEESU5-CAnOLcsu.mjs +2 -0
  46. package/dist/chunk-WMOON6TZ-D3H84qpM.mjs +2 -0
  47. package/dist/cli-Ct980dyx.mjs +3 -0
  48. package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
  49. package/dist/client-certificates-uBOjGcgo.mjs +13 -0
  50. package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-Bm7JwGaG.mjs} +1 -1
  51. package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-69M2Dx8h.mjs} +1 -1
  52. package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-Ba5LySkU.mjs} +1 -1
  53. package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-Xn2mlAPv.mjs} +214 -214
  54. package/dist/command-B7SzqjQM.mjs +2 -0
  55. package/dist/command-BLHcNQ8m.mjs +2 -0
  56. package/dist/{command-RiZ_LYcm.mjs → command-BxQbIQWT.mjs} +1 -1
  57. package/dist/command-C0SMCHZp.mjs +2 -0
  58. package/dist/command-CE8k5TuK.mjs +2 -0
  59. package/dist/command-CPiCDUth.mjs +2 -0
  60. package/dist/command-Cb0pS8T5.mjs +2 -0
  61. package/dist/command-Cz_bKDWf.mjs +2 -0
  62. package/dist/command-DCpX9Cem.mjs +2 -0
  63. package/dist/command-DEC5PwJo.mjs +2 -0
  64. package/dist/command-DHjsstFb.mjs +2 -0
  65. package/dist/command-MTUsmZU5.mjs +2 -0
  66. package/dist/command-Sb9lOxWT.mjs +2 -0
  67. package/dist/command-sQ8yswii.mjs +2 -0
  68. package/dist/{completions-xPLd1cvL.mjs → completions-DZDltM9V.mjs} +3 -3
  69. package/dist/{config-B4vIa0zp.mjs → config-DcppJ5D2.mjs} +1 -1
  70. package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-DTy6laab.mjs} +3 -3
  71. package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-CJqGGvFJ.mjs} +3 -3
  72. package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-BPxhPhr6.mjs} +3 -3
  73. package/dist/{connectors-BhvAP5fb.mjs → connectors-CdfCcZuA.mjs} +7 -7
  74. package/dist/{containers-Cq1gtnq6.mjs → containers-C7z53QcY.mjs} +86 -86
  75. package/dist/{containers-Bl3EY-cy.mjs → containers-VMqcxH5a.mjs} +17 -17
  76. package/dist/{content-scan-BYGe9fFj.mjs → content-scan-BirgZrmr.mjs} +1 -1
  77. package/dist/context-Dzzbc9RK.mjs +7 -0
  78. package/dist/{cps-BWMDWeVq.mjs → cps-DzFm3zKp.mjs} +1 -1
  79. package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-D2_OO5-1.mjs} +1 -1
  80. package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-B7wQkFVl.mjs} +1 -1
  81. package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-BKcCfbH8.mjs} +4 -4
  82. package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-CXoOxir4.mjs} +5 -5
  83. package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-CNYfnCOd.mjs} +6 -6
  84. package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-BlLM7a4L.mjs} +5 -5
  85. package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-BcWoypet.mjs} +10 -10
  86. package/dist/{d1-C1GK7DsW.mjs → d1-CvrHsqYY.mjs} +14 -14
  87. package/dist/{data-security-DDhPnX8Z.mjs → data-security-BxzLSdGk.mjs} +33 -33
  88. package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-9_Hl-5v-.mjs} +1 -1
  89. package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
  90. package/dist/delegate.mjs +1 -1
  91. package/dist/{deploy-D04Xvm0m.mjs → deploy-BlXYtvTd.mjs} +1 -1
  92. package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-DTXVZ2QJ.mjs} +1 -1
  93. package/dist/dev-reqdKM28.mjs +4 -0
  94. package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-BxHs1EJB.mjs} +7 -7
  95. package/dist/dialog-ClHoC_cG.mjs +2 -0
  96. package/dist/dist-CmyJy57B.mjs +48 -0
  97. package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
  98. package/dist/dist-cGGV-p_F.mjs +366 -0
  99. package/dist/{dls-BsnURYja.mjs → dls-D7GXW-N3.mjs} +8 -8
  100. package/dist/{dns-B_nTXhuM.mjs → dns-B0mdWJO5.mjs} +63 -63
  101. package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-BG0bzuL3.mjs} +8 -8
  102. package/dist/dot-prop-IITUZ2XW-BO5KJUwL.mjs +2 -0
  103. package/dist/dry-run-BmzTxDtZ.mjs +2 -0
  104. package/dist/{durable-objects-8U8DpF9q.mjs → durable-objects-DW0CsJzR.mjs} +4 -4
  105. package/dist/{email-auth-CzjtGH6g.mjs → email-auth-Ls-7Yijm.mjs} +1 -1
  106. package/dist/{email-routing-B92fty1-.mjs → email-routing-DVaFhg-3.mjs} +24 -24
  107. package/dist/{email-security-keTqF0nJ.mjs → email-security-vnwkqlgp.mjs} +77 -79
  108. package/dist/{email-sending-B7f95epu.mjs → email-sending-CbMUicJz.mjs} +23 -23
  109. package/dist/error-sanitization-TV6O0aCD.mjs +2 -0
  110. package/dist/error-sanitization-cyGBhW1Z.mjs +2 -0
  111. package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-2EkDoJg8.mjs} +4 -4
  112. package/dist/firewall-BK4QYqRe.mjs +36 -0
  113. package/dist/{flagship-CjC3dF7L.mjs → flagship--lHQ0H3n.mjs} +13 -13
  114. package/dist/{fraud-DU_YCLC5.mjs → fraud-CaoRrQ8W.mjs} +1 -1
  115. package/dist/generate-CrKNH6ms.mjs +3 -0
  116. package/dist/generate-Djb5Af37.mjs +2 -0
  117. package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-DDzLPmk5.mjs} +1 -1
  118. package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-Q2uXvt4m.mjs} +1 -1
  119. package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-CsaYnis6.mjs} +1 -1
  120. package/dist/{hyperdrive-DPWyiXpj.mjs → hyperdrive-DDr6sAkw.mjs} +9 -9
  121. package/dist/{iam-CtX9NPCy.mjs → iam-CmzocepZ.mjs} +24 -24
  122. package/dist/{images-CuWFOsGw.mjs → images-Ux0Phsbi.mjs} +38 -38
  123. package/dist/index.mjs +1 -1
  124. package/dist/init-Nx4RRgfT.mjs +39 -0
  125. package/dist/{intel-BeGV3VXt.mjs → intel-bgS4g7nx.mjs} +38 -38
  126. package/dist/interactive-B_dcVghB.mjs +2 -0
  127. package/dist/interactive-D80kbTap.mjs +32 -0
  128. package/dist/{ips-d6aoKAI4.mjs → ips-BDiolgWF.mjs} +1 -1
  129. package/dist/keyless-certificates-C_TwTMql.mjs +13 -0
  130. package/dist/{keys-Fyf3vWcA.mjs → keys-Cr8AqQDY.mjs} +2 -2
  131. package/dist/{kv-CA4J7cCq.mjs → kv-DmAQCqXl.mjs} +10 -10
  132. package/dist/lazy-command-B_bwSa2F.mjs +2 -0
  133. package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-De7ph4VA.mjs} +1 -1
  134. package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-DXt4ndF4.mjs} +39 -39
  135. package/dist/local-CFd107fr.mjs +2 -0
  136. package/dist/{local-B6b2OIBW.mjs → local-OKXweFsd.mjs} +1 -1
  137. package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-tTYpniPS.mjs} +1 -1
  138. package/dist/login-BurQ63Ws.mjs +5 -0
  139. package/dist/login-CmlHvH5k.mjs +2 -0
  140. package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-CQ60P96J.mjs} +3 -3
  141. package/dist/{logos-BWBVGwU6.mjs → logos-u7UwT8MH.mjs} +3 -3
  142. package/dist/{logpush-CZKR8DHO.mjs → logpush-IoIe8e80.mjs} +23 -23
  143. package/dist/{logs-CiDyrqEu.mjs → logs-ih5tyXEE.mjs} +16 -16
  144. package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-CWNFnjcY.mjs} +34 -34
  145. package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-ClfZleF8.mjs} +17 -17
  146. package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-D69pkEVW.mjs} +139 -139
  147. package/dist/{managed-defense-SYreve4W.mjs → managed-defense-BHdmL0vx.mjs} +9 -9
  148. package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-DbCR4LUg.mjs} +1 -1
  149. package/dist/{matches-qf7GReyu.mjs → matches-Cou6RVkh.mjs} +3 -3
  150. package/dist/{mcp-DYSk5_gc.mjs → mcp-CQYfM19s.mjs} +15 -15
  151. package/dist/{mesh-DdY07OYt.mjs → mesh-CXqaAFS4.mjs} +12 -12
  152. package/dist/migrate-CXMbQPyC.mjs +2 -0
  153. package/dist/mtls-certificates-DNeId8xS.mjs +13 -0
  154. package/dist/{network-DpaZ5LJL.mjs → network-B7V3JbU7.mjs} +24 -24
  155. package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-BNon8iUs.mjs} +17 -17
  156. package/dist/oauth-CeXh-ACI.mjs +9 -0
  157. package/dist/{oauth-nsTDJ0dF.mjs → oauth-DM8q-TYg.mjs} +1 -1
  158. package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-gGmWIWHl.mjs} +7 -7
  159. package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-DSEu331u.mjs} +1 -1
  160. package/dist/{observability-smcOFbC1.mjs → observability-_VJhfwM1.mjs} +44 -44
  161. package/dist/open-PCXX3ZDZ-DobJT1Mj.mjs +4 -0
  162. package/dist/{organization-Dyf_0mq4.mjs → organization-DW4EpwGl.mjs} +1 -1
  163. package/dist/{organizations-D7zGPLVm.mjs → organizations-DE1g2wVq.mjs} +1 -1
  164. package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-D3ULDV__.mjs} +3 -3
  165. package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-BLropaz7.mjs} +1 -1
  166. package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-C87TG2i_.mjs} +5 -5
  167. package/dist/output-CZt-berV.mjs +2 -0
  168. package/dist/{page-rules-CLzba_nr.mjs → page-rules-tlb9P-7V.mjs} +1 -1
  169. package/dist/{pages-pah6dZBJ.mjs → pages-CjPErYik.mjs} +24 -24
  170. package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-C50wI-Iz.mjs} +32 -32
  171. package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-DHHIvynU.mjs} +3 -3
  172. package/dist/{pipelines-lps71uoA.mjs → pipelines-Y2icOwuf.mjs} +20 -20
  173. package/dist/precursor-DeyurJSC.mjs +4 -0
  174. package/dist/previews-Dj_LcGRd.mjs +4 -0
  175. package/dist/progress-C9dWgc3J.mjs +2 -0
  176. package/dist/prompt-Mh69ni1N.mjs +3 -0
  177. package/dist/{queries-EJYlFw8m.mjs → queries-DyUJefwL.mjs} +4 -4
  178. package/dist/{queues-CozKGaA4.mjs → queues-CdNe4tGY.mjs} +29 -35
  179. package/dist/{r2-Chn_JQUM.mjs → r2-C0W2J4sT.mjs} +52 -52
  180. package/dist/{r2-data-catalog-Bfn3AWzn.mjs → r2-data-catalog-D_zDlmVD.mjs} +16 -16
  181. package/dist/{radar-NmpdyMo5.mjs → radar-CSguicKC.mjs} +1 -1
  182. package/dist/raw-fetch-1ygCOcT_.mjs +2 -0
  183. package/dist/{realtime-iWTz8WbH.mjs → realtime-CvWs5pi3.mjs} +78 -78
  184. package/dist/{registrar-Cza1L8i_.mjs → registrar-DQUxn0FK.mjs} +8 -8
  185. package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-Q7ZEmg2x.mjs} +6 -6
  186. package/dist/{registry-vreNkX6u.mjs → registry-4Sw95M5_.mjs} +1 -1
  187. package/dist/{reporting-gvXX2MxY.mjs → reporting-DJShxeDv.mjs} +7 -7
  188. package/dist/request-headers-DFBBErJg.mjs +2 -0
  189. package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-DD8HlG61.mjs} +2 -2
  190. package/dist/resolve-BVxXAYG7.mjs +2 -0
  191. package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-J46JMWQP.mjs} +14 -14
  192. package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-DLZJLIqy.mjs} +2 -2
  193. package/dist/{rules-_QDaG3U5.mjs → rules-D068LfBR.mjs} +8 -8
  194. package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-Cz6P7Oje.mjs} +17 -17
  195. package/dist/{rum-ChPyfpM2.mjs → rum-C6GQC2vI.mjs} +14 -14
  196. package/dist/run-C_qUgBTs.mjs +2 -0
  197. package/dist/run-DK1d9BJz.mjs +2 -0
  198. package/dist/schema-VZPw_2CY.mjs +2 -0
  199. package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-BmY0Nzp0.mjs} +2 -2
  200. package/dist/{scim-BjiswXbC.mjs → scim-DMTp_Zhc.mjs} +10 -10
  201. package/dist/{sdk-CsWOex96.mjs → sdk-BuF3fTHr.mjs} +2 -2
  202. package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-C2epk0sQ.mjs} +11 -11
  203. package/dist/{security-center-DP4GC1cG.mjs → security-center-DwMdQ02Y.mjs} +15 -15
  204. package/dist/{security-txt-CaR5Idmz.mjs → security-txt-CORQfMul.mjs} +1 -1
  205. package/dist/session-BEXskZi2.mjs +2 -0
  206. package/dist/shared--lvrXmXY.mjs +2 -0
  207. package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-BZ0xjy_6.mjs} +1 -1
  208. package/dist/{snippets-r-Mre0cE.mjs → snippets-LSkJGDOc.mjs} +1 -1
  209. package/dist/source-38bULAR8.mjs +6 -0
  210. package/dist/spawn-Da3HnlmB.mjs +10 -0
  211. package/dist/{spectrum-BhjCVFZk.mjs → spectrum-zU8_GFTV.mjs} +1 -1
  212. package/dist/{speed-CPgypY7n.mjs → speed-4XbFmeYM.mjs} +1 -1
  213. package/dist/src-BLLpnbzC.mjs +109 -0
  214. package/dist/{ssl-DsMrXyqK.mjs → ssl-DiCsMY_a.mjs} +4 -4
  215. package/dist/startup-profile-6fCkD04r.mjs +17 -0
  216. package/dist/startup-profile-Cw-_akjQ.mjs +2 -0
  217. package/dist/state-CcktNox9.mjs +2 -0
  218. package/dist/{state-BxCejn42.mjs → state-DiHwKWTy.mjs} +1 -1
  219. package/dist/{stream-L2NmGPby.mjs → stream-BG3NUAVE.mjs} +45 -45
  220. package/dist/{submit-KN0Ul5fV.mjs → submit-CKSaSFS1.mjs} +2 -2
  221. package/dist/{tags-CZMFKGdP.mjs → tags-uT9Mi-bX.mjs} +2 -2
  222. package/dist/telemetry-C0k8vfbq.mjs +2 -0
  223. package/dist/telemetry-Dh-8kdfY.mjs +5 -0
  224. package/dist/{telemetry-CSj_ezpk.mjs → telemetry-IrDBqbQW.mjs} +1 -1
  225. package/dist/{tenant-Cu4P-foo.mjs → tenant--UrYFHM0.mjs} +1 -1
  226. package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-8Z4TVJtr.mjs} +1 -1
  227. package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
  228. package/dist/tools-DNGD0l7I.mjs +2 -0
  229. package/dist/{tunnels-C-mMZy4v.mjs → tunnels-5lGSXYpl.mjs} +15 -15
  230. package/dist/turnstile-CT3AkMPV.mjs +33 -0
  231. package/dist/ui-D1hhIDIs.mjs +5 -0
  232. package/dist/update-check-BYJnL8J8.mjs +2 -0
  233. package/dist/update-check-DFoSm5GT.mjs +2 -0
  234. package/dist/update-check-worker.mjs +1 -1
  235. package/dist/{url-info-7ikewAnp.mjs → url-info-DvpNcNl8.mjs} +2 -2
  236. package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-C9URZnpq.mjs} +1 -1
  237. package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-CIwK3wB5.mjs} +8 -8
  238. package/dist/{user-BFq8UM1s.mjs → user-DGA7cqdf.mjs} +1 -1
  239. package/dist/{values-DnBYV1ZD.mjs → values-BzS0b25w.mjs} +2 -2
  240. package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-DtDjl2fJ.mjs} +15 -15
  241. package/dist/version-B47pK_PZ.mjs +2 -0
  242. package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-CjTh4F3B.mjs} +25 -25
  243. package/dist/{web-assets-CCSSW_JH.mjs → web-assets-4l1B5V9b.mjs} +1 -1
  244. package/dist/{web3-bbT1REPc.mjs → web3-C0Z4AJjC.mjs} +1 -1
  245. package/dist/{workers-CXuyjZB8.mjs → workers-CNBv6GxE.mjs} +20 -20
  246. package/dist/{workers-builds-TRF3K416.mjs → workers-builds-DYGeoxmX.mjs} +7 -7
  247. package/dist/{workers-for-platforms-B57iKiSN.mjs → workers-for-platforms-CSw0K8Nl.mjs} +11 -11
  248. package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-DJ7Couct.mjs} +6 -6
  249. package/dist/{workflows-CKdPlIkK.mjs → workflows-Dm03QT8U.mjs} +20 -20
  250. package/dist/{zaraz-BXFlEWSx.mjs → zaraz-DJbWUUe3.mjs} +1 -1
  251. package/dist/zero-trust-DiMY-pN5.mjs +685 -0
  252. package/dist/{zone-DHmrotGW.mjs → zone-BWjBv1yy.mjs} +1 -1
  253. package/dist/{zones-C0eKBTqG.mjs → zones-zGqcQvcY.mjs} +1 -1
  254. package/dist/zt-Bt4Q6iM1.mjs +110 -0
  255. package/package.json +13 -11
  256. package/dist/access-C_2rEi0H.mjs +0 -27
  257. package/dist/auth-DJhSjNNL.mjs +0 -8
  258. package/dist/auth-sAorfdWU.mjs +0 -2
  259. package/dist/browser-extension-C48pKh3t.mjs +0 -15
  260. package/dist/build-1a8CiNIT.mjs +0 -2
  261. package/dist/build-Ca_drQY2.mjs +0 -2
  262. package/dist/cf-oadujOtC.mjs +0 -18
  263. package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
  264. package/dist/chunk-DL5FNmn1.mjs +0 -2
  265. package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
  266. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
  267. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
  268. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
  269. package/dist/client-certificates-CgaIc3zN.mjs +0 -13
  270. package/dist/command-CF0giIIc.mjs +0 -3
  271. package/dist/command-CsZFRm3P.mjs +0 -2
  272. package/dist/command-DBz8QiFk.mjs +0 -2
  273. package/dist/dev-CVD3BVUG.mjs +0 -4
  274. package/dist/dialog--iw0F2s-.mjs +0 -2
  275. package/dist/dist-CUUGKvjh.mjs +0 -48
  276. package/dist/dist-dc4E1u01.mjs +0 -272
  277. package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
  278. package/dist/dry-run-CLX6Pbtq.mjs +0 -2
  279. package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
  280. package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
  281. package/dist/firewall-67qoXiqD.mjs +0 -56
  282. package/dist/interactive-B6woOLo-.mjs +0 -32
  283. package/dist/interactive-DnUvQHjc.mjs +0 -2
  284. package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
  285. package/dist/local-BrfySqnx.mjs +0 -2
  286. package/dist/login-CLW108XX.mjs +0 -5
  287. package/dist/login-xgRjiyJa.mjs +0 -2
  288. package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
  289. package/dist/oauth-Dzk6Gy-6.mjs +0 -14
  290. package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
  291. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
  292. package/dist/output-Bia1u2k5.mjs +0 -2
  293. package/dist/precursor-DTTYLDEa.mjs +0 -4
  294. package/dist/previews-B89cUmpr.mjs +0 -4
  295. package/dist/progress-D_mL-Kcy.mjs +0 -2
  296. package/dist/prompt-sL_yMZbI.mjs +0 -3
  297. package/dist/raw-fetch-lSVttVJF.mjs +0 -2
  298. package/dist/request-headers-POBKmu93.mjs +0 -2
  299. package/dist/resolve-BXemCSyA.mjs +0 -2
  300. package/dist/run-DtN51G2A.mjs +0 -2
  301. package/dist/run-oACgYK8I.mjs +0 -2
  302. package/dist/schema-DZSSJaY0.mjs +0 -2
  303. package/dist/shared-W9uoX1-W.mjs +0 -2
  304. package/dist/source-BR4_k2ad.mjs +0 -6
  305. package/dist/spawn-BWEuIO-w.mjs +0 -523
  306. package/dist/src-Hw-TlVAO.mjs +0 -108
  307. package/dist/startup-profile-CYEokTVe.mjs +0 -2
  308. package/dist/startup-profile-CgWHy4rE.mjs +0 -17
  309. package/dist/state-DSzkxXML.mjs +0 -2
  310. package/dist/telemetry-DAf9gLyH.mjs +0 -2
  311. package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
  312. package/dist/tools-BMKpYraQ.mjs +0 -2
  313. package/dist/turnstile-39JL9tMt.mjs +0 -33
  314. package/dist/ui-DH95w1Qk.mjs +0 -5
  315. package/dist/undici-DTSBJHNS.mjs +0 -96
  316. package/dist/update-check-BKQBD4MQ.mjs +0 -2
  317. package/dist/update-check-CE9XB6gf.mjs +0 -2
  318. package/dist/version-Bh3b9vTa.mjs +0 -2
  319. package/dist/zero-trust-M08mBsYd.mjs +0 -795
  320. /package/dist/{Page-C-JHZnIy.mjs → Page-BchtVjAO.mjs} +0 -0
  321. /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
  322. /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
  323. /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-BpPZBRMr.mjs} +0 -0
  324. /package/dist/{brands-BHRXlWDm.mjs → brands-Uy0Cmv1w.mjs} +0 -0
  325. /package/dist/{clear-UvKESVx3.mjs → clear-CpcO2ExU.mjs} +0 -0
  326. /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-B6tm-8uL.mjs} +0 -0
  327. /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-oguk5Zyj.mjs} +0 -0
  328. /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-B6zuxkr0.mjs} +0 -0
  329. /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
  330. /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
  331. /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-D3e278L_.mjs} +0 -0
  332. /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
  333. /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
  334. /package/dist/{live-D_k7eHdv.mjs → live-a01OfPf9.mjs} +0 -0
  335. /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
  336. /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
  337. /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-Bw9qmxMx.mjs} +0 -0
  338. /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CDm_xzKt.mjs} +0 -0
  339. /package/dist/{ready-CvwvbdTX.mjs → ready-BXGqY1Wi.mjs} +0 -0
  340. /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-AhGZD3a3.mjs} +0 -0
  341. /package/dist/{refute-CIAFMj00.mjs → refute-D_w5Gw20.mjs} +0 -0
  342. /package/dist/{resolve-CUDKxUrW.mjs → resolve-qPFfBMrn.mjs} +0 -0
  343. /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-BZzFam-Q.mjs} +0 -0
  344. /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-BPA8nSPM.mjs} +0 -0
  345. /package/dist/{search-12jA1b4l.mjs → search-De0UlXYN.mjs} +0 -0
  346. /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ziDz9frX.mjs} +0 -0
  347. /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-83D2DCCG.mjs} +0 -0
  348. /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-Dhol31Kn.mjs} +0 -0
  349. /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-DoOPs6Vd.mjs} +0 -0
  350. /package/dist/{verify-CZW5Fo1q.mjs → verify-CxpGEnJb.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-sL_yMZbI.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
2
+ import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,r as s,t as c}from"./body-parser-BpPZBRMr.mjs";import{n as l}from"./prompt-Mh69ni1N.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
3
3
 
4
4
  Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:u,handler:async o=>a({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.aiSecurity.customTopics.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 printable ASCII characters. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:f,handler:async u=>a({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({topics:s(u.topics,`topics`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,!await l({force:!!u.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=o(u.body);n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:e,zone_id:d})),{successLabel:`Deleted`});return}let f=c({topics:s(u.topics,`topics`)});n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:f,zone_id:d})),{successLabel:`Deleted`})})},m={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 ai-security get
@@ -1,56 +1,56 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{n as m,t as h}from"./raw-fetch-lSVttVJF.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,i as f,n as p}from"./prompt-Mh69ni1N.mjs";import{n as m,t as h}from"./raw-fetch-1ygCOcT_.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
3
3
 
4
- Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
4
+ Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
5
5
 
6
- Get a list of all delivery mechanism types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get delivery mechanism eligibility`,builder:v,handler:async c=>s({command:`alerting destinations eligible get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations eligible get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/eligible`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.eligible.get({account_id:l})),{successLabel:`Loaded`})})},b={command:`eligible`,describe:`Operations for destinations.eligible`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 alerting destinations pagerduty create
6
+ Get a list of all delivery mechanism types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get delivery mechanism eligibility`,builder:v,handler:async c=>s({command:`alerting destinations eligible get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations eligible get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/eligible`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.eligible.get({account_id:l})),{successLabel:`Loaded`})})},b={command:`eligible`,describe:`Operations for destinations.eligible`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 alerting destinations pagerduty create
7
7
 
8
- Creates a new token for integrating with PagerDuty.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create`,describe:`Create PagerDuty integration token`,builder:x,handler:async c=>s({command:`alerting destinations pagerduty create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/pagerduty/connect`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.alerting.destinations.pagerduty.create({account_id:l})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 alerting destinations pagerduty delete
8
+ Creates a new token for integrating with PagerDuty.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create`,describe:`Create PagerDuty integration token`,builder:x,handler:async c=>s({command:`alerting destinations pagerduty create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/pagerduty/connect`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Creating`,async()=>s.alerting.destinations.pagerduty.create({account_id:l})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 alerting destinations pagerduty delete
9
9
 
10
- Deletes all the PagerDuty Services connected to the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete`,describe:`Delete PagerDuty Services`,builder:C,handler:async c=>s({command:`alerting destinations pagerduty delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes all PagerDuty services connected to the account.`})){process.stderr.write(`Aborted.
10
+ Deletes all the PagerDuty Services connected to the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete`,describe:`Delete PagerDuty Services`,builder:C,handler:async c=>s({command:`alerting destinations pagerduty delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes all PagerDuty services connected to the account.`})){process.stderr.write(`Aborted.
11
11
  `);return}i(await o(`Deleting`,async()=>s.alerting.destinations.pagerduty.delete({account_id:l})),{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 alerting destinations pagerduty get
12
12
 
13
- Get a list of all configured PagerDuty services.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`List PagerDuty services`,builder:T,handler:async c=>s({command:`alerting destinations pagerduty get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.pagerduty.get({account_id:l})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 alerting destinations pagerduty link <token-id>
13
+ Get a list of all configured PagerDuty services.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`List PagerDuty services`,builder:T,handler:async c=>s({command:`alerting destinations pagerduty get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/pagerduty`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.pagerduty.get({account_id:l})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 alerting destinations pagerduty link <token-id>
14
14
 
15
- Links PagerDuty with the account using the integration token.`).positional(`token-id`,{type:`string`,description:`The token integration key`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`link <token-id>`,describe:`Connect PagerDuty`,builder:D,handler:async c=>s({command:`alerting destinations pagerduty link`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/pagerduty/connect/${c[`token-id`]==null?`<token-id>`:encodeURIComponent(String(c[`token-id`]))}`,pathParams:{"token-id":String(c[`token-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.pagerduty.link({account_id:l,token_id:c[`token-id`]})),{successLabel:`Loaded`})})},k={command:`pagerduty`,describe:`Operations for destinations.pagerduty`,builder:e=>e.command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 alerting destinations webhooks create
15
+ Links PagerDuty with the account using the integration token.`).positional(`token-id`,{type:`string`,description:`The token integration key`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`link <token-id>`,describe:`Connect PagerDuty`,builder:D,handler:async c=>s({command:`alerting destinations pagerduty link`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations pagerduty link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/pagerduty/connect/${c[`token-id`]==null?`<token-id>`:encodeURIComponent(String(c[`token-id`]))}`,pathParams:{"token-id":String(c[`token-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.pagerduty.link({account_id:l,token_id:c[`token-id`]})),{successLabel:`Loaded`})})},k={command:`pagerduty`,describe:`Operations for destinations.pagerduty`,builder:e=>e.command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 alerting destinations webhooks create
16
16
 
17
- Creates a new webhook destination.`).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a webhook`,builder:A,handler:async f=>s({command:`alerting destinations webhooks create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf alerting destinations webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.alerting.destinations.webhooks.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),f.url===void 0&&(f.url=await d(`url`,`The POST endpoint to call when dispatching a notification.`));let m=l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.alerting.destinations.webhooks.create({...m,account_id:p})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 alerting destinations webhooks delete <webhook-id>
17
+ Creates a new webhook destination.`).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a webhook`,builder:A,handler:async f=>s({command:`alerting destinations webhooks create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf alerting destinations webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.alerting.destinations.webhooks.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),f.url===void 0&&(f.url=await d(`url`,`The POST endpoint to call when dispatching a notification.`));let m=l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.alerting.destinations.webhooks.create({...m,account_id:p})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 alerting destinations webhooks delete <webhook-id>
18
18
 
19
- Delete a configured webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <webhook-id>`,describe:`Delete a webhook`,builder:M,handler:async c=>s({command:`alerting destinations webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the webhook destination.`})){process.stderr.write(`Aborted.
19
+ Delete a configured webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <webhook-id>`,describe:`Delete a webhook`,builder:M,handler:async c=>s({command:`alerting destinations webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the webhook destination.`})){process.stderr.write(`Aborted.
20
20
  `);return}i(await o(`Deleting`,async()=>s.alerting.destinations.webhooks.delete({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 alerting destinations webhooks get <webhook-id>
21
21
 
22
- Get details for a single webhooks destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <webhook-id>`,describe:`Get a webhook`,builder:P,handler:async c=>s({command:`alerting destinations webhooks get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.webhooks.get({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 alerting destinations webhooks list
22
+ Get details for a single webhooks destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <webhook-id>`,describe:`Get a webhook`,builder:P,handler:async c=>s({command:`alerting destinations webhooks get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/webhooks/${c[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(c[`webhook-id`]))}`,pathParams:{"webhook-id":String(c[`webhook-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.webhooks.get({account_id:l,webhook_id:c[`webhook-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 alerting destinations webhooks list
23
23
 
24
- Gets a list of all configured webhook destinations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List webhooks`,builder:I,handler:async c=>s({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.webhooks.list({account_id:l})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 alerting destinations webhooks update <webhook-id>
24
+ Gets a list of all configured webhook destinations.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List webhooks`,builder:I,handler:async c=>s({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.destinations.webhooks.list({account_id:l})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 alerting destinations webhooks update <webhook-id>
25
25
 
26
- Update a webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <webhook-id>`,describe:`Update a webhook`,builder:R,handler:async f=>s({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/destinations/webhooks/${f[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(f[`webhook-id`]))}`,pathParams:{"webhook-id":String(f[`webhook-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.alerting.destinations.webhooks.update({...e,account_id:p,webhook_id:f[`webhook-id`]})),{successLabel:`Updated`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),f.url===void 0&&(f.url=await d(`url`,`The POST endpoint to call when dispatching a notification.`));let m=l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)});i(await o(`Updating`,async()=>s.alerting.destinations.webhooks.update({...m,account_id:p,webhook_id:f[`webhook-id`]})),{successLabel:`Updated`})})},B={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(b).command(k).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 alerting history list
26
+ Update a webhook destination.`).positional(`webhook-id`,{type:`string`,description:`The unique identifier of a webhook`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`}).option(`secret`,{type:`string`,description:"Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body."}).option(`url`,{type:`string`,description:`The POST endpoint to call when dispatching a notification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <webhook-id>`,describe:`Update a webhook`,builder:R,handler:async f=>s({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/destinations/webhooks/${f[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(f[`webhook-id`]))}`,pathParams:{"webhook-id":String(f[`webhook-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.alerting.destinations.webhooks.update({...e,account_id:p,webhook_id:f[`webhook-id`]})),{successLabel:`Updated`});return}f.name===void 0&&(f.name=await d(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),f.url===void 0&&(f.url=await d(`url`,`The POST endpoint to call when dispatching a notification.`));let m=l({name:u(f.name,`name`,`text`),secret:u(f.secret,`secret`,`text`),url:u(f.url,`url`,`text`)});i(await o(`Updating`,async()=>s.alerting.destinations.webhooks.update({...m,account_id:p,webhook_id:f[`webhook-id`]})),{successLabel:`Updated`})})},B={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(b).command(k).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 alerting history list
27
27
 
28
- Gets a list of history records for notifications sent to an account. The records are displayed for last \`x\` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).`).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`before`,{type:`string`,description:`Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`since`,{type:`string`,description:`Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List History`,builder:H,handler:async c=>s({command:`alerting history list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={per_page:c[`per-page`],before:c.before,page:c.page,since:c.since};if(c.dryRun){a({command:`cf alerting history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/history`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.alerting.history.list({account_id:u,...s})),{successLabel:`Loaded`})})},te={command:`history`,describe:`Operations for history`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 alerting policies create
28
+ Gets a list of history records for notifications sent to an account. The records are displayed for last \`x\` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).`).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`before`,{type:`string`,description:`Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`since`,{type:`string`,description:`Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List History`,builder:H,handler:async c=>s({command:`alerting history list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={per_page:c[`per-page`],before:c.before,page:c.page,since:c.since};if(c.dryRun){a({command:`cf alerting history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/history`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.alerting.history.list({account_id:u,...s})),{successLabel:`Loaded`})})},te={command:`history`,describe:`Operations for history`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 alerting policies create
29
29
 
30
- Creates a new Notification policy.`).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,choices:`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`)}).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`,default:!0}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`name`,{type:`string`,description:`Name of the policy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create`,describe:`Create a Notification policy`,builder:W,handler:async p=>s({command:`alerting policies create`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf alerting policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({alert_interval:u(p[`alert-interval`],`alert-interval`,`text`),alert_type:u(p[`alert-type`],`alert-type`,`text`),description:u(p.description,`description`,`text`),enabled:p.enabled,filters:{actions:p[`filters-actions`],affected_asns:p[`filters-affected-asns`],affected_components:p[`filters-affected-components`],affected_locations:p[`filters-affected-locations`],airport_code:p[`filters-airport-code`],alert_trigger_preferences:p[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:p[`filters-alert-trigger-preferences-value`],enabled:p[`filters-enabled`],environment:p[`filters-environment`],event:p[`filters-event`],event_source:p[`filters-event-source`],event_type:p[`filters-event-type`],group_by:p[`filters-group-by`],health_check_id:p[`filters-health-check-id`],incident_impact:p[`filters-incident-impact`],input_id:p[`filters-input-id`],insight_class:p[`filters-insight-class`],limit:p[`filters-limit`],logo_tag:p[`filters-logo-tag`],megabits_per_second:p[`filters-megabits-per-second`],new_health:p[`filters-new-health`],new_status:p[`filters-new-status`],packets_per_second:p[`filters-packets-per-second`],pool_id:p[`filters-pool-id`],pop_names:p[`filters-pop-names`],product:p[`filters-product`],project_id:p[`filters-project-id`],protocol:p[`filters-protocol`],query_tag:p[`filters-query-tag`],requests_per_second:p[`filters-requests-per-second`],selectors:p[`filters-selectors`],services:p[`filters-services`],slo:p[`filters-slo`],status:p[`filters-status`],target_hostname:p[`filters-target-hostname`],target_ip:p[`filters-target-ip`],target_zone_name:p[`filters-target-zone-name`],token_id:p[`filters-token-id`],traffic_exclusions:p[`filters-traffic-exclusions`],tunnel_id:p[`filters-tunnel-id`],tunnel_name:p[`filters-tunnel-name`],type:p[`filters-type`],where:p[`filters-where`],zones:p[`filters-zones`]},name:u(p.name,`name`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.alerting.policies.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`alert-type`]===void 0&&(p[`alert-type`]=await f(`alert-type`,`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`))),p.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);p.name===void 0&&(p.name=await d(`name`,`Name of the policy.`));let h=l({alert_interval:u(p[`alert-interval`],`alert-interval`,`text`),alert_type:u(p[`alert-type`],`alert-type`,`text`),description:u(p.description,`description`,`text`),enabled:p.enabled,filters:{actions:p[`filters-actions`],affected_asns:p[`filters-affected-asns`],affected_components:p[`filters-affected-components`],affected_locations:p[`filters-affected-locations`],airport_code:p[`filters-airport-code`],alert_trigger_preferences:p[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:p[`filters-alert-trigger-preferences-value`],enabled:p[`filters-enabled`],environment:p[`filters-environment`],event:p[`filters-event`],event_source:p[`filters-event-source`],event_type:p[`filters-event-type`],group_by:p[`filters-group-by`],health_check_id:p[`filters-health-check-id`],incident_impact:p[`filters-incident-impact`],input_id:p[`filters-input-id`],insight_class:p[`filters-insight-class`],limit:p[`filters-limit`],logo_tag:p[`filters-logo-tag`],megabits_per_second:p[`filters-megabits-per-second`],new_health:p[`filters-new-health`],new_status:p[`filters-new-status`],packets_per_second:p[`filters-packets-per-second`],pool_id:p[`filters-pool-id`],pop_names:p[`filters-pop-names`],product:p[`filters-product`],project_id:p[`filters-project-id`],protocol:p[`filters-protocol`],query_tag:p[`filters-query-tag`],requests_per_second:p[`filters-requests-per-second`],selectors:p[`filters-selectors`],services:p[`filters-services`],slo:p[`filters-slo`],status:p[`filters-status`],target_hostname:p[`filters-target-hostname`],target_ip:p[`filters-target-ip`],target_zone_name:p[`filters-target-zone-name`],token_id:p[`filters-token-id`],traffic_exclusions:p[`filters-traffic-exclusions`],tunnel_id:p[`filters-tunnel-id`],tunnel_name:p[`filters-tunnel-name`],type:p[`filters-type`],where:p[`filters-where`],zones:p[`filters-zones`]},name:u(p.name,`name`,`text`)});i(await o(`Creating`,async()=>s.alerting.policies.create({...h,account_id:m})),{successLabel:`Created`})})};function K(e){return e.usage(`$0 alerting policies delete <policy-id>
30
+ Creates a new Notification policy.`).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,choices:`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`)}).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`,default:!0}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`name`,{type:`string`,description:`Name of the policy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create`,describe:`Create a Notification policy`,builder:W,handler:async p=>s({command:`alerting policies create`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf alerting policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({alert_interval:u(p[`alert-interval`],`alert-interval`,`text`),alert_type:u(p[`alert-type`],`alert-type`,`text`),description:u(p.description,`description`,`text`),enabled:p.enabled,filters:{actions:p[`filters-actions`],affected_asns:p[`filters-affected-asns`],affected_components:p[`filters-affected-components`],affected_locations:p[`filters-affected-locations`],airport_code:p[`filters-airport-code`],alert_trigger_preferences:p[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:p[`filters-alert-trigger-preferences-value`],enabled:p[`filters-enabled`],environment:p[`filters-environment`],event:p[`filters-event`],event_source:p[`filters-event-source`],event_type:p[`filters-event-type`],group_by:p[`filters-group-by`],health_check_id:p[`filters-health-check-id`],incident_impact:p[`filters-incident-impact`],input_id:p[`filters-input-id`],insight_class:p[`filters-insight-class`],limit:p[`filters-limit`],logo_tag:p[`filters-logo-tag`],megabits_per_second:p[`filters-megabits-per-second`],new_health:p[`filters-new-health`],new_status:p[`filters-new-status`],packets_per_second:p[`filters-packets-per-second`],pool_id:p[`filters-pool-id`],pop_names:p[`filters-pop-names`],product:p[`filters-product`],project_id:p[`filters-project-id`],protocol:p[`filters-protocol`],query_tag:p[`filters-query-tag`],requests_per_second:p[`filters-requests-per-second`],selectors:p[`filters-selectors`],services:p[`filters-services`],slo:p[`filters-slo`],status:p[`filters-status`],target_hostname:p[`filters-target-hostname`],target_ip:p[`filters-target-ip`],target_zone_name:p[`filters-target-zone-name`],token_id:p[`filters-token-id`],traffic_exclusions:p[`filters-traffic-exclusions`],tunnel_id:p[`filters-tunnel-id`],tunnel_name:p[`filters-tunnel-name`],type:p[`filters-type`],where:p[`filters-where`],zones:p[`filters-zones`]},name:u(p.name,`name`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.alerting.policies.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`alert-type`]===void 0&&(p[`alert-type`]=await f(`alert-type`,`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`))),p.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);p.name===void 0&&(p.name=await d(`name`,`Name of the policy.`));let h=l({alert_interval:u(p[`alert-interval`],`alert-interval`,`text`),alert_type:u(p[`alert-type`],`alert-type`,`text`),description:u(p.description,`description`,`text`),enabled:p.enabled,filters:{actions:p[`filters-actions`],affected_asns:p[`filters-affected-asns`],affected_components:p[`filters-affected-components`],affected_locations:p[`filters-affected-locations`],airport_code:p[`filters-airport-code`],alert_trigger_preferences:p[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:p[`filters-alert-trigger-preferences-value`],enabled:p[`filters-enabled`],environment:p[`filters-environment`],event:p[`filters-event`],event_source:p[`filters-event-source`],event_type:p[`filters-event-type`],group_by:p[`filters-group-by`],health_check_id:p[`filters-health-check-id`],incident_impact:p[`filters-incident-impact`],input_id:p[`filters-input-id`],insight_class:p[`filters-insight-class`],limit:p[`filters-limit`],logo_tag:p[`filters-logo-tag`],megabits_per_second:p[`filters-megabits-per-second`],new_health:p[`filters-new-health`],new_status:p[`filters-new-status`],packets_per_second:p[`filters-packets-per-second`],pool_id:p[`filters-pool-id`],pop_names:p[`filters-pop-names`],product:p[`filters-product`],project_id:p[`filters-project-id`],protocol:p[`filters-protocol`],query_tag:p[`filters-query-tag`],requests_per_second:p[`filters-requests-per-second`],selectors:p[`filters-selectors`],services:p[`filters-services`],slo:p[`filters-slo`],status:p[`filters-status`],target_hostname:p[`filters-target-hostname`],target_ip:p[`filters-target-ip`],target_zone_name:p[`filters-target-zone-name`],token_id:p[`filters-token-id`],traffic_exclusions:p[`filters-traffic-exclusions`],tunnel_id:p[`filters-tunnel-id`],tunnel_name:p[`filters-tunnel-name`],type:p[`filters-type`],where:p[`filters-where`],zones:p[`filters-zones`]},name:u(p.name,`name`,`text`)});i(await o(`Creating`,async()=>s.alerting.policies.create({...h,account_id:m})),{successLabel:`Created`})})};function K(e){return e.usage(`$0 alerting policies delete <policy-id>
31
31
 
32
- Delete a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q={command:`delete <policy-id>`,describe:`Delete a Notification policy`,builder:K,handler:async c=>s({command:`alerting policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the notification policy.`})){process.stderr.write(`Aborted.
32
+ Delete a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q={command:`delete <policy-id>`,describe:`Delete a Notification policy`,builder:K,handler:async c=>s({command:`alerting policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the notification policy.`})){process.stderr.write(`Aborted.
33
33
  `);return}i(await o(`Deleting`,async()=>s.alerting.policies.delete({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Deleted`})})};function J(e){return e.usage(`$0 alerting policies email details <policy-id>
34
34
 
35
- Shows details for unsubscribing an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`details <policy-id>`,describe:`Show email unsubscribe details`,builder:J,handler:async i=>s({command:`alerting policies email details`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let s={email:i.email,token:i.token};if(i.dryRun){a({command:`cf alerting policies email details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${i[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(i[`policy-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await t();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();m((await o(`Loading`,async()=>h(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})};function X(e){return e.usage(`$0 alerting policies email unsubscribe <policy-id>
35
+ Shows details for unsubscribing an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`details <policy-id>`,describe:`Show email unsubscribe details`,builder:J,handler:async i=>s({command:`alerting policies email details`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let s={email:i.email,token:i.token};if(i.dryRun){a({command:`cf alerting policies email details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${i[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(i[`policy-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await n();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();m((await o(`Loading`,async()=>h(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})};function X(e){return e.usage(`$0 alerting policies email unsubscribe <policy-id>
36
36
 
37
- Unsubscribes an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`unsubscribe <policy-id>`,describe:`Unsubscribe email from a Notification policy`,builder:X,handler:async i=>s({command:`alerting policies email unsubscribe`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let s={email:i.email,token:i.token};if(i.dryRun){a({command:`cf alerting policies email unsubscribe`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${i[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(i[`policy-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await t();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();m((await o(`Creating`,async()=>h(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`POST`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},Q={command:`email`,describe:`Operations for policies.email`,builder:e=>e.command(Y).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 alerting policies get <policy-id>
37
+ Unsubscribes an email address from a notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`email`,{type:`string`,description:`Email`,demandOption:!0}).option(`token`,{type:`string`,description:`Token`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`unsubscribe <policy-id>`,describe:`Unsubscribe email from a Notification policy`,builder:X,handler:async i=>s({command:`alerting policies email unsubscribe`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let s={email:i.email,token:i.token};if(i.dryRun){a({command:`cf alerting policies email unsubscribe`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${i[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe`,pathParams:{"policy-id":String(i[`policy-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await n();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();m((await o(`Creating`,async()=>h(`/accounts/${c}/alerting/v3/policies/${encodeURIComponent(String(i[`policy-id`]))}/email/unsubscribe${l?`?`+l:``}`,{method:`POST`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))})},Q={command:`email`,describe:`Operations for policies.email`,builder:e=>e.command(Y).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 alerting policies get <policy-id>
38
38
 
39
- Get details for a single policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <policy-id>`,describe:`Get a Notification policy`,builder:ne,handler:async c=>s({command:`alerting policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.policies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 alerting policies list
39
+ Get details for a single policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <policy-id>`,describe:`Get a Notification policy`,builder:ne,handler:async c=>s({command:`alerting policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.policies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 alerting policies list
40
40
 
41
- Get a list of all Notification policies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Notification policies`,builder:ie,handler:async c=>s({command:`alerting policies list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.policies.list({account_id:l})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 alerting policies test <policy-id>
41
+ Get a list of all Notification policies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Notification policies`,builder:ie,handler:async c=>s({command:`alerting policies list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.policies.list({account_id:l})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 alerting policies test <policy-id>
42
42
 
43
- Send a test notification for a policy to verify delivery mechanisms are working as expected.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`severity`,{type:`number`,description:`Severity level for the test alert. Defaults to INFO (1) if omitted.`}).option(`source`,{type:`string`,description:`Source identifier for the test alert.`}).option(`state-correlation-id`,{type:`string`,description:`Correlation ID for stateful test alerts. Required when state_event is set.`}).option(`state-event`,{type:`number`,description:`State event type for stateful test alerts. Use with state_correlation_id.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Optional configuration for the test notification. When omitted, a default INFO-severity test alert is sent.`})}const se={command:`test <policy-id>`,describe:`Test a Notification policy`,builder:oe,handler:async d=>s({command:`alerting policies test`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf alerting policies test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${d[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(d[`policy-id`]))}/test`,pathParams:{"policy-id":String(d[`policy-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({severity:d.severity,source:u(d.source,`source`,`text`),state_correlation_id:u(d[`state-correlation-id`],`state-correlation-id`,`text`),state_event:d[`state-event`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.alerting.policies.test({...e,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Created`});return}let p=l({severity:d.severity,source:u(d.source,`source`,`text`),state_correlation_id:u(d[`state-correlation-id`],`state-correlation-id`,`text`),state_event:d[`state-event`]});i(await o(`Creating`,async()=>s.alerting.policies.test({...p,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Created`})})};function ce(e){return e.usage(`$0 alerting policies update <policy-id>
43
+ Send a test notification for a policy to verify delivery mechanisms are working as expected.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`severity`,{type:`number`,description:`Severity level for the test alert. Defaults to INFO (1) if omitted.`}).option(`source`,{type:`string`,description:`Source identifier for the test alert.`}).option(`state-correlation-id`,{type:`string`,description:`Correlation ID for stateful test alerts. Required when state_event is set.`}).option(`state-event`,{type:`number`,description:`State event type for stateful test alerts. Use with state_correlation_id.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Optional configuration for the test notification. When omitted, a default INFO-severity test alert is sent.`})}const se={command:`test <policy-id>`,describe:`Test a Notification policy`,builder:oe,handler:async d=>s({command:`alerting policies test`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf alerting policies test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${d[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(d[`policy-id`]))}/test`,pathParams:{"policy-id":String(d[`policy-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({severity:d.severity,source:u(d.source,`source`,`text`),state_correlation_id:u(d[`state-correlation-id`],`state-correlation-id`,`text`),state_event:d[`state-event`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.alerting.policies.test({...e,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Created`});return}let p=l({severity:d.severity,source:u(d.source,`source`,`text`),state_correlation_id:u(d[`state-correlation-id`],`state-correlation-id`,`text`),state_event:d[`state-event`]});i(await o(`Creating`,async()=>s.alerting.policies.test({...p,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Created`})})};function ce(e){return e.usage(`$0 alerting policies update <policy-id>
44
44
 
45
- Update a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,choices:`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`)}).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`name`,{type:`string`,description:`Name of the policy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`update <policy-id>`,describe:`Update a Notification policy`,builder:ce,handler:async d=>s({command:`alerting policies update`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf alerting policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/policies/${d[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(d[`policy-id`]))}`,pathParams:{"policy-id":String(d[`policy-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({alert_interval:u(d[`alert-interval`],`alert-interval`,`text`),alert_type:u(d[`alert-type`],`alert-type`,`text`),description:u(d.description,`description`,`text`),enabled:d.enabled,filters:{actions:d[`filters-actions`],affected_asns:d[`filters-affected-asns`],affected_components:d[`filters-affected-components`],affected_locations:d[`filters-affected-locations`],airport_code:d[`filters-airport-code`],alert_trigger_preferences:d[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:d[`filters-alert-trigger-preferences-value`],enabled:d[`filters-enabled`],environment:d[`filters-environment`],event:d[`filters-event`],event_source:d[`filters-event-source`],event_type:d[`filters-event-type`],group_by:d[`filters-group-by`],health_check_id:d[`filters-health-check-id`],incident_impact:d[`filters-incident-impact`],input_id:d[`filters-input-id`],insight_class:d[`filters-insight-class`],limit:d[`filters-limit`],logo_tag:d[`filters-logo-tag`],megabits_per_second:d[`filters-megabits-per-second`],new_health:d[`filters-new-health`],new_status:d[`filters-new-status`],packets_per_second:d[`filters-packets-per-second`],pool_id:d[`filters-pool-id`],pop_names:d[`filters-pop-names`],product:d[`filters-product`],project_id:d[`filters-project-id`],protocol:d[`filters-protocol`],query_tag:d[`filters-query-tag`],requests_per_second:d[`filters-requests-per-second`],selectors:d[`filters-selectors`],services:d[`filters-services`],slo:d[`filters-slo`],status:d[`filters-status`],target_hostname:d[`filters-target-hostname`],target_ip:d[`filters-target-ip`],target_zone_name:d[`filters-target-zone-name`],token_id:d[`filters-token-id`],traffic_exclusions:d[`filters-traffic-exclusions`],tunnel_id:d[`filters-tunnel-id`],tunnel_name:d[`filters-tunnel-name`],type:d[`filters-type`],where:d[`filters-where`],zones:d[`filters-zones`]},name:u(d.name,`name`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.alerting.policies.update({...e,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Updated`});return}let p=l({alert_interval:u(d[`alert-interval`],`alert-interval`,`text`),alert_type:u(d[`alert-type`],`alert-type`,`text`),description:u(d.description,`description`,`text`),enabled:d.enabled,filters:{actions:d[`filters-actions`],affected_asns:d[`filters-affected-asns`],affected_components:d[`filters-affected-components`],affected_locations:d[`filters-affected-locations`],airport_code:d[`filters-airport-code`],alert_trigger_preferences:d[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:d[`filters-alert-trigger-preferences-value`],enabled:d[`filters-enabled`],environment:d[`filters-environment`],event:d[`filters-event`],event_source:d[`filters-event-source`],event_type:d[`filters-event-type`],group_by:d[`filters-group-by`],health_check_id:d[`filters-health-check-id`],incident_impact:d[`filters-incident-impact`],input_id:d[`filters-input-id`],insight_class:d[`filters-insight-class`],limit:d[`filters-limit`],logo_tag:d[`filters-logo-tag`],megabits_per_second:d[`filters-megabits-per-second`],new_health:d[`filters-new-health`],new_status:d[`filters-new-status`],packets_per_second:d[`filters-packets-per-second`],pool_id:d[`filters-pool-id`],pop_names:d[`filters-pop-names`],product:d[`filters-product`],project_id:d[`filters-project-id`],protocol:d[`filters-protocol`],query_tag:d[`filters-query-tag`],requests_per_second:d[`filters-requests-per-second`],selectors:d[`filters-selectors`],services:d[`filters-services`],slo:d[`filters-slo`],status:d[`filters-status`],target_hostname:d[`filters-target-hostname`],target_ip:d[`filters-target-ip`],target_zone_name:d[`filters-target-zone-name`],token_id:d[`filters-token-id`],traffic_exclusions:d[`filters-traffic-exclusions`],tunnel_id:d[`filters-tunnel-id`],tunnel_name:d[`filters-tunnel-name`],type:d[`filters-type`],where:d[`filters-where`],zones:d[`filters-zones`]},name:u(d.name,`name`,`text`)});i(await o(`Updating`,async()=>s.alerting.policies.update({...p,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Updated`})})},ue={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(G).command(q).command(re).command(ae).command(se).command(le).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage(`$0 alerting silences create
45
+ Update a Notification policy.`).positional(`policy-id`,{type:`string`,description:`The unique identifier of a notification policy`,demandOption:!0}).option(`alert-interval`,{type:`string`,description:`Optional specification of how often to re-alert from the same incident, not support on all alert types.`}).option(`alert-type`,{type:`string`,description:`Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.`,choices:`abuse_report_alert.access_custom_certificate_expiration_type.advanced_ddos_attack_l4_alert.advanced_ddos_attack_l7_alert.advanced_http_alert_error.bgp_hijack_notification.billing_usage_alert.block_notification_block_removed.block_notification_new_block.block_notification_review_rejected.bot_traffic_basic_alert.brand_protection_alert.brand_protection_digest.clickhouse_alert_fw_anomaly.clickhouse_alert_fw_ent_anomaly.cloudforce_one_request_notification.cni_maintenance_notification.custom_analytics.custom_bot_detection_alert.custom_ssl_certificate_event_type.dedicated_ssl_certificate_event_type.device_connectivity_anomaly_alert.dos_attack_l4.dos_attack_l7.expiring_service_token_alert.failing_logpush_job_disabled_alert.fbm_auto_advertisement.fbm_dosd_attack.fbm_volumetric_attack.health_check_status_notification.hostname_aop_custom_certificate_expiration_type.http_alert_edge_error.http_alert_origin_error.image_notification.image_resizing_notification.incident_alert.load_balancing_health_alert.load_balancing_pool_enablement_alert.logo_match_alert.magic_tunnel_health_check_event.magic_wan_tunnel_health.maintenance_event_notification.mtls_certificate_store_certificate_expiration_type.pages_event_alert.radar_notification.real_origin_monitoring.scriptmonitor_alert_new_code_change_detections.scriptmonitor_alert_new_hosts.scriptmonitor_alert_new_malicious_hosts.scriptmonitor_alert_new_malicious_scripts.scriptmonitor_alert_new_malicious_url.scriptmonitor_alert_new_max_length_resource_url.scriptmonitor_alert_new_resources.secondary_dns_all_primaries_failing.secondary_dns_primaries_failing.secondary_dns_warning.secondary_dns_zone_successfully_updated.secondary_dns_zone_validation_warning.security_insights_alert.sentinel_alert.stream_live_notifications.synthetic_test_latency_alert.synthetic_test_low_availability_alert.traffic_anomalies_alert.tunnel_health_event.tunnel_update_event.universal_ssl_event_type.web_analytics_metrics_update.zone_aop_custom_certificate_expiration_type`.split(`.`)}).option(`description`,{type:`string`,description:`Optional description for the Notification policy.`}).option(`enabled`,{type:`boolean`,description:`Whether or not the Notification policy is enabled.`}).option(`filters-actions`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-affected-asns`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-affected-components`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-affected-locations`,{type:`string`,array:!0,description:`Used for configuring radar_notification`}).option(`filters-airport-code`,{type:`string`,array:!0,description:`Used for configuring maintenance_event_notification`}).option(`filters-alert-trigger-preferences`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-alert-trigger-preferences-value`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-enabled`,{type:`string`,array:!0,description:`Used for configuring load_balancing_pool_enablement_alert`}).option(`filters-environment`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-event-source`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-event-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-group-by`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-health-check-id`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-incident-impact`,{type:`string`,array:!0,description:`Used for configuring incident_alert`}).option(`filters-input-id`,{type:`string`,array:!0,description:`Used for configuring stream_live_notifications`}).option(`filters-insight-class`,{type:`string`,array:!0,description:`Used for configuring security_insights_alert`}).option(`filters-limit`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-logo-tag`,{type:`string`,array:!0,description:`Used for configuring logo_match_alert`}).option(`filters-megabits-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-new-health`,{type:`string`,array:!0,description:`Used for configuring load_balancing_health_alert`}).option(`filters-new-status`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-packets-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-pool-id`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-pop-names`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-product`,{type:`string`,array:!0,description:`Used for configuring billing_usage_alert`}).option(`filters-project-id`,{type:`string`,array:!0,description:`Used for configuring pages_event_alert`}).option(`filters-protocol`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-query-tag`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-requests-per-second`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-selectors`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-services`,{type:`string`,array:!0,description:`Used for configuring clickhouse_alert_fw_ent_anomaly`}).option(`filters-slo`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-status`,{type:`string`,array:!0,description:`Used for configuring health_check_status_notification`}).option(`filters-target-hostname`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-target-ip`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l4_alert`}).option(`filters-target-zone-name`,{type:`string`,array:!0,description:`Used for configuring advanced_ddos_attack_l7_alert`}).option(`filters-token-id`,{type:`string`,array:!0,description:`Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.`}).option(`filters-traffic-exclusions`,{type:`string`,array:!0,description:`Used for configuring traffic_anomalies_alert`}).option(`filters-tunnel-id`,{type:`string`,array:!0,description:`Used for configuring tunnel_health_event`}).option(`filters-tunnel-name`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-type`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-where`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`filters-zones`,{type:`string`,array:!0,description:`Usage depends on specific alert type`}).option(`name`,{type:`string`,description:`Name of the policy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`update <policy-id>`,describe:`Update a Notification policy`,builder:ce,handler:async d=>s({command:`alerting policies update`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf alerting policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/policies/${d[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(d[`policy-id`]))}`,pathParams:{"policy-id":String(d[`policy-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({alert_interval:u(d[`alert-interval`],`alert-interval`,`text`),alert_type:u(d[`alert-type`],`alert-type`,`text`),description:u(d.description,`description`,`text`),enabled:d.enabled,filters:{actions:d[`filters-actions`],affected_asns:d[`filters-affected-asns`],affected_components:d[`filters-affected-components`],affected_locations:d[`filters-affected-locations`],airport_code:d[`filters-airport-code`],alert_trigger_preferences:d[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:d[`filters-alert-trigger-preferences-value`],enabled:d[`filters-enabled`],environment:d[`filters-environment`],event:d[`filters-event`],event_source:d[`filters-event-source`],event_type:d[`filters-event-type`],group_by:d[`filters-group-by`],health_check_id:d[`filters-health-check-id`],incident_impact:d[`filters-incident-impact`],input_id:d[`filters-input-id`],insight_class:d[`filters-insight-class`],limit:d[`filters-limit`],logo_tag:d[`filters-logo-tag`],megabits_per_second:d[`filters-megabits-per-second`],new_health:d[`filters-new-health`],new_status:d[`filters-new-status`],packets_per_second:d[`filters-packets-per-second`],pool_id:d[`filters-pool-id`],pop_names:d[`filters-pop-names`],product:d[`filters-product`],project_id:d[`filters-project-id`],protocol:d[`filters-protocol`],query_tag:d[`filters-query-tag`],requests_per_second:d[`filters-requests-per-second`],selectors:d[`filters-selectors`],services:d[`filters-services`],slo:d[`filters-slo`],status:d[`filters-status`],target_hostname:d[`filters-target-hostname`],target_ip:d[`filters-target-ip`],target_zone_name:d[`filters-target-zone-name`],token_id:d[`filters-token-id`],traffic_exclusions:d[`filters-traffic-exclusions`],tunnel_id:d[`filters-tunnel-id`],tunnel_name:d[`filters-tunnel-name`],type:d[`filters-type`],where:d[`filters-where`],zones:d[`filters-zones`]},name:u(d.name,`name`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.alerting.policies.update({...e,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Updated`});return}let p=l({alert_interval:u(d[`alert-interval`],`alert-interval`,`text`),alert_type:u(d[`alert-type`],`alert-type`,`text`),description:u(d.description,`description`,`text`),enabled:d.enabled,filters:{actions:d[`filters-actions`],affected_asns:d[`filters-affected-asns`],affected_components:d[`filters-affected-components`],affected_locations:d[`filters-affected-locations`],airport_code:d[`filters-airport-code`],alert_trigger_preferences:d[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:d[`filters-alert-trigger-preferences-value`],enabled:d[`filters-enabled`],environment:d[`filters-environment`],event:d[`filters-event`],event_source:d[`filters-event-source`],event_type:d[`filters-event-type`],group_by:d[`filters-group-by`],health_check_id:d[`filters-health-check-id`],incident_impact:d[`filters-incident-impact`],input_id:d[`filters-input-id`],insight_class:d[`filters-insight-class`],limit:d[`filters-limit`],logo_tag:d[`filters-logo-tag`],megabits_per_second:d[`filters-megabits-per-second`],new_health:d[`filters-new-health`],new_status:d[`filters-new-status`],packets_per_second:d[`filters-packets-per-second`],pool_id:d[`filters-pool-id`],pop_names:d[`filters-pop-names`],product:d[`filters-product`],project_id:d[`filters-project-id`],protocol:d[`filters-protocol`],query_tag:d[`filters-query-tag`],requests_per_second:d[`filters-requests-per-second`],selectors:d[`filters-selectors`],services:d[`filters-services`],slo:d[`filters-slo`],status:d[`filters-status`],target_hostname:d[`filters-target-hostname`],target_ip:d[`filters-target-ip`],target_zone_name:d[`filters-target-zone-name`],token_id:d[`filters-token-id`],traffic_exclusions:d[`filters-traffic-exclusions`],tunnel_id:d[`filters-tunnel-id`],tunnel_name:d[`filters-tunnel-name`],type:d[`filters-type`],where:d[`filters-where`],zones:d[`filters-zones`]},name:u(d.name,`name`,`text`)});i(await o(`Updating`,async()=>s.alerting.policies.update({...p,account_id:f,policy_id:d[`policy-id`]})),{successLabel:`Updated`})})},ue={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(G).command(q).command(re).command(ae).command(se).command(le).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage(`$0 alerting silences create
46
46
 
47
- Creates a new silence for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`create`,describe:`Create Silences`,builder:de,handler:async l=>s({command:`alerting silences create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf alerting silences create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.alerting.silences.create({body:e,account_id:u})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function pe(e){return e.usage(`$0 alerting silences delete <silence-id>
47
+ Creates a new silence for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`create`,describe:`Create Silences`,builder:de,handler:async l=>s({command:`alerting silences create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf alerting silences create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await n();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.alerting.silences.create({body:e,account_id:u})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function pe(e){return e.usage(`$0 alerting silences delete <silence-id>
48
48
 
49
- Deletes an existing silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $={command:`delete <silence-id>`,describe:`Delete Silence`,builder:pe,handler:async c=>s({command:`alerting silences delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/silences/${c[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(c[`silence-id`]))}`,pathParams:{"silence-id":String(c[`silence-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the notification silence.`})){process.stderr.write(`Aborted.
49
+ Deletes an existing silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $={command:`delete <silence-id>`,describe:`Delete Silence`,builder:pe,handler:async c=>s({command:`alerting silences delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/silences/${c[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(c[`silence-id`]))}`,pathParams:{"silence-id":String(c[`silence-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the notification silence.`})){process.stderr.write(`Aborted.
50
50
  `);return}i(await o(`Deleting`,async()=>s.alerting.silences.delete({account_id:l,silence_id:c[`silence-id`]})),{successLabel:`Deleted`})})};function me(e){return e.usage(`$0 alerting silences get <silence-id>
51
51
 
52
- Gets a specific silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get <silence-id>`,describe:`Get Silence`,builder:me,handler:async c=>s({command:`alerting silences get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/silences/${c[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(c[`silence-id`]))}`,pathParams:{"silence-id":String(c[`silence-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.silences.get({account_id:l,silence_id:c[`silence-id`]})),{successLabel:`Loaded`})})};function ge(e){return e.usage(`$0 alerting silences list
52
+ Gets a specific silence for an account.`).positional(`silence-id`,{type:`string`,description:`Silence ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get <silence-id>`,describe:`Get Silence`,builder:me,handler:async c=>s({command:`alerting silences get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/silences/${c[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(c[`silence-id`]))}`,pathParams:{"silence-id":String(c[`silence-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.silences.get({account_id:l,silence_id:c[`silence-id`]})),{successLabel:`Loaded`})})};function ge(e){return e.usage(`$0 alerting silences list
53
53
 
54
- Gets a list of silences for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List Silences`,builder:ge,handler:async c=>s({command:`alerting silences list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.silences.list({account_id:l})),{successLabel:`Loaded`})})};function ve(e){return e.usage(`$0 alerting silences update
54
+ Gets a list of silences for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List Silences`,builder:ge,handler:async c=>s({command:`alerting silences list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting silences list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.silences.list({account_id:l})),{successLabel:`Loaded`})})};function ve(e){return e.usage(`$0 alerting silences update
55
55
 
56
- Updates existing silences for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update`,describe:`Update Silences`,builder:ve,handler:async l=>s({command:`alerting silences update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf alerting silences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.alerting.silences.update({body:e,account_id:u})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},be={command:`silences`,describe:`Operations for silences`,builder:e=>e.command(fe).command($).command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`alerting`,describe:`alerting`,builder:e=>e.command(_).command(V).command(te).command(ue).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
56
+ Updates existing silences for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update`,describe:`Update Silences`,builder:ve,handler:async l=>s({command:`alerting silences update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf alerting silences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await n();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.alerting.silences.update({body:e,account_id:u})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},be={command:`silences`,describe:`Operations for silences`,builder:e=>e.command(fe).command($).command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`alerting`,describe:`alerting`,builder:e=>e.command(_).command(V).command(te).command(ue).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-CUWbw_Tq.mjs";import{n as m,t as h}from"./input-validation-Ch4Vllrm.mjs";import{a as g}from"./prompt-sL_yMZbI.mjs";function _(e){return e.usage(`$0 analytics latency colos get
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-BpPZBRMr.mjs";import{n as m,t as h}from"./input-validation-D3e278L_.mjs";import{a as g}from"./prompt-Mh69ni1N.mjs";function _(e){return e.usage(`$0 analytics latency colos get
3
3
 
4
- Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
4
+ Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
5
5
 
6
- Retrieves aggregate Argo Smart Routing analytics for a zone, including latency improvements, bandwidth savings, and routing statistics.`).option(`bins`,{type:`string`,description:`Bins`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Argo Analytics for a zone`,builder:b,handler:async e=>l({command:`analytics latency get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={bins:e.bins};if(e.dryRun){s({command:`cf analytics latency get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await a(e),i=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.analytics.latency.get({zone_id:i,...n})),{successLabel:`Loaded`})})},S={command:`latency`,describe:`Argo Smart Routing latency analytics showing time-to-first-byte improvements`,builder:e=>e.command(x).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 analytics query data-security content-findings top-n
6
+ Retrieves aggregate Argo Smart Routing analytics for a zone, including latency improvements, bandwidth savings, and routing statistics.`).option(`bins`,{type:`string`,description:`Bins`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Argo Analytics for a zone`,builder:b,handler:async e=>l({command:`analytics latency get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={bins:e.bins};if(e.dryRun){s({command:`cf analytics latency get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await a(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.analytics.latency.get({zone_id:i,...t})),{successLabel:`Loaded`})})},S={command:`latency`,describe:`Argo Smart Routing latency analytics showing time-to-first-byte improvements`,builder:e=>e.command(x).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 analytics query data-security content-findings top-n
7
7
 
8
- Returns the top N integrations ranked by total content findings.`).option(`filters`,{type:`string`,description:"Filters to apply. `findingType = content` is applied automatically for CASB data. Provide as a JSON array of objects or @path/to/file.json."}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`n`,{type:`number`,description:`Maximum number of integrations to return.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Returns the top N integrations for content findings.`})}const w={command:`top-n`,describe:`Top integrations by content findings`,builder:C,handler:async t=>l({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query data-security content-findings top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/data-security/content-findings/top-n`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),n:t.n,to:m(t.to,`to`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.contentFindings.topN({...e,account_id:l})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(t.from===void 0&&(t.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),t.n===void 0)throw Error(`--n is required (or pass --body with this field set).`);t.to===void 0&&(t.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),n:t.n,to:m(t.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.contentFindings.topN({...u,account_id:l})),{successLabel:`Created`})})},T={command:`content-findings`,describe:`Operations for query.data-security.content-findings`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 analytics query data-security findings summary
8
+ Returns the top N integrations ranked by total content findings.`).option(`filters`,{type:`string`,description:"Filters to apply. `findingType = content` is applied automatically for CASB data. Provide as a JSON array of objects or @path/to/file.json."}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`n`,{type:`number`,description:`Maximum number of integrations to return.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Returns the top N integrations for content findings.`})}const w={command:`top-n`,describe:`Top integrations by content findings`,builder:C,handler:async n=>l({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query data-security content-findings top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/data-security/content-findings/top-n`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),n:n.n,to:m(n.to,`to`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.contentFindings.topN({...e,account_id:l})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(n.from===void 0&&(n.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),n.n===void 0)throw Error(`--n is required (or pass --body with this field set).`);n.to===void 0&&(n.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),n:n.n,to:m(n.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.contentFindings.topN({...u,account_id:l})),{successLabel:`Created`})})},T={command:`content-findings`,describe:`Operations for query.data-security.content-findings`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 analytics query data-security findings summary
9
9
 
10
- Returns aggregate current-period and previous-period totals for CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for aggregate findings summary.`})}const D={command:`summary`,describe:`Data security findings summary`,builder:E,handler:async t=>l({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query data-security findings summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/data-security/findings/summary`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),to:m(t.to,`to`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.summary({...e,account_id:l})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);t.from===void 0&&(t.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),t.to===void 0&&(t.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),to:m(t.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.summary({...u,account_id:l})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 analytics query data-security findings timeseries
10
+ Returns aggregate current-period and previous-period totals for CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for aggregate findings summary.`})}const D={command:`summary`,describe:`Data security findings summary`,builder:E,handler:async n=>l({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query data-security findings summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/data-security/findings/summary`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),to:m(n.to,`to`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.summary({...e,account_id:l})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);n.from===void 0&&(n.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),n.to===void 0&&(n.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),to:m(n.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.summary({...u,account_id:l})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 analytics query data-security findings timeseries
11
11
 
12
- Returns merged time-bucketed CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for findings timeseries.`})}const k={command:`timeseries`,describe:`Data security findings timeseries`,builder:O,handler:async t=>l({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query data-security findings timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/data-security/findings/timeseries`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),to:m(t.to,`to`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.timeseries({...e,account_id:l})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);t.from===void 0&&(t.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),t.to===void 0&&(t.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),to:m(t.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.timeseries({...u,account_id:l})),{successLabel:`Created`})})},A={command:`findings`,describe:`Operations for query.data-security.findings`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`data-security`,describe:`Operations for query.data-security`,builder:e=>e.command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 analytics query summary <dataset>
12
+ Returns merged time-bucketed CASB findings.`).option(`filters`,{type:`string`,description:`Filters to apply. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:`Start of the query time range (inclusive). RFC3339.`}).option(`to`,{type:`string`,description:`End of the query time range (exclusive). RFC3339.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query for findings timeseries.`})}const k={command:`timeseries`,describe:`Data security findings timeseries`,builder:O,handler:async n=>l({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query data-security findings timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/data-security/findings/timeseries`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),to:m(n.to,`to`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.timeseries({...e,account_id:l})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);n.from===void 0&&(n.from=await g(`from`,`Start of the query time range (inclusive). RFC3339.`)),n.to===void 0&&(n.to=await g(`to`,`End of the query time range (exclusive). RFC3339.`));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),to:m(n.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.dataSecurity.findings.timeseries({...u,account_id:l})),{successLabel:`Created`})})},A={command:`findings`,describe:`Operations for query.data-security.findings`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`data-security`,describe:`Operations for query.data-security`,builder:e=>e.command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 analytics query summary <dataset>
13
13
 
14
- Returns aggregate summary stats for a dataset. Includes current-period and previous-period totals for trend comparison.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const N={command:`summary <dataset>`,describe:`Query analytics summary`,builder:M,handler:async t=>l({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/${t.dataset==null?`<dataset>`:encodeURIComponent(String(t.dataset))}/summary`,pathParams:{dataset:String(t.dataset??``)},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.summary({...e,account_id:l,dataset:t.dataset})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(t.from===void 0&&(t.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),t[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(t.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);t.to===void 0&&(t.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.summary({...u,account_id:l,dataset:t.dataset})),{successLabel:`Created`})})};function P(e){return e.usage("$0 analytics query timeseries <dataset>\n\nReturns time-bucketed analytics data for a dataset. Includes time slots, each containing the requested stats, group-by dimensions, and resolution-controlled bucket size (e.g. `hour`, `day`).").positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`resolution`,{type:`string`,description:`Time bucket size for grouping results. Controls the granularity of the returned time slots.
15
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const F={command:`timeseries <dataset>`,describe:`Query analytics timeseries`,builder:P,handler:async t=>l({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/${t.dataset==null?`<dataset>`:encodeURIComponent(String(t.dataset))}/timeseries`,pathParams:{dataset:String(t.dataset??``)},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`),resolution:m(t.resolution,`resolution`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.timeseries({...e,account_id:l,dataset:t.dataset})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(t.from===void 0&&(t.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),t[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(t.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);t.to===void 0&&(t.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),t.resolution===void 0&&(t.resolution=await g(`resolution`,`Time bucket size for grouping results. Controls the granularity of the returned time slots. `));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`),resolution:m(t.resolution,`resolution`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.timeseries({...u,account_id:l,dataset:t.dataset})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 analytics query top-n <dataset>
14
+ Returns aggregate summary stats for a dataset. Includes current-period and previous-period totals for trend comparison.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const N={command:`summary <dataset>`,describe:`Query analytics summary`,builder:M,handler:async n=>l({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/${n.dataset==null?`<dataset>`:encodeURIComponent(String(n.dataset))}/summary`,pathParams:{dataset:String(n.dataset??``)},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.summary({...e,account_id:l,dataset:n.dataset})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(n.from===void 0&&(n.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),n[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(n.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);n.to===void 0&&(n.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.summary({...u,account_id:l,dataset:n.dataset})),{successLabel:`Created`})})};function P(e){return e.usage("$0 analytics query timeseries <dataset>\n\nReturns time-bucketed analytics data for a dataset. Includes time slots, each containing the requested stats, group-by dimensions, and resolution-controlled bucket size (e.g. `hour`, `day`).").positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`resolution`,{type:`string`,description:`Time bucket size for grouping results. Controls the granularity of the returned time slots.
15
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const F={command:`timeseries <dataset>`,describe:`Query analytics timeseries`,builder:P,handler:async n=>l({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/${n.dataset==null?`<dataset>`:encodeURIComponent(String(n.dataset))}/timeseries`,pathParams:{dataset:String(n.dataset??``)},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`),resolution:m(n.resolution,`resolution`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.timeseries({...e,account_id:l,dataset:n.dataset})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(n.from===void 0&&(n.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),n[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(n.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);n.to===void 0&&(n.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),n.resolution===void 0&&(n.resolution=await g(`resolution`,`Time bucket size for grouping results. Controls the granularity of the returned time slots. `));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`),resolution:m(n.resolution,`resolution`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.timeseries({...u,account_id:l,dataset:n.dataset})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 analytics query top-n <dataset>
16
16
 
17
- Returns the top N results for a dataset by a specified stat. Includes an array of result rows, each containing the requested stats and group-by dimensions.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`n`,{type:`number`,description:`Maximum number of results to return.`}).option(`order-by`,{type:`string`,description:`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const L={command:`top-n <dataset>`,describe:`Query analytics top-N`,builder:I,handler:async t=>l({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf analytics query top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/analytics/query/${t.dataset==null?`<dataset>`:encodeURIComponent(String(t.dataset))}/top-n`,pathParams:{dataset:String(t.dataset??``)},bodyKind:`json`,body:t.body===void 0?p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`),n:t.n,orderBy:m(t[`order-by`],`order-by`,`text`)}):d(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=d(t.body);o(await c(`Creating`,async()=>i.analytics.query.topN({...e,account_id:l,dataset:t.dataset})),{successLabel:`Created`});return}if(t.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(t.from===void 0&&(t.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),t[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(t.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);if(t.to===void 0&&(t.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),t.n===void 0)throw Error(`--n is required (or pass --body with this field set).`);t[`order-by`]===void 0&&(t[`order-by`]=await g(`order-by`,`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`));let u=p({filters:f(t.filters,`filters`),from:m(t.from,`from`,`text`),groupBy:t[`group-by`],stats:t.stats,to:m(t.to,`to`,`text`),n:t.n,orderBy:m(t[`order-by`],`order-by`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.topN({...u,account_id:l,dataset:t.dataset})),{successLabel:`Created`})})},R={command:`query`,describe:`Operations for query`,builder:e=>e.command(N).command(F).command(L).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage("$0 analytics sql get\n\nExecutes a SQL query against the analytics datasets available to the caller. SQL placeholders can be bound with query parameters named `param_<name>`, such as `param_status=404` for `$status`.").option(`query`,{type:`string`,description:`SQL query to execute.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`Query analytics datasets`,builder:z,handler:async e=>l({command:`analytics sql get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={query:e.query};if(e.dryRun){s({command:`cf analytics sql get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e);o(await c(`Loading`,async()=>n.analytics.sql.get(t)),{successLabel:`Loaded`})})};function V(e){return e.usage("$0 analytics sql introspection get\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, descriptions, and kinds. Set `include_columns` to include each dataset's column names, descriptions, and data types. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` is set, the response also includes custom attribute names and types discovered from that account's own data, which legitimately differs per caller. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:`Include a capped set of custom attribute names and types observed during the preceding seven days. Requires a nonempty dataset_name.`}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`List available analytics datasets`,builder:V,handler:async e=>l({command:`analytics sql introspection get`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let t={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){s({command:`cf analytics sql introspection get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e);o(await c(`Loading`,async()=>n.analytics.sql.introspection.get(t)),{successLabel:`Loaded`})})},U={command:`introspection`,describe:`Operations for sql.introspection`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 analytics sql post
17
+ Returns the top N results for a dataset by a specified stat. Includes an array of result rows, each containing the requested stats and group-by dimensions.`).positional(`dataset`,{type:`string`,description:"Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.",demandOption:!0}).option(`filters`,{type:`string`,description:`Filters to apply before aggregating results. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`)."}).option(`group-by`,{type:`string`,array:!0,description:`Specifies the column names to group results by. Requires valid columns for the target dataset.`}).option(`stats`,{type:`string`,array:!0,description:"Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`)."}).option(`to`,{type:`string`,description:`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`}).option(`n`,{type:`number`,description:`Maximum number of results to return.`}).option(`order-by`,{type:`string`,description:`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines fields that all query types share.`})}const L={command:`top-n <dataset>`,describe:`Query analytics top-N`,builder:I,handler:async n=>l({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf analytics query top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics/query/${n.dataset==null?`<dataset>`:encodeURIComponent(String(n.dataset))}/top-n`,pathParams:{dataset:String(n.dataset??``)},bodyKind:`json`,body:n.body===void 0?p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`),n:n.n,orderBy:m(n[`order-by`],`order-by`,`text`)}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.analytics.query.topN({...e,account_id:l,dataset:n.dataset})),{successLabel:`Created`});return}if(n.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(n.from===void 0&&(n.from=await g(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),n[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(n.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);if(n.to===void 0&&(n.to=await g(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),n.n===void 0)throw Error(`--n is required (or pass --body with this field set).`);n[`order-by`]===void 0&&(n[`order-by`]=await g(`order-by`,`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`));let u=p({filters:f(n.filters,`filters`),from:m(n.from,`from`,`text`),groupBy:n[`group-by`],stats:n.stats,to:m(n.to,`to`,`text`),n:n.n,orderBy:m(n[`order-by`],`order-by`,`text`)});o(await c(`Creating`,async()=>i.analytics.query.topN({...u,account_id:l,dataset:n.dataset})),{successLabel:`Created`})})},R={command:`query`,describe:`Operations for query`,builder:e=>e.command(N).command(F).command(L).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage("$0 analytics sql get\n\nExecutes a SQL query against the analytics datasets available to the caller. SQL placeholders can be bound with query parameters named `param_<name>`, such as `param_status=404` for `$status`.").option(`query`,{type:`string`,description:`SQL query to execute.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`Query analytics datasets`,builder:z,handler:async e=>l({command:`analytics sql get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={query:e.query};if(e.dryRun){s({command:`cf analytics sql get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e);o(await c(`Loading`,async()=>n.analytics.sql.get(t)),{successLabel:`Loaded`})})};function V(e){return e.usage("$0 analytics sql introspection get\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, descriptions, and kinds. Set `include_columns` to include each dataset's column names, descriptions, and data types. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` is set, the response also includes custom attribute names and types discovered from that account's own data, which legitimately differs per caller. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:`Include a capped set of custom attribute names and types observed during the preceding seven days. Requires a nonempty dataset_name.`}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`List available analytics datasets`,builder:V,handler:async e=>l({command:`analytics sql introspection get`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let t={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){s({command:`cf analytics sql introspection get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:t,bodyKind:`none`});return}let n=await a(e);o(await c(`Loading`,async()=>n.analytics.sql.introspection.get(t)),{successLabel:`Loaded`})})},U={command:`introspection`,describe:`Operations for sql.introspection`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 analytics sql post
18
18
 
19
19
  Executes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named \`param_<name>\`.`).option(`query`,{type:`string`,description:`SQL query to execute.`}).option(`scope-account-tag`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
20
20
  `}).option(`scope-zone-tag`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,t as u}from"./input-validation-D3e278L_.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
3
3
 
4
- Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
4
+ Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};