cf 1.0.0-beta.12 → 1.0.0-beta.14

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 (306) hide show
  1. package/dist/_meta/commands.json +4648 -3810
  2. package/dist/_meta/hand-written-commands.json +356 -23
  3. package/dist/_meta/schemas.json +2522 -2143
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/account-tags-RhvWOkOf.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts--3lrEkmu.mjs} +67 -80
  8. package/dist/{acm-BfI0p2sX.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-jFzFBANM.mjs → ai-CRkQ4pjC.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/ai-gateway-CbhvQK4L.mjs +80 -0
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-CpbCB8br.mjs} +5 -5
  17. package/dist/analytics-DkY9dOP1.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/argo-DhC5L_aN.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-CKotxfap.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-AobvBmz4.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-RQ3HS4m1.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-CDMc4tvX.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/browser-run-hHD1RT43.mjs +42 -0
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-C05hHXUp.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/cf-oRSQKirD.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-CPI5cYtB.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Civns3WA.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-ht4q6i2y.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-balaN_my.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  47. package/dist/cloudflared-D83U8Yn3.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CXdeqJ9l.mjs} +143 -185
  49. package/dist/{command-VuxpEvmH.mjs → command-9VAc7b30.mjs} +1 -1
  50. package/dist/{command-CUkXxZsc.mjs → command-B_Ixlz8Q.mjs} +1 -1
  51. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  52. package/dist/{command-DBaNgfA4.mjs → command-BtDY_MKv.mjs} +1 -1
  53. package/dist/command-CUNMrMou.mjs +2 -0
  54. package/dist/{command-SS1z_t68.mjs → command-Ckb9FufU.mjs} +1 -1
  55. package/dist/{command-BWlpCtHe.mjs → command-CtVUNm__.mjs} +1 -1
  56. package/dist/{command-DyE8v4sd.mjs → command-CyJQ40fc.mjs} +1 -1
  57. package/dist/{command-BlGILcTA.mjs → command-DPX9sJVi.mjs} +1 -1
  58. package/dist/{command-CXxh5Hce.mjs → command-DXaRn1ls.mjs} +1 -1
  59. package/dist/{command-CRl00uA2.mjs → command-DjEJaOwV.mjs} +1 -1
  60. package/dist/{command-Rv2MR-eh.mjs → command-DtgJilOK.mjs} +1 -1
  61. package/dist/{command-CKQlxypn.mjs → command-OHov3PEc.mjs} +1 -1
  62. package/dist/{command-DEQSv-S1.mjs → command-OWe3v69l.mjs} +1 -1
  63. package/dist/{command-BQpXcGKV.mjs → command-SmWD-MeI.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-CuqAO3N_.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-6lVSr-fd.mjs} +1 -1
  69. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  70. package/dist/containers-ncw3bd3a.mjs +376 -0
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  72. package/dist/{context-Bwkz4Lm_.mjs → context-BBLtgdR1.mjs} +2 -2
  73. package/dist/cps-C5phNoVU.mjs +6 -0
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-wGtmFbz1.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  81. package/dist/d1-EQMUlHTJ.mjs +94 -0
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  83. package/dist/deploy-B22sEVHd.mjs +2 -0
  84. package/dist/deploy-context-DmG9rgPO.mjs +56 -0
  85. package/dist/deploy-input-BCjcuP6u.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ClhhXuNU.mjs} +1 -1
  87. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/dist-DmRM6WSZ.mjs +449 -0
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-BEHj4X9T.mjs} +1 -1
  92. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  93. package/dist/{dns-C-A5pwf3.mjs → dns-n4mfYBZg.mjs} +7 -7
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-WcSPt22u.mjs} +5 -5
  98. package/dist/{email-security-BCarmbky.mjs → email-security-BXu3OGay.mjs} +15 -15
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall-CRtYO0Ha.mjs} +7 -7
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-DvTFZSay.mjs} +3 -3
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-uSyibsit.mjs} +5 -5
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  107. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  108. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  109. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  110. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  111. package/dist/{iam-sRKDU2Z3.mjs → iam-Dl3cU9GI.mjs} +1 -1
  112. package/dist/{images-DXdekLVs.mjs → images-C2OkI1j7.mjs} +6 -6
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-Da8pe296.mjs +43 -0
  115. package/dist/{intel-CnVeSjIS.mjs → intel-DoB1g_K7.mjs} +2 -2
  116. package/dist/interactive-BW9T1D1q.mjs +48 -0
  117. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  118. package/dist/{ips-COCUG8mk.mjs → ips-BRt68epr.mjs} +1 -1
  119. package/dist/k2-_eq5ZY2t.mjs +11 -0
  120. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  121. package/dist/{keys-CDZreums.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  122. package/dist/{kv-DkpKVimq.mjs → kv-BTYCXKML.mjs} +4 -4
  123. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  125. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-BcPM4I0s.mjs} +1 -1
  127. package/dist/local-BundUuDT.mjs +2 -0
  128. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-BBYC_BtH.mjs} +1 -1
  130. package/dist/{login-BrjOuHKu.mjs → login-D2uoWhWh.mjs} +1 -1
  131. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  132. package/dist/{logos-Bd8xNRKW.mjs → logos-X5B8z7Iv.mjs} +1 -1
  133. package/dist/{logpush-BYk3qqwY.mjs → logpush-C2ENi1et.mjs} +7 -7
  134. package/dist/{logs-Jcj2NN8H.mjs → logs-BKDz7kBW.mjs} +1 -1
  135. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  136. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  137. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  138. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  139. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  140. package/dist/{matches-BtKqG8T9.mjs → matches-rPMLS3Ip.mjs} +1 -1
  141. package/dist/mcp-DXUMvEWt.mjs +32 -0
  142. package/dist/mesh-MmBCQ37q.mjs +26 -0
  143. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  144. package/dist/{monetization-pLalYYMI.mjs → monetization-DQE5VtUO.mjs} +2 -2
  145. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-DwkEb-Hy.mjs} +2 -2
  146. package/dist/{network-DrJxPWXQ.mjs → network-BcfobxQY.mjs} +1 -1
  147. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -11
  148. package/dist/o11y-BBv7nedp.mjs +93 -0
  149. package/dist/{oauth-B08YQ4xq.mjs → oauth-BUr8bPwo.mjs} +1 -1
  150. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  151. package/dist/{oauth-TGbM1Q0V.mjs → oauth-n8um6MFk.mjs} +1 -1
  152. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  153. package/dist/organization-CJeOVWH7.mjs +71 -0
  154. package/dist/{organizations-Dk0D9ukm.mjs → organizations-BpfoqZcG.mjs} +1 -1
  155. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  156. package/dist/origin-post-quantum-encryption-CM-If38w.mjs +6 -0
  157. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +3 -3
  158. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  159. package/dist/{page-rules-BKaU37cM.mjs → page-rules-DOeekMrj.mjs} +4 -4
  160. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  161. package/dist/pay-per-crawl-qJpseNNx.mjs +38 -0
  162. package/dist/pay-per-use-C1MWKJ4O.mjs +33 -0
  163. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  164. package/dist/{precursor-DmQ32-Sp.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  165. package/dist/previews-BEheHO3T.mjs +4 -0
  166. package/dist/process-2wmDCy17.mjs +2 -0
  167. package/dist/{progress-BYVZuEcG.mjs → progress-CQqDtgmF.mjs} +1 -1
  168. package/dist/prompt-C8FyienX.mjs +3 -0
  169. package/dist/{queries-DPBkVynK.mjs → queries-DJ8looyq.mjs} +1 -1
  170. package/dist/{queues-CCXRs98q.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  171. package/dist/{r2-BKuBSW8h.mjs → r2-CdJKpP2w.mjs} +52 -49
  172. package/dist/{radar-Gv1yFoRX.mjs → radar-CdvQL4xm.mjs} +1 -1
  173. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  174. package/dist/{realtime-CVl-rvgx.mjs → realtime-onrXppzh.mjs} +9 -9
  175. package/dist/{registrar-swlnh22i.mjs → registrar-CbEBc5IE.mjs} +2 -2
  176. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  177. package/dist/{registry-C20J1MW0.mjs → registry-PI6sO95I.mjs} +1 -1
  178. package/dist/{reporting-Bgwsvol1.mjs → reporting-bXZY6obP.mjs} +1 -1
  179. package/dist/{request-headers-CUee83pa.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  180. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-CihskC2A.mjs} +1 -1
  181. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  182. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  183. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-DDqcCHVs.mjs} +11 -11
  184. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  185. package/dist/{rules-BDunCGMj.mjs → rules-CAW0-Wde.mjs} +1 -1
  186. package/dist/rulesets-CPir63Qc.mjs +37 -0
  187. package/dist/{rum-B7XiECe9.mjs → rum-BfwTcuup.mjs} +1 -1
  188. package/dist/{run-CrZgB8L_.mjs → run-CW2Cgi0S.mjs} +1 -1
  189. package/dist/run-DEynXvCc.mjs +2 -0
  190. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  191. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  192. package/dist/{scim-CORcs2wK.mjs → scim-CtZ1FeQE.mjs} +1 -1
  193. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-BIuBYUJT.mjs} +2 -2
  194. package/dist/{security-insights-DblK_6sg.mjs → security-insights-DfUus0bs.mjs} +3 -3
  195. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  196. package/dist/{session-BWe9et4K.mjs → session-BcM8Vyyx.mjs} +1 -1
  197. package/dist/shared-CpS23WwR.mjs +2 -0
  198. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  199. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DLO3iFAg.mjs} +1 -1
  200. package/dist/spawn-D07wH-MH.mjs +10 -0
  201. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  202. package/dist/{speed-Dj0YhfRe.mjs → speed-DX5X2EIR.mjs} +1 -1
  203. package/dist/sql-CF044HDW.mjs +4 -0
  204. package/dist/src-BMATTZU_.mjs +125 -0
  205. package/dist/{ssl-BQL1fNtD.mjs → ssl-CM-rChEC.mjs} +5 -5
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  207. package/dist/startup-profile-D662WI9s.mjs +2 -0
  208. package/dist/state-D7uNYnoi.mjs +2 -0
  209. package/dist/{state-Dy6-rKNd.mjs → state-DIiIGEtR.mjs} +1 -1
  210. package/dist/{stream-DKv2TtZN.mjs → stream-5EmUOQvy.mjs} +5 -5
  211. package/dist/{submit-Byt2KBGI.mjs → submit-lEAaRSMR.mjs} +1 -1
  212. package/dist/{tags-BIBsdG68.mjs → tags-CX23P4jg.mjs} +1 -1
  213. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  214. package/dist/{telemetry-bu3txnIR.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  215. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-DnI7QziH.mjs} +1 -1
  216. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  217. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  218. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  219. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-HFkPml6x.mjs} +1 -1
  221. package/dist/update-check-aTutXNRd.mjs +2 -0
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-B8udoxlx.mjs → url-info-Dos9VOXV.mjs} +1 -1
  224. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  225. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  226. package/dist/{user-BLZ-0Bgv.mjs → user-rXca0J9M.mjs} +14 -14
  227. package/dist/values-D-rrZrDa.mjs +4 -0
  228. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  229. package/dist/version-BGnqDvNR.mjs +2 -0
  230. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  231. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  232. package/dist/{web3-DjeavuLg.mjs → web3-MI0GQDnu.mjs} +5 -5
  233. package/dist/workers-By6Pf8fv.mjs +40 -0
  234. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  235. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-DL8fC1qR.mjs} +4 -6
  236. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  237. package/dist/workflows-ByQLnV0E.mjs +52 -0
  238. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  239. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-CgbpmA85.mjs} +1 -1
  240. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CpjTkkWt.mjs} +418 -402
  241. package/dist/{zone-tymlghWb.mjs → zone-DnKIe6po.mjs} +1 -1
  242. package/dist/{zones-Bz6dgT9_.mjs → zones--5ZzsDmQ.mjs} +15 -15
  243. package/package.json +25 -26
  244. package/dist/abuse-reports-Cy9RcWPu.mjs +0 -24
  245. package/dist/access-DwJm1qet.mjs +0 -2
  246. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  247. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  248. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  249. package/dist/analytics-NPND7aHB.mjs +0 -20
  250. package/dist/argo-DYfLQhd2.mjs +0 -10
  251. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  252. package/dist/bot-management-UrCM3P8K.mjs +0 -9
  253. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  254. package/dist/build-C4giET85.mjs +0 -2
  255. package/dist/cf-B9aqZZKD.mjs +0 -18
  256. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  257. package/dist/cloudflared-B48cfu95.mjs +0 -2
  258. package/dist/command-CzvlHvov.mjs +0 -2
  259. package/dist/containers-DRzgE46U.mjs +0 -375
  260. package/dist/containers-DuIsM7lM.mjs +0 -78
  261. package/dist/cps-B7_BJaAU.mjs +0 -6
  262. package/dist/d1-MvAQMvvo.mjs +0 -89
  263. package/dist/deploy-BS47vZvJ.mjs +0 -2
  264. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  265. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  266. package/dist/diagnostics-ChDfJ-Gv.mjs +0 -15
  267. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  268. package/dist/dist-8rP3V95o.mjs +0 -57
  269. package/dist/dist-CYFkGHYv.mjs +0 -487
  270. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  271. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  272. package/dist/hyperdrive-DAA8Fazg.mjs +0 -37
  273. package/dist/init-j47MT4Qe.mjs +0 -39
  274. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  275. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  276. package/dist/k2-CmHkArHL.mjs +0 -13
  277. package/dist/load-balancers-C5YMvhXD.mjs +0 -76
  278. package/dist/local-D5L5Bwju.mjs +0 -2
  279. package/dist/mcp-QDd1Iyc0.mjs +0 -32
  280. package/dist/mesh-DtrIzl5z.mjs +0 -26
  281. package/dist/observability-CvN9oxAo.mjs +0 -80
  282. package/dist/organization-DIwqRBBV.mjs +0 -75
  283. package/dist/origin-post-quantum-encryption-BOKWKDTY.mjs +0 -6
  284. package/dist/pages-2Xg-lrMf.mjs +0 -54
  285. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  286. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  287. package/dist/pipelines-BM-T7mMK.mjs +0 -44
  288. package/dist/previews-DDQ9ACDJ.mjs +0 -4
  289. package/dist/prompt-F5wxc8zq.mjs +0 -3
  290. package/dist/raw-fetch-DyYWa923.mjs +0 -2
  291. package/dist/resolve-qwL1LmKN.mjs +0 -2
  292. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  293. package/dist/run-nNxXb_Cv.mjs +0 -2
  294. package/dist/shared-0N31BXkY.mjs +0 -2
  295. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  296. package/dist/src-CAiZlihY.mjs +0 -117
  297. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  298. package/dist/state-BA2CanJ_.mjs +0 -2
  299. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  300. package/dist/update-check-B-CvDAUz.mjs +0 -2
  301. package/dist/values-BUK-m0Jg.mjs +0 -4
  302. package/dist/version-BZNc7Y3t.mjs +0 -2
  303. package/dist/waiting-rooms-BycGk2Y0.mjs +0 -53
  304. package/dist/workers-C_SfyU-v.mjs +0 -38
  305. package/dist/workers-vpc-CKts8Av0.mjs +0 -13
  306. package/dist/workflows-BibtWuOx.mjs +0 -43
