cf 1.0.0-beta.26 → 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 (294) hide show
  1. package/dist/_meta/commands.json +7373 -4926
  2. package/dist/_meta/hand-written-commands.json +2 -2
  3. package/dist/_meta/schemas.json +11614 -4465
  4. package/dist/abuse-reports-D9edOyag.mjs +24 -0
  5. package/dist/{access-DCOOmDC5.mjs → access-CKCCSrrU.mjs} +1 -1
  6. package/dist/{accounts-HC6XuIwP.mjs → accounts-CNb9U9bK.mjs} +33 -27
  7. package/dist/{acm-DYgr6SAR.mjs → acm-CdKTAToZ.mjs} +3 -3
  8. package/dist/{addressing-BS66pJ_a.mjs → addressing-eZI_C-b0.mjs} +18 -18
  9. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
  10. package/dist/{ai-BiIKznNv.mjs → ai-Csl_QNwv.mjs} +7 -7
  11. package/dist/ai-audit-DlqWsQi-.mjs +6 -0
  12. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
  13. package/dist/ai-search-BxyhS3X7.mjs +74 -0
  14. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-DvU2iYkY.mjs} +3 -3
  15. package/dist/{alerting-BSzuvFk1.mjs → alerting-r0G2X9y9.mjs} +10 -10
  16. package/dist/analytics-C6bfqm-W.mjs +17 -0
  17. package/dist/analytics-engine-BlIecoOe.mjs +4 -0
  18. package/dist/api-Dnt6lRJG.mjs +3 -0
  19. package/dist/{api-security-BBxEJjGv.mjs → api-security-DZ7GWOqD.mjs} +26 -26
  20. package/dist/argo-Bh0_cj49.mjs +14 -0
  21. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-VZJWVq_6.mjs} +16 -16
  22. package/dist/{audit-logs-BhJs-OS2.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-C50SqX9F.mjs → auth-clmqFEWU.mjs} +3 -3
  26. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-DW4dJVdj.mjs} +1 -1
  27. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-C0ynlGHf.mjs} +23 -23
  28. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
  29. package/dist/billing-B2KusU6g.mjs +22 -0
  30. package/dist/{blocks-DnNrvi8s.mjs → blocks-BFulF68V.mjs} +1 -1
  31. package/dist/body-parser-DoewLePl.mjs +2 -0
  32. package/dist/body-unions-DNs981Ia.mjs +2 -0
  33. package/dist/bot-management-CXHXgrQC.mjs +9 -0
  34. package/dist/{botnet-feed-lD9s2oLA.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-D3mAH87h.mjs → builds-BbxINHRP.mjs} +27 -27
  40. package/dist/cache-BacNNtLu.mjs +36 -0
  41. package/dist/{cf-CpC4giTf.mjs → cf-BQ_LRiut.mjs} +2 -2
  42. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
  43. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +363 -0
  44. package/dist/{cli-Cm4Twas4.mjs → cli-B7vslRfu.mjs} +1 -1
  45. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-bzB9JosR.mjs} +6 -6
  46. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
  47. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
  48. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-DWBPQDA3.mjs} +126 -124
  49. package/dist/{command--Y_QAiU2.mjs → command-AVwd7XjE.mjs} +1 -1
  50. package/dist/{command-DlI7Z_7j.mjs → command-B87T_f2f.mjs} +1 -1
  51. package/dist/{command-QHmV62Fv.mjs → command-CEHhi3t0.mjs} +1 -1
  52. package/dist/{command-B-_ba4rQ.mjs → command-CYmQE79n.mjs} +1 -1
  53. package/dist/{command-DsOv6z9q.mjs → command-CbxXc5IW.mjs} +1 -1
  54. package/dist/{command-BKNQsGqu.mjs → command-Ce8CVLth.mjs} +1 -1
  55. package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
  56. package/dist/{command-BV8-laJK.mjs → command-D4YcwpVp.mjs} +1 -1
  57. package/dist/{command-BVz2aES3.mjs → command-D895kdlh.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-D9Qyi1B0.mjs} +1 -1
  59. package/dist/{command-CfOqnqlN.mjs → command-DeutqL1n.mjs} +1 -1
  60. package/dist/{command-Dn39o5xQ.mjs → command-Dl9ICrRK.mjs} +1 -1
  61. package/dist/{command-CN8NFLs2.mjs → command-DtCSe8Hy.mjs} +1 -1
  62. package/dist/{command-BsCFkho-.mjs → command-DwzVtmb3.mjs} +1 -1
  63. package/dist/{command-CQMRxiDz.mjs → command-wtBubtZ4.mjs} +1 -1
  64. package/dist/{completions-BA52jTea.mjs → completions-BvdKtzsX.mjs} +1 -1
  65. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
  66. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
  68. package/dist/{connectors-D8H6rQz9.mjs → connectors-DZFGNw3i.mjs} +4 -4
  69. package/dist/{containers-D4sa-Eoy.mjs → containers-B06OGOEB.mjs} +212 -212
  70. package/dist/{containers-Db-eWudu.mjs → containers-DCzQCo79.mjs} +8 -8
  71. package/dist/{content-scan-DUVq09i8.mjs → content-scan-XhnNJqXf.mjs} +4 -4
  72. package/dist/{context-BvLXzoMs.mjs → context-BY1Eh_Qe.mjs} +1 -1
  73. package/dist/{cps-CqaRliZZ.mjs → cps-CohlxvuN.mjs} +2 -2
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-BV4bHq8v.mjs} +2 -4
  76. package/dist/custom-csrs-BVdMQjYq.mjs +18 -0
  77. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
  78. package/dist/custom-nameservers-CapMDyly.mjs +12 -0
  79. package/dist/custom-pages-BVIniWfq.mjs +38 -0
  80. package/dist/d1-nJCOJZb8.mjs +50 -0
  81. package/dist/{delegate-CMfEjvHn.mjs → delegate-CcL6RoGw.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-DDbmxkiX.mjs → deploy-DJMnWFNk.mjs} +1 -1
  84. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
  85. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
  86. package/dist/{dev-BS156bim.mjs → dev-GsYHvMah.mjs} +1 -1
  87. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
  88. package/dist/{dist-DehXZozc.mjs → dist-D-ihn_mV.mjs} +42 -33
  89. package/dist/{dls-DciZC_gQ.mjs → dls-N1x8sAK3.mjs} +3 -3
  90. package/dist/{dns-C2YPspGN.mjs → dns-DATWP-PF.mjs} +36 -30
  91. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-n3Y2ui6W.mjs} +8 -8
  92. package/dist/{docs-CYjyBA8q.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-DcI97y4p.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
  95. package/dist/{email-auth-CMCQAu99.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
  96. package/dist/email-domains-uL22-zRY.mjs +14 -0
  97. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CV43rMJC.mjs} +15 -13
  98. package/dist/{email-security-Bu0fAYh-.mjs → email-security-DK_SJ0yi.mjs} +38 -38
  99. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CTQafGec.mjs} +17 -17
  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-C5RGao2J.mjs → errors-VG1mgwJl.mjs} +1 -1
  103. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
  104. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CW-fAI9m.mjs} +30 -14
  105. package/dist/{flagship-C5PTR1ND.mjs → flagship-RiLnDwfJ.mjs} +8 -8
  106. package/dist/{fraud-B7hwBheX.mjs → fraud-DvfBBTe8.mjs} +2 -2
  107. package/dist/get-3XNn0upb.mjs +2 -0
  108. package/dist/global-options-DiKj2cQy.mjs +2 -0
  109. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
  110. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
  111. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
  112. package/dist/iam-LlGEzRCq.mjs +62 -0
  113. package/dist/{images-Ttea4khD.mjs → images-C5WqUXkK.mjs} +11 -11
  114. package/dist/index.mjs +1 -1
  115. package/dist/{init-BeYrAg7Q.mjs → init-EVsjBrOz.mjs} +2 -2
  116. package/dist/{intel-CJznBf5n.mjs → intel-vcWyslaX.mjs} +18 -19
  117. package/dist/{interactive-DsU8VDvK.mjs → interactive-BCDFSPtq.mjs} +1 -1
  118. package/dist/{internal-DOho_iA0.mjs → internal-BhV9WjLp.mjs} +1 -1
  119. package/dist/{ips-BgNoRwFN.mjs → ips-CqHjVsqd.mjs} +1 -1
  120. package/dist/{k2-Cj1ORHul.mjs → k2-CZT2Pd5J.mjs} +2 -2
  121. package/dist/kv-Ipa7dnvF.mjs +12 -0
  122. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
  124. package/dist/{live-BfrWKfq8.mjs → live-C9L1bNuE.mjs} +1 -1
  125. package/dist/load-balancers-Cb3VkSfc.mjs +84 -0
  126. package/dist/local-D5Vq6ooZ.mjs +2 -0
  127. package/dist/{local-CvzO-cQH.mjs → local-DIJ7SIKC.mjs} +1 -1
  128. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-BZjgkacr.mjs} +1 -1
  129. package/dist/{login-CVWkMh1L.mjs → login-DG5ebyab.mjs} +1 -1
  130. package/dist/login-DRJugxya.mjs +2 -0
  131. package/dist/logpush-C5Gw7F_9.mjs +68 -0
  132. package/dist/logs-y3REfHbb.mjs +51 -0
  133. package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
  134. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BPV_POf5.mjs} +129 -129
  135. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
  136. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
  137. package/dist/{mcp-BUOfMkBP.mjs → mcp-RPtrISTy.mjs} +6 -6
  138. package/dist/{mesh-B1RrhAT1.mjs → mesh-DZ4QHBPE.mjs} +5 -5
  139. package/dist/{migrate-BTU8AvlP.mjs → migrate-CRIUqGi2.mjs} +1 -1
  140. package/dist/{monetization-Da3ooFLC.mjs → monetization-CVZqM8Xo.mjs} +9 -5
  141. package/dist/{network-CjhSzhMm.mjs → network-DLt2JUo1.mjs} +15 -15
  142. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
  143. package/dist/o11y-ySxrnP1Z.mjs +88 -0
  144. package/dist/{oauth-Dnog5v-Q.mjs → oauth-CFVUl-Wv.mjs} +1 -1
  145. package/dist/{oauth-DdXkpU44.mjs → oauth-Cidoyxfp.mjs} +1 -1
  146. package/dist/observability-C-KNh__y.mjs +4 -0
  147. package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
  148. package/dist/organizations-DbeeWUL4.mjs +71 -0
  149. package/dist/output-BZQEl3mK.mjs +2 -0
  150. package/dist/package-B7RgwuFR.mjs +2 -0
  151. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-DRw763O1.mjs} +4 -4
  152. package/dist/{pages-DYZDvWK6.mjs → pages-DfQnxiTk.mjs} +12 -12
  153. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
  154. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-wdEhl8k4.mjs} +14 -12
  155. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-DbyrI6F4.mjs} +11 -11
  156. package/dist/precursor-Dx8lN4UJ.mjs +4 -0
  157. package/dist/previews-DEVNSip2.mjs +6 -0
  158. package/dist/{progress-B-CVX0kn.mjs → progress-yvPscjYg.mjs} +1 -1
  159. package/dist/{prompt-DJF_Rs5S.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
  160. package/dist/{queues-DaqLO-UO.mjs → queues-DgMc7Z6A.mjs} +18 -18
  161. package/dist/{r2-DDIU9JN3.mjs → r2-BpTVicIq.mjs} +43 -43
  162. package/dist/{radar-D59qCgld.mjs → radar-DW-S1VUh.mjs} +11 -11
  163. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
  164. package/dist/{ready-DgE08svD.mjs → ready-d0li0X6r.mjs} +1 -1
  165. package/dist/realtime-DMKHLYF4.mjs +170 -0
  166. package/dist/registrar-D23gfKBi.mjs +43 -0
  167. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
  168. package/dist/{reporting-Dx2YTick.mjs → reporting-WX8P3Y0k.mjs} +2 -2
  169. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-C0FpeBhz.mjs} +1 -1
  170. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-qd7XOAka.mjs} +2 -2
  171. package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
  172. package/dist/{rules-CjgLSlUC.mjs → rules-CB0QQTB3.mjs} +5 -5
  173. package/dist/rulesets-DmqwixUC.mjs +42 -0
  174. package/dist/{rum-vPEpMS_h.mjs → rum-BZ_24qZU.mjs} +9 -9
  175. package/dist/{run-BZ6Fj3jQ.mjs → run-BOKI1uWa.mjs} +1 -1
  176. package/dist/run-DBqOjD1P.mjs +2 -0
  177. package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
  178. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
  179. package/dist/schema-flags-CXm9iIv6.mjs +4 -0
  180. package/dist/{scim-BA7XbsSu.mjs → scim-DchxaJfE.mjs} +8 -8
  181. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-oAft1cFE.mjs} +5 -5
  182. package/dist/security-insights-DMm0qg_m.mjs +62 -0
  183. package/dist/{security-txt-DikhnR2L.mjs → security-txt-CIt0494b.mjs} +2 -2
  184. package/dist/{session-BOnam-Wv.mjs → session-vzNfUhPl.mjs} +1 -1
  185. package/dist/{shared-DmmWSObC.mjs → shared-MK-_lkbn.mjs} +1 -1
  186. package/dist/{signed-url-C-24KbWB.mjs → signed-url-gNangfwc.mjs} +1 -1
  187. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
  188. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-DdoDYXW-.mjs} +3 -3
  189. package/dist/{spawn-C3hzWVrJ.mjs → spawn-B5F4OIHG.mjs} +1 -1
  190. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-DLYIHelC.mjs} +3 -3
  191. package/dist/{speed-DShjlpAs.mjs → speed-DugG9Tm9.mjs} +2 -2
  192. package/dist/{sql-DCoFf15T.mjs → sql-Bb56llsb.mjs} +2 -2
  193. package/dist/src-BoSDeQ9m.mjs +133 -0
  194. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bg4X3WGk.mjs} +24 -24
  195. package/dist/startup-profile-DQVkZZpb.mjs +2 -0
  196. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DZL2DC44.mjs} +1 -1
  197. package/dist/state-DW3QZtfh.mjs +2 -0
  198. package/dist/{state-DmjHXZat.mjs → state-mr5ux1Nb.mjs} +1 -1
  199. package/dist/{stream-CpZbnSpH.mjs → stream-BuZYDbNR.mjs} +21 -21
  200. package/dist/{tags-BIjQ3Kjh.mjs → tags-SKz2odE_.mjs} +12 -6
  201. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-B4zmCpT0.mjs} +1 -1
  202. package/dist/telemetry-DkDUr4KK.mjs +2 -0
  203. package/dist/tenant-custom-nameservers-BhkhBerL.mjs +8 -0
  204. package/dist/tenants-DD-GMq0K.mjs +13 -0
  205. package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
  206. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-D90ztENM.mjs} +6 -6
  207. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-DhSU_Xar.mjs} +4 -4
  208. package/dist/ui-xjCox-gU.mjs +2 -0
  209. package/dist/{update-check-D_Wtw0_D.mjs → update-check-CRttabfu.mjs} +1 -1
  210. package/dist/{update-check-Dc7cRFlx.mjs → update-check-HltjTMDE.mjs} +1 -1
  211. package/dist/update-check-worker.mjs +1 -1
  212. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
  213. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BRdWwka4.mjs} +3 -3
  214. package/dist/{user-BaF0qvvO.mjs → user-Cmb1_Wu5.mjs} +50 -52
  215. package/dist/{vectorize-D5qiggZU.mjs → vectorize-BTBerJME.mjs} +11 -11
  216. package/dist/verify-B9ILCohg.mjs +2 -0
  217. package/dist/verify-BCuWaO-L.mjs +2 -0
  218. package/dist/version-6Bpy6Bgt.mjs +2 -0
  219. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-LymmKIGr.mjs} +16 -14
  220. package/dist/{web-assets-BySw_Tme.mjs → web-assets-LHPQsrnY.mjs} +21 -21
  221. package/dist/{web3-BKkKf1RF.mjs → web3-BsOio0Ae.mjs} +12 -12
  222. package/dist/workers-BnLiOjZf.mjs +39 -0
  223. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-sKpITeRk.mjs} +4 -4
  224. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
  225. package/dist/workers-vpc-D8lefWDo.mjs +12 -0
  226. package/dist/{workflows-Cr957c4U.mjs → workflows-B-ZIG3y7.mjs} +22 -22
  227. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-6E6wT_LZ.mjs} +67 -58
  228. package/dist/zaraz-BBKki5WS.mjs +22 -0
  229. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-BZDXM5r6.mjs} +487 -409
  230. package/dist/{zones-BzyjOT10.mjs → zones-B-UV_DGE.mjs} +24 -24
  231. package/package.json +16 -16
  232. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  233. package/dist/ai-audit-DI4Rw2wl.mjs +0 -6
  234. package/dist/ai-search-QOenIzDL.mjs +0 -74
  235. package/dist/analytics-CQ-Yt1mm.mjs +0 -17
  236. package/dist/analytics-engine-CdrY5-95.mjs +0 -4
  237. package/dist/api-X3wKppsT.mjs +0 -3
  238. package/dist/argo-BiefH8wc.mjs +0 -14
  239. package/dist/auth-Czzy5Rs_.mjs +0 -2
  240. package/dist/auth-D5Yj9eYU.mjs +0 -2
  241. package/dist/billing-BrLJqlOf.mjs +0 -22
  242. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  243. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  244. package/dist/brand-protection-Byoa1hvj.mjs +0 -26
  245. package/dist/browser-run-BSVANGzU.mjs +0 -40
  246. package/dist/build-CPKxZ3kL.mjs +0 -2
  247. package/dist/build-Dwd1_7o0.mjs +0 -2
  248. package/dist/cache-0xCdyNg9.mjs +0 -36
  249. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  250. package/dist/create-BtmuVqVL.mjs +0 -2
  251. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  252. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  253. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  254. package/dist/d1-BsWI546w.mjs +0 -89
  255. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  256. package/dist/error-sanitization-B025CygB.mjs +0 -2
  257. package/dist/get-Be821dio.mjs +0 -2
  258. package/dist/iam-DuZenYtc.mjs +0 -48
  259. package/dist/kv-CTyuvcAz.mjs +0 -12
  260. package/dist/load-balancers-DMTsh-9q.mjs +0 -72
  261. package/dist/local-CWTti4ot.mjs +0 -2
  262. package/dist/login-Djz5mvHJ.mjs +0 -2
  263. package/dist/logpush-OMhp7VgE.mjs +0 -44
  264. package/dist/logs-BSyyNwso.mjs +0 -35
  265. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  266. package/dist/magic-network-monitoring-DRRvSrDP.mjs +0 -34
  267. package/dist/o11y-DeNxXxcp.mjs +0 -86
  268. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  269. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  270. package/dist/organization-IsxVyWol.mjs +0 -73
  271. package/dist/organizations-p8Mgo8A7.mjs +0 -4
  272. package/dist/origin-post-quantum-encryption-Bwysyttf.mjs +0 -6
  273. package/dist/output-BJEgbI0G.mjs +0 -2
  274. package/dist/package-BOE_De2L.mjs +0 -2
  275. package/dist/precursor-B35P8h6h.mjs +0 -4
  276. package/dist/previews-B1mqjXaJ.mjs +0 -6
  277. package/dist/realtime-DWjdrDzv.mjs +0 -168
  278. package/dist/registrar-uYOU1U27.mjs +0 -43
  279. package/dist/resource-sharing-CIsLVAcK.mjs +0 -36
  280. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  281. package/dist/run-D4-K_cbQ.mjs +0 -2
  282. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  283. package/dist/security-insights-ZKtey62s.mjs +0 -40
  284. package/dist/src-jyCTFHcS.mjs +0 -131
  285. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  286. package/dist/state-C7lNNN31.mjs +0 -2
  287. package/dist/telemetry-BZdRnr26.mjs +0 -2
  288. package/dist/tenant-CqYoylyU.mjs +0 -10
  289. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  290. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  291. package/dist/version-DNcdABcr.mjs +0 -2
  292. package/dist/workers-TS0oQ-XH.mjs +0 -39
  293. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
  294. package/dist/zaraz-C8__FhOh.mjs +0 -22
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,i as a,t as o}from"./context-BvLXzoMs.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-B-CVX0kn.mjs";import{t as u}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-DJF_Rs5S.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
3
-
4
- Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`available`,describe:`List available account or zone datasets`,builder:y,handler:async e=>u({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(v,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function S(e){return e.usage(`$0 logs datasets create
5
-
6
- Create a new Log Explorer dataset for the account or zone. List available account or zone datasets to see the dataset types and fields you can use. The \`fields\` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests. Defaults to all available
7
- fields when absent.
8
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
9
- See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
10
- for syntax and examples.
11
- `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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 C={command:`create`,describe:`Create an account or zone dataset`,builder:S,handler:async e=>u({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(x,{body:t,account_or_zone:u,account_or_zone_id:h}));s(r,{successLabel:`Created`});return}e.dataset===void 0&&(e.dataset=await g(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),v=await l(`Creating`,async()=>n.send(x,{body:_,account_or_zone:u,account_or_zone_id:h}));s(v,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function T(e){return e.usage(`$0 logs datasets delete <dataset-id>
12
-
13
- Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset 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 E={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:T,handler:async e=>u({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await _({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the account.`}))return;let f=await l(`Deleting`,async()=>n.send(w,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 logs datasets get <dataset-id>
14
-
15
- Retrieve a single Log Explorer dataset by ID for the account or zone.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:O,handler:async e=>u({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(D,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,query:[`include_zones`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function j(e){return e.usage("$0 logs datasets list\n\nReturns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.").option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List account or zone datasets`,builder:j,handler:async e=>u({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},e,async()=>{let n={include_zones:e[`include-zones`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(A,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 logs datasets update <dataset-id>
16
-
17
- Updates the enabled state and/or field configuration of an account or zone dataset.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests after the update. Defaults
18
- to all available fields when absent.
19
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
20
- ingested. If omitted, the existing filter is left unchanged. Set
21
- to an empty string (\`""\`) to clear the filter. Otherwise,
22
- replaces the dataset's filter entirely.
23
- See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
24
- for syntax and examples.
25
- `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. If omitted,\nthe existing setting is left unchanged. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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 F={command:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:P,handler:async e=>u({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(N,{body:t,account_or_zone:u,account_or_zone_id:h,dataset_id:e[`dataset-id`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g=p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),_=await l(`Updating`,async()=>n.send(N,{body:g,account_or_zone:u,account_or_zone_id:h,dataset_id:e[`dataset-id`]}));s(_,{successLabel:`Updated`})})},I={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logs list get
26
-
27
- Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get`,describe:`List log files`,builder:L,handler:async e=>u({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix,limit:e.limit},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();c({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/list`,pathParams:{},query:a,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await o();e.accountId=f;let p=await l(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/logs/list`,{query:a,headers:Object.keys(u).length>0?u:void 0}));s(p,{successLabel:`Loaded`})})},R={command:`list`,describe:`Operations for list`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/query/sql`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,507:`InsufficientStorageError`}};function B(e){return e.usage(`$0 logs query
28
-
29
- Run a SQL query against account or zone-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured account or zone datasets to see enabled account or zone-level datasets. Zone-level datasets will not appear here. List available account or zone datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const V={command:`query`,describe:`Run a log query`,builder:B,handler:async e=>u({command:`logs query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`octet-stream`,body:e.body});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();if(d===`zones`?e.zoneId=f:e.accountId=f,e.file){let t=h(e.file),r=await l(`Loading`,async()=>n(u,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));s(r,{successLabel:`Loaded`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Loading`,async()=>n(u,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));s(r,{successLabel:`Loaded`});return}let p=await l(`Loading`,async()=>u.send(z,{account_or_zone:d,account_or_zone_id:f}));s(p,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/rayids/${t.ray_id}`,query:[`fields`,`timestamps`]};function U(e){return e.usage(`$0 logs rayid get <ray-id>
30
-
31
- The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:U,handler:async e=>u({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){c({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(H,{zone_id:i,ray_id:e[`ray-id`],...t}));s(o,{successLabel:`Loaded`})})},G={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received/fields`};function q(e){return e.usage(`$0 logs received fields get
32
-
33
- Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List fields`,builder:q,handler:async e=>u({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(K,{zone_id:n}));s(i,{successLabel:`Loaded`})})},Y={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received`,query:[`start`,`end`,`fields`,`sample`,`count`,`timestamps`]};function Z(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Get logs received`,builder:Z,handler:async e=>u({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){c({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(X,{zone_id:i,...t}));s(o,{successLabel:`Loaded`})})},$={command:`received`,describe:`Received log operations`,builder:e=>e.command(Q).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 logs retrieve get
34
-
35
- Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get`,describe:`Retrieve logs`,builder:te,handler:async e=>u({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();c({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/retrieve`,pathParams:{},query:a,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await o();e.accountId=f;let p=await l(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:a,headers:Object.keys(u).length>0?u:void 0}));s(p,{successLabel:`Loaded`})})},re={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ie={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(V).command(I).command(R).command(G).command($).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ie as default};
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as u,s as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-DJF_Rs5S.mjs";import{n as _,t as v}from"./raw-fetch-BrOxDN9k.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
-
4
- Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).coerce(`destination-type`,e=>p(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).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 ee={command:`create`,describe:`Create Catalog Sync`,builder:y,handler:async e=>l({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),destination_type:e[`destination-type`],name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`destination-type`]===void 0&&(e[`destination-type`]=await h(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),e.name===void 0&&(e.name=await m(`name`,`The name field`)),e[`update-mode`]===void 0&&(e[`update-mode`]=await h(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`destination-type`]!==void 0&&d(v,[`destination_type`],e[`destination-type`]),e.name!==void 0&&d(v,[`name`],p(e.name,`name`,`text`)),e.policy!==void 0&&d(v,[`policy`],p(e.policy,`policy`,`text`)),e[`update-mode`]!==void 0&&d(v,[`update_mode`],e[`update-mode`]);let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,query:[`delete_destination`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function te(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
-
6
- Delete a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`delete-destination`,{type:`boolean`,description:`Delete destination`}).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 ne={command:`delete <sync-id>`,describe:`Delete Catalog Sync`,builder:te,handler:async e=>l({command:`magic-cloud-networking catalog-syncs delete`,classification:{safeFlags:[`delete-destination`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={delete_destination:e[`delete-destination`]};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(b,{account_id:u,sync_id:e[`sync-id`],...n}));o(d,{successLabel:`Deleted`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function re(e){return e.usage(`$0 magic-cloud-networking catalog-syncs edit <sync-id>
7
-
8
- Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).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 ie={command:`edit <sync-id>`,describe:`Patch Catalog Sync`,builder:re,handler:async e=>l({command:`magic-cloud-networking catalog-syncs edit`,classification:{safeFlags:[`update-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,sync_id:e[`sync-id`]}));o(r,{successLabel:`Updated`});return}let d=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}),m=await c(`Updating`,async()=>n.send(x,{body:d,account_id:l,sync_id:e[`sync-id`]}));o(m,{successLabel:`Updated`})})};var ae={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function oe(e){return e.usage(`$0 magic-cloud-networking catalog-syncs get <sync-id>
9
-
10
- Read a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <sync-id>`,describe:`Read Catalog Sync`,builder:oe,handler:async e=>l({command:`magic-cloud-networking catalog-syncs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ae,{account_id:l,sync_id:e[`sync-id`]}));o(u,{successLabel:`Loaded`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 magic-cloud-networking catalog-syncs list
11
-
12
- List Catalog Syncs (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Catalog Syncs`,builder:S,handler:async e=>l({command:`magic-cloud-networking catalog-syncs list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking catalog-syncs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ce,{account_id:l}));o(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/prebuilt-policies`,query:[`destination_type`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 magic-cloud-networking catalog-syncs prebuilt-policies list
13
-
14
- List prebuilt catalog sync policies (Closed Beta).`).option(`destination-type`,{type:`string`,description:`Specify type of destination, omit to return all.`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Prebuilt Policies`,builder:T,handler:async e=>l({command:`magic-cloud-networking catalog-syncs prebuilt-policies list`,classification:{safeFlags:[`destination-type`,`dry-run`]}},e,async()=>{let n={destination_type:e[`destination-type`]};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking catalog-syncs prebuilt-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/prebuilt-policies`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(w,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},D={command:`prebuilt-policies`,describe:`Operations for catalog-syncs.prebuilt-policies`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}/refresh`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 magic-cloud-networking catalog-syncs refresh <sync-id>
15
-
16
- Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`refresh <sync-id>`,describe:`Run Catalog Sync`,builder:k,handler:async e=>l({command:`magic-cloud-networking catalog-syncs refresh`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}/refresh`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(O,{account_id:l,sync_id:e[`sync-id`]}));o(u,{successLabel:`Created`})})};var j={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/catalog-syncs/${t.sync_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function M(e){return e.usage(`$0 magic-cloud-networking catalog-syncs update <sync-id>
17
-
18
- Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>p(e,`update-mode`,`text`)).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 N={command:`update <sync-id>`,describe:`Update Catalog Sync`,builder:M,handler:async e=>l({command:`magic-cloud-networking catalog-syncs update`,classification:{safeFlags:[`update-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking catalog-syncs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/catalog-syncs/${e[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(e[`sync-id`]))}`,pathParams:{"sync-id":String(e[`sync-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(j,{body:t,account_id:l,sync_id:e[`sync-id`]}));o(r,{successLabel:`Updated`});return}let d=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`),policy:p(e.policy,`policy`,`text`),update_mode:e[`update-mode`]}),m=await c(`Updating`,async()=>n.send(j,{body:d,account_id:l,sync_id:e[`sync-id`]}));o(m,{successLabel:`Updated`})})},P={command:`catalog-syncs`,describe:`Operations for catalog-syncs`,builder:e=>e.command(ee).command(ne).command(ie).command(se).command(C).command(A).command(N).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 magic-cloud-networking cloud-integrations create
19
-
20
- Create a new Cloud Integration (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`]}).coerce(`cloud-type`,e=>p(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).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 Cloud Integration`,builder:F,handler:async e=>l({command:`magic-cloud-networking cloud-integrations create`,classification:{safeFlags:[`cloud-type`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({cloud_type:e[`cloud-type`],description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`)}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloud-type`]===void 0&&(e[`cloud-type`]=await h(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`])),e[`friendly-name`]===void 0&&(e[`friendly-name`]=await m(`friendly-name`,`The friendly_name field`));let v={};e[`cloud-type`]!==void 0&&d(v,[`cloud_type`],e[`cloud-type`]),e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`friendly-name`]!==void 0&&d(v,[`friendly_name`],p(e[`friendly-name`],`friendly-name`,`text`));let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var L={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function R(e){return e.usage(`$0 magic-cloud-networking cloud-integrations delete <provider-id>
21
-
22
- Delete a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider 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 z={command:`delete <provider-id>`,describe:`Delete Cloud Integration`,builder:R,handler:async e=>l({command:`magic-cloud-networking cloud-integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(L,{account_id:l,provider_id:e[`provider-id`]}));o(u,{successLabel:`Deleted`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/discover`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,409:`ConflictError`,500:`InternalServerError`}};function V(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover-all
23
-
24
- Run discovery for all Cloud Integrations in an account (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`discover-all`,describe:`Run Discovery for All Integrations`,builder:V,handler:async e=>l({command:`magic-cloud-networking cloud-integrations discover-all`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking cloud-integrations discover-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers/discover`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(B,{account_id:l}));o(u,{successLabel:`Created`})})};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}/discover`,query:[`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function W(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover <provider-id>
25
-
26
- Run discovery for a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`discover <provider-id>`,describe:`Run Discovery`,builder:W,handler:async e=>l({command:`magic-cloud-networking cloud-integrations discover`,classification:{safeFlags:[`v2`,`dry-run`]}},e,async()=>{let n={v2:e.v2};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations discover`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}/discover`,pathParams:{"provider-id":String(e[`provider-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(U,{account_id:u,provider_id:e[`provider-id`],...n}));o(d,{successLabel:`Created`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function le(e){return e.usage(`$0 magic-cloud-networking cloud-integrations edit <provider-id>
27
-
28
- Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).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 ue={command:`edit <provider-id>`,describe:`Patch Cloud Integration`,builder:le,handler:async e=>l({command:`magic-cloud-networking cloud-integrations edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(K,{body:t,account_id:l,provider_id:e[`provider-id`]}));o(r,{successLabel:`Updated`});return}let d=f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}),m=await c(`Updating`,async()=>n.send(K,{body:d,account_id:l,provider_id:e[`provider-id`]}));o(m,{successLabel:`Updated`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,query:[`status`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function fe(e){return e.usage(`$0 magic-cloud-networking cloud-integrations get <provider-id>
29
-
30
- Read a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <provider-id>`,describe:`Read Cloud Integration`,builder:fe,handler:async e=>l({command:`magic-cloud-networking cloud-integrations get`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{let n={status:e.status};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(de,{account_id:u,provider_id:e[`provider-id`],...n}));o(d,{successLabel:`Loaded`})})};var me={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}/initial_setup`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function he(e){return e.usage(`$0 magic-cloud-networking cloud-integrations initial-setup <provider-id>
31
-
32
- Get initial configuration to complete Cloud Integration setup (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`initial-setup <provider-id>`,describe:`Get Cloud Integration Setup Config`,builder:he,handler:async e=>l({command:`magic-cloud-networking cloud-integrations initial-setup`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations initial-setup`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}/initial_setup`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(me,{account_id:l,provider_id:e[`provider-id`]}));o(u,{successLabel:`Loaded`})})};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers`,query:[`status`,`order_by`,`desc`,`cloudflare`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ve(e){return e.usage(`$0 magic-cloud-networking cloud-integrations list
33
-
34
- List Cloud Integrations (Closed Beta).`).option(`status`,{type:`boolean`,description:`Status`}).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`list`,describe:`List Cloud Integrations`,builder:ve,handler:async e=>l({command:`magic-cloud-networking cloud-integrations list`,classification:{safeFlags:[`status`,`desc`,`cloudflare`,`dry-run`]}},e,async()=>{let n={status:e.status,order_by:e[`order-by`],desc:e.desc,cloudflare:e.cloudflare};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking cloud-integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(_e,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/providers/${t.provider_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function be(e){return e.usage(`$0 magic-cloud-networking cloud-integrations update <provider-id>
35
-
36
- Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).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 xe={command:`update <provider-id>`,describe:`Update Cloud Integration`,builder:be,handler:async e=>l({command:`magic-cloud-networking cloud-integrations update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking cloud-integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/providers/${e[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(e[`provider-id`]))}`,pathParams:{"provider-id":String(e[`provider-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(q,{body:t,account_id:l,provider_id:e[`provider-id`]}));o(r,{successLabel:`Updated`});return}let d=f({aws_arn:p(e[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:p(e[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:p(e[`azure-tenant-id`],`azure-tenant-id`,`text`),description:p(e.description,`description`,`text`),friendly_name:p(e[`friendly-name`],`friendly-name`,`text`),gcp_project_id:p(e[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:p(e[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}),m=await c(`Updating`,async()=>n.send(q,{body:d,account_id:l,provider_id:e[`provider-id`]}));o(m,{successLabel:`Updated`})})},Se={command:`cloud-integrations`,describe:`Operations for cloud-integrations`,builder:e=>e.command(I).command(z).command(G).command(H).command(ue).command(pe).command(ge).command(ye).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Ce(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces edit
37
-
38
- Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).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:`edit`,describe:`Patch Magic WAN Address Space`,builder:Ce,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({prefixes:e.prefixes}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(J,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let d=f({prefixes:e.prefixes}),p=await c(`Updating`,async()=>n.send(J,{body:d,account_id:l}));o(p,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ee(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces list
39
-
40
- Read the Magic WAN Address Space (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`list`,describe:`Read Magic WAN Address Space`,builder:Ee,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Te,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/magic_wan_address_space`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Oe(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces update
41
-
42
- Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).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`,describe:`Update Magic WAN Address Space`,builder:Oe,handler:async e=>l({command:`magic-cloud-networking on-ramps address-spaces update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps address-spaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({prefixes:e.prefixes}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let d=f({prefixes:e.prefixes}),p=await c(`Updating`,async()=>n.send(Y,{body:d,account_id:l}));o(p,{successLabel:`Updated`})})},Ae={command:`address-spaces`,describe:`Operations for on-ramps.address-spaces`,builder:e=>e.command(we).command(De).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}/apply`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Me(e){return e.usage(`$0 magic-cloud-networking on-ramps apply <onramp-id>
43
-
44
- Apply an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`apply <onramp-id>`,describe:`Apply On-ramp`,builder:Me,handler:async e=>l({command:`magic-cloud-networking on-ramps apply`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps apply`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/apply`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(je,{account_id:l,onramp_id:e[`onramp-id`]}));o(u,{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 magic-cloud-networking on-ramps create
45
-
46
- Create a new On-ramp (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`adopted-hub-id`,{type:`string`,description:`The adopted_hub_id field`}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`cloud-asn`,{type:`number`,description:`Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`]}).coerce(`cloud-type`,e=>p(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`dynamic-routing`,{type:`boolean`,description:`Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.`}).option(`hub-provider-id`,{type:`string`,description:`The hub_provider_id field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`region`,{type:`string`,description:`The region field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`OnrampTypeSingle`,`OnrampTypeHub`]}).coerce(`type`,e=>p(e,`type`,`text`)).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`create`,describe:`Create On-ramp`,builder:Pe,handler:async e=>l({command:`magic-cloud-networking on-ramps create`,classification:{safeFlags:[`cloud-type`,`dynamic-routing`,`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`type`,`dry-run`]}},e,async()=>{let l={};if(e.forwarded!==void 0&&(l.forwarded=String(e.forwarded)),e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({adopted_hub_id:p(e[`adopted-hub-id`],`adopted-hub-id`,`text`),attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],cloud_asn:e[`cloud-asn`],cloud_type:e[`cloud-type`],description:p(e.description,`description`,`text`),dynamic_routing:e[`dynamic-routing`],hub_provider_id:p(e[`hub-provider-id`],`hub-provider-id`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),region:p(e.region,`region`,`text`),type:e.type,vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let g=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e[`cloud-type`]===void 0&&(e[`cloud-type`]=await h(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`])),e[`dynamic-routing`]===void 0)throw Error(`--dynamic-routing is required (or pass --body with this field set).`);if(e[`install-routes-in-cloud`]===void 0)throw Error(`--install-routes-in-cloud is required (or pass --body with this field set).`);if(e[`install-routes-in-magic-wan`]===void 0)throw Error(`--install-routes-in-magic-wan is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The name field`)),e.type===void 0&&(e.type=await h(`type`,`The type field`,[`OnrampTypeSingle`,`OnrampTypeHub`]));let v={};e[`adopted-hub-id`]!==void 0&&d(v,[`adopted_hub_id`],p(e[`adopted-hub-id`],`adopted-hub-id`,`text`)),e[`attached-hubs`]!==void 0&&d(v,[`attached_hubs`],e[`attached-hubs`]),e[`attached-vpcs`]!==void 0&&d(v,[`attached_vpcs`],e[`attached-vpcs`]),e[`cloud-asn`]!==void 0&&d(v,[`cloud_asn`],e[`cloud-asn`]),e[`cloud-type`]!==void 0&&d(v,[`cloud_type`],e[`cloud-type`]),e.description!==void 0&&d(v,[`description`],p(e.description,`description`,`text`)),e[`dynamic-routing`]!==void 0&&d(v,[`dynamic_routing`],e[`dynamic-routing`]),e[`hub-provider-id`]!==void 0&&d(v,[`hub_provider_id`],p(e[`hub-provider-id`],`hub-provider-id`,`text`)),e[`install-routes-in-cloud`]!==void 0&&d(v,[`install_routes_in_cloud`],e[`install-routes-in-cloud`]),e[`install-routes-in-magic-wan`]!==void 0&&d(v,[`install_routes_in_magic_wan`],e[`install-routes-in-magic-wan`]),e[`manage-hub-to-hub-attachments`]!==void 0&&d(v,[`manage_hub_to_hub_attachments`],e[`manage-hub-to-hub-attachments`]),e[`manage-vpc-to-hub-attachments`]!==void 0&&d(v,[`manage_vpc_to_hub_attachments`],e[`manage-vpc-to-hub-attachments`]),e.name!==void 0&&d(v,[`name`],p(e.name,`name`,`text`)),e.region!==void 0&&d(v,[`region`],p(e.region,`region`,`text`)),e.type!==void 0&&d(v,[`type`],e.type),e.vpc!==void 0&&d(v,[`vpc`],p(e.vpc,`vpc`,`text`));let y=await c(`Creating`,async()=>n(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};var Ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,query:[`destroy`,`force`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Le(e){return e.usage(`$0 magic-cloud-networking on-ramps delete <onramp-id>
47
-
48
- Delete an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`destroy`,{type:`boolean`,description:`Destroy`}).option(`force`,{type:`boolean`,description:`Force`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Re={command:`delete <onramp-id>`,describe:`Delete On-ramp`,builder:Le,handler:async e=>l({command:`magic-cloud-networking on-ramps delete`,classification:{safeFlags:[`destroy`,`force`,`dry-run`]}},e,async()=>{let n={destroy:e.destroy,force:e.force};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await g({force:!!e.force}))return;let d=await c(`Deleting`,async()=>l.send(Ie,{account_id:u,onramp_id:e[`onramp-id`],...n}));o(d,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function ze(e){return e.usage(`$0 magic-cloud-networking on-ramps edit <onramp-id>
49
-
50
- Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).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 Be={command:`edit <onramp-id>`,describe:`Patch On-ramp`,builder:ze,handler:async e=>l({command:`magic-cloud-networking on-ramps edit`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(X,{body:t,account_id:l,onramp_id:e[`onramp-id`]}));o(r,{successLabel:`Updated`});return}let d=f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}),m=await c(`Updating`,async()=>n.send(X,{body:d,account_id:l,onramp_id:e[`onramp-id`]}));o(m,{successLabel:`Updated`})})};function Ve(e){return e.usage(`$0 magic-cloud-networking on-ramps export <onramp-id>
51
-
52
- Export an On-ramp to terraform ready file(s) (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const He={command:`export <onramp-id>`,describe:`Export as Terraform`,builder:Ve,handler:async e=>l({command:`magic-cloud-networking on-ramps export`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/export`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>v(`/accounts/${n}/magic/cloud/onramps/${encodeURIComponent(String(e[`onramp-id`]))}/export`,{method:`POST`,local:e.local===!0,persistTo:e.persistTo}));_(e.text===!0?o.toString(`utf-8`):o)})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,query:[`status`,`vpcs`,`post_apply_resources`,`planned_resources`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function We(e){return e.usage(`$0 magic-cloud-networking on-ramps get <onramp-id>
53
-
54
- Read an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`post-apply-resources`,{type:`boolean`,description:`Post apply resources`}).option(`planned-resources`,{type:`boolean`,description:`Planned resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <onramp-id>`,describe:`Read On-ramp`,builder:We,handler:async e=>l({command:`magic-cloud-networking on-ramps get`,classification:{safeFlags:[`status`,`vpcs`,`post-apply-resources`,`planned-resources`,`dry-run`]}},e,async()=>{let n={status:e.status,vpcs:e.vpcs,post_apply_resources:e[`post-apply-resources`],planned_resources:e[`planned-resources`]};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ue,{account_id:u,onramp_id:e[`onramp-id`],...n}));o(d,{successLabel:`Loaded`})})};var Ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps`,query:[`order_by`,`desc`,`status`,`vpcs`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function qe(e){return e.usage(`$0 magic-cloud-networking on-ramps list
55
-
56
- List On-ramps (Closed Beta).`).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`list`,describe:`List On-ramps`,builder:qe,handler:async e=>l({command:`magic-cloud-networking on-ramps list`,classification:{safeFlags:[`desc`,`status`,`vpcs`,`dry-run`]}},e,async()=>{let n={order_by:e[`order-by`],desc:e.desc,status:e.status,vpcs:e.vpcs};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking on-ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ke,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Ye={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}/plan`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Xe(e){return e.usage(`$0 magic-cloud-networking on-ramps plan <onramp-id>
57
-
58
- Plan an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ze={command:`plan <onramp-id>`,describe:`Plan On-ramp`,builder:Xe,handler:async e=>l({command:`magic-cloud-networking on-ramps plan`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}/plan`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Ye,{account_id:l,onramp_id:e[`onramp-id`]}));o(u,{successLabel:`Created`})})};var Z={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/cloud/onramps/${t.onramp_id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function Qe(e){return e.usage(`$0 magic-cloud-networking on-ramps update <onramp-id>
59
-
60
- Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).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 $e={command:`update <onramp-id>`,describe:`Update On-ramp`,builder:Qe,handler:async e=>l({command:`magic-cloud-networking on-ramps update`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking on-ramps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/onramps/${e[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(e[`onramp-id`]))}`,pathParams:{"onramp-id":String(e[`onramp-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Z,{body:t,account_id:l,onramp_id:e[`onramp-id`]}));o(r,{successLabel:`Updated`});return}let d=f({attached_hubs:e[`attached-hubs`],attached_vpcs:e[`attached-vpcs`],description:p(e.description,`description`,`text`),install_routes_in_cloud:e[`install-routes-in-cloud`],install_routes_in_magic_wan:e[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:e[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:e[`manage-vpc-to-hub-attachments`],name:p(e.name,`name`,`text`),vpc:p(e.vpc,`vpc`,`text`)}),m=await c(`Updating`,async()=>n.send(Z,{body:d,account_id:l,onramp_id:e[`onramp-id`]}));o(m,{successLabel:`Updated`})})},et={command:`on-ramps`,describe:`Operations for on-ramps`,builder:e=>e.command(Ne).command(Fe).command(Re).command(Be).command(He).command(Ge).command(Je).command(Ze).command($e).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.usage(`$0 magic-cloud-networking resources export
61
-
62
- Export resources in the Resource Catalog as a JSON file (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,array:!0,description:`Resource type`}).option(`resource-id`,{type:`string`,array:!0,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`search`,{type:`string`,array:!0,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const nt={command:`export`,describe:`Export Resources`,builder:tt,handler:async e=>l({command:`magic-cloud-networking resources export`,classification:{safeFlags:[`desc`,`v2`,`dry-run`,`text`]}},e,async()=>{let n={provider_id:e[`provider-id`],resource_type:e[`resource-type`],resource_id:e[`resource-id`],region:e.region,resource_group:e[`resource-group`],search:e.search,order_by:e[`order-by`],desc:e.desc,v2:e.v2};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking resources export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/resources/export`,pathParams:{},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>v(`/accounts/${o}/magic/cloud/resources/export${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));_(e.text===!0?u.toString(`utf-8`):u)})};var Q={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources/${t.resource_id}`,query:[`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function rt(e){return e.usage(`$0 magic-cloud-networking resources get <resource-id>
63
-
64
- Read an resource from the Resource Catalog (Closed Beta).`).positional(`resource-id`,{type:`string`,description:`Resource ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get <resource-id>`,describe:`Read Resource`,builder:rt,handler:async e=>l({command:`magic-cloud-networking resources get`,classification:{safeFlags:[`v2`,`dry-run`]}},e,async()=>{let n={v2:e.v2};if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/resources/${e[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(e[`resource-id`]))}`,pathParams:{"resource-id":String(e[`resource-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Q,{account_id:u,resource_id:e[`resource-id`],...n}));o(d,{successLabel:`Loaded`})})};var at={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources`,query:[`provider_id`,`resource_type`,`resource_id`,`region`,`resource_group`,`managed`,`search`,`order_by`,`desc`,`per_page`,`page`,`cloudflare`,`v2`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ot(e){return e.usage(`$0 magic-cloud-networking resources list
65
-
66
- List resources in the Resource Catalog (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,array:!0,description:`Resource type`}).option(`resource-id`,{type:`string`,array:!0,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`managed`,{type:`boolean`,description:`Managed`}).option(`search`,{type:`string`,array:!0,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`list`,describe:`List Resources`,builder:ot,handler:async e=>l({command:`magic-cloud-networking resources list`,classification:{safeFlags:[`managed`,`desc`,`cloudflare`,`v2`,`dry-run`]}},e,async()=>{let n={provider_id:e[`provider-id`],resource_type:e[`resource-type`],resource_id:e[`resource-id`],region:e.region,resource_group:e[`resource-group`],managed:e.managed,search:e.search,order_by:e[`order-by`],desc:e.desc,per_page:e[`per-page`],page:e.page,cloudflare:e.cloudflare,v2:e.v2};if(e.dryRun){let e=await i();s({command:`cf magic-cloud-networking resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/resources`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(at,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cloud/resources/policy-preview`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`}};function ct(e){return e.usage(`$0 magic-cloud-networking resources policy-preview
67
-
68
- Preview Rego query result against the latest resource catalog (Closed Beta).`).option(`policy`,{type:`string`,description:`The policy field`}).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 lt={command:`policy-preview`,describe:`Preview Rego Query`,builder:ct,handler:async e=>l({command:`magic-cloud-networking resources policy-preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-cloud-networking resources policy-preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cloud/resources/policy-preview`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({policy:p(e.policy,`policy`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.policy===void 0&&(e.policy=await m(`policy`,`The policy field`));let d=f({policy:p(e.policy,`policy`,`text`)}),h=await c(`Creating`,async()=>n.send($,{body:d,account_id:l}));o(h,{successLabel:`Created`})})},ut={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(nt).command(it).command(st).command(lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},dt={command:`magic-cloud-networking`,describe:`magic-cloud-networking`,builder:e=>e.command(P).command(Se).command(et).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{dt as default};
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{i as n,n as r}from"./auth-D5Yj9eYU.mjs";import{a as i,t as a}from"./context-BvLXzoMs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-B-CVX0kn.mjs";import{t as l}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.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,i as h,n as g}from"./prompt-DJF_Rs5S.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function ee(e){return e.usage(`$0 magic-network-monitoring configs create
3
-
4
- Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create account configuration`,builder:ee,handler:async e=>l({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The account name.`));let h=f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}),g=await c(`Creating`,async()=>n.send(_,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function b(e){return e.usage(`$0 magic-network-monitoring configs delete
5
-
6
- Delete an existing network monitoring configuration.`).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 te={command:`delete`,describe:`Delete account configuration`,builder:b,handler:async e=>l({command:`magic-network-monitoring configs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-network-monitoring configs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(y,{account_id:l}));o(u,{successLabel:`Deleted`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function S(e){return e.usage(`$0 magic-network-monitoring configs edit
7
-
8
- Update fields in an existing network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`edit`,describe:`Update account configuration fields`,builder:S,handler:async e=>l({command:`magic-network-monitoring configs edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring configs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let m=f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}),h=await c(`Updating`,async()=>n.send(x,{body:m,account_id:l}));o(h,{successLabel:`Updated`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/config/full`};function T(e){return e.usage(`$0 magic-network-monitoring configs full get
9
-
10
- Lists default sampling, router IPs, warp devices, and rules for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get`,describe:`List rules and account configuration`,builder:T,handler:async e=>l({command:`magic-network-monitoring configs full get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-network-monitoring configs full get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config/full`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(w,{account_id:l}));o(u,{successLabel:`Loaded`})})},D={command:`full`,describe:`Operations for configs.full`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function k(e){return e.usage(`$0 magic-network-monitoring configs get
11
-
12
- Lists default sampling, router IPs and warp devices for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get`,describe:`List account configuration`,builder:k,handler:async e=>l({command:`magic-network-monitoring configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-network-monitoring configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(O,{account_id:l}));o(u,{successLabel:`Loaded`})})};var j={method:`PUT`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function M(e){return e.usage(`$0 magic-network-monitoring configs update
13
-
14
- Update an existing network monitoring configuration, requires the entire configuration to be updated at once.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update`,describe:`Update an entire account configuration`,builder:M,handler:async e=>l({command:`magic-network-monitoring configs update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring configs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(j,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The account name.`));let h=f({default_sampling:e[`default-sampling`],name:p(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:u(e[`warp-devices`],`warp-devices`)}),g=await c(`Updating`,async()=>n.send(j,{body:h,account_id:l}));o(g,{successLabel:`Updated`})})},P={command:`configs`,describe:`Account-level monitoring configuration — sampling rates, thresholds, and notification settings`,builder:e=>e.command(v).command(te).command(C).command(A).command(N).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}/advertisement`};function I(e){return e.usage(`$0 magic-network-monitoring rules advertisements edit <rule-id>
15
-
16
- Update advertisement for rule.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`edit <rule-id>`,describe:`Update advertisement for rule`,builder:I,handler:async e=>l({command:`magic-network-monitoring rules advertisements edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules advertisements edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}/advertisement`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Updating`,async()=>n.send(F,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Updated`})})},R={command:`advertisements`,describe:`Operations for rules.advertisements`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 magic-network-monitoring rules bulk create
17
-
18
- Create multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`).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:`create`,describe:`Create rules in bulk`,builder:z,handler:async e=>l({command:`magic-network-monitoring rules bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body);if(Array.isArray(t)&&t.length>100){let e=Math.ceil(t.length/100),r=null;for(let i=0;i<t.length;i+=100){let a=t.slice(i,i+100),o=Math.floor(i/100)+1;r=await c(`Creating: batch ${o}/${e}`,async()=>n(l,`POST`,`/accounts/${u}/mnm/rules/bulk`,{body:a}))}o(r,{successLabel:`Created`});return}let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/mnm/rules/bulk`,{body:t}));o(r,{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.`)})};function V(e){return e.usage(`$0 magic-network-monitoring rules bulk update
19
-
20
- Update multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`).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:`update`,describe:`Update rules in bulk`,builder:V,handler:async e=>l({command:`magic-network-monitoring rules bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body);if(Array.isArray(t)&&t.length>100){let e=Math.ceil(t.length/100),r=null;for(let i=0;i<t.length;i+=100){let a=t.slice(i,i+100),o=Math.floor(i/100)+1;r=await c(`Updating: batch ${o}/${e}`,async()=>n(l,`PUT`,`/accounts/${u}/mnm/rules/bulk`,{body:a}))}o(r,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/mnm/rules/bulk`,{body:t}));o(r,{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.`)})},H={command:`bulk`,describe:`Operations for rules.bulk`,builder:e=>e.command(B).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/rules`,body:`json`};function W(e){return e.usage(`$0 magic-network-monitoring rules create
21
-
22
- Create network monitoring rules for account. Currently only supports creating a single rule per API request.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`],default:`1m`}).coerce(`duration`,e=>p(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>p(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>p(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>p(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>p(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`create`,describe:`Create rules`,builder:W,handler:async e=>l({command:`magic-network-monitoring rules create`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(U,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await m(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await h(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let u=f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),g=await c(`Creating`,async()=>n.send(U,{body:u,account_id:l}));o(g,{successLabel:`Created`})})};var K={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`};function q(e){return e.usage(`$0 magic-network-monitoring rules delete <rule-id>
23
-
24
- Delete a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,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 J={command:`delete <rule-id>`,describe:`Delete rule`,builder:q,handler:async e=>l({command:`magic-network-monitoring rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(K,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`,body:`json`};function X(e){return e.usage(`$0 magic-network-monitoring rules edit <rule-id>
25
-
26
- Update a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>p(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>p(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>p(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>p(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>p(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`edit <rule-id>`,describe:`Update rule`,builder:X,handler:async e=>l({command:`magic-network-monitoring rules edit`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(Y,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await m(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await h(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let u=f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),g=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(g,{successLabel:`Updated`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`};function ie(e){return e.usage(`$0 magic-network-monitoring rules get <rule-id>
27
-
28
- List a single network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get <rule-id>`,describe:`Get rule`,builder:ie,handler:async e=>l({command:`magic-network-monitoring rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(re,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Loaded`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/rules`};function se(e){return e.usage(`$0 magic-network-monitoring rules list
29
-
30
- Lists network monitoring rules for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List rules`,builder:se,handler:async e=>l({command:`magic-network-monitoring rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-network-monitoring rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oe,{account_id:l}));o(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/mnm/rules`,body:`json`};function ce(e){return e.usage(`$0 magic-network-monitoring rules update
31
-
32
- Update network monitoring rules for account.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>p(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>p(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>p(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>p(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>p(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`update`,describe:`Update rules`,builder:ce,handler:async e=>l({command:`magic-network-monitoring rules update`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-network-monitoring rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await m(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await h(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let u=f({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:p(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),g=await c(`Updating`,async()=>n.send($,{body:u,account_id:l}));o(g,{successLabel:`Updated`})})},ue={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(G).command(J).command(Z).command(ae).command(Q).command(le).command(R).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/vpc-flows/token`};function fe(e){return e.usage(`$0 magic-network-monitoring vpc-flows tokens create
33
-
34
- Generate authentication token for VPC flow logs export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`create`,describe:`Generate authentication token for VPC flow logs export.`,builder:fe,handler:async e=>l({command:`magic-network-monitoring vpc-flows tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-network-monitoring vpc-flows tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/vpc-flows/token`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(de,{account_id:l}));o(u,{successLabel:`Created`})})},me={command:`tokens`,describe:`Operations for vpc-flows.tokens`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},he={command:`vpc-flows`,describe:`Ingest VPC flow logs from cloud providers for network visibility and anomaly detection`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`magic-network-monitoring`,describe:`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,builder:e=>e.command(P).command(ue).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ge as default};