cf 1.0.0-beta.27 → 1.0.0-beta.28

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 (267) hide show
  1. package/dist/_meta/commands.json +5787 -1914
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +796 -557
  4. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
  5. package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
  7. package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
  14. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
  23. package/dist/auth-B-h0BHg7.mjs +2 -0
  24. package/dist/auth-B6tswVxH.mjs +2 -0
  25. package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
  28. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
  33. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
  34. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
  35. package/dist/brand-protection-kv1ba80i.mjs +14 -0
  36. package/dist/browser-run-D-vRoZmf.mjs +40 -0
  37. package/dist/build-BzJGqb2o.mjs +2 -0
  38. package/dist/build-FFxzigo4.mjs +2 -0
  39. package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
  44. package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
  49. package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/containers-B06OGOEB.mjs +380 -0
  70. package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
  76. package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
  77. package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
  79. package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
  80. package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
  91. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
  92. package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
  93. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
  94. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
  97. package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
  98. package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
  100. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  101. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  102. package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
  105. package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  109. package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  110. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  111. package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
  112. package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
  113. package/dist/index.mjs +1 -1
  114. package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
  115. package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
  116. package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
  117. package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
  118. package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
  119. package/dist/k2-CZT2Pd5J.mjs +10 -0
  120. package/dist/kv-Ipa7dnvF.mjs +12 -0
  121. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  122. package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  123. package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
  124. package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
  125. package/dist/local-D5Vq6ooZ.mjs +2 -0
  126. package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
  127. package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  128. package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
  129. package/dist/login-DRJugxya.mjs +2 -0
  130. package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
  131. package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
  132. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  133. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  134. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  135. package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  136. package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
  137. package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  138. package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
  139. package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
  140. package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
  141. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  142. package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
  143. package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  144. package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
  145. package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
  146. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  147. package/dist/organizations-DbeeWUL4.mjs +71 -0
  148. package/dist/output-BZQEl3mK.mjs +2 -0
  149. package/dist/package-B7RgwuFR.mjs +2 -0
  150. package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
  151. package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
  152. package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  153. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
  154. package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  155. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
  156. package/dist/previews-DEVNSip2.mjs +6 -0
  157. package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
  158. package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  159. package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
  160. package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
  161. package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
  162. package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  163. package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
  164. package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
  165. package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
  166. package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  167. package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  168. package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  169. package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  170. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  171. package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
  172. package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
  173. package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
  174. package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
  175. package/dist/run-DBqOjD1P.mjs +2 -0
  176. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  177. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  178. package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
  179. package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
  180. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  181. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
  182. package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
  183. package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
  184. package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
  185. package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
  186. package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  187. package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
  188. package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
  189. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
  190. package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
  191. package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
  192. package/dist/src-BoSDeQ9m.mjs +133 -0
  193. package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  194. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  195. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  196. package/dist/state-DW3QZtfh.mjs +2 -0
  197. package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
  198. package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
  199. package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
  200. package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  201. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  202. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
  203. package/dist/tenants-DD-GMq0K.mjs +13 -0
  204. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  205. package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
  206. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  207. package/dist/ui-xjCox-gU.mjs +2 -0
  208. package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
  209. package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
  210. package/dist/update-check-worker.mjs +1 -1
  211. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  212. package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  213. package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
  214. package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
  215. package/dist/verify-B9ILCohg.mjs +2 -0
  216. package/dist/verify-BCuWaO-L.mjs +2 -0
  217. package/dist/version-6Bpy6Bgt.mjs +2 -0
  218. package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
  219. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  220. package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
  221. package/dist/workers-BnLiOjZf.mjs +39 -0
  222. package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  223. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  224. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
  225. package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  226. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
  227. package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
  228. package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
  229. package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
  230. package/package.json +14 -14
  231. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  232. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  233. package/dist/api-X3wKppsT.mjs +0 -3
  234. package/dist/argo-D1VONzu-.mjs +0 -14
  235. package/dist/auth-CspwoBlp.mjs +0 -2
  236. package/dist/auth-FK2eLQ02.mjs +0 -2
  237. package/dist/billing-DRNww0iC.mjs +0 -24
  238. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  239. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  240. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  241. package/dist/build-CRm2TQq8.mjs +0 -2
  242. package/dist/build-DO_GNhRl.mjs +0 -2
  243. package/dist/cache-jlLJLSu7.mjs +0 -36
  244. package/dist/containers-DINLx5_i.mjs +0 -380
  245. package/dist/create-BtmuVqVL.mjs +0 -2
  246. package/dist/error-sanitization-B025CygB.mjs +0 -2
  247. package/dist/get-Be821dio.mjs +0 -2
  248. package/dist/k2-wsanPL3y.mjs +0 -10
  249. package/dist/kv-BLSPcEnH.mjs +0 -12
  250. package/dist/local-CFsO9Tkg.mjs +0 -2
  251. package/dist/login-BfuOf-Yi.mjs +0 -2
  252. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  253. package/dist/organization-CEnlXwrl.mjs +0 -70
  254. package/dist/organizations-Dt86ToxE.mjs +0 -4
  255. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  256. package/dist/output-BJEgbI0G.mjs +0 -2
  257. package/dist/package-CiRJBRHO.mjs +0 -2
  258. package/dist/previews-DzJ85fsr.mjs +0 -6
  259. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  260. package/dist/run-DD45EQTm.mjs +0 -2
  261. package/dist/src-DPnUfK4c.mjs +0 -131
  262. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  263. package/dist/state-Uwfrmw5I.mjs +0 -2
  264. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  265. package/dist/ui-FYultowZ.mjs +0 -2
  266. package/dist/version-Zr2oF8mY.mjs +0 -2
  267. package/dist/workers-B3uJqJKc.mjs +0 -39
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./prompt-D0dXwuME.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(e){return e.usage(`$0 ai-security custom-topics get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as s,n as c,t as l}from"./body-parser-DoewLePl.mjs";import{n as u}from"./prompt-CEpZ-lQZ.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(e){return e.usage(`$0 ai-security custom-topics get
3
3
 
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 p={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:f,handler:async e=>o({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`,body:`json`};function h(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 UTF-8 bytes. Text in any language is supported, including spaces, numbers, punctuation, and symbols. Tabs, line breaks, invalid text, and invisible formatting characters are not allowed. - 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 g={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:h,handler:async e=>o({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({topics:s(e.topics,`topics`)}):c(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,!await u({force:!!e.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`}))return;if(e.body){let t=c(e.body),n=await a(`Deleting`,async()=>o.send(m,{body:t,zone_id:d}));r(n,{successLabel:`Deleted`});return}let f=l({topics:s(e.topics,`topics`)}),p=await a(`Deleting`,async()=>o.send(m,{body:f,zone_id:d}));r(p,{successLabel:`Deleted`})})},_={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`};function y(e){return e.usage(`$0 ai-security get
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 p={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:f,handler:async e=>o({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`,body:`json`};function h(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 UTF-8 bytes. Text in any language is supported, including spaces, numbers, punctuation, and symbols. Tabs, line breaks, invalid text, and invisible formatting characters are not allowed. - 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 g={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:h,handler:async e=>o({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({topics:s(e.topics,`topics`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,!await u({force:!!e.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Updating`,async()=>d.send(m,{body:e,zone_id:f}));r(t,{successLabel:`Updated`});return}let p=l({topics:s(e.topics,`topics`)}),h=await a(`Updating`,async()=>d.send(m,{body:p,zone_id:f}));r(h,{successLabel:`Updated`})})},_={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`};function y(e){return e.usage(`$0 ai-security get
5
5
 
6
6
  Get the current AI Security for Apps status for the zone. While enabled, Cloudflare scans prompts sent to endpoints labeled \`cf-llm\` for personally identifiable information, unsafe topics, and prompt injection attempts.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get the AI Security for Apps status for a zone.`,builder:y,handler:async e=>o({command:`ai-security get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf ai-security get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(v,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`,body:`json`};function S(e){return e.usage(`$0 ai-security update
7
7
 
8
- Update the AI Security for Apps status for the zone, enabling or disabling the detection. The detection results are exposed as \`cf.llm.prompt.*\` fields for use in custom rules and rate limiting rules; changes can take up to a minute to propagate.`).option(`enabled`,{type:`boolean`,description:`Whether AI Security for Apps is enabled on the zone.`}).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:`AI Security for Apps enablement status for a zone.`})}const C={command:`update`,describe:`Update the AI Security for Apps status for a zone.`,builder:S,handler:async e=>o({command:`ai-security update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf ai-security update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled}):c(e.body)});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force,message:`This operation toggles AI Security for Apps for a zone.`}))return;if(e.body){let t=c(e.body),n=await a(`Deleting`,async()=>o.send(x,{body:t,zone_id:s}));r(n,{successLabel:`Deleted`});return}let d=l({enabled:e.enabled}),f=await a(`Deleting`,async()=>o.send(x,{body:d,zone_id:s}));r(f,{successLabel:`Deleted`})})},w={command:`ai-security`,describe:`Detect prompt injection, PII, and unsafe topics in traffic to your AI applications`,builder:e=>e.command(b).command(C).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
8
+ Update the AI Security for Apps status for the zone, enabling or disabling the detection. The detection results are exposed as \`cf.llm.prompt.*\` fields for use in custom rules and rate limiting rules; changes can take up to a minute to propagate.`).option(`enabled`,{type:`boolean`,description:`Whether AI Security for Apps is enabled on the zone.`}).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:`AI Security for Apps enablement status for a zone.`})}const C={command:`update`,describe:`Update the AI Security for Apps status for a zone.`,builder:S,handler:async e=>o({command:`ai-security update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf ai-security update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),s=await t(e),d=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=d,!await u({force:!!e.force,message:`This operation toggles AI Security for Apps for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(x,{body:e,zone_id:d}));r(t,{successLabel:`Updated`});return}let f=l({enabled:e.enabled}),p=await a(`Updating`,async()=>s.send(x,{body:f,zone_id:d}));r(p,{successLabel:`Updated`})})},w={command:`ai-security`,describe:`Detect prompt injection, PII, and unsafe topics in traffic to your AI applications`,builder:e=>e.command(b).command(C).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";import{n as g,t as _}from"./raw-fetch-DQeDx1wT.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(e){return e.usage(`$0 alerting available-alerts list
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-CEpZ-lQZ.mjs";import{n as g,t as _}from"./raw-fetch-Cl5spWC3.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/available_alerts`};function y(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 ee={command:`list`,describe:`Get Alert Types`,builder:y,handler:async e=>c({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));a(u,{successLabel:`Loaded`})})},te={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/eligible`};function re(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 b={command:`list`,describe:`Get Alert Types`,builder:y,handler:async e=>c({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(v,{account_id:l}));a(u,{successLabel:`Loaded`})})},ee={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/eligible`};function ne(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 ie={command:`get`,describe:`Get delivery mechanism eligibility`,builder:re,handler:async e=>c({command:`alerting destinations eligible get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting destinations eligible get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/eligible`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ne,{account_id:l}));a(u,{successLabel:`Loaded`})})},b={command:`eligible`,describe:`Operations for destinations.eligible`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty/connect`};function S(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 re={command:`get`,describe:`Get delivery mechanism eligibility`,builder:ne,handler:async e=>c({command:`alerting destinations eligible get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting destinations eligible get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/eligible`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l}));a(u,{successLabel:`Loaded`})})},ie={command:`eligible`,describe:`Operations for destinations.eligible`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty/connect`};function S(e){return e.usage(`$0 alerting destinations pagerduty create
7
7
 
8
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 C={command:`create`,describe:`Create PagerDuty integration token`,builder:S,handler:async e=>c({command:`alerting destinations pagerduty create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting destinations pagerduty create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/pagerduty/connect`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(x,{account_id:l}));a(u,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/pagerduty`};function T(e){return e.usage(`$0 alerting destinations pagerduty delete
9
9
 
@@ -13,7 +13,7 @@ Get a list of all configured PagerDuty services.`).option(`dry-run`,{type:`boole
13
13
 
14
14
  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 M={command:`link <token-id>`,describe:`Connect PagerDuty`,builder:j,handler:async e=>c({command:`alerting destinations pagerduty link`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations pagerduty link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/pagerduty/connect/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(A,{account_id:l,token_id:e[`token-id`]}));a(u,{successLabel:`Loaded`})})},N={command:`pagerduty`,describe:`Operations for destinations.pagerduty`,builder:e=>e.command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks`,body:`json`};function F(e){return e.usage(`$0 alerting destinations webhooks create
15
15
 
16
- 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 I={command:`create`,describe:`Create a webhook`,builder:F,handler:async e=>c({command:`alerting destinations webhooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(P,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await p(`url`,`The POST endpoint to call when dispatching a notification.`));let m=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),h=await s(`Creating`,async()=>c.send(P,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var L={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`};function R(e){return e.usage(`$0 alerting destinations webhooks delete <webhook-id>
16
+ 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 I={command:`create`,describe:`Create a webhook`,builder:F,handler:async e=>c({command:`alerting destinations webhooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations webhooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(P,{body:e,account_id:m}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await p(`url`,`The POST endpoint to call when dispatching a notification.`));let h=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),g=await s(`Creating`,async()=>l.send(P,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var L={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`};function R(e){return e.usage(`$0 alerting destinations webhooks delete <webhook-id>
17
17
 
18
18
  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 z={command:`delete <webhook-id>`,describe:`Delete a webhook`,builder:R,handler:async e=>c({command:`alerting destinations webhooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations webhooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the webhook destination.`}))return;let u=await s(`Deleting`,async()=>c.send(L,{account_id:l,webhook_id:e[`webhook-id`]}));a(u,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`};function V(e){return e.usage(`$0 alerting destinations webhooks get <webhook-id>
19
19
 
@@ -21,11 +21,11 @@ Get details for a single webhooks destination.`).positional(`webhook-id`,{type:`
21
21
 
22
22
  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 G={command:`list`,describe:`List webhooks`,builder:W,handler:async e=>c({command:`alerting destinations webhooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting destinations webhooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/destinations/webhooks`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(U,{account_id:l}));a(u,{successLabel:`Loaded`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/destinations/webhooks/${t.webhook_id}`,body:`json`};function q(e){return e.usage(`$0 alerting destinations webhooks update <webhook-id>
23
23
 
24
- 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 J={command:`update <webhook-id>`,describe:`Update a webhook`,builder:q,handler:async e=>c({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(K,{body:t,account_id:l,webhook_id:e[`webhook-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await p(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await p(`url`,`The POST endpoint to call when dispatching a notification.`));let m=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),h=await s(`Updating`,async()=>c.send(K,{body:m,account_id:l,webhook_id:e[`webhook-id`]}));a(h,{successLabel:`Updated`})})},Y={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(b).command(N).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/history`,query:[`per_page`,`before`,`page`,`since`]};function se(e){return e.usage(`$0 alerting history list
24
+ 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 J={command:`update <webhook-id>`,describe:`Update a webhook`,builder:q,handler:async e=>c({command:`alerting destinations webhooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting destinations webhooks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/destinations/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}):u(e.body),sensitiveBodyPaths:[[`secret`]]});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>l.send(K,{body:t,account_id:m,webhook_id:e[`webhook-id`]}));a(n,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await p(`name`,`The name of the webhook destination. This will be included in the request body when you receive a webhook notification.`)),e.url===void 0&&(e.url=await p(`url`,`The POST endpoint to call when dispatching a notification.`));let h=d({name:f(e.name,`name`,`text`),secret:f(e.secret,`secret`,`text`),url:f(e.url,`url`,`text`)}),g=await s(`Updating`,async()=>l.send(K,{body:h,account_id:m,webhook_id:e[`webhook-id`]}));a(g,{successLabel:`Updated`})})},Y={command:`webhooks`,describe:`Operations for destinations.webhooks`,builder:e=>e.command(I).command(z).command(H).command(G).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(ie).command(N).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/history`,query:[`per_page`,`before`,`page`,`since`]};function se(e){return e.usage(`$0 alerting history list
25
25
 
26
26
  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 ce={command:`list`,describe:`List History`,builder:se,handler:async e=>c({command:`alerting history list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={per_page:e[`per-page`],before:e.before,page:e.page,since:e.since};if(e.dryRun){let e=await r();o({command:`cf alerting history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/history`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(oe,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},le={command:`history`,describe:`Operations for history`,builder:e=>e.command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies`,body:`json`};function ue(e){return e.usage(`$0 alerting policies create
27
27
 
28
- 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:/* @__PURE__ */ `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(`.`)}).coerce(`alert-type`,e=>f(e,`alert-type`,`text`)).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(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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 de={command:`create`,describe:`Create a Notification policy`,builder:ue,handler:async e=>c({command:`alerting policies create`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(X,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}if(e[`alert-type`]===void 0&&(e[`alert-type`]=await m(`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.`,/* @__PURE__ */ `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(`.`))),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`Name of the policy.`));let g=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),_=await s(`Creating`,async()=>c.send(X,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`};function pe(e){return e.usage(`$0 alerting policies delete <policy-id>
28
+ 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:/* @__PURE__ */ `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(`.`)}).coerce(`alert-type`,e=>f(e,`alert-type`,`text`)).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(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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 de={command:`create`,describe:`Create a Notification policy`,builder:ue,handler:async e=>c({command:`alerting policies create`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),h=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>h.send(X,{body:e,account_id:g}));a(t,{successLabel:`Created`});return}if(e[`alert-type`]===void 0&&(e[`alert-type`]=await m(`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.`,/* @__PURE__ */ `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(`.`))),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`Name of the policy.`));let _=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),v=await s(`Creating`,async()=>h.send(X,{body:_,account_id:g}));a(v,{successLabel:`Created`})})};var fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`};function pe(e){return e.usage(`$0 alerting policies delete <policy-id>
29
29
 
30
30
  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 me={command:`delete <policy-id>`,describe:`Delete a Notification policy`,builder:pe,handler:async e=>c({command:`alerting policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the notification policy.`}))return;let u=await s(`Deleting`,async()=>c.send(fe,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};function he(e){return e.usage(`$0 alerting policies email details <policy-id>
31
31
 
@@ -37,11 +37,11 @@ Get details for a single policy.`).positional(`policy-id`,{type:`string`,descrip
37
37
 
38
38
  Get a list of all Notification policies.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List Notification policies`,builder:we,handler:async e=>c({command:`alerting policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/policies`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ce,{account_id:l}));a(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}/test`,body:`json`};function Ee(e){return e.usage(`$0 alerting policies test <policy-id>
39
39
 
40
- 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 De={command:`test <policy-id>`,describe:`Test a Notification policy`,builder:Ee,handler:async e=>c({command:`alerting policies test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/test`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Created`});return}let p=d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}),m=await s(`Creating`,async()=>c.send(Z,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Created`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`,body:`json`};function Oe(e){return e.usage(`$0 alerting policies update <policy-id>
40
+ 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 De={command:`test <policy-id>`,describe:`Test a Notification policy`,builder:Ee,handler:async e=>c({command:`alerting policies test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/test`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),l=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Creating`,async()=>l.send(Z,{body:t,account_id:p,policy_id:e[`policy-id`]}));a(n,{successLabel:`Created`});return}let m=d({severity:e.severity,source:f(e.source,`source`,`text`),state_correlation_id:f(e[`state-correlation-id`],`state-correlation-id`,`text`),state_event:e[`state-event`]}),h=await s(`Creating`,async()=>l.send(Z,{body:m,account_id:p,policy_id:e[`policy-id`]}));a(h,{successLabel:`Created`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/policies/${t.policy_id}`,body:`json`};function Oe(e){return e.usage(`$0 alerting policies update <policy-id>
41
41
 
42
- 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:/* @__PURE__ */ `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(`.`)}).coerce(`alert-type`,e=>f(e,`alert-type`,`text`)).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(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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 ke={command:`update <policy-id>`,describe:`Update a Notification policy`,builder:Oe,handler:async e=>c({command:`alerting policies update`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:p,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let m=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),h=await s(`Updating`,async()=>c.send(Q,{body:m,account_id:p,policy_id:e[`policy-id`]}));a(h,{successLabel:`Updated`})})},Ae={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(de).command(me).command(Se).command(Te).command(De).command(ke).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`,body:`json`};function Me(e){return e.usage(`$0 alerting silences create
42
+ 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:/* @__PURE__ */ `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(`.`)}).coerce(`alert-type`,e=>f(e,`alert-type`,`text`)).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(`mechanisms-email`,{type:`string`,description:`The mechanisms.email field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-pagerduty`,{type:`string`,description:`The mechanisms.pagerduty field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mechanisms-webhooks`,{type:`string`,description:`The mechanisms.webhooks field. Provide as a JSON array of objects or @path/to/file.json.`}).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 ke={command:`update <policy-id>`,describe:`Update a Notification policy`,builder:Oe,handler:async e=>c({command:`alerting policies update`,classification:{safeFlags:[`alert-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),p=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>p.send(Q,{body:t,account_id:m,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let h=d({alert_interval:f(e[`alert-interval`],`alert-interval`,`text`),alert_type:e[`alert-type`],description:f(e.description,`description`,`text`),enabled:e.enabled,filters:{actions:e[`filters-actions`],affected_asns:e[`filters-affected-asns`],affected_components:e[`filters-affected-components`],affected_locations:e[`filters-affected-locations`],airport_code:e[`filters-airport-code`],alert_trigger_preferences:e[`filters-alert-trigger-preferences`],alert_trigger_preferences_value:e[`filters-alert-trigger-preferences-value`],enabled:e[`filters-enabled`],environment:e[`filters-environment`],event:e[`filters-event`],event_source:e[`filters-event-source`],event_type:e[`filters-event-type`],group_by:e[`filters-group-by`],health_check_id:e[`filters-health-check-id`],incident_impact:e[`filters-incident-impact`],input_id:e[`filters-input-id`],insight_class:e[`filters-insight-class`],limit:e[`filters-limit`],logo_tag:e[`filters-logo-tag`],megabits_per_second:e[`filters-megabits-per-second`],new_health:e[`filters-new-health`],new_status:e[`filters-new-status`],packets_per_second:e[`filters-packets-per-second`],pool_id:e[`filters-pool-id`],pop_names:e[`filters-pop-names`],product:e[`filters-product`],project_id:e[`filters-project-id`],protocol:e[`filters-protocol`],query_tag:e[`filters-query-tag`],requests_per_second:e[`filters-requests-per-second`],selectors:e[`filters-selectors`],services:e[`filters-services`],slo:e[`filters-slo`],status:e[`filters-status`],target_hostname:e[`filters-target-hostname`],target_ip:e[`filters-target-ip`],target_zone_name:e[`filters-target-zone-name`],token_id:e[`filters-token-id`],traffic_exclusions:e[`filters-traffic-exclusions`],tunnel_id:e[`filters-tunnel-id`],tunnel_name:e[`filters-tunnel-name`],type:e[`filters-type`],where:e[`filters-where`],zones:e[`filters-zones`]},mechanisms:{email:l(e[`mechanisms-email`],`mechanisms-email`),pagerduty:l(e[`mechanisms-pagerduty`],`mechanisms-pagerduty`),webhooks:l(e[`mechanisms-webhooks`],`mechanisms-webhooks`)},name:f(e.name,`name`,`text`)}),g=await s(`Updating`,async()=>p.send(Q,{body:h,account_id:m,policy_id:e[`policy-id`]}));a(g,{successLabel:`Updated`})})},Ae={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(de).command(me).command(Se).command(Te).command(De).command(ke).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`,body:`json`};function Me(e){return e.usage(`$0 alerting silences create
43
43
 
44
- 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 Ne={command:`create`,describe:`Create Silences`,builder:Me,handler:async e=>c({command:`alerting silences create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting silences create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(je,{body:t,account_id:l}));a(n,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var Pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences/${t.silence_id}`};function $(e){return e.usage(`$0 alerting silences delete <silence-id>
44
+ 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 Ne={command:`create`,describe:`Create Silences`,builder:Me,handler:async e=>c({command:`alerting silences create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting silences create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>l.send(je,{body:e,account_id:d}));a(t,{successLabel:`Created`})}})};var Pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences/${t.silence_id}`};function $(e){return e.usage(`$0 alerting silences delete <silence-id>
45
45
 
46
46
  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 Fe={command:`delete <silence-id>`,describe:`Delete Silence`,builder:$,handler:async e=>c({command:`alerting silences delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting silences delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences/${e[`silence-id`]==null?`<silence-id>`:encodeURIComponent(String(e[`silence-id`]))}`,pathParams:{"silence-id":String(e[`silence-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the notification silence.`}))return;let u=await s(`Deleting`,async()=>c.send(Pe,{account_id:l,silence_id:e[`silence-id`]}));a(u,{successLabel:`Deleted`})})};var Ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences/${t.silence_id}`};function Le(e){return e.usage(`$0 alerting silences get <silence-id>
47
47
 
@@ -49,4 +49,4 @@ Gets a specific silence for an account.`).positional(`silence-id`,{type:`string`
49
49
 
50
50
  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 Ve={command:`list`,describe:`List Silences`,builder:Be,handler:async e=>c({command:`alerting silences list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf alerting silences list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ze,{account_id:l}));a(u,{successLabel:`Loaded`})})};var He={method:`PUT`,path:t=>e`/accounts/${t.account_id}/alerting/v3/silences`,body:`json`};function Ue(e){return e.usage(`$0 alerting silences update
51
51
 
52
- 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 We={command:`update`,describe:`Update Silences`,builder:Ue,handler:async e=>c({command:`alerting silences update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting silences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(He,{body:t,account_id:l}));a(n,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ge={command:`silences`,describe:`Operations for silences`,builder:e=>e.command(Ne).command(Fe).command(Re).command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ke={command:`alerting`,describe:`alerting`,builder:e=>e.command(te).command(ae).command(le).command(Ae).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ke as default};
52
+ 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 We={command:`update`,describe:`Update Silences`,builder:Ue,handler:async e=>c({command:`alerting silences update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf alerting silences update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/alerting/v3/silences`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let c=e.body===void 0?void 0:u(e.body),l=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body!==void 0){let e=c,t=await s(`Updating`,async()=>l.send(He,{body:e,account_id:d}));a(t,{successLabel:`Updated`})}})},Ge={command:`silences`,describe:`Operations for silences`,builder:e=>e.command(Ne).command(Fe).command(Re).command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ke={command:`alerting`,describe:`alerting`,builder:e=>e.command(ee).command(ae).command(le).command(Ae).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ke as default};
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m}from"./prompt-D0dXwuME.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(e){return e.usage(`$0 analytics latency colos get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m}from"./prompt-CEpZ-lQZ.mjs";var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency/colos`};function g(e){return e.usage(`$0 analytics latency colos get
3
3
 
4
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 _={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:g,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(h,{zone_id:r}));o(a,{successLabel:`Loaded`})})},v={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/zones/${t.zone_id}/analytics/latency`,query:[`bins`]};function b(e){return e.usage(`$0 analytics latency get
5
5
 
6
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 n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.send(y,{zone_id:a,...t}));o(l,{successLabel:`Loaded`})})},S={command:`latency`,describe:`Argo Smart Routing latency analytics showing time-to-first-byte improvements`,builder:e=>e.command(x).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/content-findings/top-n`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function w(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(`limit`,{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 T={command:`top-n`,describe:`Top integrations by content findings`,builder:w,handler:async e=>l({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security content-findings top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/content-findings/top-n`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(C,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}),g=await c(`Creating`,async()=>i.send(C,{body:h,account_id:l}));o(g,{successLabel:`Created`})})},E={command:`content-findings`,describe:`Operations for query.data-security.content-findings`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function O(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(`limit`,{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 T={command:`top-n`,describe:`Top integrations by content findings`,builder:w,handler:async e=>l({command:`analytics query data-security content-findings top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security content-findings top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/content-findings/top-n`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(C,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),n:e.limit,to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.send(C,{body:g,account_id:h}));o(_,{successLabel:`Created`})})},E={command:`content-findings`,describe:`Operations for query.data-security.content-findings`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function O(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 k={command:`summary`,describe:`Data security findings summary`,builder:O,handler:async e=>l({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security findings summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/summary`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(D,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),g=await c(`Creating`,async()=>i.send(D,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function j(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 k={command:`summary`,describe:`Data security findings summary`,builder:O,handler:async e=>l({command:`analytics query data-security findings summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security findings summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/summary`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(D,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.send(D,{body:g,account_id:h}));o(_,{successLabel:`Created`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/data-security/findings/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function j(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 M={command:`timeseries`,describe:`Data security findings timeseries`,builder:j,handler:async e=>l({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security findings timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/timeseries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(A,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),g=await c(`Creating`,async()=>i.send(A,{body:h,account_id:l}));o(g,{successLabel:`Created`})})},N={command:`findings`,describe:`Operations for query.data-security.findings`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`data-security`,describe:`Operations for query.data-security`,builder:e=>e.command(E).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function I(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 M={command:`timeseries`,describe:`Data security findings timeseries`,builder:j,handler:async e=>l({command:`analytics query data-security findings timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query data-security findings timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/data-security/findings/timeseries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(A,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);e.from===void 0&&(e.from=await m(`from`,`Start of the query time range (inclusive). RFC3339.`)),e.to===void 0&&(e.to=await m(`to`,`End of the query time range (exclusive). RFC3339.`));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.send(A,{body:g,account_id:h}));o(_,{successLabel:`Created`})})},N={command:`findings`,describe:`Operations for query.data-security.findings`,builder:e=>e.command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`data-security`,describe:`Operations for query.data-security`,builder:e=>e.command(E).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/summary`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function I(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:`Raw JSON request body (bypasses individual flags)`})}const L={command:`summary <dataset>`,describe:`Query analytics summary`,builder:I,handler:async e=>l({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/summary`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(F,{body:t,account_id:l,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}),g=await c(`Creating`,async()=>i.send(F,{body:h,account_id:l,dataset:e.dataset}));o(g,{successLabel:`Created`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function z(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:`Raw JSON request body (bypasses individual flags)`})}const B={command:`timeseries <dataset>`,describe:`Query analytics timeseries`,builder:z,handler:async e=>l({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/timeseries`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(R,{body:t,account_id:l,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.resolution===void 0&&(e.resolution=await m(`resolution`,`Time bucket size for grouping results. Controls the granularity of the returned time slots. `));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}),g=await c(`Creating`,async()=>i.send(R,{body:h,account_id:l,dataset:e.dataset}));o(g,{successLabel:`Created`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/top-n`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function H(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:`Raw JSON request body (bypasses individual flags)`})}const L={command:`summary <dataset>`,describe:`Query analytics summary`,builder:I,handler:async e=>l({command:`analytics query summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query summary`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/summary`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(F,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`)}),_=await c(`Creating`,async()=>l.send(F,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/timeseries`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function z(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:`Raw JSON request body (bypasses individual flags)`})}const B={command:`timeseries <dataset>`,describe:`Query analytics timeseries`,builder:z,handler:async e=>l({command:`analytics query timeseries`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query timeseries`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/timeseries`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(R,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.resolution===void 0&&(e.resolution=await m(`resolution`,`Time bucket size for grouping results. Controls the granularity of the returned time slots. `));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),resolution:p(e.resolution,`resolution`,`text`)}),_=await c(`Creating`,async()=>l.send(R,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/analytics/query/${t.dataset}/top-n`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function H(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(`limit`,{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:`Raw JSON request body (bypasses individual flags)`})}const U={command:`top-n <dataset>`,describe:`Query analytics top-N`,builder:H,handler:async e=>l({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/top-n`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(V,{body:t,account_id:l,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);if(e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e[`order-by`]===void 0&&(e[`order-by`]=await m(`order-by`,`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`));let h=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}),g=await c(`Creating`,async()=>i.send(V,{body:h,account_id:l,dataset:e.dataset}));o(g,{successLabel:`Created`})})},W={command:`query`,describe:`Operations for query`,builder:e=>e.command(L).command(B).command(U).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`analytics`,describe:`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,builder:e=>e.command(S).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
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(`limit`,{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:`Raw JSON request body (bypasses individual flags)`})}const U={command:`top-n <dataset>`,describe:`Query analytics top-N`,builder:H,handler:async e=>l({command:`analytics query top-n`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf analytics query top-n`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/analytics/query/${e.dataset==null?`<dataset>`:encodeURIComponent(String(e.dataset))}/top-n`,pathParams:{dataset:String(e.dataset??``)},bodyKind:`json`,body:e.body===void 0?f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),h=e.local?t:await a();if(e.accountId=h,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(V,{body:t,account_id:h,dataset:e.dataset}));o(n,{successLabel:`Created`});return}if(e.filters===void 0)throw Error(`--filters is required (or pass --body with this field set).`);if(e.from===void 0&&(e.from=await m(`from`,"The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).")),e[`group-by`]===void 0)throw Error(`--group-by is required (or pass --body with this field set).`);if(e.stats===void 0)throw Error(`--stats is required (or pass --body with this field set).`);if(e.to===void 0&&(e.to=await m(`to`,`Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.`)),e.limit===void 0)throw Error(`--limit is required (or pass --body with this field set).`);e[`order-by`]===void 0&&(e[`order-by`]=await m(`order-by`,`Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.`));let g=f({filters:u(e.filters,`filters`),from:p(e.from,`from`,`text`),groupBy:e[`group-by`],stats:e.stats,to:p(e.to,`to`,`text`),n:e.limit,orderBy:p(e[`order-by`],`order-by`,`text`)}),_=await c(`Creating`,async()=>l.send(V,{body:g,account_id:h,dataset:e.dataset}));o(_,{successLabel:`Created`})})},W={command:`query`,describe:`Operations for query`,builder:e=>e.command(L).command(B).command(U).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`analytics`,describe:`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,builder:e=>e.command(S).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-DIJ7SIKC.mjs";import{i as t,n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";function d(e){return e.usage(`$0 analytics-engine sql query
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:`Plain-text request body (without JSON quotes)`}).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){let e=await r();o({command:`cf analytics-engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.file===void 0?d.body:{file:d.file}});return}if(d.body===void 0&&d.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let c=d.file===void 0?l(d.body,`body`,`binary`):void 0,f=await n(d),p=d.local?e:await i();if(d.accountId=p,d.file!==void 0){let e=u(d.file),n=await s(`Loading`,async()=>t(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}}));a(n,{successLabel:`Loaded`})}else if(d.body!==void 0){let e=c,n=await s(`Loading`,async()=>t(f,`POST`,`/accounts/${p}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}}));a(n,{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};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ function e(e){return{headers:e.headers,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url}}const t={headers:new Headers,redirected:!1,status:499,statusText:`Client Closed Request`,type:`error`,url:``},n={headers:new Headers,redirected:!1,status:0,statusText:`Unknown Error`,type:`error`,url:``};function r({message:e,statusCode:t,body:n}){let r=[];return e!=null&&r.push(e),t!=null&&r.push(`Status code: ${t.toString()}`),n!=null&&r.push(`Body: ${JSON.stringify(n,void 0,2)}`),r.join(`
3
+ `)}var i=class extends Error{statusCode;body;rawResponse;constructor(e){super(r(e)),Object.setPrototypeOf(this,new.target.prototype),this.name=`ApiError`,this.statusCode=e.statusCode,this.body=e.body,this.rawResponse=e.rawResponse,e.cause!==void 0&&e.cause!==null&&Object.defineProperty(this,"cause",{value:e.cause,writable:!0,configurable:!0})}get requestId(){return this.rawResponse?.headers?.get(`x-request-id`)??void 0}},a=class extends i{constructor(e,t){super({message:e,cause:t?.cause}),Object.setPrototypeOf(this,new.target.prototype),this.name=`ApiTimeoutError`}};function o(e,t,n,r){let a=new i({message:e,statusCode:t,body:n,rawResponse:r});return a.name=e,a}const s=/* @__PURE__ */ new WeakMap;function c(e,t){return typeof e==`object`&&e&&t!==void 0&&s.set(e,t),e}function l(e){return typeof e==`object`&&e?s.get(e):void 0}function u(e){if(!e)return e;let t=+!!e.startsWith(`/`),n=e.endsWith(`/`)?e.length-1:e.length;return t===0&&n===e.length?e:e.slice(t,n)}function d(e,t){return e.endsWith(`/`)?e+t:`${e}/${t}`}function f(e,t){let n=e;for(let e of t){let t=u(e);t&&(n=d(n,t))}return t.at(-1)?.endsWith(`/`)&&!n.endsWith(`/`)&&(n+=`/`),n}function p(e,...t){if(!e)return``;if(t.length===0)return e;if(!e.includes(`://`))return f(e,t);let n;try{n=new URL(e)}catch{return f(e,t)}for(let e of t){let t=u(e);t&&(n.pathname=d(n.pathname,t))}return t.at(-1)?.endsWith(`/`)&&!n.pathname.endsWith(`/`)&&(n.pathname+=`/`),n.toString()}function m(e){return e==null?``:encodeURIComponent(String(e))}function h(e,t,n){let r=[];for(let[i,a]of Object.entries(e)){let e=t?`${t}[${i}]`:i;if(a!=null){if(Array.isArray(a)){if(a.length===0)continue;if(n){let t=a.filter(e=>e!=null).map(m);t.length>0&&r.push(`${encodeURIComponent(e)}=${t.join(`,`)}`);continue}for(let t of a)t!=null&&(typeof t==`object`&&!Array.isArray(t)?r.push(...h(t,e,n)):r.push(`${encodeURIComponent(e)}=${m(t)}`))}else if(typeof a==`object`){if(Object.keys(a).length===0)continue;r.push(...h(a,e,n))}else r.push(`${encodeURIComponent(e)}=${m(a)}`)}}return r}function g(e,t=[]){let n=/* @__PURE__ */ new Map;for(let[t,r]of e){if(r==null)continue;let e=h({[t]:r},``,!1).join(`&`);e.length>0&&n.set(t,e)}for(let[r,i]of e){if(!t.includes(r)||i==null)continue;let e=h({[r]:i},``,!0).join(`&`);e.length>0&&n.set(r,e)}return[...n.values()].join(`&`)}function _(t,n){if(typeof t!=`object`||!t||Array.isArray(t)||!(`success`in t))return t;let r=e=>Reflect.get(t,e);if(r(`success`)===!1){let a=r(`errors`),o=(Array.isArray(a)?a:[]).map(e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`&&`message`in e){let t=Reflect.get(e,`message`);return typeof t==`string`?t:void 0}}).filter(e=>typeof e==`string`&&e.length>0).join(`, `)||`Cloudflare API request failed`,s=new i({message:o,statusCode:n?.ok===!1?n.status:void 0,body:t,rawResponse:n?e(n):void 0});throw s.name=`ApiEnvelopeError`,s.message=o,s}if(!(`result`in t))return t;let a=r(`result`);return Array.isArray(a)?{result:a,result_info:r(`result_info`)}:c(a,r(`result_info`))}function v(e){let t={get bodyUsed(){return e.bodyUsed},stream:()=>e.body,arrayBuffer:e.arrayBuffer.bind(e),blob:e.blob.bind(e)};return`bytes`in e&&typeof e.bytes==`function`&&(t.bytes=e.bytes.bind(e)),t}async function y(e,t){if(t===`binary-response`)return v(e);if(t===`text`)return await e.text();let n=await e.text();if(n.length===0)return;let r;try{r=JSON.parse(n)}catch{return{ok:!1,error:{reason:`non-json`,statusCode:e.status,rawBody:n}}}return _(r,e)}const b=/* @__PURE__ */ new Set([`application/hal+json`,`application/json`,`application/ld+json`,`application/problem+json`,`application/vnd.api+json`,`text/json`]);async function x(e){let t=e.headers.get(`Content-Type`)?.toLowerCase();if(t==null||t.length===0)return y(e);if(t.includes(`;`)&&(t=t.split(`;`)[0]?.trim()??``),b.has(t)||t.startsWith(`application/vnd.`)&&t.endsWith(`+json`)){let t=await e.text();return t.length>0?JSON.parse(t):void 0}return await e.text()}function S(e){let t=new AbortController;for(let n of e)if(n.aborted||(n.addEventListener(`abort`,()=>t.abort(n.reason),{signal:t.signal}),n.aborted))return t.abort(n.reason),t.signal;return t.signal}async function C(e,t,n,r,i){let a=[],o;if(r!==void 0){let e=new AbortController;o=setTimeout(()=>e.abort(`timeout`),r),a.push(e.signal)}i!==void 0&&a.push(i);try{return await e(t,{...n,signal:S(a)})}finally{o!==void 0&&clearTimeout(o)}}const w=[408,429,502,503,504];function T(e,t){let n=e.headers.get(`Retry-After`);if(n){let e=parseInt(n,10);if(!Number.isNaN(e)&&e>0)return Math.min(e*1e3,6e4);let t=new Date(n);if(!Number.isNaN(t.getTime())){let e=t.getTime()-Date.now();if(e>0)return Math.min(e,6e4)}}let r=e.headers.get(`X-RateLimit-Reset`);if(r){let e=parseInt(r,10);if(!Number.isNaN(e)){let t=e*1e3-Date.now();if(t>0)return Math.min(t,6e4)*(1+Math.random()*.2)}}return Math.min(1e3*2**t,6e4)*(1+(Math.random()-.5)*.2)}async function E(e,t,n,r){let i=await C(e,t,n,r.timeoutMs,r.signal);for(let a=0;a<(r.maxRetries??2)&&w.includes(i.status);a++)await new Promise(e=>setTimeout(e,T(i,a))),i=await C(e,t,n,r.timeoutMs,r.signal);return i}function D(...e){let t={};for(let n of e)if(n!=null)for(let[e,r]of Object.entries(n)){let n=e.toLowerCase();r==null?n in t&&delete t[n]:t[n]=r}return t}var O=class{#e;constructor(e){this.#e=e}get baseUrl(){return this.#e.baseUrl}async#t(){return(await this.#e.auth?.())?.headers??{}}async send(r,s={},c){let l=new Set(r.pathParams),u=r.path(s),d=u.replace(/^\//,``),f=[];for(let e of r.query??[])l.add(e),f.push([e,s[e]]);let m={};for(let e of r.headers??[])l.add(e),m[e]=s[e];let h,_;if(r.body===`json`){h=s.body;let e=typeof h==`object`&&!!h&&!Array.isArray(h);r.constants!==void 0&&(h===void 0||e)&&(h={...h,...r.constants})}else if(r.body===`form`){_=new FormData;for(let[e,t]of Object.entries(s))!l.has(e)&&t!=null&&_.append(e,typeof t==`object`?JSON.stringify(t):String(t))}let v=p(this.#e.baseUrl,d),b=g(f,r.joined),S=new Headers;S.set(`Accept`,r.response===`text`?`text/plain`:`*/*`),h!==void 0&&r.body!==`form`&&S.set(`Content-Type`,r.contentType??`application/json`);let C=D(await this.#t(),this.#e.headers,Object.fromEntries(Object.entries(m).filter(([,e])=>e!=null)),c?.headers);for(let[e,t]of Object.entries(C))S.set(e,typeof t==`string`?t:`${t}`);let w={method:r.method,headers:S};_===void 0?h!==void 0&&(w.body=JSON.stringify(h)):(w.body=_,w.duplex=`half`);let T=c?.timeoutInSeconds??this.#e.timeoutInSeconds??60,O=c?.abortSignal,k;try{let t=await E(this.#e.fetch??fetch,b?`${v}?${b}`:v,w,{timeoutMs:T*1e3,signal:O,maxRetries:c?.maxRetries??this.#e.maxRetries}),n=e(t);if(t.status<200||t.status>=400){let e=await x(t),a=r.errors?.[String(t.status)];throw a===void 0?new i({statusCode:t.status,body:e,rawResponse:n}):o(a,t.status,e,n)}k=await y(t,r.response===!1?void 0:r.response)}catch(e){throw e instanceof i?e:O?.aborted?new i({message:`The user aborted a request`,rawResponse:t,cause:e}):e instanceof Error&&e.name===`AbortError`?new a(`Timeout exceeded when calling ${r.method} ${u}.`,{cause:e}):new i({message:e instanceof Error?e.message:JSON.stringify(e),rawResponse:n,cause:e})}if(r.response!==!1)return k}async fetch(e,t,n){let r=e instanceof URL?e.toString():e,i=r.startsWith(`http://`)||r.startsWith(`https://`)?r:p(this.#e.baseUrl,r),a={};for(let[e,t]of Object.entries(this.#e.headers??{}))t!=null&&(a[e.toLowerCase()]=`${t}`);for(let[e,t]of Object.entries(await this.#t()))a[e.toLowerCase()]=t;if(t?.headers!==void 0&&t.headers!==null){let e=t.headers instanceof Headers?Object.fromEntries(t.headers.entries()):Array.isArray(t.headers)?Object.fromEntries(t.headers):t.headers;for(let[t,n]of Object.entries(e))n!=null&&(a[t.toLowerCase()]=n)}for(let[e,t]of Object.entries(n?.headers??{}))a[e.toLowerCase()]=t;let o=n?.timeoutInSeconds??this.#e.timeoutInSeconds,s={method:t?.method??`GET`,headers:a};return t?.body!==void 0&&t.body!==null&&(s.body=t.body),E(this.#e.fetch??fetch,i,s,{timeoutMs:o===void 0?void 0:o*1e3,signal:n?.abortSignal??t?.signal??void 0,maxRetries:n?.maxRetries??this.#e.maxRetries})}};export{i,l as n,c as r,O as t};