cf 1.0.0-beta.26 → 1.0.0-beta.27

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 (256) hide show
  1. package/dist/_meta/commands.json +1996 -3422
  2. package/dist/_meta/schemas.json +9249 -2339
  3. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  4. package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
  5. package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  6. package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
  7. package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
  8. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  9. package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
  10. package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  11. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  12. package/dist/ai-search-DbZIxdio.mjs +74 -0
  13. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  14. package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
  15. package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
  16. package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  17. package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
  18. package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
  19. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
  20. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  21. package/dist/auth-CspwoBlp.mjs +2 -0
  22. package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
  23. package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
  24. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
  25. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
  26. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  27. package/dist/billing-DRNww0iC.mjs +24 -0
  28. package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
  29. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  30. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  31. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  32. package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  33. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  34. package/dist/build-CRm2TQq8.mjs +2 -0
  35. package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
  36. package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
  37. package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
  38. package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
  39. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  40. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  41. package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
  42. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  43. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  44. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  45. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  46. package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
  47. package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
  48. package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
  49. package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
  50. package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
  51. package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
  52. package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
  53. package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
  54. package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
  55. package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
  56. package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
  57. package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
  59. package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
  60. package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
  61. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  64. package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
  65. package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
  66. package/dist/containers-DINLx5_i.mjs +380 -0
  67. package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  68. package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
  69. package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
  70. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  71. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  72. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  73. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  74. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  75. package/dist/d1-CDIyRdh4.mjs +52 -0
  76. package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  79. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  80. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  81. package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
  82. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  83. package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
  84. package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
  85. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  86. package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
  87. package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
  88. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  89. package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
  90. package/dist/email-domains-CDSbVclP.mjs +14 -0
  91. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  92. package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
  93. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  94. package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
  95. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  96. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
  97. package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
  98. package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
  99. package/dist/global-options-DiKj2cQy.mjs +2 -0
  100. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  101. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  102. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  103. package/dist/iam-8T74DNhH.mjs +62 -0
  104. package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
  105. package/dist/index.mjs +1 -1
  106. package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
  107. package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
  108. package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
  109. package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
  110. package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
  111. package/dist/k2-wsanPL3y.mjs +10 -0
  112. package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
  113. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  114. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  115. package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
  116. package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  117. package/dist/local-CFsO9Tkg.mjs +2 -0
  118. package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
  119. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  120. package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
  121. package/dist/login-BfuOf-Yi.mjs +2 -0
  122. package/dist/logpush-qhlxsioM.mjs +68 -0
  123. package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
  124. package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  125. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  126. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  127. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  128. package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
  129. package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
  130. package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
  131. package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
  132. package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
  133. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  134. package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
  135. package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  136. package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
  137. package/dist/observability-BxhJQCgZ.mjs +4 -0
  138. package/dist/organization-CEnlXwrl.mjs +70 -0
  139. package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
  140. package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  141. package/dist/package-CiRJBRHO.mjs +2 -0
  142. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  143. package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
  144. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  145. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  146. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  147. package/dist/precursor-D3VH2MXT.mjs +4 -0
  148. package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
  149. package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
  150. package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
  151. package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
  152. package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
  153. package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
  154. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  155. package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
  156. package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
  157. package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
  158. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  159. package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
  160. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  161. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
  162. package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  163. package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
  164. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  165. package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
  166. package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
  167. package/dist/run-DD45EQTm.mjs +2 -0
  168. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  169. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  170. package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
  171. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  172. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  173. package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
  174. package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
  175. package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
  176. package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
  177. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  178. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
  179. package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
  180. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  181. package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
  182. package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
  183. package/dist/src-DPnUfK4c.mjs +131 -0
  184. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
  185. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  186. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  187. package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
  188. package/dist/state-Uwfrmw5I.mjs +2 -0
  189. package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
  190. package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
  191. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
  192. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  193. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  194. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  195. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  196. package/dist/ui-FYultowZ.mjs +2 -0
  197. package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  198. package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
  199. package/dist/update-check-worker.mjs +1 -1
  200. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  201. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  202. package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
  203. package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  204. package/dist/version-Zr2oF8mY.mjs +2 -0
  205. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  206. package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  207. package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
  208. package/dist/workers-B3uJqJKc.mjs +39 -0
  209. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  210. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  211. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  212. package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
  213. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  214. package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  215. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  216. package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
  217. package/package.json +14 -14
  218. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  219. package/dist/ai-search-QOenIzDL.mjs +0 -74
  220. package/dist/auth-Czzy5Rs_.mjs +0 -2
  221. package/dist/billing-BrLJqlOf.mjs +0 -22
  222. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  223. package/dist/browser-run-BSVANGzU.mjs +0 -40
  224. package/dist/build-CPKxZ3kL.mjs +0 -2
  225. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  226. package/dist/containers-D4sa-Eoy.mjs +0 -380
  227. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  228. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  229. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  230. package/dist/d1-BsWI546w.mjs +0 -89
  231. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  232. package/dist/iam-DuZenYtc.mjs +0 -48
  233. package/dist/k2-Cj1ORHul.mjs +0 -10
  234. package/dist/local-CWTti4ot.mjs +0 -2
  235. package/dist/login-Djz5mvHJ.mjs +0 -2
  236. package/dist/logpush-OMhp7VgE.mjs +0 -44
  237. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  238. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  239. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  240. package/dist/organization-IsxVyWol.mjs +0 -73
  241. package/dist/package-BOE_De2L.mjs +0 -2
  242. package/dist/precursor-B35P8h6h.mjs +0 -4
  243. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  244. package/dist/run-D4-K_cbQ.mjs +0 -2
  245. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  246. package/dist/security-insights-ZKtey62s.mjs +0 -40
  247. package/dist/src-jyCTFHcS.mjs +0 -131
  248. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  249. package/dist/state-C7lNNN31.mjs +0 -2
  250. package/dist/telemetry-BZdRnr26.mjs +0 -2
  251. package/dist/tenant-CqYoylyU.mjs +0 -10
  252. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  253. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  254. package/dist/version-DNcdABcr.mjs +0 -2
  255. package/dist/workers-TS0oQ-XH.mjs +0 -39
  256. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-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,r as f,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-DJF_Rs5S.mjs";import{n as ee,t as te}from"./raw-fetch-BrOxDN9k.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-D0dXwuME.mjs";import{n as ee,t as te}from"./raw-fetch-DQeDx1wT.mjs";var ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function re(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