@@ -1,136 +1,139 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-F5wxc8zq.mjs";import{n as _,t as v}from"./raw-fetch-DyYWa923.mjs";function ee(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-C8FyienX.mjs";import{n as _,t as v}from"./raw-fetch-DbXN3SlE.mjs";function ee(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
4
- 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 te={command:`create`,describe:`Create DNS Protection rule.`,builder:ee,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`profile-sensitivity`]===void 0&&(t[`profile-sensitivity`]=await m(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete for account
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 te={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:ee,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
5
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
5
6
 
6
- 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 b={command:`account`,describe:`Delete all DNS Protection rules.`,builder:y,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete for account`,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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
7
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},x={command:`for`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete.for`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete protection rule <rule-id>
7
+ 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 b={command:`create`,describe:`Create DNS Protection rule.`,builder:y,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`profile-sensitivity`]===void 0&&(t[`profile-sensitivity`]=await m(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function x(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
8
8
 
9
- 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 C={command:`rule <rule-id>`,describe:`Delete DNS Protection rule.`,builder:S,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
10
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.delete.protection.rule({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})},w={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete.protection`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`delete`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules.delete`,builder:e=>e.command(x).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
9
+ 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 S={command:`delete <rule-id>`,describe:`Delete DNS Protection rule.`,builder:x,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
10
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.delete({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
11
11
 
12
- Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:E,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules list
12
+ Get a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:C,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules list
13
13
 
14
- 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 k={command:`list`,describe:`List all DNS Protection rules.`,builder:O,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedDnsProtection.configs.dns.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
14
+ 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 E={command:`list`,describe:`List all DNS Protection rules.`,builder:T,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedDnsProtection.configs.dns.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
15
15
 
16
- 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 j={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:A,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},M={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(te).command(D).command(k).command(j).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
16
+ 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 O={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:D,handler:async t=>c({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({block_any_queries:t[`block-any-queries`],burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),profile_sensitivity:p(t[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},k={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(te).command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},A={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
17
17
 
18
- Create an allowlist prefix for an account.`).option(`comment`,{type:`string`,description:`An comment describing the allowlist prefix.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect.`}).option(`prefix`,{type:`string`,description:`The allowlist prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new allowlist prefix to create.`})}const R={command:`create`,describe:`Create allowlist prefix.`,builder:L,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled,prefix:p(t.prefix,`prefix`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.comment===void 0&&(t.comment=await m(`comment`,`An comment describing the allowlist prefix.`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.prefix===void 0&&(t.prefix=await m(`prefix`,`The allowlist prefix to add in CIDR format.`));let d=f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled,prefix:p(t.prefix,`prefix`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function z(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix <prefix-id>
18
+ 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 F={command:`bulk-delete`,describe:`Delete all allowlist prefixes.`,builder:P,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
19
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
19
20
 
20
- Delete the allowlist prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix 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 B={command:`prefix <prefix-id>`,describe:`Delete allowlist prefix.`,builder:z,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete allowlist prefix`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
21
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.delete.allowlist.prefix({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Deleted`})})},V={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete.allowlist`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist delete for account
21
+ Create an allowlist prefix for an account.`).option(`comment`,{type:`string`,description:`An comment describing the allowlist prefix.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect.`}).option(`prefix`,{type:`string`,description:`The allowlist prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new allowlist prefix to create.`})}const L={command:`create`,describe:`Create allowlist prefix.`,builder:I,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled,prefix:p(t.prefix,`prefix`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.comment===void 0&&(t.comment=await m(`comment`,`An comment describing the allowlist prefix.`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.prefix===void 0&&(t.prefix=await m(`prefix`,`The allowlist prefix to add in CIDR format.`));let d=f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled,prefix:p(t.prefix,`prefix`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function R(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
22
22
 
23
- 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 U={command:`account`,describe:`Delete all allowlist prefixes.`,builder:H,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist delete for account`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
24
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},W={command:`for`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete.for`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.allowlist.delete`,builder:e=>e.command(V).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist get <prefix-id>
23
+ List all allowlist prefixes 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 z={command:`list`,describe:`List all allowlist prefixes.`,builder:R,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.allowlist.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix delete <prefix-id>
25
24
 
26
- Get an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:K,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.get({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
25
+ Delete the allowlist prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix 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 V={command:`delete <prefix-id>`,describe:`Delete allowlist prefix.`,builder:B,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist prefix delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
26
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.prefix.delete({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Deleted`})})};function H(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix get <prefix-id>
27
27
 
28
- List all allowlist prefixes 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 Y={command:`list`,describe:`List all allowlist prefixes.`,builder:J,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.allowlist.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist update <prefix-id>
28
+ Get an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:H,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist prefix get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.prefix.get({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix update <prefix-id>
29
29
 
30
- Update an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A comment describing the allowlist prefix. Optional.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect. 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 allowlist prefix.`})}const Z={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:X,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.update({...e,account_id:l,prefix_id:t[`prefix-id`]}));a(n,{successLabel:`Updated`});return}let d=f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.update({...d,account_id:l,prefix_id:t[`prefix-id`]}));a(m,{successLabel:`Updated`})})},Q={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(R).command(q).command(Y).command(Z).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
30
+ Update an allowlist prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the allowlist prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A comment describing the allowlist prefix. Optional.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable the allowlist prefix into effect. 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 allowlist prefix.`})}const G={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:W,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs allowlist prefix update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.prefix.update({...e,account_id:l,prefix_id:t[`prefix-id`]}));a(n,{successLabel:`Updated`});return}let d=f({comment:p(t.comment,`comment`,`text`),enabled:t.enabled}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.allowlist.prefix.update({...d,account_id:l,prefix_id:t[`prefix-id`]}));a(m,{successLabel:`Updated`})})},K={command:`prefix`,describe:`Operations for advanced-tcp-protection.configs.allowlist.prefix`,builder:e=>e.command(V).command(U).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(F).command(L).command(z).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk-delete
31
31
 
32
- Create multiple prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The list of new prefixes to create.`})}const re={command:`create`,describe:`Create multiple prefixes.`,builder:ne,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.bulk.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ie={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
32
+ Delete all 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 Y={command:`bulk-delete`,describe:`Delete all prefixes.`,builder:J,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
33
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function X(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
33
34
 
34
- Create a prefix for an account.`).option(`comment`,{type:`string`,description:`A comment describing the prefix.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection.`}).option(`prefix`,{type:`string`,description:`The prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new prefix to create.`})}const oe={command:`create`,describe:`Create prefix.`,builder:ae,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded,prefix:p(t.prefix,`prefix`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.comment===void 0&&(t.comment=await m(`comment`,`A comment describing the prefix.`)),t.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);t.prefix===void 0&&(t.prefix=await m(`prefix`,`The prefix to add in CIDR format.`));let d=f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded,prefix:p(t.prefix,`prefix`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function se(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
35
+ Create multiple prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The list of new prefixes to create.`})}const Z={command:`create`,describe:`Create multiple prefixes.`,builder:X,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.bulk.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Q={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
35
36
 
36
- Delete the prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix 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 ce={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:se,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
37
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.delete({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Deleted`})})};function le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
37
+ Create a prefix for an account.`).option(`comment`,{type:`string`,description:`A comment describing the prefix.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection.`}).option(`prefix`,{type:`string`,description:`The prefix to add in CIDR format.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new prefix to create.`})}const re={command:`create`,describe:`Create prefix.`,builder:ne,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded,prefix:p(t.prefix,`prefix`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.comment===void 0&&(t.comment=await m(`comment`,`A comment describing the prefix.`)),t.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);t.prefix===void 0&&(t.prefix=await m(`prefix`,`The prefix to add in CIDR format.`));let d=f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded,prefix:p(t.prefix,`prefix`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function ie(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
38
38
 
39
- Get a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <prefix-id>`,describe:`Get prefix.`,builder:le,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.get({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes list
39
+ Delete the prefix for an account given a UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix 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 ae={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:ie,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
40
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.delete({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Deleted`})})};function oe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
40
41
 
41
- List all prefixes 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 fe={command:`list`,describe:`List all prefixes.`,builder:de,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.prefixes.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
42
+ Get a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <prefix-id>`,describe:`Get prefix.`,builder:oe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.get({account_id:l,prefix_id:t[`prefix-id`]}));a(u,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes list
42
43
 
43
- Update a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A new comment for the prefix. Optional.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection. 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 prefix.`})}const me={command:`update <prefix-id>`,describe:`Update prefix.`,builder:pe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...e,account_id:l,prefix_id:t[`prefix-id`]}));a(n,{successLabel:`Updated`});return}let d=f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...d,account_id:l,prefix_id:t[`prefix-id`]}));a(m,{successLabel:`Updated`})})},he={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(oe).command(ce).command(ue).command(fe).command(me).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
44
+ List all prefixes 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 le={command:`list`,describe:`List all prefixes.`,builder:ce,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.prefixes.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
44
45
 
45
- 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 _e={command:`create`,describe:`Create a SYN Protection filter.`,builder:ge,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.expression===void 0&&(t.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(t.expression,`expression`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function ve(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete for account
46
+ Update a prefix specified by the given UUID.`).positional(`prefix-id`,{type:`string`,description:`The UUID of the prefix to update.`,demandOption:!0}).option(`comment`,{type:`string`,description:`A new comment for the prefix. Optional.`}).option(`excluded`,{type:`boolean`,description:`Whether to exclude the prefix from protection. 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 prefix.`})}const de={command:`update <prefix-id>`,describe:`Update prefix.`,builder:ue,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${t[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(t[`prefix-id`]))}`,pathParams:{"prefix-id":String(t[`prefix-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...e,account_id:l,prefix_id:t[`prefix-id`]}));a(n,{successLabel:`Updated`});return}let d=f({comment:p(t.comment,`comment`,`text`),excluded:t.excluded}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.prefixes.update({...d,account_id:l,prefix_id:t[`prefix-id`]}));a(m,{successLabel:`Updated`})})},fe={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(Y).command(re).command(ae).command(se).command(le).command(de).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters bulk-delete
46
47
 
47
- 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 ye={command:`account`,describe:`Delete all SYN Protection filters.`,builder:ve,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete for account`,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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
48
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},be={command:`for`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete.for`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete protection filter <filter-id>
48
+ 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 me={command:`bulk-delete`,describe:`Delete all SYN Protection filters.`,builder:pe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
49
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function he(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
49
50
 
50
- 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 Se={command:`filter <filter-id>`,describe:`Delete SYN Protection filter.`,builder:xe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
51
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.delete.protection.filter({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Deleted`})})},Ce={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete.protection`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},we={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters.delete`,builder:e=>e.command(be).command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
51
+ 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 ge={command:`create`,describe:`Create a SYN Protection filter.`,builder:he,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.expression===void 0&&(t.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(t.expression,`expression`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function _e(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
52
52
 
53
- Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:Te,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.get({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Loaded`})})};function De(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters list
53
+ 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 ve={command:`delete <filter-id>`,describe:`Delete SYN Protection filter.`,builder:_e,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
54
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.delete({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Deleted`})})};function ye(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
54
55
 
55
- 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 Oe={command:`list`,describe:`List all SYN Protection filters.`,builder:De,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={mode:t[`filter-mode`],page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.filters.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function ke(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
56
+ Get a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:ye,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.get({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Loaded`})})};function xe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters list
56
57
 
57
- 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 Ae={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:ke,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:e,account_id:l,filter_id:t[`filter-id`]}));a(n,{successLabel:`Updated`});return}let d=f({expression:p(t.expression,`expression`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:d,account_id:l,filter_id:t[`filter-id`]}));a(m,{successLabel:`Updated`})})},je={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(_e).command(Ee).command(Oe).command(Ae).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Me(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
58
+ 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 Se={command:`list`,describe:`List all SYN Protection filters.`,builder:xe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={mode:t[`filter-mode`],page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.filters.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ce(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
58
59
 
59
- 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 Ne={command:`create`,describe:`Create SYN Protection rule.`,builder:Me,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete for account
60
+ 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 we={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:Ce,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:e,account_id:l,filter_id:t[`filter-id`]}));a(n,{successLabel:`Updated`});return}let d=f({expression:p(t.expression,`expression`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.filters.update({body:d,account_id:l,filter_id:t[`filter-id`]}));a(m,{successLabel:`Updated`})})},Te={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(me).command(ge).command(ve).command(be).command(Se).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
60
61
 
61
- 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 Fe={command:`account`,describe:`Delete all SYN Protection rules.`,builder:Pe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete for account`,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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
62
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},Ie={command:`for`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete.for`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete protection rule <rule-id>
62
+ 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 De={command:`bulk-delete`,describe:`Delete all SYN Protection rules.`,builder:Ee,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
63
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function Oe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
63
64
 
64
- 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 Re={command:`rule <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Le,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
65
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.delete.protection.rule({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})},ze={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete.protection`,builder:e=>e.command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules.delete`,builder:e=>e.command(Ie).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ve(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
65
+ 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 ke={command:`create`,describe:`Create SYN Protection rule.`,builder:Oe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Ae(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
66
66
 
67
- Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Ve,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function Ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules list
67
+ 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 je={command:`delete <rule-id>`,describe:`Delete SYN Protection rule.`,builder:Ae,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
68
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.delete({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})};function Me(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
68
69
 
69
- 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 We={command:`list`,describe:`List all SYN Protection rules.`,builder:Ue,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
70
+ Get a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Me,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function Pe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules list
70
71
 
71
- 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 Ke={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Ge,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},qe={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Ne).command(He).command(We).command(Ke).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Je={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(je).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
72
+ 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 Fe={command:`list`,describe:`List all SYN Protection rules.`,builder:Pe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.syn.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ie(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
72
73
 
73
- 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 Ze={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Xe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.expression===void 0&&(t.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(t.expression,`expression`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function Qe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account
74
+ 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 Le={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:Ie,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:p(t[`mitigation-type`],`mitigation-type`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.syn.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},Re={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(De).command(ke).command(je).command(Ne).command(Fe).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(Te).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ve(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
74
75
 
75
- 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 $e={command:`account`,describe:`Delete all TCP Flow Protection filters.`,builder:Qe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete for account`,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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
76
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},et={command:`for`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete.for`,builder:e=>e.command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter <filter-id>
76
+ 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 He={command:`bulk-delete`,describe:`Delete all TCP Flow Protection filters.`,builder:Ve,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
77
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function Ue(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
77
78
 
78
- 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 nt={command:`filter <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:tt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete protection filter`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
79
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.delete.protection.filter({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Deleted`})})},rt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete.protection`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},it={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters.delete`,builder:e=>e.command(et).command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
79
+ 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 We={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:Ue,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.expression===void 0&&(t.expression=await m(`expression`,`The filter expression.`));let d=f({expression:p(t.expression,`expression`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function Ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
80
80
 
81
- Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:at,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.get({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Loaded`})})};function st(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters list
81
+ 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 Ke={command:`delete <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:Ge,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
82
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.delete({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Deleted`})})};function qe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
82
83
 
83
- 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 ct={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:st,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={mode:t[`filter-mode`],page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
84
+ Get a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:qe,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.get({account_id:l,filter_id:t[`filter-id`]}));a(u,{successLabel:`Loaded`})})};function Ye(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters list
84
85
 
85
- 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 ut={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:lt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:e,account_id:l,filter_id:t[`filter-id`]}));a(n,{successLabel:`Updated`});return}let d=f({expression:p(t.expression,`expression`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:d,account_id:l,filter_id:t[`filter-id`]}));a(m,{successLabel:`Updated`})})},dt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(Ze).command(ot).command(ct).command(ut).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ft(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
86
+ 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 Xe={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:Ye,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={mode:t[`filter-mode`],page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ze(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
86
87
 
87
- 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 pt={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:ft,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the TCP Flow Protection rule.`));let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account
88
+ 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 Qe={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:Ze,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(t[`filter-id`]))}`,pathParams:{"filter-id":String(t[`filter-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({expression:p(t.expression,`expression`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:e,account_id:l,filter_id:t[`filter-id`]}));a(n,{successLabel:`Updated`});return}let d=f({expression:p(t.expression,`expression`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.filters.update({body:d,account_id:l,filter_id:t[`filter-id`]}));a(m,{successLabel:`Updated`})})},$e={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(He).command(We).command(Ke).command(Je).command(Xe).command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function et(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
88
89
 
89
- 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 ht={command:`account`,describe:`Delete all TCP Flow Protection rules.`,builder:mt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete for account`,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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
90
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.delete.for.account({account_id:l}));a(u,{successLabel:`Deleted`})})},gt={command:`for`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete.for`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule <rule-id>
90
+ 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 tt={command:`bulk-delete`,describe:`Delete all TCP Flow Protection rules.`,builder:et,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
91
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.bulkDelete({account_id:l}));a(u,{successLabel:`Deleted`})})};function nt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
91
92
 
92
- 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 vt={command:`rule <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:_t,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete protection rule`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
93
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.delete.protection.rule({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})},yt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete.protection`,builder:e=>e.command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`delete`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules.delete`,builder:e=>e.command(gt).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
93
+ 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 rt={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:nt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`burst-sensitivity`]===void 0&&(t[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.name===void 0&&(t.name=await m(`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'.`)),t[`rate-sensitivity`]===void 0&&(t[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),t.scope===void 0&&(t.scope=await m(`scope`,`The scope for the TCP Flow Protection rule.`));let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(t.name,`name`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(t.scope,`scope`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function it(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
94
94
 
95
- Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:xt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function Ct(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules list
95
+ 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 at={command:`delete <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:it,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
96
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.delete({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})};function ot(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
96
97
 
97
- 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 wt={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:Ct,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Tt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
98
+ Get a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:ot,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function ct(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules list
98
99
 
99
- 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 Et={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Tt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},Dt={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(pt).command(St).command(wt).command(Et).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(dt).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},kt={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function At(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
100
+ 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 lt={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:ct,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function ut(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
100
101
 
101
- Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jt={command:`get`,describe:`Get protection status.`,builder:At,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function Mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
102
+ 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 dt={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:ut,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...e,account_id:l,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}let d=f({burst_sensitivity:p(t[`burst-sensitivity`],`burst-sensitivity`,`text`),rate_sensitivity:p(t[`rate-sensitivity`],`rate-sensitivity`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.flow.protection.rules.update({...d,account_id:l,rule_id:t[`rule-id`]}));a(m,{successLabel:`Updated`})})},ft={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(tt).command(rt).command(at).command(st).command(lt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command($e).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},mt={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ht(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
102
103
 
103
- Update the protection status of the account.`).option(`enabled`,{type:`boolean`,description:`Enables or disables protection.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The update to apply to the protection status.`})}const Nt={command:`update`,describe:`Update protection status.`,builder:Mt,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:t.enabled}),p=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...d,account_id:l}));a(p,{successLabel:`Updated`})})},Pt={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(jt).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ft={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},It={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(kt).command(Ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lt={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Q).command(he).command(Ye).command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rt={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zt(e){return e.usage(`$0 magic-transit apps create
104
+ Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get`,describe:`Get protection status.`,builder:ht,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function _t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
104
105
 
105
- Creates a new App for an account`).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Bt={command:`create`,describe:`Create a new App`,builder:zt,handler:async t=>c({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.apps.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`Display name for the app.`)),t.type===void 0&&(t.type=await m(`type`,`Category of the app.`));let d=f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.apps.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function Vt(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
106
+ Update the protection status of the account.`).option(`enabled`,{type:`boolean`,description:`Enables or disables protection.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The update to apply to the protection status.`})}const vt={command:`update`,describe:`Update protection status.`,builder:_t,handler:async t=>c({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({enabled:t.enabled}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=f({enabled:t.enabled}),p=await s(`Updating`,async()=>c.magicTransit.advancedTcpProtection.configs.tcp.protection.status.update({...d,account_id:l}));a(p,{successLabel:`Updated`})})},yt={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(gt).command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(mt).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},St={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(q).command(fe).command(Be).command(xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ct={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(St).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wt(e){return e.usage(`$0 magic-transit apps create
106
107
 
107
- Deletes specific Account App.`).positional(`account-app-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 Ht={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Vt,handler:async t=>c({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps/${t[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(t[`account-app-id`]))}`,pathParams:{"account-app-id":String(t[`account-app-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
108
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.apps.delete({account_id:l,account_app_id:t[`account-app-id`]}));a(u,{successLabel:`Deleted`})})};function Ut(e){return e.usage(`$0 magic-transit apps list
108
+ Creates a new App for an account`).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Tt={command:`create`,describe:`Create a new App`,builder:wt,handler:async t=>c({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.apps.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`Display name for the app.`)),t.type===void 0&&(t.type=await m(`type`,`Category of the app.`));let d=f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.apps.create({body:d,account_id:l}));a(h,{successLabel:`Created`})})};function Et(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
109
109
 
110
- Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wt={command:`list`,describe:`List Apps`,builder:Ut,handler:async t=>c({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.apps.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function Gt(e){return e.usage(`$0 magic-transit apps update <account-app-id>
110
+ Deletes specific Account App.`).positional(`account-app-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 Dt={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Et,handler:async t=>c({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps/${t[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(t[`account-app-id`]))}`,pathParams:{"account-app-id":String(t[`account-app-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
111
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.apps.delete({account_id:l,account_app_id:t[`account-app-id`]}));a(u,{successLabel:`Deleted`})})};function Ot(e){return e.usage(`$0 magic-transit apps list
111
112
 
112
- Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 Kt={command:`update <account-app-id>`,describe:`Update an App`,builder:Gt,handler:async t=>c({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps/${t[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(t[`account-app-id`]))}`,pathParams:{"account-app-id":String(t[`account-app-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.apps.update({body:e,account_id:l,account_app_id:t[`account-app-id`]}));a(n,{successLabel:`Updated`});return}let d=f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.apps.update({body:d,account_id:l,account_app_id:t[`account-app-id`]}));a(m,{successLabel:`Updated`})})},qt={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(Bt).command(Ht).command(Wt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jt(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
113
+ Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kt={command:`list`,describe:`List Apps`,builder:Ot,handler:async t=>c({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.apps.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function At(e){return e.usage(`$0 magic-transit apps update <account-app-id>
113
114
 
114
- Creates a new BGP filter profile for an account.`).option(`description`,{type:`string`,description:`Description of the filter profile`,default:``}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Yt={command:`create`,describe:`Create BGP Filter Profile`,builder:Jt,handler:async t=>c({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),match_action:p(t[`match-action`],`match-action`,`text`),name:p(t.name,`name`,`text`),targets:t.targets}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`match-action`]===void 0&&(t[`match-action`]=await h(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),t.name===void 0&&(t.name=await m(`name`,`Friendly name for the filter profile`)),t.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),match_action:p(t[`match-action`],`match-action`,`text`),name:p(t.name,`name`,`text`),targets:t.targets}),g=await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...d,account_id:l}));a(g,{successLabel:`Created`})})};function Xt(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
115
+ Updates an Account App`).positional(`account-app-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`hostnames`,{type:`string`,array:!0,description:`FQDNs to associate with traffic decisions.`}).option(`name`,{type:`string`,description:`Display name for the app.`}).option(`type`,{type:`string`,description:`Category of the app.`}).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 jt={command:`update <account-app-id>`,describe:`Update an App`,builder:At,handler:async t=>c({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/apps/${t[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(t[`account-app-id`]))}`,pathParams:{"account-app-id":String(t[`account-app-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.apps.update({body:e,account_id:l,account_app_id:t[`account-app-id`]}));a(n,{successLabel:`Updated`});return}let d=f({hostnames:t.hostnames,name:p(t.name,`name`,`text`),type:p(t.type,`type`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.apps.update({body:d,account_id:l,account_app_id:t[`account-app-id`]}));a(m,{successLabel:`Updated`})})},Mt={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(Tt).command(Dt).command(kt).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nt(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
115
116
 
116
- Deletes a BGP filter profile.`).positional(`profile-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 Zt={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Xt,handler:async t=>c({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
117
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.bgpFilterProfiles.delete({account_id:l,profile_id:t[`profile-id`]}));a(u,{successLabel:`Deleted`})})};function Qt(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
117
+ Creates a new BGP filter profile for an account.`).option(`description`,{type:`string`,description:`Description of the filter profile`,default:``}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).coerce(`match-action`,e=>p(e,`match-action`,`text`)).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pt={command:`create`,describe:`Create BGP Filter Profile`,builder:Nt,handler:async t=>c({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),match_action:t[`match-action`],name:p(t.name,`name`,`text`),targets:t.targets}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`match-action`]===void 0&&(t[`match-action`]=await h(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),t.name===void 0&&(t.name=await m(`name`,`Friendly name for the filter profile`)),t.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),match_action:t[`match-action`],name:p(t.name,`name`,`text`),targets:t.targets}),g=await s(`Creating`,async()=>c.magicTransit.bgpFilterProfiles.create({...d,account_id:l}));a(g,{successLabel:`Created`})})};function Ft(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
118
118
 
119
- Gets a specific BGP filter profile for an account.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $t={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:Qt,handler:async t=>c({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.get({account_id:l,profile_id:t[`profile-id`]}));a(u,{successLabel:`Loaded`})})};function en(e){return e.usage(`$0 magic-transit bgp-filter-profiles list
119
+ Deletes a BGP filter profile.`).positional(`profile-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 It={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Ft,handler:async t=>c({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
120
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.bgpFilterProfiles.delete({account_id:l,profile_id:t[`profile-id`]}));a(u,{successLabel:`Deleted`})})};function Lt(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
120
121
 
121
- Lists all BGP filter profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tn={command:`list`,describe:`List BGP Filter Profiles`,builder:en,handler:async t=>c({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function nn(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
122
+ Gets a specific BGP filter profile for an account.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:Lt,handler:async t=>c({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.get({account_id:l,profile_id:t[`profile-id`]}));a(u,{successLabel:`Loaded`})})};function zt(e){return e.usage(`$0 magic-transit bgp-filter-profiles list
122
123
 
123
- Updates a BGP filter profile. Omitted properties are left unchanged. To clear an existing description send \`description: ""\`.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the filter profile`}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:'Partial update for a BGP filter profile. At least one property must be provided; omitted properties are left unchanged. To clear an existing description send `description: ""`.'})}const rn={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:nn,handler:async t=>c({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),match_action:p(t[`match-action`],`match-action`,`text`),name:p(t.name,`name`,`text`),targets:t.targets}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...e,account_id:l,profile_id:t[`profile-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),match_action:p(t[`match-action`],`match-action`,`text`),name:p(t.name,`name`,`text`),targets:t.targets}),m=await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...d,account_id:l,profile_id:t[`profile-id`]}));a(m,{successLabel:`Updated`})})},an={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Yt).command(Zt).command($t).command(tn).command(rn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function on(e){return e.usage(`$0 magic-transit bgp-settings get
124
+ Lists all BGP filter profiles for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`list`,describe:`List BGP Filter Profiles`,builder:zt,handler:async t=>c({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpFilterProfiles.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function Vt(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
124
125
 
125
- Gets the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sn={command:`get`,describe:`Get BGP Settings`,builder:on,handler:async t=>c({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpSettings.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function cn(e){return e.usage(`$0 magic-transit bgp-settings update
126
+ Updates a BGP filter profile. Omitted properties are left unchanged. To clear an existing description send \`description: ""\`.`).positional(`profile-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description of the filter profile`}).option(`match-action`,{type:`string`,description:`Action to take when a route matches one of the targets in this profile`,choices:[`allow`,`deny`]}).coerce(`match-action`,e=>p(e,`match-action`,`text`)).option(`name`,{type:`string`,description:`Friendly name for the filter profile`}).option(`targets`,{type:`string`,array:!0,description:`List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: '{X,Y}' matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), '{X}' matches exactly length X (equivalent to {X,X}), '+' is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:'Partial update for a BGP filter profile. At least one property must be provided; omitted properties are left unchanged. To clear an existing description send `description: ""`.'})}const Ht={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:Vt,handler:async t=>c({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/filter_profiles/${t[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(t[`profile-id`]))}`,pathParams:{"profile-id":String(t[`profile-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),match_action:t[`match-action`],name:p(t.name,`name`,`text`),targets:t.targets}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...e,account_id:l,profile_id:t[`profile-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),match_action:t[`match-action`],name:p(t.name,`name`,`text`),targets:t.targets}),m=await s(`Updating`,async()=>c.magicTransit.bgpFilterProfiles.update({...d,account_id:l,profile_id:t[`profile-id`]}));a(m,{successLabel:`Updated`})})},Ut={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Pt).command(It).command(Rt).command(Bt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wt(e){return e.usage(`$0 magic-transit bgp-settings get
126
127
 
127
- Modifies the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`cloudflare-asn`,{type:`number`,description:`Route advertisements from Cloudflare to ramps in this account will use this ASN.`}).option(`redistribute-static:wan`,{type:`boolean`,description:`Redistribute static WAN routes into BGP`}).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 ln={command:`update`,describe:`Update BGP Settings`,builder:cn,handler:async t=>c({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({cloudflare_asn:t[`cloudflare-asn`],redistribute:{"static:wan":t[`redistribute-static:wan`]}}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...e,account_id:l}));a(n,{successLabel:`Updated`});return}let d=f({cloudflare_asn:t[`cloudflare-asn`],redistribute:{"static:wan":t[`redistribute-static:wan`]}}),p=await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...d,account_id:l}));a(p,{successLabel:`Updated`})})},un={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(sn).command(ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dn(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
128
+ Gets the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gt={command:`get`,describe:`Get BGP Settings`,builder:Wt,handler:async t=>c({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.bgpSettings.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function Kt(e){return e.usage(`$0 magic-transit bgp-settings update
128
129
 
129
- Updates multiple interconnects associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fn={command:`bulk-update`,describe:`Update multiple interconnects`,builder:dn,handler:async l=>c({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function pn(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
130
+ Modifies the BGP settings for an account, including the default ASN and redistribution configuration.`).option(`cloudflare-asn`,{type:`number`,description:`Route advertisements from Cloudflare to ramps in this account will use this ASN.`}).option(`redistribute-static:wan`,{type:`boolean`,description:`Redistribute static WAN routes into BGP`}).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 qt={command:`update`,describe:`Update BGP Settings`,builder:Kt,handler:async t=>c({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({cloudflare_asn:t[`cloudflare-asn`],redistribute:{"static:wan":t[`redistribute-static:wan`]}}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...e,account_id:l}));a(n,{successLabel:`Updated`});return}let d=f({cloudflare_asn:t[`cloudflare-asn`],redistribute:{"static:wan":t[`redistribute-static:wan`]}}),p=await s(`Updating`,async()=>c.magicTransit.bgpSettings.update({...d,account_id:l}));a(p,{successLabel:`Updated`})})},Jt={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(Gt).command(qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yt(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
130
131
 
131
- Lists details for a specific interconnect.`).positional(`cf-interconnect-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 mn={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:pn,handler:async l=>c({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects/${l[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(l[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(l[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(l[`cf-interconnect-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function hn(e){return e.usage(`$0 magic-transit cf-interconnects list
132
+ Updates multiple interconnects associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xt={command:`bulk-update`,describe:`Update multiple interconnects`,builder:Yt,handler:async l=>c({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function Zt(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
132
133
 
133
- Lists interconnects associated with an account.`).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 gn={command:`list`,describe:`List interconnects`,builder:hn,handler:async l=>c({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function _n(e){return e.usage(`$0 magic-transit cf-interconnects update <cf-interconnect-id>
134
+ Lists details for a specific interconnect.`).positional(`cf-interconnect-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 Qt={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:Zt,handler:async l=>c({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects/${l[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(l[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(l[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(l[`cf-interconnect-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function $t(e){return e.usage(`$0 magic-transit cf-interconnects list
135
+
136
+ Lists interconnects associated with an account.`).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 en={command:`list`,describe:`List interconnects`,builder:$t,handler:async l=>c({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function tn(e){return e.usage(`$0 magic-transit cf-interconnects update <cf-interconnect-id>
134
137
 
135
138
  Updates a specific interconnect associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`cf-interconnect-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`bgp-as-no`,{type:`number`,description:`Deprecated. Use customer_asn.`}).option(`bgp-cloudflare-endpoint`,{type:`string`,description:`Read-only for v1.5; derived from interface_address.`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session.`}).option(`bgp-customer-endpoint`,{type:`string`,description:`Read-only for v1.5; derived from interface_address.`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
136
139
 
@@ -147,34 +150,34 @@ character:
147
150
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
148
151
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
149
152
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
150
- these disallowed characters will be rejected.`}).option(`description`,{type:`string`,description:`An optional description of the interconnect.`}).option(`gre-cloudflare-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel created as part of the Interconnect.`}).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`]}).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`]}).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 interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.`,choices:[`unidirectional`,`bidirectional`]}).option(`health-check-source`,{type:`string`,description:"The source IPv4 address used for bidirectional health checks. Supported only for version 1.5 interconnects. It is required when `direction` is `bidirectional` and must be omitted (and is cleared) when `direction` is `unidirectional`. The address must be within RFC1918 space, the approved link-local range 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27."}).option(`interface-address`,{type:`string`,description:`The IPv4 interface address for the interconnect. For MPLS Interconnects,
153
+ these disallowed characters will be rejected.`}).option(`description`,{type:`string`,description:`An optional description of the interconnect.`}).option(`gre-cloudflare-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel created as part of the Interconnect.`}).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=>p(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=>p(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 interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>p(e,`health-check-direction`,`text`)).option(`health-check-source`,{type:`string`,description:"The source IPv4 address used for bidirectional health checks. Supported only for version 1.5 interconnects. It is required when `direction` is `bidirectional` and must be omitted (and is cleared) when `direction` is `unidirectional`. The address must be within RFC1918 space, the approved link-local range 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27."}).option(`interface-address`,{type:`string`,description:`The IPv4 interface address for the interconnect. For MPLS Interconnects,
151
154
  use a /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix
152
155
  may be used. Version 1.5 interconnects require a /31 prefix and may
153
156
  also use a prefix from the account's authorized prefixes; otherwise,
154
157
  select the subnet from RFC 1918 or the approved link-local ranges.
155
- `}).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:`The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the interconnect. The name cannot share a name with other tunnels.`}).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 vn={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:_n,handler:async d=>c({command:`magic-transit cf-interconnects update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects/${d[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(d[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(d[`cf-interconnect-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{as_no:d[`bgp-as-no`],cloudflare_endpoint:p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:d[`bgp-customer-asn`],customer_endpoint:p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:p(d.description,`description`,`text`),gre:{cloudflare_endpoint:p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`),source:p(d[`health-check-source`],`health-check-source`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`)}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let g={};d[`automatic-return-routing`]!==void 0&&l(g,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-as-no`]!==void 0&&l(g,[`bgp`,`as_no`],d[`bgp-as-no`]),d[`bgp-cloudflare-endpoint`]!==void 0&&l(g,[`bgp`,`cloudflare_endpoint`],p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),d[`bgp-customer-asn`]!==void 0&&l(g,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-customer-endpoint`]!==void 0&&l(g,[`bgp`,`customer_endpoint`],p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),d[`bgp-export-filter-id`]!==void 0&&l(g,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(g,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(g,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(g,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d.description!==void 0&&l(g,[`description`],p(d.description,`description`,`text`)),d[`gre-cloudflare-endpoint`]!==void 0&&l(g,[`gre`,`cloudflare_endpoint`],p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),d[`health-check-enabled`]!==void 0&&l(g,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(g,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(g,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(g,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(g,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`health-check-source`]!==void 0&&l(g,[`health_check`,`source`],p(d[`health-check-source`],`health-check-source`,`text`)),d[`interface-address`]!==void 0&&l(g,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(g,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(g,[`mtu`],d.mtu),d.name!==void 0&&l(g,[`name`],p(d.name,`name`,`text`));let _=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Updated`})})},yn={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(fn).command(mn).command(gn).command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bn(e){return e.usage(`$0 magic-transit cf1-sites create
158
+ `}).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:`The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum value is 576.`}).option(`name`,{type:`string`,description:`The name of the interconnect. The name cannot share a name with other tunnels.`}).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 nn={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:tn,handler:async d=>c({command:`magic-transit cf-interconnects update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf_interconnects/${d[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(d[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(d[`cf-interconnect-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{as_no:d[`bgp-as-no`],cloudflare_endpoint:p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:d[`bgp-customer-asn`],customer_endpoint:p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:p(d.description,`description`,`text`),gre:{cloudflare_endpoint:p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:d[`health-check-enabled`],rate:d[`health-check-rate`],target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:d[`health-check-type`],direction:d[`health-check-direction`],source:p(d[`health-check-source`],`health-check-source`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`)}):u(d.body)});return}let m=await n(d),h=d.local?e:await i();if(d.accountId=h,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let g={};d[`automatic-return-routing`]!==void 0&&l(g,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-as-no`]!==void 0&&l(g,[`bgp`,`as_no`],d[`bgp-as-no`]),d[`bgp-cloudflare-endpoint`]!==void 0&&l(g,[`bgp`,`cloudflare_endpoint`],p(d[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),d[`bgp-customer-asn`]!==void 0&&l(g,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-customer-endpoint`]!==void 0&&l(g,[`bgp`,`customer_endpoint`],p(d[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),d[`bgp-export-filter-id`]!==void 0&&l(g,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(g,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(g,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(g,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d.description!==void 0&&l(g,[`description`],p(d.description,`description`,`text`)),d[`gre-cloudflare-endpoint`]!==void 0&&l(g,[`gre`,`cloudflare_endpoint`],p(d[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),d[`health-check-enabled`]!==void 0&&l(g,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(g,[`health_check`,`rate`],d[`health-check-rate`]),d[`health-check-target-saved`]!==void 0&&l(g,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(g,[`health_check`,`type`],d[`health-check-type`]),d[`health-check-direction`]!==void 0&&l(g,[`health_check`,`direction`],d[`health-check-direction`]),d[`health-check-source`]!==void 0&&l(g,[`health_check`,`source`],p(d[`health-check-source`],`health-check-source`,`text`)),d[`interface-address`]!==void 0&&l(g,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(g,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(g,[`mtu`],d.mtu),d.name!==void 0&&l(g,[`name`],p(d.name,`name`,`text`));let _=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${h}/magic/cf_interconnects/${encodeURIComponent(String(d[`cf-interconnect-id`]))}`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0}));a(_,{successLabel:`Updated`})})},rn={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(Xt).command(Qt).command(en).command(nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function an(e){return e.usage(`$0 magic-transit cf1-sites create
156
159
 
157
- Creates new CF1 Sites for an account. Each site must have a unique name within the 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 xn={command:`create`,describe:`Create CF1 Sites`,builder:bn,handler:async t=>c({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.cf1Sites.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Sn(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
160
+ Creates new CF1 Sites for an account. Each site must have a unique name within the 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 on={command:`create`,describe:`Create CF1 Sites`,builder:an,handler:async t=>c({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.cf1Sites.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function sn(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
158
161
 
159
- Deletes a specific CF1 Site for an account.`).positional(`cf1-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 Cn={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:Sn,handler:async t=>c({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
160
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.cf1Sites.delete({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Deleted`})})};function wn(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
162
+ Deletes a specific CF1 Site for an account.`).positional(`cf1-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 cn={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:sn,handler:async t=>c({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
163
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.cf1Sites.delete({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Deleted`})})};function ln(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
161
164
 
162
- Gets a specific CF1 Site for an account.`).positional(`cf1-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 Tn={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:wn,handler:async t=>c({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.get({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Loaded`})})};function En(e){return e.usage(`$0 magic-transit cf1-sites list
165
+ Gets a specific CF1 Site for an account.`).positional(`cf1-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 un={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:ln,handler:async t=>c({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.get({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Loaded`})})};function dn(e){return e.usage(`$0 magic-transit cf1-sites list
163
166
 
164
- Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dn={command:`list`,describe:`List CF1 Sites`,builder:En,handler:async t=>c({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function On(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
167
+ Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fn={command:`list`,describe:`List CF1 Sites`,builder:dn,handler:async t=>c({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function pn(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
165
168
 
166
- Creates ramps (network connections) for a CF1 Site.`).positional(`cf1-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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const kn={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:On,handler:async t=>c({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.cf1Sites.ramps.create({body:e,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function An(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
169
+ Creates ramps (network connections) for a CF1 Site.`).positional(`cf1-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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const mn={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:pn,handler:async t=>c({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.cf1Sites.ramps.create({body:e,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function hn(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
167
170
 
168
- Deletes a specific ramp from a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-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 jn={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:An,handler:async t=>c({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps/${t[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(t[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``),"ramp-id":String(t[`ramp-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
169
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.cf1Sites.ramps.delete({account_id:l,cf1_site_id:t[`cf1-site-id`],ramp_id:t[`ramp-id`]}));a(u,{successLabel:`Deleted`})})};function $(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
171
+ Deletes a specific ramp from a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-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 gn={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:hn,handler:async t=>c({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps/${t[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(t[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``),"ramp-id":String(t[`ramp-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
172
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.cf1Sites.ramps.delete({account_id:l,cf1_site_id:t[`cf1-site-id`],ramp_id:t[`ramp-id`]}));a(u,{successLabel:`Deleted`})})};function _n(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
170
173
 
171
- Gets a specific ramp for a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-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 Mn={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:$,handler:async t=>c({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps/${t[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(t[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``),"ramp-id":String(t[`ramp-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.get({account_id:l,cf1_site_id:t[`cf1-site-id`],ramp_id:t[`ramp-id`]}));a(u,{successLabel:`Loaded`})})};function Nn(e){return e.usage(`$0 magic-transit cf1-sites ramps list
174
+ Gets a specific ramp for a CF1 Site.`).positional(`ramp-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`cf1-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 vn={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:_n,handler:async t=>c({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps/${t[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(t[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``),"ramp-id":String(t[`ramp-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.get({account_id:l,cf1_site_id:t[`cf1-site-id`],ramp_id:t[`ramp-id`]}));a(u,{successLabel:`Loaded`})})};function yn(e){return e.usage(`$0 magic-transit cf1-sites ramps list
172
175
 
173
- Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.`).option(`cf1-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 Pn={command:`list`,describe:`List CF1 Site Ramps`,builder:Nn,handler:async t=>c({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.list({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Loaded`})})},Fn={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(kn).command(jn).command(Mn).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function In(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
176
+ Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.`).option(`cf1-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 bn={command:`list`,describe:`List CF1 Site Ramps`,builder:yn,handler:async t=>c({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.cf1Sites.ramps.list({account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(u,{successLabel:`Loaded`})})},xn={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(mn).command(gn).command(vn).command(bn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Sn(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
174
177
 
175
- Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`A human-provided description of the CF1 Site.`}).option(`location-lat`,{type:`number`,description:`Latitude of the CF1 Site.`}).option(`location-long`,{type:`number`,description:`Longitude of the CF1 Site.`}).option(`location-name`,{type:`string`,description:`Name of nearest town, city, or village.`}).option(`name`,{type:`string`,description:`A human-provided name describing the CF1 Site that should be unique within the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update payload for a CF1 Site. All properties are optional; only fields supplied in the request body are modified.`})}const Ln={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:In,handler:async t=>c({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),location:{lat:t[`location-lat`],long:t[`location-long`],name:p(t[`location-name`],`location-name`,`text`)},name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...e,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),location:{lat:t[`location-lat`],long:t[`location-long`],name:p(t[`location-name`],`location-name`,`text`)},name:p(t.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...d,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(m,{successLabel:`Updated`})})},Rn={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(xn).command(Cn).command(Tn).command(Dn).command(Ln).command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zn(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
178
+ Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values.`).positional(`cf1-site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`A human-provided description of the CF1 Site.`}).option(`location-lat`,{type:`number`,description:`Latitude of the CF1 Site.`}).option(`location-long`,{type:`number`,description:`Longitude of the CF1 Site.`}).option(`location-name`,{type:`string`,description:`Name of nearest town, city, or village.`}).option(`name`,{type:`string`,description:`A human-provided name describing the CF1 Site that should be unique within the account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update payload for a CF1 Site. All properties are optional; only fields supplied in the request body are modified.`})}const Cn={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Sn,handler:async t=>c({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cf1_sites/${t[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(t[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(t[`cf1-site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),location:{lat:t[`location-lat`],long:t[`location-long`],name:p(t[`location-name`],`location-name`,`text`)},name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...e,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),location:{lat:t[`location-lat`],long:t[`location-long`],name:p(t[`location-name`],`location-name`,`text`)},name:p(t.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.cf1Sites.update({...d,account_id:l,cf1_site_id:t[`cf1-site-id`]}));a(m,{successLabel:`Updated`})})},$={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(on).command(cn).command(un).command(fn).command(Cn).command(xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wn(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
176
179
 
177
- Updates multiple GRE tunnels. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bn={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:zn,handler:async l=>c({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function Vn(e){return e.usage(`$0 magic-transit gre-tunnels create
180
+ Updates multiple GRE tunnels. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Tn={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:wn,handler:async l=>c({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function En(e){return e.usage(`$0 magic-transit gre-tunnels create
178
181
 
179
182
  Creates a new GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.",default:!1}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
180
183
 
@@ -191,18 +194,18 @@ character:
191
194
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
192
195
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
193
196
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
194
- 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`]}).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`]}).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`]}).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 Hn={command:`create`,describe:`Create a GRE tunnel`,builder:Vn,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`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 _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl);let v=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function Un(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
197
+ 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=>p(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=>p(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=>p(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 Dn={command:`create`,describe:`Create a GRE tunnel`,builder:En,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:d[`health-check-rate`],target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:d[`health-check-type`],direction:d[`health-check-direction`]},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`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 _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],d[`health-check-rate`]),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],d[`health-check-type`]),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],d[`health-check-direction`]),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl);let v=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/gre_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function On(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
195
198
 
196
- 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 Wn={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:Un,handler:async l=>c({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
197
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function Gn(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
199
+ 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 kn={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:On,handler:async l=>c({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
200
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function An(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
198
201
 
199
- Lists informtion for a specific GRE tunnel.`).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})}const Kn={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:Gn,handler:async l=>c({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function qn(e){return e.usage(`$0 magic-transit gre-tunnels list
202
+ Lists informtion for a specific GRE tunnel.`).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})}const jn={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:An,handler:async l=>c({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${l[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(l[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(l[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(l[`gre-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Mn(e){return e.usage(`$0 magic-transit gre-tunnels list
200
203
 
201
- Lists GRE tunnels associated with an account.`).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 Jn={command:`list`,describe:`List GRE tunnels`,builder:qn,handler:async l=>c({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Yn(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
204
+ Lists GRE tunnels associated with an account.`).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 Nn={command:`list`,describe:`List GRE tunnels`,builder:Mn,handler:async l=>c({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Pn(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
202
205
 
203
- Updates a specific 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 request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag 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`]}).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`]}).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`]}).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.`}).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.`}).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 Xn={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:Yn,handler:async d=>c({command:`magic-transit gre-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${d[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(d[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(d[`gre-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`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 _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl);let v=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Updated`})})},Zn={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command(Bn).command(Hn).command(Wn).command(Kn).command(Jn).command(Xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qn(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
206
+ Updates a specific 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 request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag 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=>p(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=>p(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=>p(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.`}).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.`}).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 Fn={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:Pn,handler:async d=>c({command:`magic-transit gre-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/gre_tunnels/${d[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(d[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(d[`gre-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],cloudflare_gre_endpoint:p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:d[`health-check-rate`],target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:d[`health-check-type`],direction:d[`health-check-direction`]},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),mtu:d.mtu,name:p(d.name,`name`,`text`),ttl:d.ttl}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}d[`cloudflare-gre-endpoint`]===void 0&&(d[`cloudflare-gre-endpoint`]=await m(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),d[`customer-gre-endpoint`]===void 0&&(d[`customer-gre-endpoint`]=await m(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`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 _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`cloudflare-gre-endpoint`]!==void 0&&l(_,[`cloudflare_gre_endpoint`],p(d[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),d[`customer-gre-endpoint`]!==void 0&&l(_,[`customer_gre_endpoint`],p(d[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],d[`health-check-rate`]),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],d[`health-check-type`]),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],d[`health-check-direction`]),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.mtu!==void 0&&l(_,[`mtu`],d.mtu),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.ttl!==void 0&&l(_,[`ttl`],d.ttl);let v=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/gre_tunnels/${encodeURIComponent(String(d[`gre-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Updated`})})},In={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command(Tn).command(Dn).command(kn).command(jn).command(Nn).command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ln(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
204
207
 
205
- Update multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $n={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:Qn,handler:async l=>c({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function er(e){return e.usage(`$0 magic-transit ipsec-tunnels create
208
+ Update multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies 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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Rn={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:Ln,handler:async l=>c({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await n(l),f=l.local?e:await i();if(l.accountId=f,l.body){let e=u(l.body),n=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}let p=await s(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(p,{successLabel:`Updated`})})};function zn(e){return e.usage(`$0 magic-transit ipsec-tunnels create
206
209
 
207
210
  Creates a new IPsec tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected.",default:!1}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
208
211
 
@@ -226,18 +229,18 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
226
229
 
227
230
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
228
231
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
229
- 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`]}).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`]}).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`]}).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 tr={command:`create`,describe:`Create an IPsec tunnel`,builder:er,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]);let v=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function nr(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
232
+ 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=>p(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=>p(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=>p(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 Bn={command:`create`,describe:`Create an IPsec tunnel`,builder:zn,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:d[`health-check-rate`],target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:d[`health-check-type`],direction:d[`health-check-direction`]},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body),sensitiveBodyPaths:[[`psk`]]});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],d[`health-check-rate`]),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],d[`health-check-type`]),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],d[`health-check-direction`]),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]);let v=await s(`Creating`,async()=>t(h,`POST`,`/accounts/${g}/magic/ipsec_tunnels`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function Vn(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
230
233
 
231
- 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 rr={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:nr,handler:async l=>c({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
232
- `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function ir(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
234
+ 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 Hn={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:Vn,handler:async l=>c({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();if(l.accountId=d,!await g({force:!!l.force})){process.stderr.write(`Aborted.
235
+ `);return}let f=await s(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Deleted`})})};function Un(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
233
236
 
234
- Lists details for a specific IPsec tunnel.`).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})}const ar={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:ir,handler:async l=>c({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function or(e){return e.usage(`$0 magic-transit ipsec-tunnels list
237
+ Lists details for a specific IPsec tunnel.`).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})}const Wn={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:Un,handler:async l=>c({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${l[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(l[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(l[`ipsec-tunnel-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Gn(e){return e.usage(`$0 magic-transit ipsec-tunnels list
235
238
 
236
- Lists IPsec tunnels associated with an account.`).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 sr={command:`list`,describe:`List IPsec tunnels`,builder:or,handler:async l=>c({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function cr(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-generate <ipsec-tunnel-id>
239
+ Lists IPsec tunnels associated with an account.`).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 Kn={command:`list`,describe:`List IPsec tunnels`,builder:Gn,handler:async l=>c({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function qn(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-generate <ipsec-tunnel-id>
237
240
 
238
- Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lr={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:cr,handler:async t=>c({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${t[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(t[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(t[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.magicTransit.ipsecTunnels.pskGenerate({account_id:l,ipsec_tunnel_id:t[`ipsec-tunnel-id`]}));a(u,{successLabel:`Created`})})};function ur(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
241
+ Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jn={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:qn,handler:async t=>c({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${t[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(t[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(t[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.magicTransit.ipsecTunnels.pskGenerate({account_id:l,ipsec_tunnel_id:t[`ipsec-tunnel-id`]}));a(u,{successLabel:`Created`})})};function Yn(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
239
242
 
240
- Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place.`).option(`validate-only`,{type:`boolean`,description:"If `true`, only run validation without persisting changes."}).option(`psks`,{type:`string`,description:`List of tunnel ID and PSK pairs. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for setting PSKs for multiple IPsec tunnels.`})}const dr={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:ur,handler:async t=>c({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},t,async()=>{let c={validate_only:t[`validate-only`]};if(t.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:c,bodyKind:`json`,body:t.body===void 0?f({psks:d(t.psks,`psks`)}):u(t.body)});return}let l=await n(t),p=t.local?e:await i();if(t.accountId=p,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...e,account_id:p,...c}));a(n,{successLabel:`Created`});return}if(t.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let m=f({psks:d(t.psks,`psks`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...m,account_id:p,...c}));a(h,{successLabel:`Created`})})};function fr(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
243
+ Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place.`).option(`validate-only`,{type:`boolean`,description:"If `true`, only run validation without persisting changes."}).option(`psks`,{type:`string`,description:`List of tunnel ID and PSK pairs. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for setting PSKs for multiple IPsec tunnels.`})}const Xn={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:Yn,handler:async t=>c({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},t,async()=>{let c={validate_only:t[`validate-only`]};if(t.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:c,bodyKind:`json`,body:t.body===void 0?f({psks:d(t.psks,`psks`)}):u(t.body)});return}let l=await n(t),p=t.local?e:await i();if(t.accountId=p,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...e,account_id:p,...c}));a(n,{successLabel:`Created`});return}if(t.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let m=f({psks:d(t.psks,`psks`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await s(`Creating`,async()=>l.magicTransit.ipsecTunnels.pskSet({...m,account_id:p,...c}));a(h,{successLabel:`Created`})})};function Zn(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
241
244
 
242
245
  Updates a specific 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 request and response bodies will be presented using the new object format. Defaults to false.`}).option(`automatic-return-routing`,{type:`boolean`,description:"True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected."}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-export-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes advertised to the customer.`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic routing table.`}).option(`bgp-import-filter-id`,{type:`string`,description:`ID of the BGP filter profile applied to routes received from the customer.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
243
246
 
@@ -261,123 +264,123 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
261
264
 
262
265
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
263
266
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
264
- 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`]}).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`]}).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`]}).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 pr={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:fr,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${d[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(d[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:p(d[`health-check-rate`],`health-check-rate`,`text`),target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:p(d[`health-check-type`],`health-check-type`,`text`),direction:p(d[`health-check-direction`],`health-check-direction`,`text`)},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body)});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],p(d[`health-check-rate`],`health-check-rate`,`text`)),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],p(d[`health-check-type`],`health-check-type`,`text`)),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],p(d[`health-check-direction`],`health-check-direction`,`text`)),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]);let v=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Updated`})})},mr={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command($n).command(tr).command(rr).command(ar).command(sr).command(lr).command(dr).command(pr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hr(e){return e.usage(`$0 magic-transit pcaps create
267
+ 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=>p(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=>p(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=>p(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 Qn={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Zn,handler:async d=>c({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`]}},d,async()=>{let c={};if(d[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(d[`x-magic-new-hc-target`])),d.dryRun){let e=await r();o({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/ipsec_tunnels/${d[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(d[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({automatic_return_routing:d[`automatic-return-routing`],bgp:{customer_asn:d[`bgp-customer-asn`],export_filter_id:p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:d[`bgp-extra-prefixes`],import_filter_id:p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:p(d[`customer-endpoint`],`customer-endpoint`,`text`),description:p(d.description,`description`,`text`),health_check:{enabled:d[`health-check-enabled`],rate:d[`health-check-rate`],target:{saved:p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:d[`health-check-type`],direction:d[`health-check-direction`]},interface_address:p(d[`interface-address`],`interface-address`,`text`),interface_address6:p(d[`interface-address6`],`interface-address6`,`text`),name:p(d.name,`name`,`text`),psk:p(d.psk,`psk`,`text`),replay_protection:d[`replay-protection`]}):u(d.body),sensitiveBodyPaths:[[`psk`]]});return}let h=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}d[`cloudflare-endpoint`]===void 0&&(d[`cloudflare-endpoint`]=await m(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),d[`interface-address`]===void 0&&(d[`interface-address`]=await m(`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.`)),d.name===void 0&&(d.name=await m(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let _={};d[`automatic-return-routing`]!==void 0&&l(_,[`automatic_return_routing`],d[`automatic-return-routing`]),d[`bgp-customer-asn`]!==void 0&&l(_,[`bgp`,`customer_asn`],d[`bgp-customer-asn`]),d[`bgp-export-filter-id`]!==void 0&&l(_,[`bgp`,`export_filter_id`],p(d[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),d[`bgp-extra-prefixes`]!==void 0&&l(_,[`bgp`,`extra_prefixes`],d[`bgp-extra-prefixes`]),d[`bgp-import-filter-id`]!==void 0&&l(_,[`bgp`,`import_filter_id`],p(d[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),d[`bgp-md5-key`]!==void 0&&l(_,[`bgp`,`md5_key`],p(d[`bgp-md5-key`],`bgp-md5-key`,`text`)),d[`cloudflare-endpoint`]!==void 0&&l(_,[`cloudflare_endpoint`],p(d[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),d[`custom-remote-identities-fqdn-id`]!==void 0&&l(_,[`custom_remote_identities`,`fqdn_id`],p(d[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),d[`customer-endpoint`]!==void 0&&l(_,[`customer_endpoint`],p(d[`customer-endpoint`],`customer-endpoint`,`text`)),d.description!==void 0&&l(_,[`description`],p(d.description,`description`,`text`)),d[`health-check-enabled`]!==void 0&&l(_,[`health_check`,`enabled`],d[`health-check-enabled`]),d[`health-check-rate`]!==void 0&&l(_,[`health_check`,`rate`],d[`health-check-rate`]),d[`health-check-target-saved`]!==void 0&&l(_,[`health_check`,`target`,`saved`],p(d[`health-check-target-saved`],`health-check-target-saved`,`text`)),d[`health-check-type`]!==void 0&&l(_,[`health_check`,`type`],d[`health-check-type`]),d[`health-check-direction`]!==void 0&&l(_,[`health_check`,`direction`],d[`health-check-direction`]),d[`interface-address`]!==void 0&&l(_,[`interface_address`],p(d[`interface-address`],`interface-address`,`text`)),d[`interface-address6`]!==void 0&&l(_,[`interface_address6`],p(d[`interface-address6`],`interface-address6`,`text`)),d.name!==void 0&&l(_,[`name`],p(d.name,`name`,`text`)),d.psk!==void 0&&l(_,[`psk`],p(d.psk,`psk`,`text`)),d[`replay-protection`]!==void 0&&l(_,[`replay_protection`],d[`replay-protection`]);let v=await s(`Updating`,async()=>t(h,`PUT`,`/accounts/${g}/magic/ipsec_tunnels/${encodeURIComponent(String(d[`ipsec-tunnel-id`]))}`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Updated`})})},$n={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(Rn).command(Bn).command(Hn).command(Wn).command(Kn).command(Jn).command(Xn).command(Qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function er(e){return e.usage(`$0 magic-transit pcaps create
265
268
 
266
- 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 gr={command:`create`,describe:`Create PCAP request`,builder:hr,handler:async t=>c({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function _r(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
269
+ 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 tr={command:`create`,describe:`Create PCAP request`,builder:er,handler:async t=>c({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function nr(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
267
270
 
268
- Download PCAP information into a file. Response is a binary PCAP file.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const vr={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:_r,handler:async t=>c({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>v(`/accounts/${a}/pcaps/${encodeURIComponent(String(t[`pcap-id`]))}/download`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));_(t.text===!0?c.toString(`utf-8`):c)})},yr={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function br(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
271
+ Download PCAP information into a file. Response is a binary PCAP file.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const rr={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:nr,handler:async t=>c({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>v(`/accounts/${a}/pcaps/${encodeURIComponent(String(t[`pcap-id`]))}/download`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));_(t.text===!0?c.toString(`utf-8`):c)})},ir={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ar(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
269
272
 
270
- Get information for a PCAP request by id.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xr={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:br,handler:async t=>c({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.get({account_id:l,pcap_id:t[`pcap-id`]}));a(u,{successLabel:`Loaded`})})};function Sr(e){return e.usage(`$0 magic-transit pcaps list
273
+ Get information for a PCAP request by id.`).positional(`pcap-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const or={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:ar,handler:async t=>c({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.get({account_id:l,pcap_id:t[`pcap-id`]}));a(u,{successLabel:`Loaded`})})};function sr(e){return e.usage(`$0 magic-transit pcaps list
271
274
 
272
- Lists all packet capture requests for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cr={command:`list`,describe:`List packet capture requests`,builder:Sr,handler:async t=>c({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function wr(e){return e.usage(`$0 magic-transit pcaps ownership create
275
+ Lists all packet capture requests for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cr={command:`list`,describe:`List packet capture requests`,builder:sr,handler:async t=>c({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function lr(e){return e.usage(`$0 magic-transit pcaps ownership create
273
276
 
274
- Adds an AWS or GCP bucket to use with full packet captures.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).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 Tr={command:`create`,describe:`Add buckets for full packet captures`,builder:wr,handler:async t=>c({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`destination-conf`]===void 0&&(t[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let d=f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Er(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
277
+ Adds an AWS or GCP bucket to use with full packet captures.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).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 ur={command:`create`,describe:`Add buckets for full packet captures`,builder:lr,handler:async t=>c({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`destination-conf`]===void 0&&(t[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let d=f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function dr(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
275
278
 
276
- Deletes buckets added to the packet captures API.`).positional(`ownership-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 Dr={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Er,handler:async t=>c({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership/${t[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(t[`ownership-id`]))}`,pathParams:{"ownership-id":String(t[`ownership-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
277
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.pcaps.ownership.delete({account_id:l,ownership_id:t[`ownership-id`]}));a(u,{successLabel:`Deleted`})})};function Or(e){return e.usage(`$0 magic-transit pcaps ownership get
279
+ Deletes buckets added to the packet captures API.`).positional(`ownership-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 fr={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:dr,handler:async t=>c({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership/${t[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(t[`ownership-id`]))}`,pathParams:{"ownership-id":String(t[`ownership-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
280
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.pcaps.ownership.delete({account_id:l,ownership_id:t[`ownership-id`]}));a(u,{successLabel:`Deleted`})})};function pr(e){return e.usage(`$0 magic-transit pcaps ownership get
278
281
 
279
- List all buckets configured for use with PCAPs API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kr={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:Or,handler:async t=>c({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.ownership.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function Ar(e){return e.usage(`$0 magic-transit pcaps ownership validate
282
+ List all buckets configured for use with PCAPs API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mr={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:pr,handler:async t=>c({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.pcaps.ownership.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function hr(e){return e.usage(`$0 magic-transit pcaps ownership validate
280
283
 
281
- Validates buckets added to the packet captures API.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).option(`ownership-challenge`,{type:`string`,description:`The ownership challenge filename stored in the bucket.`}).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 jr={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Ar,handler:async t=>c({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(t[`ownership-challenge`],`ownership-challenge`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`destination-conf`]===void 0&&(t[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),t[`ownership-challenge`]===void 0&&(t[`ownership-challenge`]=await m(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let d=f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(t[`ownership-challenge`],`ownership-challenge`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...d,account_id:l}));a(h,{successLabel:`Created`})})},Mr={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Tr).command(Dr).command(kr).command(jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nr(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
284
+ Validates buckets added to the packet captures API.`).option(`destination-conf`,{type:`string`,description:"The full URI for the bucket. This field only applies to `full` packet captures."}).option(`ownership-challenge`,{type:`string`,description:`The ownership challenge filename stored in the bucket.`}).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 gr={command:`validate`,describe:`Validate buckets for full packet captures`,builder:hr,handler:async t=>c({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(t[`ownership-challenge`],`ownership-challenge`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`destination-conf`]===void 0&&(t[`destination-conf`]=await m(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),t[`ownership-challenge`]===void 0&&(t[`ownership-challenge`]=await m(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let d=f({destination_conf:p(t[`destination-conf`],`destination-conf`,`text`),ownership_challenge:p(t[`ownership-challenge`],`ownership-challenge`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.pcaps.ownership.validate({...d,account_id:l}));a(h,{successLabel:`Created`})})},_r={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(ur).command(fr).command(mr).command(gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vr(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
282
285
 
283
- Stop full PCAP.`).positional(`pcap-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 Pr={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:Nr,handler:async t=>c({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`})){process.stderr.write(`Aborted.
284
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.pcaps.stop({account_id:l,pcap_id:t[`pcap-id`]}));a(u,{successLabel:`Deleted`})})},Fr={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(gr).command(xr).command(Cr).command(Pr).command(yr).command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ir(e){return e.usage(`$0 magic-transit redundancy-groups create
286
+ Stop full PCAP.`).positional(`pcap-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 yr={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:vr,handler:async t=>c({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pcaps/${t[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(t[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(t[`pcap-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`})){process.stderr.write(`Aborted.
287
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.pcaps.stop({account_id:l,pcap_id:t[`pcap-id`]}));a(u,{successLabel:`Deleted`})})},br={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(tr).command(or).command(cr).command(yr).command(ir).command(_r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xr(e){return e.usage(`$0 magic-transit redundancy-groups create
285
288
 
286
- Creates a new redundancy group, optionally with tunnel members.`).option(`description`,{type:`string`,description:`Optional description`,default:``}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 Lr={command:`create`,describe:`Create a Redundancy Group`,builder:Ir,handler:async t=>c({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}),g=await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:h,account_id:l}));a(g,{successLabel:`Created`})})};function Rr(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
289
+ Creates a new redundancy group, optionally with tunnel members.`).option(`description`,{type:`string`,description:`Optional description`,default:``}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 Sr={command:`create`,describe:`Create a Redundancy Group`,builder:xr,handler:async t=>c({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}),g=await s(`Creating`,async()=>c.magicTransit.redundancyGroups.create({body:h,account_id:l}));a(g,{successLabel:`Created`})})};function Cr(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
287
290
 
288
- Deletes a redundancy group. Member tunnels are not deleted — their redundancy_group_id is cleared.`).positional(`redundancy-group-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 zr={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:Rr,handler:async t=>c({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
289
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.redundancyGroups.delete({account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(u,{successLabel:`Deleted`})})};function Br(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
291
+ Deletes a redundancy group. Member tunnels are not deleted — their redundancy_group_id is cleared.`).positional(`redundancy-group-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 wr={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:Cr,handler:async t=>c({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
292
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.redundancyGroups.delete({account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(u,{successLabel:`Deleted`})})};function Tr(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
290
293
 
291
- Gets details for a specific redundancy group, including full member tunnel data.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vr={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:Br,handler:async t=>c({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.redundancyGroups.get({account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(u,{successLabel:`Loaded`})})};function Hr(e){return e.usage(`$0 magic-transit redundancy-groups list
294
+ Gets details for a specific redundancy group, including full member tunnel data.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Er={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:Tr,handler:async t=>c({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.redundancyGroups.get({account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(u,{successLabel:`Loaded`})})};function Dr(e){return e.usage(`$0 magic-transit redundancy-groups list
292
295
 
293
- Lists redundancy groups associated with an account, including full member tunnel data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`list`,describe:`List Redundancy Groups`,builder:Hr,handler:async t=>c({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.redundancyGroups.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function Wr(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
296
+ Lists redundancy groups associated with an account, including full member tunnel data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Or={command:`list`,describe:`List Redundancy Groups`,builder:Dr,handler:async t=>c({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.redundancyGroups.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function kr(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
294
297
 
295
- Replaces the name, description, and full set of members for an existing redundancy group.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description`}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 Gr={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:Wr,handler:async t=>c({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:e,account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}),g=await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:h,account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(g,{successLabel:`Updated`})})},Kr={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(Lr).command(zr).command(Vr).command(Ur).command(Gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qr(e){return e.usage(`$0 magic-transit routes bulk-update
298
+ Replaces the name, description, and full set of members for an existing redundancy group.`).positional(`redundancy-group-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description`}).option(`members`,{type:`string`,description:`Tunnels to add to the group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Human-readable name for the redundancy group`}).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 Ar={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:kr,handler:async t=>c({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/redundancy_groups/${t[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(t[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(t[`redundancy-group-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:e,account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await m(`name`,`Human-readable name for the redundancy group`));let h=f({description:p(t.description,`description`,`text`),members:d(t.members,`members`),name:p(t.name,`name`,`text`)}),g=await s(`Updating`,async()=>c.magicTransit.redundancyGroups.update({body:h,account_id:l,redundancy_group_id:t[`redundancy-group-id`]}));a(g,{successLabel:`Updated`})})},jr={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(Sr).command(wr).command(Er).command(Or).command(Ar).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mr(e){return e.usage(`$0 magic-transit routes bulk-update
296
299
 
297
- Update multiple Magic static routes. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Jr={command:`bulk-update`,describe:`Update Many Routes`,builder:qr,handler:async t=>c({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({routes:d(t.routes,`routes`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(t.routes,`routes`)}),m=await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...p,account_id:l}));a(m,{successLabel:`Updated`})})};function Yr(e){return e.usage(`$0 magic-transit routes create
300
+ Update multiple Magic static routes. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Nr={command:`bulk-update`,describe:`Update Many Routes`,builder:Mr,handler:async t=>c({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({routes:d(t.routes,`routes`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(t.routes,`routes`)}),m=await s(`Updating`,async()=>c.magicTransit.routes.bulkUpdate({...p,account_id:l}));a(m,{successLabel:`Updated`})})};function Pr(e){return e.usage(`$0 magic-transit routes create
298
301
 
299
- Creates a new Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 Xr={command:`create`,describe:`Create a Route`,builder:Yr,handler:async t=>c({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.routes.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.nexthop===void 0&&(t.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),t.prefix===void 0&&(t.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}),h=await s(`Creating`,async()=>c.magicTransit.routes.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Zr(e){return e.usage(`$0 magic-transit routes delete <route-id>
302
+ Creates a new Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 Fr={command:`create`,describe:`Create a Route`,builder:Pr,handler:async t=>c({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.routes.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.nexthop===void 0&&(t.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),t.prefix===void 0&&(t.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}),h=await s(`Creating`,async()=>c.magicTransit.routes.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Ir(e){return e.usage(`$0 magic-transit routes delete <route-id>
300
303
 
301
- Disable and remove a specific Magic static route.`).positional(`route-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 Qr={command:`delete <route-id>`,describe:`Delete Route`,builder:Zr,handler:async t=>c({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
302
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.routes.delete({account_id:l,route_id:t[`route-id`]}));a(u,{successLabel:`Deleted`})})};function $r(e){return e.usage(`$0 magic-transit routes empty
304
+ Disable and remove a specific Magic static route.`).positional(`route-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 Lr={command:`delete <route-id>`,describe:`Delete Route`,builder:Ir,handler:async t=>c({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
305
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.routes.delete({account_id:l,route_id:t[`route-id`]}));a(u,{successLabel:`Deleted`})})};function Rr(e){return e.usage(`$0 magic-transit routes empty
303
306
 
304
- Delete multiple Magic static routes.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ei={command:`empty`,describe:`Delete Many Routes`,builder:$r,handler:async t=>c({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({routes:d(t.routes,`routes`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
305
- `);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.magicTransit.routes.empty({...e,account_id:l}));a(n,{successLabel:`Deleted`});return}if(t.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(t.routes,`routes`)}),m=await s(`Deleting`,async()=>c.magicTransit.routes.empty({...p,account_id:l}));a(m,{successLabel:`Deleted`})})};function ti(e){return e.usage(`$0 magic-transit routes get <route-id>
307
+ Delete multiple Magic static routes.`).option(`routes`,{type:`string`,description:`The routes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const zr={command:`empty`,describe:`Delete Many Routes`,builder:Rr,handler:async t=>c({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({routes:d(t.routes,`routes`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
308
+ `);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.magicTransit.routes.empty({...e,account_id:l}));a(n,{successLabel:`Deleted`});return}if(t.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=f({routes:d(t.routes,`routes`)}),m=await s(`Deleting`,async()=>c.magicTransit.routes.empty({...p,account_id:l}));a(m,{successLabel:`Deleted`})})};function Br(e){return e.usage(`$0 magic-transit routes get <route-id>
306
309
 
307
- Get a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ni={command:`get <route-id>`,describe:`Route Details`,builder:ti,handler:async t=>c({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.routes.get({account_id:l,route_id:t[`route-id`]}));a(u,{successLabel:`Loaded`})})};function ri(e){return e.usage(`$0 magic-transit routes list
310
+ Get a specific Magic static route.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vr={command:`get <route-id>`,describe:`Route Details`,builder:Br,handler:async t=>c({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.routes.get({account_id:l,route_id:t[`route-id`]}));a(u,{successLabel:`Loaded`})})};function Hr(e){return e.usage(`$0 magic-transit routes list
308
311
 
309
- List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ii={command:`list`,describe:`List Routes`,builder:ri,handler:async t=>c({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.routes.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function ai(e){return e.usage(`$0 magic-transit routes update <route-id>
312
+ List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`list`,describe:`List Routes`,builder:Hr,handler:async t=>c({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.routes.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function Wr(e){return e.usage(`$0 magic-transit routes update <route-id>
310
313
 
311
- Update a specific Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 oi={command:`update <route-id>`,describe:`Update Route`,builder:ai,handler:async t=>c({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.routes.update({body:e,account_id:l,route_id:t[`route-id`]}));a(n,{successLabel:`Updated`});return}if(t.nexthop===void 0&&(t.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),t.prefix===void 0&&(t.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}),h=await s(`Updating`,async()=>c.magicTransit.routes.update({body:d,account_id:l,route_id:t[`route-id`]}));a(h,{successLabel:`Updated`})})},si={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(Jr).command(Xr).command(Qr).command(ei).command(ni).command(ii).command(oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ci(e){return e.usage(`$0 magic-transit sites acls create <site-id>
314
+ Update a specific Magic static route. Use \`?validate_only=true\` as an optional query parameter to run validation only without persisting changes.`).positional(`route-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`An optional human provided description of the static route.`}).option(`nexthop`,{type:`string`,description:`The next-hop IP Address for the static route.`}).option(`prefix`,{type:`string`,description:`IP Prefix in Classless Inter-Domain Routing format.`}).option(`priority`,{type:`number`,description:`Priority of the static route.`}).option(`scope-colo-names`,{type:`string`,array:!0,description:`List of colo names for the ECMP scope.`}).option(`scope-colo-regions`,{type:`string`,array:!0,description:`List of colo regions for the ECMP scope.`}).option(`weight`,{type:`number`,description:`Optional weight of the ECMP scope - if provided.`}).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 Gr={command:`update <route-id>`,describe:`Update Route`,builder:Wr,handler:async t=>c({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/routes/${t[`route-id`]==null?`<route-id>`:encodeURIComponent(String(t[`route-id`]))}`,pathParams:{"route-id":String(t[`route-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.routes.update({body:e,account_id:l,route_id:t[`route-id`]}));a(n,{successLabel:`Updated`});return}if(t.nexthop===void 0&&(t.nexthop=await m(`nexthop`,`The next-hop IP Address for the static route.`)),t.prefix===void 0&&(t.prefix=await m(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let d=f({description:p(t.description,`description`,`text`),nexthop:p(t.nexthop,`nexthop`,`text`),prefix:p(t.prefix,`prefix`,`text`),priority:t.priority,scope:{colo_names:t[`scope-colo-names`],colo_regions:t[`scope-colo-regions`]},weight:t.weight}),h=await s(`Updating`,async()=>c.magicTransit.routes.update({body:d,account_id:l,route_id:t[`route-id`]}));a(h,{successLabel:`Updated`})})},Kr={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(Nr).command(Fr).command(Lr).command(zr).command(Vr).command(Ur).command(Gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qr(e){return e.usage(`$0 magic-transit sites acls create <site-id>
312
315
 
313
- Creates a new Site ACL.`).positional(`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:`Bidirectional ACL policy for local network traffic within a site.`})}const li={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:ci,handler:async t=>c({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}t[`lan-1-lan-id`]===void 0&&(t[`lan-1-lan-id`]=await m(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),t[`lan-2-lan-id`]===void 0&&(t[`lan-2-lan-id`]=await m(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),t.name===void 0&&(t.name=await m(`name`,`The name of the ACL.`));let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),h=await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...d,account_id:l,site_id:t[`site-id`]}));a(h,{successLabel:`Created`})})};function ui(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
316
+ Creates a new Site ACL.`).positional(`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:`Bidirectional ACL policy for local network traffic within a site.`})}const Jr={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:qr,handler:async t=>c({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}t[`lan-1-lan-id`]===void 0&&(t[`lan-1-lan-id`]=await m(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),t[`lan-2-lan-id`]===void 0&&(t[`lan-2-lan-id`]=await m(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),t.name===void 0&&(t.name=await m(`name`,`The name of the ACL.`));let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),h=await s(`Creating`,async()=>c.magicTransit.sites.acls.create({...d,account_id:l,site_id:t[`site-id`]}));a(h,{successLabel:`Created`})})};function Yr(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
314
317
 
315
- 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 di={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:ui,handler:async t=>c({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
316
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.acls.delete({account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(u,{successLabel:`Deleted`})})};function fi(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
318
+ 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 Xr={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:Yr,handler:async t=>c({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
319
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.acls.delete({account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(u,{successLabel:`Deleted`})})};function Zr(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
317
320
 
318
- 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 pi={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:fi,handler:async t=>c({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:e,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),m=await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:d,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(m,{successLabel:`Updated`})})};function mi(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
321
+ 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 Qr={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:Zr,handler:async t=>c({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:e,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),m=await s(`Updating`,async()=>c.magicTransit.sites.acls.edit({body:d,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(m,{successLabel:`Updated`})})};function $r(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
319
322
 
320
- 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 hi={command:`get <acl-id>`,describe:`Site ACL Details`,builder:mi,handler:async t=>c({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.acls.get({account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(u,{successLabel:`Loaded`})})};function gi(e){return e.usage(`$0 magic-transit sites acls list
323
+ 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 ei={command:`get <acl-id>`,describe:`Site ACL Details`,builder:$r,handler:async t=>c({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.acls.get({account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(u,{successLabel:`Loaded`})})};function ti(e){return e.usage(`$0 magic-transit sites acls list
321
324
 
322
- 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 _i={command:`list`,describe:`List Site ACLs`,builder:gi,handler:async t=>c({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.acls.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function vi(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
325
+ 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 ni={command:`list`,describe:`List Site ACLs`,builder:ti,handler:async t=>c({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.acls.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function ri(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
323
326
 
324
- 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 yi={command:`update <acl-id>`,describe:`Update Site ACL`,builder:vi,handler:async t=>c({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:e,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),m=await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:d,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(m,{successLabel:`Updated`})})},bi={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(li).command(di).command(pi).command(hi).command(_i).command(yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xi(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
327
+ 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 ii={command:`update <acl-id>`,describe:`Update Site ACL`,builder:ri,handler:async t=>c({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"acl-id":String(t[`acl-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:e,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),forward_locally:t[`forward-locally`],lan_1:{lan_id:p(t[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:p(t[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:t[`lan-1-port-ranges`],ports:t[`lan-1-ports`]},lan_2:{lan_id:p(t[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:p(t[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:t[`lan-2-port-ranges`],ports:t[`lan-2-ports`]},name:p(t.name,`name`,`text`),protocols:t.protocols,unidirectional:t.unidirectional}),m=await s(`Updating`,async()=>c.magicTransit.sites.acls.update({body:d,account_id:l,site_id:t[`site-id`],acl_id:t[`acl-id`]}));a(m,{successLabel:`Updated`})})},ai={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Jr).command(Xr).command(Qr).command(ei).command(ni).command(ii).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oi(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
325
328
 
326
- 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 Si={command:`create <site-id>`,describe:`Create a new App Config`,builder:xi,handler:async t=>c({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({breakout:t.breakout,preferred_wans:t[`preferred-wans`],priority:t.priority}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let d=f({breakout:t.breakout,preferred_wans:t[`preferred-wans`],priority:t.priority}),p=await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...d,account_id:l,site_id:t[`site-id`]}));a(p,{successLabel:`Created`})})};function Ci(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
329
+ 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 si={command:`create <site-id>`,describe:`Create a new App Config`,builder:oi,handler:async t=>c({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({breakout:t.breakout,preferred_wans:t[`preferred-wans`],priority:t.priority}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let d=f({breakout:t.breakout,preferred_wans:t[`preferred-wans`],priority:t.priority}),p=await s(`Creating`,async()=>c.magicTransit.sites.appConfiguration.create({...d,account_id:l,site_id:t[`site-id`]}));a(p,{successLabel:`Created`})})};function ci(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
327
330
 
328
- Deletes specific App Config associated with a site.`).positional(`app-config-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 wi={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:Ci,handler:async t=>c({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs/${t[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(t[`app-config-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"app-config-id":String(t[`app-config-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
329
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.appConfiguration.delete({account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(u,{successLabel:`Deleted`})})};function Ti(e){return e.usage(`$0 magic-transit sites app-configuration list
331
+ Deletes specific App Config associated with a site.`).positional(`app-config-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 li={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:ci,handler:async t=>c({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs/${t[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(t[`app-config-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"app-config-id":String(t[`app-config-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
332
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.appConfiguration.delete({account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(u,{successLabel:`Deleted`})})};function ui(e){return e.usage(`$0 magic-transit sites app-configuration list
330
333
 
331
- Lists App Configs associated with a site.`).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 Ei={command:`list`,describe:`List App Configs`,builder:Ti,handler:async t=>c({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.appConfiguration.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function Di(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
334
+ Lists App Configs associated with a site.`).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 di={command:`list`,describe:`List App Configs`,builder:ui,handler:async t=>c({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.appConfiguration.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function fi(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
332
335
 
333
- Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).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 Oi={command:`update <app-config-id>`,describe:`Update an App Config`,builder:Di,handler:async t=>c({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs/${t[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(t[`app-config-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"app-config-id":String(t[`app-config-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({account_app_id:p(t[`account-app-id`],`account-app-id`,`text`),breakout:t.breakout,managed_app_id:p(t[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:t[`preferred-wans`],priority:t.priority}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({...e,account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(n,{successLabel:`Updated`});return}let d=f({account_app_id:p(t[`account-app-id`],`account-app-id`,`text`),breakout:t.breakout,managed_app_id:p(t[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:t[`preferred-wans`],priority:t.priority}),m=await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({...d,account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(m,{successLabel:`Updated`})})},ki={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(Si).command(wi).command(Ei).command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ai(e){return e.usage(`$0 magic-transit sites create
336
+ Updates an App Config for a site`).positional(`app-config-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-app-id`,{type:`string`,description:`Magic account app ID.`}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`managed-app-id`,{type:`string`,description:`Managed app ID.`}).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 pi={command:`update <app-config-id>`,describe:`Update an App Config`,builder:fi,handler:async t=>c({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/app_configs/${t[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(t[`app-config-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"app-config-id":String(t[`app-config-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({account_app_id:p(t[`account-app-id`],`account-app-id`,`text`),breakout:t.breakout,managed_app_id:p(t[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:t[`preferred-wans`],priority:t.priority}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({...e,account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(n,{successLabel:`Updated`});return}let d=f({account_app_id:p(t[`account-app-id`],`account-app-id`,`text`),breakout:t.breakout,managed_app_id:p(t[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:t[`preferred-wans`],priority:t.priority}),m=await s(`Updating`,async()=>c.magicTransit.sites.appConfiguration.update({...d,account_id:l,site_id:t[`site-id`],app_config_id:t[`app-config-id`]}));a(m,{successLabel:`Updated`})})},mi={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(si).command(li).command(di).command(pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function hi(e){return e.usage(`$0 magic-transit sites create
334
337
 
335
- Creates a new Site`).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 ji={command:`create`,describe:`Create a new Site`,builder:Ai,handler:async t=>c({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the site.`));let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.sites.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function Mi(e){return e.usage(`$0 magic-transit sites delete <site-id>
338
+ Creates a new Site`).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 gi={command:`create`,describe:`Create a new Site`,builder:hi,handler:async t=>c({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the site.`));let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),h=await s(`Creating`,async()=>c.magicTransit.sites.create({...d,account_id:l}));a(h,{successLabel:`Created`})})};function _i(e){return e.usage(`$0 magic-transit sites delete <site-id>
336
339
 
337
- Remove a specific Site.`).positional(`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 Ni={command:`delete <site-id>`,describe:`Delete Site`,builder:Mi,handler:async t=>c({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
338
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.delete({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Deleted`})})};function Pi(e){return e.usage(`$0 magic-transit sites edit <site-id>
340
+ Remove a specific Site.`).positional(`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 vi={command:`delete <site-id>`,describe:`Delete Site`,builder:_i,handler:async t=>c({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
341
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.delete({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Deleted`})})};function yi(e){return e.usage(`$0 magic-transit sites edit <site-id>
339
342
 
340
- Patch 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 Fi={command:`edit <site-id>`,describe:`Patch Site`,builder:Pi,handler:async t=>c({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.edit({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.sites.edit({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function Ii(e){return e.usage(`$0 magic-transit sites get <site-id>
343
+ Patch 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 bi={command:`edit <site-id>`,describe:`Patch Site`,builder:yi,handler:async t=>c({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.edit({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.sites.edit({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function xi(e){return e.usage(`$0 magic-transit sites get <site-id>
341
344
 
342
- 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 Li={command:`get <site-id>`,describe:`Site Details`,builder:Ii,handler:async l=>c({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${l[`site-id`]==null?`<site-id>`:encodeURIComponent(String(l[`site-id`]))}`,pathParams:{"site-id":String(l[`site-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(l[`site-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Ri(e){return e.usage(`$0 magic-transit sites lans create <site-id>
345
+ 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 Si={command:`get <site-id>`,describe:`Site Details`,builder:xi,handler:async l=>c({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`x-magic-new-hc-target`]!==void 0&&(c[`x-magic-new-hc-target`]=String(l[`x-magic-new-hc-target`])),l.dryRun){let e=await r();o({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${l[`site-id`]==null?`<site-id>`:encodeURIComponent(String(l[`site-id`]))}`,pathParams:{"site-id":String(l[`site-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(l[`site-id`]))}`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})};function Ci(e){return e.usage(`$0 magic-transit sites lans create <site-id>
343
346
 
344
- 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-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-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`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 zi={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:Ri,handler:async t=>c({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...m,account_id:l,site_id:t[`site-id`]}));a(h,{successLabel:`Created`})})};function Bi(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
347
+ 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-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-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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`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 wi={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:Ci,handler:async t=>c({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Creating`,async()=>c.magicTransit.sites.lans.create({...m,account_id:l,site_id:t[`site-id`]}));a(h,{successLabel:`Created`})})};function Ti(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
345
348
 
346
- 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 Vi={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Bi,handler:async t=>c({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
347
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.lans.delete({account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(u,{successLabel:`Deleted`})})};function Hi(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
349
+ 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 Ei={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Ti,handler:async t=>c({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
350
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.lans.delete({account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(u,{successLabel:`Deleted`})})};function Di(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
348
351
 
349
- 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-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-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`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 Ui={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Hi,handler:async t=>c({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:e,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(n,{successLabel:`Updated`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:m,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(h,{successLabel:`Updated`})})};function Wi(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
352
+ 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-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-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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`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 Oi={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Di,handler:async t=>c({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:e,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(n,{successLabel:`Updated`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Updating`,async()=>c.magicTransit.sites.lans.edit({body:m,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(h,{successLabel:`Updated`})})};function ki(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
350
353
 
351
- 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 Gi={command:`get <lan-id>`,describe:`Site LAN Details`,builder:Wi,handler:async t=>c({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.lans.get({account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(u,{successLabel:`Loaded`})})};function Ki(e){return e.usage(`$0 magic-transit sites lans list
354
+ 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 Ai={command:`get <lan-id>`,describe:`Site LAN Details`,builder:ki,handler:async t=>c({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.lans.get({account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(u,{successLabel:`Loaded`})})};function ji(e){return e.usage(`$0 magic-transit sites lans list
352
355
 
353
- 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 qi={command:`list`,describe:`List Site LANs`,builder:Ki,handler:async t=>c({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.lans.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function Ji(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
356
+ 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 Mi={command:`list`,describe:`List Site LANs`,builder:ji,handler:async t=>c({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.lans.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function Ni(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
354
357
 
355
- 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-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-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-servers`,`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 Yi={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Ji,handler:async t=>c({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:e,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(n,{successLabel:`Updated`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:m,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(h,{successLabel:`Updated`})})},Xi={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(zi).command(Vi).command(Ui).command(Gi).command(qi).command(Yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zi(e){return e.usage(`$0 magic-transit sites list
358
+ 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-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-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-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`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 Pi={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Ni,handler:async t=>c({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/lans/${t[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(t[`lan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"lan-id":String(t[`lan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:e,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(n,{successLabel:`Updated`});return}let m=f({bond_id:t[`bond-id`],ha_link:t[`ha-link`],is_breakout:t[`is-breakout`],is_prioritized:t[`is-prioritized`],name:p(t.name,`name`,`text`),nat:{static_prefix:p(t[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:t.physport,routed_subnets:d(t[`routed-subnets`],`routed-subnets`),static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:t[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_pool_end:p(t[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:p(t[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:p(t[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:t[`static-addressing-dhcp-server-dns-servers`]},secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:p(t[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:t[`vlan-tag`]}),h=await s(`Updating`,async()=>c.magicTransit.sites.lans.update({body:m,account_id:l,site_id:t[`site-id`],lan_id:t[`lan-id`]}));a(h,{successLabel:`Updated`})})},Fi={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(wi).command(Ei).command(Oi).command(Ai).command(Mi).command(Pi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ii(e){return e.usage(`$0 magic-transit sites list
356
359
 
357
- 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 Qi={command:`list`,describe:`List Sites`,builder:Zi,handler:async t=>c({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={connectorid:t.connectorid};if(t.dryRun){let e=await r();o({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.sites.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function $i(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
360
+ 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 Li={command:`list`,describe:`List Sites`,builder:Ii,handler:async t=>c({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={connectorid:t.connectorid};if(t.dryRun){let e=await r();o({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.magicTransit.sites.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ri(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
358
361
 
359
- Creates a NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ea={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:$i,handler:async t=>c({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Created`})})};function ta(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
362
+ Creates a NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 zi={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:Ri,handler:async t=>c({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Creating`,async()=>c.magicTransit.sites.netflowConfig.create({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Created`})})};function Bi(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
360
363
 
361
- Remove NetFlow configuration for a site.`).positional(`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 na={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:ta,handler:async t=>c({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
362
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.netflowConfig.delete({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Deleted`})})};function ra(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
364
+ Remove NetFlow configuration for a site.`).positional(`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 Vi={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:Bi,handler:async t=>c({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
365
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.netflowConfig.delete({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Deleted`})})};function Hi(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
363
366
 
364
- Updates NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ia={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:ra,handler:async t=>c({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function aa(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
367
+ Updates NetFlow configuration for a site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 Ui={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:Hi,handler:async t=>c({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.edit({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function Wi(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
365
368
 
366
- Get NetFlow configuration for a site.`).positional(`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 oa={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:aa,handler:async t=>c({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.netflowConfig.get({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function sa(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
369
+ Get NetFlow configuration for a site.`).positional(`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 Gi={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:Wi,handler:async t=>c({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.netflowConfig.get({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function Ki(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
367
370
 
368
- Updates NetFlow configuration for a site (partial update).`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 ca={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:sa,handler:async t=>c({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})},la={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(ea).command(na).command(ia).command(oa).command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ua(e){return e.usage(`$0 magic-transit sites update <site-id>
371
+ Updates NetFlow configuration for a site (partial update).`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`active-timeout`,{type:`number`,description:`Timeout in seconds for active flows.`}).option(`collector-ip`,{type:`string`,description:`IPv4 address of the NetFlow collector.`}).option(`collector-port`,{type:`number`,description:`UDP port of the NetFlow collector.`}).option(`inactive-timeout`,{type:`number`,description:`Timeout in seconds for inactive flows.`}).option(`sampling-rate`,{type:`number`,description:`Sampling rate for NetFlow records (1 = every packet).`}).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 qi={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:Ki,handler:async t=>c({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({active_timeout:t[`active-timeout`],collector_ip:p(t[`collector-ip`],`collector-ip`,`text`),collector_port:t[`collector-port`],inactive_timeout:t[`inactive-timeout`],sampling_rate:t[`sampling-rate`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.netflowConfig.update({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})},Ji={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(zi).command(Vi).command(Ui).command(Gi).command(qi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yi(e){return e.usage(`$0 magic-transit sites update <site-id>
369
372
 
370
- 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 da={command:`update <site-id>`,describe:`Update Site`,builder:ua,handler:async t=>c({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.update({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.sites.update({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function fa(e){return e.usage(`$0 magic-transit sites wans create <site-id>
373
+ 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 Xi={command:`update <site-id>`,describe:`Update Site`,builder:Yi,handler:async t=>c({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.update({body:e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Updated`});return}let d=f({connector_id:p(t[`connector-id`],`connector-id`,`text`),description:p(t.description,`description`,`text`),ha_mode:t[`ha-mode`],location:{lat:p(t[`location-lat`],`location-lat`,`text`),lon:p(t[`location-lon`],`location-lon`,`text`)},name:p(t.name,`name`,`text`),secondary_connector_id:p(t[`secondary-connector-id`],`secondary-connector-id`,`text`)}),m=await s(`Updating`,async()=>c.magicTransit.sites.update({body:d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Updated`})})};function Zi(e){return e.usage(`$0 magic-transit sites wans create <site-id>
371
374
 
372
- 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`}).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(`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(`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`].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 pa={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:fa,handler:async t=>c({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}if(t.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let d=f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Created`})})};function ma(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
375
+ 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=>p(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(`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(`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`].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 Qi={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:Zi,handler:async t=>c({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...e,account_id:l,site_id:t[`site-id`]}));a(n,{successLabel:`Created`});return}if(t.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let d=f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Creating`,async()=>c.magicTransit.sites.wans.create({...d,account_id:l,site_id:t[`site-id`]}));a(m,{successLabel:`Created`})})};function $i(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
373
376
 
374
- 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 ha={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:ma,handler:async t=>c({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
375
- `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.wans.delete({account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(u,{successLabel:`Deleted`})})};function ga(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
377
+ 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 ea={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:$i,handler:async t=>c({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
378
+ `);return}let u=await s(`Deleting`,async()=>c.magicTransit.sites.wans.delete({account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(u,{successLabel:`Deleted`})})};function ta(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
376
379
 
377
- Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`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.`,choices:[`low`,`mid`,`high`]}).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`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(`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`].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 _a={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:ga,handler:async t=>c({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:e,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(n,{successLabel:`Updated`});return}let d=f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:d,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(m,{successLabel:`Updated`})})};function va(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
380
+ Patch a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`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.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>p(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`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(`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`].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 na={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:ta,handler:async t=>c({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:e,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(n,{successLabel:`Updated`});return}let d=f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.wans.edit({body:d,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(m,{successLabel:`Updated`})})};function ra(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
378
381
 
379
- Get 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})}const ya={command:`get <wan-id>`,describe:`Site WAN Details`,builder:va,handler:async t=>c({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.wans.get({account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(u,{successLabel:`Loaded`})})};function ba(e){return e.usage(`$0 magic-transit sites wans list
382
+ Get 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})}const ia={command:`get <wan-id>`,describe:`Site WAN Details`,builder:ra,handler:async t=>c({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.wans.get({account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(u,{successLabel:`Loaded`})})};function aa(e){return e.usage(`$0 magic-transit sites wans list
380
383
 
381
- Lists Site WANs 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 xa={command:`list`,describe:`List Site WANs`,builder:ba,handler:async t=>c({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.wans.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function Sa(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
384
+ Lists Site WANs 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 oa={command:`list`,describe:`List Site WANs`,builder:aa,handler:async t=>c({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans`,pathParams:{"site-id":String(t[`site-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicTransit.sites.wans.list({account_id:l,site_id:t[`site-id`]}));a(u,{successLabel:`Loaded`})})};function sa(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
382
385
 
383
- Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`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.`,choices:[`low`,`mid`,`high`]}).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`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(`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`].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 Ca={command:`update <wan-id>`,describe:`Update Site WAN`,builder:Sa,handler:async t=>c({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:e,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(n,{successLabel:`Updated`});return}let d=f({health_check_rate:p(t[`health-check-rate`],`health-check-rate`,`text`),load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:d,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(m,{successLabel:`Updated`})})},wa={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(pa).command(ha).command(_a).command(ya).command(xa).command(Ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ta={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(ji).command(Ni).command(Fi).command(Li).command(Qi).command(da).command(bi).command(ki).command(Xi).command(la).command(wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ea={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(I).command(Rt).command(qt).command(an).command(un).command(yn).command(Rn).command(Zn).command(mr).command(Fr).command(Kr).command(si).command(Ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ea as default};
386
+ Update a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`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.`,choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>p(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`}).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(`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(`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`].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 ca={command:`update <wan-id>`,describe:`Update Site WAN`,builder:sa,handler:async t=>c({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites/${t[`site-id`]==null?`<site-id>`:encodeURIComponent(String(t[`site-id`]))}/wans/${t[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(t[`wan-id`]))}`,pathParams:{"site-id":String(t[`site-id`]??``),"wan-id":String(t[`wan-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:e,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(n,{successLabel:`Updated`});return}let d=f({health_check_rate:t[`health-check-rate`],load_balance_inner_flows:t[`load-balance-inner-flows`],name:p(t.name,`name`,`text`),physport:t.physport,priority:t.priority,static_addressing:{address:p(t[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:p(t[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:p(t[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`)},vlan_tag:t[`vlan-tag`]}),m=await s(`Updating`,async()=>c.magicTransit.sites.wans.update({body:d,account_id:l,site_id:t[`site-id`],wan_id:t[`wan-id`]}));a(m,{successLabel:`Updated`})})},la={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(Qi).command(ea).command(na).command(ia).command(oa).command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ua={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(gi).command(vi).command(bi).command(Si).command(Li).command(Xi).command(ai).command(mi).command(Fi).command(Ji).command(la).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},da={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(N).command(Ct).command(Mt).command(Ut).command(Jt).command(rn).command($).command(In).command($n).command(br).command(jr).command(Kr).command(ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{da as default};