4
  Delete all DNS Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:re,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-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-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ne,{account_id:l}));o(u,{successLabel:`Deleted`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ae(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
5
5
 
6
- Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const oe={command:`create`,describe:`Create DNS Protection rule.`,builder:ae,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await g(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ce(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
6
+ Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const oe={command:`create`,describe:`Create DNS Protection rule.`,builder:ae,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await g(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(y,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ce(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
7
7
 
8
8
  Delete a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to delete.`,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 le={command:`delete <rule-id>`,describe:`Delete DNS Protection rule.`,builder:ce,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection 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-transit advanced-dns-protection configs dns protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/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 v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(se,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function de(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
9
9
 
@@ -11,7 +11,7 @@ Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{t
11
11
 
12
12
  List all DNS Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`List all DNS Protection rules.`,builder:me,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,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(pe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ge={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`,body:`json`};function _e(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
13
13
 
14
- Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const ve={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:_e,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/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?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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(ge,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(ge,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},ye={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(ie).command(oe).command(le).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
14
+ Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for DNS Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const ve={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:_e,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/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?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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(ge,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(ge,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},ye={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(ie).command(oe).command(le).command(fe).command(he).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
15
15
 
16
16
  Delete all allowlist prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ee={command:`bulk-delete`,describe:`Delete all allowlist prefixes.`,builder:Te,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist bulk-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-transit advanced-tcp-protection configs allowlist bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(we,{account_id:l}));o(u,{successLabel:`Deleted`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,body:`json`};function De(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
17
17
 
@@ -41,7 +41,7 @@ Update a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`str
41
41
 
42
42
  Delete all SYN Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const dt={command:`bulk-delete`,describe:`Delete all SYN Protection filters.`,builder:ut,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters bulk-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-transit advanced-tcp-protection configs syn protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(lt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,body:`json`};function ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
43
43
 
44
- Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const pt={command:`create`,describe:`Create a SYN Protection filter.`,builder:ft,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):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(w,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Creating`,async()=>n.send(w,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function ht(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
44
+ Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const pt={command:`create`,describe:`Create a SYN Protection filter.`,builder:ft,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):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(w,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await g(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let u=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Creating`,async()=>n.send(w,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function ht(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
45
45
 
46
46
  Delete a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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 gt={command:`delete <filter-id>`,describe:`Delete SYN Protection filter.`,builder:ht,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters 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-transit advanced-tcp-protection configs syn protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(mt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var _t={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function vt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
47
47
 
@@ -49,11 +49,11 @@ Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id
49
49
 
50
50
  List all SYN Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`list`,describe:`List all SYN Protection filters.`,builder:xt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,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(bt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var T={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`,body:`json`};function Ct(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
51
51
 
52
- Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const wt={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:Ct,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):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(T,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Updating`,async()=>n.send(T,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},Tt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(dt).command(pt).command(gt).command(yt).command(St).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Et={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
52
+ Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const wt={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:Ct,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):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(T,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Updating`,async()=>n.send(T,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},Tt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(dt).command(pt).command(gt).command(yt).command(St).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Et={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
53
53
 
54
54
  Delete all SYN Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ot={command:`bulk-delete`,describe:`Delete all SYN Protection rules.`,builder:Dt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules bulk-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-transit advanced-tcp-protection configs syn protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Et,{account_id:l}));o(u,{successLabel:`Deleted`})})};var E={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,body:`json`};function kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
55
55
 
56
- Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const At={command:`create`,describe:`Create SYN Protection rule.`,builder:kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(E,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(E,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var jt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
56
+ Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`protection-mode`,{type:`string`,description:`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const At={command:`create`,describe:`Create SYN Protection rule.`,builder:kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(E,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(E,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var jt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
57
57
 
58
58
  Delete a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to delete.`,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 Nt={command:`delete <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Mt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection 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-transit advanced-tcp-protection configs syn protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/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 v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(jt,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var Pt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
59
59
 
@@ -61,11 +61,11 @@ Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{t
61
61
 
62
62
  List all SYN Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zt={command:`list`,describe:`List all SYN Protection rules.`,builder:Rt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,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(Lt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var D={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`,body:`json`};function Bt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
63
63
 
64
- Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Vt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/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?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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(D,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(D,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Ht={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ot).command(At).command(Nt).command(It).command(zt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(Tt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
64
+ Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for SYN Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Vt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/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?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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(D,{body:t,account_id:l,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(D,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Ht={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ot).command(At).command(Nt).command(It).command(zt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(Tt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Gt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Kt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
65
65
 
66
66
  Delete all TCP Flow Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const qt={command:`bulk-delete`,describe:`Delete all TCP Flow Protection filters.`,builder:Kt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-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-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Gt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,body:`json`};function Jt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
67
67
 
68
- Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Yt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):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(O,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`));let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Creating`,async()=>n.send(O,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Xt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
68
+ Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Yt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):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(O,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await g(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let u=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Creating`,async()=>n.send(O,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var Xt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
69
69
 
70
70
  Delete a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,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 Qt={command:`delete <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:Zt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters 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-transit advanced-tcp-protection configs tcp flow protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Xt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var $t={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function en(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
71
71
 
@@ -73,11 +73,11 @@ Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filt
73
73
 
74
74
  List all TCP Flow Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const an={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:rn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,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(nn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`,body:`json`};function on(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
75
75
 
76
- Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const sn={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:on,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`)}):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(k,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`)}),f=await c(`Updating`,async()=>n.send(k,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},cn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(qt).command(Yt).command(Qt).command(tn).command(an).command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ln={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function un(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
76
+ Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const sn={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:on,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):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(k,{body:t,account_id:l,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let u=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Updating`,async()=>n.send(k,{body:u,account_id:l,filter_id:e[`filter-id`]}));o(f,{successLabel:`Updated`})})},cn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(qt).command(Yt).command(Qt).command(tn).command(an).command(sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ln={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function un(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
77
77
 
78
78
  Delete all TCP Flow Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const dn={command:`bulk-delete`,describe:`Delete all TCP Flow Protection rules.`,builder:un,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-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-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ln,{account_id:l}));o(u,{successLabel:`Deleted`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,body:`json`};function fn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
79
79
 
80
- Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const pn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:fn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(A,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the TCP Flow Protection rule.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(A,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function hn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
80
+ Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const pn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:fn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):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(A,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the TCP Flow Protection rule.`));let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),f=await c(`Creating`,async()=>n.send(A,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var mn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function hn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
81
81
 
82
82
  Delete a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to delete.`,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 gn={command:`delete <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:hn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection 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-transit advanced-tcp-protection configs tcp flow protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/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 v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(mn,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var _n={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function vn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
83
83
 
@@ -85,7 +85,7 @@ Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-i
85
85
 
86
86
  List all TCP Flow Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sn={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:xn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,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(bn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var j={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`,body:`json`};function Cn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
87
87
 
88
- Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const wn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Cn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/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?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(j,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Tn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(dn).command(pn).command(gn).command(yn).command(Sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var On={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function kn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
88
+ Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for TCP Flow Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const wn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Cn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/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?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):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,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let u=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>n.send(j,{body:u,account_id:l,rule_id:e[`rule-id`]}));o(f,{successLabel:`Updated`})})},Tn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(dn).command(pn).command(gn).command(yn).command(Sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var On={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function kn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
89
89
 
90
90
  Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const An={command:`get`,describe:`Get protection status.`,builder:kn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,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(On,{account_id:l}));o(u,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`,body:`json`};function jn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
91
91
 
@@ -176,7 +176,7 @@ character:
176
176
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
177
177
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
178
178
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
179
- these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const ti={command:`create`,describe:`Create a GRE tunnel`,builder:ei,handler:async e=>l({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&p(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(_,[`mtu`],e.mtu),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(_,[`ttl`],e.ttl);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function ni(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
179
+ these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).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)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const ti={command:`create`,describe:`Create a GRE tunnel`,builder:ei,handler:async e=>l({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&p(_,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(_,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(_,[`mtu`],e.mtu),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(_,[`ttl`],e.ttl);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/gre_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function ni(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
180
180
 
181
181
  Disables and removes a specific static GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 ri={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:ni,handler:async e=>l({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function ii(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
182
182
 
@@ -210,7 +210,7 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
210
210
 
211
211
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
212
212
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
213
- cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const mi={command:`create`,describe:`Create an IPsec tunnel`,builder:pi,handler:async e=>l({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function hi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
213
+ cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).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)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const mi={command:`create`,describe:`Create an IPsec tunnel`,builder:pi,handler:async e=>l({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${f}/magic/ipsec_tunnels`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};function hi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
214
214
 
215
215
  Disables and removes a specific static IPsec Tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).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 gi={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:hi,handler:async e=>l({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function _i(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
216
216
 
@@ -244,7 +244,7 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
244
244
 
245
245
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
246
246
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
247
- cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const Oi={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Di,handler:async e=>l({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ki={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(fi).command(mi).command(gi).command(vi).command(bi).command(Ci).command(Ei).command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ai={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function ji(e){return e.usage(`$0 magic-transit pcaps create
247
+ cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).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)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const Oi={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Di,handler:async e=>l({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(_,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(_,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(_,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(_,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(_,[`replay_protection`],e[`replay-protection`]);let v=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${f}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},ki={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(fi).command(mi).command(gi).command(vi).command(bi).command(Ci).command(Ei).command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ai={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function ji(e){return e.usage(`$0 magic-transit pcaps create
248
248
 
249
249
  Create new PCAP request for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mi={command:`create`,describe:`Create PCAP request`,builder:ji,handler:async e=>l({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0: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(Ai,{body:t,account_id:l}));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 Ni(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
250
250
 
@@ -292,13 +292,13 @@ Creates a new Site ACL.`).positional(`site-id`,{type:`string`,description:`Ident
292
292
 
293
293
  Remove a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,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 za={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:Ra,handler:async e=>l({command:`magic-transit sites acls 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-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(La,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Deleted`})})};var J={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function Ba(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
294
294
 
295
- Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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)`}).check(e=>{if([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const Va={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:Ba,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):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,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ua(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
295
+ Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Va={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:Ba,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):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,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(J,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})};var Ha={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ua(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
296
296
 
297
297
  Get a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wa={command:`get <acl-id>`,describe:`Site ACL Details`,builder:Ua,handler:async e=>l({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-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(Ha,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Loaded`})})};var Ga={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`};function Ka(e){return e.usage(`$0 magic-transit sites acls list
298
298
 
299
299
  Lists Site ACLs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qa={command:`list`,describe:`List Site ACLs`,builder:Ka,handler:async e=>l({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-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(Ga,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function Ja(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
300
300
 
301
- Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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)`}).check(e=>{if([`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0)){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_1-* flag is set`)}return!0}).check(e=>{if([`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0)){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan_2-* flag is set`)}return!0})}const Ya={command:`update <acl-id>`,describe:`Update Site ACL`,builder:Ja,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):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,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})},Xa={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Ia).command(za).command(Va).command(Wa).command(qa).command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Za(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
301
+ Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).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)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Ya={command:`update <acl-id>`,describe:`Update Site ACL`,builder:Ja,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):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,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>n.send(Y,{body:u,account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(f,{successLabel:`Updated`})})},Xa={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Ia).command(za).command(Va).command(Wa).command(qa).command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Za(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
302
302
 
303
303
  Creates a new App Config for a site`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).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 Qa={command:`create <site-id>`,describe:`Create a new App Config`,builder:Za,handler:async e=>l({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}):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(X,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let u=m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}),f=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var $a={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`};function eo(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
304
304
 
@@ -316,17 +316,17 @@ Patch a specific Site.`).positional(`site-id`,{type:`string`,description:`Identi
316
316
 
317
317
  Get a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vo={command:`get <site-id>`,describe:`Site Details`,builder:_o,handler:async e=>l({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(e[`site-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};var yo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`,body:`json`};function bo(e){return e.usage(`$0 magic-transit sites lans create <site-id>
318
318
 
319
- Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{if([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static_addressing-* flag is set`)}return!0})}const xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(yo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Creating`,async()=>n.send(yo,{body:p,account_id:l,site_id:e[`site-id`]}));o(g,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
319
+ Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(yo,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Creating`,async()=>n.send(yo,{body:p,account_id:l,site_id:e[`site-id`]}));o(g,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
320
320
 
321
321
  Remove a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,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 wo={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Co,handler:async e=>l({command:`magic-transit sites lans 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-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(So,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Deleted`})})};var To={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Eo(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
322
322
 
323
- Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{if([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static_addressing-* flag is set`)}return!0})}const Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(To,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(To,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
323
+ Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(To,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(To,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
324
324
 
325
325
  Get a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ao={command:`get <lan-id>`,describe:`Site LAN Details`,builder:ko,handler:async e=>l({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-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(Oo,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Loaded`})})};var jo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`};function Mo(e){return e.usage(`$0 magic-transit sites lans list
326
326
 
327
327
  Lists Site LANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const No={command:`list`,describe:`List Site LANs`,builder:Mo,handler:async e=>l({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-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(jo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Po={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Fo(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
328
328
 
329
- Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{if([`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static_addressing-* flag is set`)}return!0})}const Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(Po,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(Po,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
329
+ Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):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(Po,{body:t,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let p=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),g=await c(`Updating`,async()=>n.send(Po,{body:p,account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(g,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
330
330
 
331
331
  Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.`).option(`connectorid`,{type:`string`,description:`Identifier`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bo={command:`list`,describe:`List Sites`,builder:zo,handler:async e=>l({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={connectorid:e.connectorid};if(e.dryRun){let e=await i();s({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,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(Ro,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Vo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function Ho(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
332
332
 
@@ -342,7 +342,7 @@ Updates NetFlow configuration for a site (partial update).`).positional(`site-id
342
342
 
343
343
  Update a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`ha-mode`,{type:`boolean`,description:`Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).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 is={command:`update <site-id>`,describe:`Update Site`,builder:rs,handler:async e=>l({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):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(ns,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let u=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Updating`,async()=>n.send(ns,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Updated`})})};var as={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`,body:`json`};function os(e){return e.usage(`$0 magic-transit sites wans create <site-id>
344
344
 
345
- Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{if([`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`,`static-addressing-secondary-gateway-address`].some(t=>e[t]!==void 0)){let t=[`static-addressing-address`,`static-addressing-gateway-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static_addressing-* flag is set`)}return!0})}const ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):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(as,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Creating`,async()=>n.send(as,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
345
+ Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).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)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`,`static-addressing-secondary-gateway-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`,`static-addressing-gateway-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):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(as,{body:t,account_id:l,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let u=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Creating`,async()=>n.send(as,{body:u,account_id:l,site_id:e[`site-id`]}));o(f,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
346
346
 
347
347
  Remove a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,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 us={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:ls,handler:async e=>l({command:`magic-transit sites wans 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-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(cs,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(u,{successLabel:`Deleted`})})};var ds={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function fs(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
348
348