cf 1.0.0-beta.28 → 1.0.0-beta.29

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 (328) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +2240 -3181
  3. package/dist/_meta/hand-written-commands.json +38 -8
  4. package/dist/_meta/schemas.json +1683 -2505
  5. package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
  12. package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
  19. package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
  20. package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
  21. package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  22. package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  23. package/dist/auth-Czr8ChBB.mjs +2 -0
  24. package/dist/auth-DA1PHaHi.mjs +2 -0
  25. package/dist/auth-Dwfa4S3h.mjs +7 -0
  26. package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  27. package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
  28. package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  29. package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
  30. package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
  31. package/dist/body-parser-HN91kAf0.mjs +2 -0
  32. package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  33. package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  34. package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  35. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  36. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  37. package/dist/build-CCwo_ydV.mjs +2 -0
  38. package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
  39. package/dist/builds-tMa3sbQU.mjs +62 -0
  40. package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
  41. package/dist/cf-DmvZ2L51.mjs +18 -0
  42. package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  43. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  44. package/dist/cli-Cc7ujzAy.mjs +4 -0
  45. package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  46. package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  47. package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  48. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  49. package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
  50. package/dist/command-BVct0Dvr.mjs +2 -0
  51. package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
  52. package/dist/command-CJ3ldWrA.mjs +2 -0
  53. package/dist/command-CyOdBNur.mjs +2 -0
  54. package/dist/command-D2XkyO1e.mjs +2 -0
  55. package/dist/command-DHODgfFZ.mjs +2 -0
  56. package/dist/command-DIIaZx_f.mjs +2 -0
  57. package/dist/command-DONwHpqZ.mjs +2 -0
  58. package/dist/command-DdYnSf-8.mjs +2 -0
  59. package/dist/command-DqOU7Ql2.mjs +2 -0
  60. package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
  61. package/dist/command-NqM0lo4a.mjs +2 -0
  62. package/dist/command-bwVDyMv4.mjs +2 -0
  63. package/dist/command-yzqs4m83.mjs +2 -0
  64. package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
  65. package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
  66. package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  67. package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  68. package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  69. package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
  70. package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
  71. package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
  72. package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
  73. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  74. package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
  75. package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
  76. package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
  77. package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
  78. package/dist/d1-N81q-FAr.mjs +50 -0
  79. package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/deploy-Ok4ncy06.mjs +2 -0
  82. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  83. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  84. package/dist/dev-DxbkJkzc.mjs +4 -0
  85. package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  86. package/dist/dialog-CD94-Kzw.mjs +2 -0
  87. package/dist/discover-D9FNaCDK.mjs +2 -0
  88. package/dist/discover-DGsMj9ZN.mjs +2 -0
  89. package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
  90. package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
  91. package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
  92. package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  93. package/dist/docs-BFVK88kB.mjs +3 -0
  94. package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  95. package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  96. package/dist/email-auth--2KCzZNA.mjs +6 -0
  97. package/dist/email-routing-DzaExfVf.mjs +44 -0
  98. package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
  99. package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  100. package/dist/errors-C_bGcR0X.mjs +11 -0
  101. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  102. package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
  103. package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
  104. package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
  105. package/dist/generate-BzOnRBij.mjs +2 -0
  106. package/dist/generate-DfxZtpn9.mjs +2 -0
  107. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  108. package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  109. package/dist/gt-BV-jij5q.mjs +4 -0
  110. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  111. package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  112. package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
  113. package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
  114. package/dist/index.mjs +1 -1
  115. package/dist/init-BgCF9K8h.mjs +43 -0
  116. package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
  117. package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
  118. package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
  119. package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
  120. package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
  121. package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
  122. package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  123. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  124. package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
  125. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  126. package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
  127. package/dist/local-DRxctCh9.mjs +2 -0
  128. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  129. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  130. package/dist/log-DBAHla_W.mjs +2 -0
  131. package/dist/login-CK3nn9a5.mjs +2 -0
  132. package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
  133. package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
  134. package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
  135. package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
  136. package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  137. package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  138. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  139. package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
  140. package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
  141. package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  142. package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
  143. package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  144. package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
  145. package/dist/o11y-eYYs59X9.mjs +88 -0
  146. package/dist/oauth-BgDZMd72.mjs +5 -0
  147. package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
  148. package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
  149. package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
  150. package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
  151. package/dist/output-hFMAotFl.mjs +2 -0
  152. package/dist/package-oNVeacC9.mjs +2 -0
  153. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  154. package/dist/pages-5spcBpX1.mjs +48 -0
  155. package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
  156. package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  157. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  158. package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  159. package/dist/previews-Bv1HMMtO.mjs +6 -0
  160. package/dist/progress-DE_G09u2.mjs +2 -0
  161. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  162. package/dist/prompt-D274Im1O.mjs +4 -0
  163. package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
  164. package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
  165. package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
  166. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  167. package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
  168. package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
  169. package/dist/registrar-Cl1snz8z.mjs +43 -0
  170. package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
  171. package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  172. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  173. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  174. package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
  175. package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
  176. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  177. package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
  178. package/dist/run-C5yPsiO2.mjs +2 -0
  179. package/dist/run-CXWkMU3x.mjs +2 -0
  180. package/dist/schema-CfZOW8Zw.mjs +2 -0
  181. package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  182. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  183. package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
  184. package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  185. package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  186. package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  187. package/dist/session-COdP8BXD.mjs +2 -0
  188. package/dist/shared-D_2KLpP3.mjs +2 -0
  189. package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  190. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  191. package/dist/snippets-DrrdpLnS.mjs +18 -0
  192. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  193. package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  194. package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
  195. package/dist/sql-BCuLxGSf.mjs +4 -0
  196. package/dist/src-ByCoEqOw.mjs +133 -0
  197. package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
  198. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  199. package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  200. package/dist/state-B6r-b_-d.mjs +2 -0
  201. package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
  202. package/dist/static-assets-DGDoaJf1.mjs +386 -0
  203. package/dist/stream-CzlqY8hq.mjs +89 -0
  204. package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
  205. package/dist/telemetry-COlodX5Z.mjs +2 -0
  206. package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  207. package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  208. package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
  209. package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
  210. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  211. package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  212. package/dist/ui-dWsVmFCG.mjs +2 -0
  213. package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
  214. package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
  215. package/dist/update-check-worker.mjs +1 -1
  216. package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  217. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  218. package/dist/user-Bk1BIqZ5.mjs +103 -0
  219. package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
  220. package/dist/version-CcuBNjqg.mjs +2 -0
  221. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  222. package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
  223. package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
  224. package/dist/workers-BZMvamn0.mjs +39 -0
  225. package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  226. package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  227. package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
  228. package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
  229. package/dist/zaraz-BFK0p28R.mjs +22 -0
  230. package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
  231. package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
  232. package/package.json +19 -19
  233. package/dist/ai-gateway-Lj4On37s.mjs +0 -74
  234. package/dist/ai-search-BxyhS3X7.mjs +0 -74
  235. package/dist/alerting-r0G2X9y9.mjs +0 -52
  236. package/dist/analytics-C6bfqm-W.mjs +0 -17
  237. package/dist/auth-B-h0BHg7.mjs +0 -2
  238. package/dist/auth-B6tswVxH.mjs +0 -2
  239. package/dist/auth-clmqFEWU.mjs +0 -7
  240. package/dist/body-parser-DoewLePl.mjs +0 -2
  241. package/dist/brand-protection-kv1ba80i.mjs +0 -14
  242. package/dist/browser-run-D-vRoZmf.mjs +0 -40
  243. package/dist/build-BzJGqb2o.mjs +0 -2
  244. package/dist/builds-BbxINHRP.mjs +0 -64
  245. package/dist/cf-BQ_LRiut.mjs +0 -18
  246. package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
  247. package/dist/cli-B7vslRfu.mjs +0 -4
  248. package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
  249. package/dist/command-AVwd7XjE.mjs +0 -2
  250. package/dist/command-B87T_f2f.mjs +0 -2
  251. package/dist/command-CEHhi3t0.mjs +0 -2
  252. package/dist/command-CYmQE79n.mjs +0 -2
  253. package/dist/command-Ce8CVLth.mjs +0 -2
  254. package/dist/command-CqDudQZs.mjs +0 -2
  255. package/dist/command-D4YcwpVp.mjs +0 -2
  256. package/dist/command-D9Qyi1B0.mjs +0 -2
  257. package/dist/command-Dl9ICrRK.mjs +0 -2
  258. package/dist/command-DtCSe8Hy.mjs +0 -2
  259. package/dist/command-DwzVtmb3.mjs +0 -2
  260. package/dist/command-wtBubtZ4.mjs +0 -2
  261. package/dist/containers-B06OGOEB.mjs +0 -380
  262. package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
  263. package/dist/d1-nJCOJZb8.mjs +0 -50
  264. package/dist/deploy-DJMnWFNk.mjs +0 -2
  265. package/dist/deploy-context-YCW3eqP1.mjs +0 -56
  266. package/dist/deploy-input-CQLBXFEB.mjs +0 -2
  267. package/dist/dev-GsYHvMah.mjs +0 -4
  268. package/dist/dialog-D5lus4M4.mjs +0 -2
  269. package/dist/discover-6kAmVMPp.mjs +0 -2
  270. package/dist/discover-C06Syc2B.mjs +0 -2
  271. package/dist/docs-CRc_WOXh.mjs +0 -3
  272. package/dist/email-auth-ptdqNSTZ.mjs +0 -6
  273. package/dist/email-domains-uL22-zRY.mjs +0 -14
  274. package/dist/email-routing-CV43rMJC.mjs +0 -44
  275. package/dist/errors-VG1mgwJl.mjs +0 -11
  276. package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
  277. package/dist/generate-CeeWW3eX.mjs +0 -3
  278. package/dist/generate-D6V4Q58z.mjs +0 -2
  279. package/dist/gt-BQkaDQDq.mjs +0 -3
  280. package/dist/healthchecks-BA1fmzTm.mjs +0 -20
  281. package/dist/init-EVsjBrOz.mjs +0 -43
  282. package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
  283. package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
  284. package/dist/local-D5Vq6ooZ.mjs +0 -2
  285. package/dist/local-runtime-BZjgkacr.mjs +0 -2
  286. package/dist/log-DZfik9Jk.mjs +0 -2
  287. package/dist/login-DRJugxya.mjs +0 -2
  288. package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
  289. package/dist/o11y-ySxrnP1Z.mjs +0 -88
  290. package/dist/oauth-CFVUl-Wv.mjs +0 -4
  291. package/dist/output-BZQEl3mK.mjs +0 -2
  292. package/dist/package-B7RgwuFR.mjs +0 -2
  293. package/dist/page-rules-DRw763O1.mjs +0 -38
  294. package/dist/pages-DfQnxiTk.mjs +0 -48
  295. package/dist/pipelines-DbyrI6F4.mjs +0 -40
  296. package/dist/previews-DEVNSip2.mjs +0 -6
  297. package/dist/progress-yvPscjYg.mjs +0 -2
  298. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  299. package/dist/prompt-CEpZ-lQZ.mjs +0 -4
  300. package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
  301. package/dist/registrar-D23gfKBi.mjs +0 -43
  302. package/dist/request-headers-C0FpeBhz.mjs +0 -2
  303. package/dist/request-tracers-qd7XOAka.mjs +0 -4
  304. package/dist/rulesets-DmqwixUC.mjs +0 -42
  305. package/dist/run-BOKI1uWa.mjs +0 -2
  306. package/dist/run-DBqOjD1P.mjs +0 -2
  307. package/dist/schema-Dj9STsWI.mjs +0 -2
  308. package/dist/schema-flags-CXm9iIv6.mjs +0 -4
  309. package/dist/session-vzNfUhPl.mjs +0 -2
  310. package/dist/shared-MK-_lkbn.mjs +0 -2
  311. package/dist/smart-shield-Boy_qbqd.mjs +0 -22
  312. package/dist/snippets-DdoDYXW-.mjs +0 -18
  313. package/dist/spawn-B5F4OIHG.mjs +0 -5
  314. package/dist/sql-Bb56llsb.mjs +0 -4
  315. package/dist/src-BoSDeQ9m.mjs +0 -133
  316. package/dist/startup-profile-DQVkZZpb.mjs +0 -2
  317. package/dist/state-DW3QZtfh.mjs +0 -2
  318. package/dist/stream-BuZYDbNR.mjs +0 -89
  319. package/dist/telemetry-DkDUr4KK.mjs +0 -2
  320. package/dist/tunnels-D90ztENM.mjs +0 -27
  321. package/dist/ui-xjCox-gU.mjs +0 -2
  322. package/dist/url-scanner-BRdWwka4.mjs +0 -16
  323. package/dist/user-Cmb1_Wu5.mjs +0 -103
  324. package/dist/version-6Bpy6Bgt.mjs +0 -2
  325. package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
  326. package/dist/workers-BnLiOjZf.mjs +0 -39
  327. package/dist/workers-builds-sKpITeRk.mjs +0 -14
  328. package/dist/zaraz-BBKki5WS.mjs +0 -22
@@ -1,123 +1,123 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,r as f,s as p,t as m}from"./body-parser-DoewLePl.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v}from"./prompt-CEpZ-lQZ.mjs";import{n as y,t as ee}from"./raw-fetch-Cl5spWC3.mjs";var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function ne(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import{a as u,i as d,n as f}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{c as p,i as m,o as h,r as g,t as _}from"./body-parser-HN91kAf0.mjs";import{n as v}from"./input-validation-D7z60HJH.mjs";import{n as y,t as ee}from"./raw-fetch-DhlyWQtk.mjs";var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`};function ne(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules bulk-delete
3
3
 
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 re={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:ne,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(te,{account_id:l}));o(u,{successLabel:`Deleted`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ie(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
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 re={command:`bulk-delete`,describe:`Delete all DNS Protection rules.`,builder:ne,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(te,{account_id:l}));s(u,{successLabel:`Deleted`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,body:`json`};function ie(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
5
5
 
6
- Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const ae={command:`create`,describe:`Create DNS Protection rule.`,builder:ie,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(b,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await g(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let f=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(b,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var oe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function se(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
6
+ Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const ae={command:`create`,describe:`Create DNS Protection rule.`,builder:ie,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({block_any_queries:e[`block-any-queries`],burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),profile_sensitivity:v(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(b,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await u(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await u(`protection-mode`,`The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`profile-sensitivity`]===void 0&&(e[`profile-sensitivity`]=await u(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await u(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await u(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let f=_({block_any_queries:e[`block-any-queries`],burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),profile_sensitivity:v(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(b,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var oe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function se(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete <rule-id>
7
7
 
8
- Delete a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <rule-id>`,describe:`Delete DNS Protection rule.`,builder:se,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(oe,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ue(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
8
+ Delete a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <rule-id>`,describe:`Delete DNS Protection rule.`,builder:se,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-dns-protection configs dns protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(oe,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`};function ue(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules get <rule-id>
9
9
 
10
- 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 de={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:ue,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(le,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function pe(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules list
10
+ 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 de={command:`get <rule-id>`,describe:`Get DNS Protection rule.`,builder:ue,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-dns-protection configs dns protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(le,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function pe(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules list
11
11
 
12
- List all DNS Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List all DNS Protection rules.`,builder:pe,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(fe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var he={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`,body:`json`};function ge(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
12
+ List all DNS Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List all DNS Protection rules.`,builder:pe,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(fe,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var he={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/${t.rule_id}`,body:`json`};function ge(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules update <rule-id>
13
13
 
14
- Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for DNS Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const _e={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:ge,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(he,{body:t,account_id:u,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let f=m({block_any_queries:e[`block-any-queries`],burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:h(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),p=await c(`Updating`,async()=>l.send(he,{body:f,account_id:u,rule_id:e[`rule-id`]}));o(p,{successLabel:`Updated`})})},ve={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(re).command(ae).command(ce).command(de).command(me).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function we(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
14
+ Update a DNS Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the DNS Protection rule to update.`,demandOption:!0}).option(`block-any-queries`,{type:`boolean`,description:`The new value for whether to block DNS ANY queries. Optional.`}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for DNS Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`profile-sensitivity`,{type:`string`,description:`The new profile sensitivity. Optional. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the DNS Protection rule.`})}const _e={command:`update <rule-id>`,describe:`Update DNS Protection rule.`,builder:ge,handler:async e=>l({command:`magic-transit advanced-dns-protection configs dns protection rules update`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-dns-protection configs dns protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({block_any_queries:e[`block-any-queries`],burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:v(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(he,{body:n,account_id:u,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}let d=_({block_any_queries:e[`block-any-queries`],burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),profile_sensitivity:v(e[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>l.send(he,{body:d,account_id:u,rule_id:e[`rule-id`]}));s(f,{successLabel:`Updated`})})},ve={command:`rules`,describe:`Operations for advanced-dns-protection.configs.dns.protection.rules`,builder:e=>e.command(re).command(ae).command(ce).command(de).command(me).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`protection`,describe:`Operations for advanced-dns-protection.configs.dns.protection`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`dns`,describe:`Operations for advanced-dns-protection.configs.dns`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`configs`,describe:`Operations for advanced-dns-protection.configs`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Se={command:`advanced-dns-protection`,describe:`Advanced Dns Protection operations`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ce={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`};function we(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist bulk-delete
15
15
 
16
- Delete all allowlist prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Te={command:`bulk-delete`,describe:`Delete all allowlist prefixes.`,builder:we,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Ce,{account_id:l}));o(u,{successLabel:`Deleted`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,body:`json`};function Ee(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
16
+ Delete all allowlist prefixes for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Te={command:`bulk-delete`,describe:`Delete all allowlist prefixes.`,builder:we,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Ce,{account_id:l}));s(u,{successLabel:`Deleted`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,body:`json`};function Ee(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist create
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 De={command:`create`,describe:`Create allowlist prefix.`,builder:Ee,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(x,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`An comment describing the allowlist prefix.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The allowlist prefix to add in CIDR format.`));let f=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled,prefix:h(e.prefix,`prefix`,`text`)}),p=await c(`Creating`,async()=>l.send(x,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var Oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function ke(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
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 De={command:`create`,describe:`Create allowlist prefix.`,builder:Ee,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs allowlist create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({comment:v(e.comment,`comment`,`text`),enabled:e.enabled,prefix:v(e.prefix,`prefix`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(x,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await u(`comment`,`An comment describing the allowlist prefix.`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await u(`prefix`,`The allowlist prefix to add in CIDR format.`));let f=_({comment:v(e.comment,`comment`,`text`),enabled:e.enabled,prefix:v(e.prefix,`prefix`,`text`)}),p=await c(`Creating`,async()=>l.send(x,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var Oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function ke(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist list
19
19
 
20
- 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 Ae={command:`list`,describe:`List all allowlist prefixes.`,builder:ke,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Oe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var je={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`};function Me(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix delete <prefix-id>
20
+ 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 Ae={command:`list`,describe:`List all allowlist prefixes.`,builder:ke,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Oe,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var je={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`};function Me(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix delete <prefix-id>
21
21
 
22
- 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 Ne={command:`delete <prefix-id>`,describe:`Delete allowlist prefix.`,builder:Me,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(je,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`};function Fe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix get <prefix-id>
22
+ 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 Ne={command:`delete <prefix-id>`,describe:`Delete allowlist prefix.`,builder:Me,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(je,{account_id:l,prefix_id:e[`prefix-id`]}));s(u,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`};function Fe(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix get <prefix-id>
23
23
 
24
- 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 Ie={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:Fe,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Pe,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`,body:`json`};function Le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix update <prefix-id>
24
+ 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 Ie={command:`get <prefix-id>`,describe:`Get allowlist prefix.`,builder:Fe,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Pe,{account_id:l,prefix_id:e[`prefix-id`]}));s(u,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/allowlist/${t.prefix_id}`,body:`json`};function Le(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs allowlist prefix update <prefix-id>
25
25
 
26
- 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 Re={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:Le,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(S,{body:t,account_id:u,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let f=m({comment:h(e.comment,`comment`,`text`),enabled:e.enabled}),p=await c(`Updating`,async()=>l.send(S,{body:f,account_id:u,prefix_id:e[`prefix-id`]}));o(p,{successLabel:`Updated`})})},ze={command:`prefix`,describe:`Operations for advanced-tcp-protection.configs.allowlist.prefix`,builder:e=>e.command(Ne).command(Ie).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(Te).command(De).command(Ae).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ve={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`};function He(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk-delete
26
+ 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 Re={command:`update <prefix-id>`,describe:`Update allowlist prefix.`,builder:Le,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs allowlist prefix update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs allowlist prefix update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/allowlist/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({comment:v(e.comment,`comment`,`text`),enabled:e.enabled}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(S,{body:n,account_id:u,prefix_id:e[`prefix-id`]}));s(r,{successLabel:`Updated`});return}let d=_({comment:v(e.comment,`comment`,`text`),enabled:e.enabled}),f=await c(`Updating`,async()=>l.send(S,{body:d,account_id:u,prefix_id:e[`prefix-id`]}));s(f,{successLabel:`Updated`})})},ze={command:`prefix`,describe:`Operations for advanced-tcp-protection.configs.allowlist.prefix`,builder:e=>e.command(Ne).command(Ie).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Be={command:`allowlist`,describe:`Operations for advanced-tcp-protection.configs.allowlist`,builder:e=>e.command(Te).command(De).command(Ae).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ve={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`};function He(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk-delete
27
27
 
28
- 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 Ue={command:`bulk-delete`,describe:`Delete all prefixes.`,builder:He,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs 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 n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Ve,{account_id:l}));o(u,{successLabel:`Deleted`})})};var We={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/bulk`,body:`json`};function Ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
28
+ 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 Ue={command:`bulk-delete`,describe:`Delete all prefixes.`,builder:He,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Ve,{account_id:l}));s(u,{successLabel:`Deleted`})})};var We={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/bulk`,body:`json`};function Ge(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes bulk create
29
29
 
30
- 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 Ke={command:`create`,describe:`Create multiple prefixes.`,builder:Ge,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(We,{body:e,account_id:u}));o(t,{successLabel:`Created`})}})},qe={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,body:`json`};function Je(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
30
+ 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 Ke={command:`create`,describe:`Create multiple prefixes.`,builder:Ge,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs prefixes bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(We,{body:e,account_id:u}));s(n,{successLabel:`Created`})}})},qe={command:`bulk`,describe:`Operations for advanced-tcp-protection.configs.prefixes.bulk`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,body:`json`};function Je(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes create
31
31
 
32
- 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 Ye={command:`create`,describe:`Create prefix.`,builder:Je,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(C,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await g(`comment`,`A comment describing the prefix.`)),e.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await g(`prefix`,`The prefix to add in CIDR format.`));let f=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded,prefix:h(e.prefix,`prefix`,`text`)}),p=await c(`Creating`,async()=>l.send(C,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var Xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function Ze(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
32
+ 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 Ye={command:`create`,describe:`Create prefix.`,builder:Je,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes create`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs prefixes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({comment:v(e.comment,`comment`,`text`),excluded:e.excluded,prefix:v(e.prefix,`prefix`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(C,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}if(e.comment===void 0&&(e.comment=await u(`comment`,`A comment describing the prefix.`)),e.excluded===void 0)throw Error(`--excluded is required (or pass --body with this field set).`);e.prefix===void 0&&(e.prefix=await u(`prefix`,`The prefix to add in CIDR format.`));let f=_({comment:v(e.comment,`comment`,`text`),excluded:e.excluded,prefix:v(e.prefix,`prefix`,`text`)}),p=await c(`Creating`,async()=>l.send(C,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var Xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function Ze(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes delete <prefix-id>
33
33
 
34
- 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 Qe={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:Ze,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Xe,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Deleted`})})};var $e={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function et(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
34
+ 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 Qe={command:`delete <prefix-id>`,describe:`Delete prefix.`,builder:Ze,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs prefixes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Xe,{account_id:l,prefix_id:e[`prefix-id`]}));s(u,{successLabel:`Deleted`})})};var $e={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`};function et(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes get <prefix-id>
35
35
 
36
- 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 tt={command:`get <prefix-id>`,describe:`Get prefix.`,builder:et,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($e,{account_id:l,prefix_id:e[`prefix-id`]}));o(u,{successLabel:`Loaded`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function rt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes list
36
+ 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 tt={command:`get <prefix-id>`,describe:`Get prefix.`,builder:et,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs prefixes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send($e,{account_id:l,prefix_id:e[`prefix-id`]}));s(u,{successLabel:`Loaded`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function rt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes list
37
37
 
38
- 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 it={command:`list`,describe:`List all prefixes.`,builder:rt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(nt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var w={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`,body:`json`};function at(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
38
+ 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 it={command:`list`,describe:`List all prefixes.`,builder:rt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(nt,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var w={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/prefixes/${t.prefix_id}`,body:`json`};function at(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs prefixes update <prefix-id>
39
39
 
40
- 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 ot={command:`update <prefix-id>`,describe:`Update prefix.`,builder:at,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(w,{body:t,account_id:u,prefix_id:e[`prefix-id`]}));o(r,{successLabel:`Updated`});return}let f=m({comment:h(e.comment,`comment`,`text`),excluded:e.excluded}),p=await c(`Updating`,async()=>l.send(w,{body:f,account_id:u,prefix_id:e[`prefix-id`]}));o(p,{successLabel:`Updated`})})},st={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(Ue).command(Ye).command(Qe).command(tt).command(it).command(ot).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ct={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`};function lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters bulk-delete
40
+ 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 ot={command:`update <prefix-id>`,describe:`Update prefix.`,builder:at,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs prefixes update`,classification:{safeFlags:[`excluded`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs prefixes update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/prefixes/${e[`prefix-id`]==null?`<prefix-id>`:encodeURIComponent(String(e[`prefix-id`]))}`,pathParams:{"prefix-id":String(e[`prefix-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({comment:v(e.comment,`comment`,`text`),excluded:e.excluded}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(w,{body:n,account_id:u,prefix_id:e[`prefix-id`]}));s(r,{successLabel:`Updated`});return}let d=_({comment:v(e.comment,`comment`,`text`),excluded:e.excluded}),f=await c(`Updating`,async()=>l.send(w,{body:d,account_id:u,prefix_id:e[`prefix-id`]}));s(f,{successLabel:`Updated`})})},st={command:`prefixes`,describe:`Operations for advanced-tcp-protection.configs.prefixes`,builder:e=>e.command(Ue).command(Ye).command(Qe).command(tt).command(it).command(ot).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ct={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`};function lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters bulk-delete
41
41
 
42
- Delete all SYN Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`bulk-delete`,describe:`Delete all SYN Protection filters.`,builder:lt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ct,{account_id:l}));o(u,{successLabel:`Deleted`})})};var T={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,body:`json`};function dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
42
+ Delete all SYN Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`bulk-delete`,describe:`Delete all SYN Protection filters.`,builder:lt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(ct,{account_id:l}));s(u,{successLabel:`Deleted`})})};var T={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,body:`json`};function dt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters create
43
43
 
44
- Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const ft={command:`create`,describe:`Create a SYN Protection filter.`,builder:dt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(T,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await g(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let f=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Creating`,async()=>l.send(T,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var pt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
44
+ Create a SYN Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const ft={command:`create`,describe:`Create a SYN Protection filter.`,builder:dt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(T,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await u(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await u(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let f=_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Creating`,async()=>l.send(T,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var pt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function mt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters delete <filter-id>
45
45
 
46
- Delete a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ht={command:`delete <filter-id>`,describe:`Delete SYN Protection filter.`,builder:mt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(pt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function _t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
46
+ Delete a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ht={command:`delete <filter-id>`,describe:`Delete SYN Protection filter.`,builder:mt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(pt,{account_id:l,filter_id:e[`filter-id`]}));s(u,{successLabel:`Deleted`})})};var gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`};function _t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters get <filter-id>
47
47
 
48
- 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 vt={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:_t,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(gt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Loaded`})})};var yt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,query:[`mode`,`page`,`per_page`,`order`,`direction`],joined:[`mode`,`page`,`per_page`,`order`,`direction`]};function bt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters list
48
+ 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 vt={command:`get <filter-id>`,describe:`Get SYN Protection filter.`,builder:_t,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(gt,{account_id:l,filter_id:e[`filter-id`]}));s(u,{successLabel:`Loaded`})})};var yt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters`,query:[`mode`,`page`,`per_page`,`order`,`direction`],joined:[`mode`,`page`,`per_page`,`order`,`direction`]};function bt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters list
49
49
 
50
- List all SYN Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`list`,describe:`List all SYN Protection filters.`,builder:bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(yt,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`,body:`json`};function St(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
50
+ List all SYN Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`list`,describe:`List all SYN Protection filters.`,builder:bt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(yt,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/filters/${t.filter_id}`,body:`json`};function St(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection filters update <filter-id>
51
51
 
52
- Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const Ct={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:St,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(E,{body:t,account_id:u,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let f=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Updating`,async()=>l.send(E,{body:f,account_id:u,filter_id:e[`filter-id`]}));o(p,{successLabel:`Updated`})})},wt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(ut).command(ft).command(ht).command(vt).command(xt).command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Et(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
52
+ Update a SYN Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const Ct={command:`update <filter-id>`,describe:`Update SYN Protection filter.`,builder:St,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(E,{body:n,account_id:u,filter_id:e[`filter-id`]}));s(r,{successLabel:`Updated`});return}let d=_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Updating`,async()=>l.send(E,{body:d,account_id:u,filter_id:e[`filter-id`]}));s(f,{successLabel:`Updated`})})},wt={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.filters`,builder:e=>e.command(ut).command(ft).command(ht).command(vt).command(xt).command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`};function Et(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules bulk-delete
53
53
 
54
- Delete all SYN Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Dt={command:`bulk-delete`,describe:`Delete all SYN Protection rules.`,builder:Et,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Tt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,body:`json`};function Ot(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
54
+ Delete all SYN Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Dt={command:`bulk-delete`,describe:`Delete all SYN Protection rules.`,builder:Et,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Tt,{account_id:l}));s(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,body:`json`};function Ot(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules create
55
55
 
56
- Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`protection-mode`,{type:`string`,description:`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const kt={command:`create`,describe:`Create SYN Protection rule.`,builder:Ot,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(D,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let f=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(D,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var At={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function jt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
56
+ Create a SYN Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'.`}).option(`protection-mode`,{type:`string`,description:`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new SYN Protection rule to add.`})}const kt={command:`create`,describe:`Create SYN Protection rule.`,builder:Ot,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:v(e[`mitigation-type`],`mitigation-type`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(D,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await u(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await u(`protection-mode`,`The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await u(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await u(`scope`,`The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let f=_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:v(e[`mitigation-type`],`mitigation-type`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(D,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var At={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function jt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules delete <rule-id>
57
57
 
58
- Delete a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Mt={command:`delete <rule-id>`,describe:`Delete SYN Protection rule.`,builder:jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(At,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var Nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Pt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
58
+ Delete a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Mt={command:`delete <rule-id>`,describe:`Delete SYN Protection rule.`,builder:jt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(At,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var Nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`};function Pt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules get <rule-id>
59
59
 
60
- 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 Ft={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Pt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Nt,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Loaded`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function Lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules list
60
+ 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 Ft={command:`get <rule-id>`,describe:`Get SYN Protection rule.`,builder:Pt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Nt,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var It={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function Lt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules list
61
61
 
62
- List all SYN Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List all SYN Protection rules.`,builder:Lt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(It,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var O={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`,body:`json`};function zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
62
+ List all SYN Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List all SYN Protection rules.`,builder:Lt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(It,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var O={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/syn_protection/rules/${t.rule_id}`,body:`json`};function zt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs syn protection rules update <rule-id>
63
63
 
64
- Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for SYN Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Bt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:zt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(O,{body:t,account_id:u,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let f=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:h(e[`mitigation-type`],`mitigation-type`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),p=await c(`Updating`,async()=>l.send(O,{body:f,account_id:u,rule_id:e[`rule-id`]}));o(p,{successLabel:`Updated`})})},Vt={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Dt).command(kt).command(Mt).command(Ft).command(Rt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(wt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Wt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Gt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
64
+ Update a SYN Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the SYN Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`mitigation-type`,{type:`string`,description:`The new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for SYN Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The fields to update on the SYN Protection rule.`})}const Bt={command:`update <rule-id>`,describe:`Update SYN Protection rule.`,builder:zt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs syn protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs syn protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/syn_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:v(e[`mitigation-type`],`mitigation-type`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(O,{body:n,account_id:u,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}let d=_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mitigation_type:v(e[`mitigation-type`],`mitigation-type`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>l.send(O,{body:d,account_id:u,rule_id:e[`rule-id`]}));s(f,{successLabel:`Updated`})})},Vt={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.syn.protection.rules`,builder:e=>e.command(Dt).command(kt).command(Mt).command(Ft).command(Rt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.syn.protection`,builder:e=>e.command(wt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`syn`,describe:`Operations for advanced-tcp-protection.configs.syn`,builder:e=>e.command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Wt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`};function Gt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete
65
65
 
66
- Delete all TCP Flow Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Kt={command:`bulk-delete`,describe:`Delete all TCP Flow Protection filters.`,builder:Gt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Wt,{account_id:l}));o(u,{successLabel:`Deleted`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,body:`json`};function qt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
66
+ Delete all TCP Flow Protection filters for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Kt={command:`bulk-delete`,describe:`Delete all TCP Flow Protection filters.`,builder:Gt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Wt,{account_id:l}));s(u,{successLabel:`Deleted`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,body:`json`};function qt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters create
67
67
 
68
- Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Jt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:qt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(k,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await g(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await g(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let f=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Creating`,async()=>l.send(k,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var Yt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Xt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
68
+ Create a TCP Flow Protection filter for an account.`).option(`expression`,{type:`string`,description:`The filter expression.`}).option(`filter-mode`,{type:`string`,description:`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new filter to create.`})}const Jt={command:`create`,describe:`Create a TCP Flow Protection filter.`,builder:qt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(k,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e.expression===void 0&&(e.expression=await u(`expression`,`The filter expression.`)),e[`filter-mode`]===void 0&&(e[`filter-mode`]=await u(`filter-mode`,`The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.`));let f=_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Creating`,async()=>l.send(k,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var Yt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function Xt(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters delete <filter-id>
69
69
 
70
- Delete a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Zt={command:`delete <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:Xt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Yt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Deleted`})})};var Qt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function $t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
70
+ Delete a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Zt={command:`delete <filter-id>`,describe:`Delete TCP Flow Protection filter.`,builder:Xt,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Yt,{account_id:l,filter_id:e[`filter-id`]}));s(u,{successLabel:`Deleted`})})};var Qt={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`};function $t(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters get <filter-id>
71
71
 
72
- 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 en={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:$t,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Qt,{account_id:l,filter_id:e[`filter-id`]}));o(u,{successLabel:`Loaded`})})};var tn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,query:[`mode`,`page`,`per_page`,`order`,`direction`],joined:[`mode`,`page`,`per_page`,`order`,`direction`]};function nn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters list
72
+ 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 en={command:`get <filter-id>`,describe:`Get TCP Flow Protection filter.`,builder:$t,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Qt,{account_id:l,filter_id:e[`filter-id`]}));s(u,{successLabel:`Loaded`})})};var tn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,query:[`mode`,`page`,`per_page`,`order`,`direction`],joined:[`mode`,`page`,`per_page`,`order`,`direction`]};function nn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters list
73
73
 
74
- List all TCP Flow Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rn={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:nn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(tn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`,body:`json`};function an(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
74
+ List all TCP Flow Protection filters for an account.`).option(`filter-mode`,{type:`string`,description:`The mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.`}).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rn={command:`list`,describe:`List all TCP Flow Protection filters.`,builder:nn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={mode:e[`filter-mode`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(tn,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${t.filter_id}`,body:`json`};function an(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection filters update <filter-id>
75
75
 
76
- Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const on={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:an,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(A,{body:t,account_id:u,filter_id:e[`filter-id`]}));o(r,{successLabel:`Updated`});return}let f=m({expression:h(e.expression,`expression`,`text`),mode:h(e[`filter-mode`],`filter-mode`,`text`)}),p=await c(`Updating`,async()=>l.send(A,{body:f,account_id:u,filter_id:e[`filter-id`]}));o(p,{successLabel:`Updated`})})},sn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(Kt).command(Jt).command(Zt).command(en).command(rn).command(on).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function ln(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
76
+ Update a TCP Flow Protection filter specified by the given UUID.`).positional(`filter-id`,{type:`string`,description:`The UUID of the filter to update.`,demandOption:!0}).option(`expression`,{type:`string`,description:`The new filter expression. Optional.`}).option(`filter-mode`,{type:`string`,description:`The new mode for the filter. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the filter.`})}const on={command:`update <filter-id>`,describe:`Update TCP Flow Protection filter.`,builder:an,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection filters update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection filters update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(A,{body:n,account_id:u,filter_id:e[`filter-id`]}));s(r,{successLabel:`Updated`});return}let d=_({expression:v(e.expression,`expression`,`text`),mode:v(e[`filter-mode`],`filter-mode`,`text`)}),f=await c(`Updating`,async()=>l.send(A,{body:d,account_id:u,filter_id:e[`filter-id`]}));s(f,{successLabel:`Updated`})})},sn={command:`filters`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.filters`,builder:e=>e.command(Kt).command(Jt).command(Zt).command(en).command(rn).command(on).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`};function ln(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete
77
77
 
78
- Delete all TCP Flow Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const un={command:`bulk-delete`,describe:`Delete all TCP Flow Protection rules.`,builder:ln,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(cn,{account_id:l}));o(u,{successLabel:`Deleted`})})};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,body:`json`};function dn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
78
+ Delete all TCP Flow Protection rules for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const un={command:`bulk-delete`,describe:`Delete all TCP Flow Protection rules.`,builder:ln,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(cn,{account_id:l}));s(u,{successLabel:`Deleted`})})};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,body:`json`};function dn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules create
79
79
 
80
- Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const fn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:dn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(j,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await g(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await g(`protection-mode`,`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await g(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await g(`scope`,`The scope for the TCP Flow Protection rule.`));let f=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),name:h(e.name,`name`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:h(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(j,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var pn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function mn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
80
+ Create a TCP Flow Protection rule for an account.`).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`name`,{type:`string`,description:`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the TCP Flow Protection rule.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new TCP Flow Protection rule.`})}const fn={command:`create`,describe:`Create TCP Flow Protection rule.`,builder:dn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(j,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e[`burst-sensitivity`]===void 0&&(e[`burst-sensitivity`]=await u(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),e[`protection-mode`]===void 0&&(e[`protection-mode`]=await u(`protection-mode`,`The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),e[`rate-sensitivity`]===void 0&&(e[`rate-sensitivity`]=await u(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),e.scope===void 0&&(e.scope=await u(`scope`,`The scope for the TCP Flow Protection rule.`));let f=_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),name:v(e.name,`name`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:v(e.scope,`scope`,`text`)}),p=await c(`Creating`,async()=>l.send(j,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var pn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function mn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules delete <rule-id>
81
81
 
82
- Delete a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hn={command:`delete <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:mn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(pn,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Deleted`})})};var gn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function _n(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
82
+ Delete a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hn={command:`delete <rule-id>`,describe:`Delete TCP Flow Protection rule.`,builder:mn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(pn,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Deleted`})})};var gn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`};function _n(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules get <rule-id>
83
83
 
84
- 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 vn={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:_n,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(gn,{account_id:l,rule_id:e[`rule-id`]}));o(u,{successLabel:`Loaded`})})};var yn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function bn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules list
84
+ 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 vn={command:`get <rule-id>`,describe:`Get TCP Flow Protection rule.`,builder:_n,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(gn,{account_id:l,rule_id:e[`rule-id`]}));s(u,{successLabel:`Loaded`})})};var yn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,query:[`page`,`per_page`,`order`,`direction`],joined:[`page`,`per_page`,`order`,`direction`]};function bn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules list
85
85
 
86
- List all TCP Flow Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xn={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:bn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(yn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`,body:`json`};function Sn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
86
+ List all TCP Flow Protection rules for an account.`).option(`page`,{type:`number`,description:`The page number for pagination. Defaults to 1.`}).option(`per-page`,{type:`number`,description:`The number of items per page. Must be between 10 and 1000. Defaults to 25.`}).option(`order`,{type:`string`,description:`The field to order by. Defaults to 'prefix'.`}).option(`direction`,{type:`string`,description:`The direction of ordering (ASC or DESC). Defaults to 'ASC'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xn={command:`list`,describe:`List all TCP Flow Protection rules.`,builder:bn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();r({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:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(yn,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${t.rule_id}`,body:`json`};function Sn(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp flow protection rules update <rule-id>
87
87
 
88
- Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for TCP Flow Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const Cn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Sn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(M,{body:t,account_id:u,rule_id:e[`rule-id`]}));o(r,{successLabel:`Updated`});return}let f=m({burst_sensitivity:h(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:h(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:h(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),p=await c(`Updating`,async()=>l.send(M,{body:f,account_id:u,rule_id:e[`rule-id`]}));o(p,{successLabel:`Updated`})})},wn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(un).command(fn).command(hn).command(vn).command(xn).command(Cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function On(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
88
+ Update a TCP Flow Protection rule specified by the given UUID.`).positional(`rule-id`,{type:`string`,description:`The UUID of the TCP Flow Protection rule to update.`,demandOption:!0}).option(`burst-sensitivity`,{type:`string`,description:`The new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`protection-mode`,{type:`string`,description:`The new mode for TCP Flow Protection. Optional. Must be one of 'enabled', 'disabled', 'monitoring'.`}).option(`rate-sensitivity`,{type:`string`,description:`The new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The updates to apply to the TCP Flow Protection rule.`})}const Cn={command:`update <rule-id>`,describe:`Update TCP Flow Protection rule.`,builder:Sn,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp flow protection rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp flow protection rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_flow_protection/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(M,{body:n,account_id:u,rule_id:e[`rule-id`]}));s(r,{successLabel:`Updated`});return}let d=_({burst_sensitivity:v(e[`burst-sensitivity`],`burst-sensitivity`,`text`),mode:v(e[`protection-mode`],`protection-mode`,`text`),rate_sensitivity:v(e[`rate-sensitivity`],`rate-sensitivity`,`text`)}),f=await c(`Updating`,async()=>l.send(M,{body:d,account_id:u,rule_id:e[`rule-id`]}));s(f,{successLabel:`Updated`})})},wn={command:`rules`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection.rules`,builder:e=>e.command(un).command(fn).command(hn).command(vn).command(xn).command(Cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow.protection`,builder:e=>e.command(sn).command(wn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},En={command:`flow`,describe:`Operations for advanced-tcp-protection.configs.tcp.flow`,builder:e=>e.command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`};function On(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status get
89
89
 
90
- Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`get`,describe:`Get protection status.`,builder:On,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Dn,{account_id:l}));o(u,{successLabel:`Loaded`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`,body:`json`};function An(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
90
+ Get the protection status of the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`get`,describe:`Get protection status.`,builder:On,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Dn,{account_id:l}));s(u,{successLabel:`Loaded`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/advanced_tcp_protection/configs/tcp_protection_status`,body:`json`};function An(e){return e.usage(`$0 magic-transit advanced-tcp-protection configs tcp protection status update
91
91
 
92
- 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 jn={command:`update`,describe:`Update protection status.`,builder:An,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(N,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let f=m({enabled:e.enabled}),p=await c(`Updating`,async()=>l.send(N,{body:f,account_id:u}));o(p,{successLabel:`Updated`})})},Mn={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(kn).command(jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pn={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(En).command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fn={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Be).command(st).command(Ut).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},In={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/apps`,body:`json`};function Ln(e){return e.usage(`$0 magic-transit apps create
92
+ 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 jn={command:`update`,describe:`Update protection status.`,builder:An,handler:async e=>l({command:`magic-transit advanced-tcp-protection configs tcp protection status update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit advanced-tcp-protection configs tcp protection status update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/advanced_tcp_protection/configs/tcp_protection_status`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({enabled:e.enabled}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Updating`,async()=>l.send(N,{body:e,account_id:u}));s(n,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let d=_({enabled:e.enabled}),f=await c(`Updating`,async()=>l.send(N,{body:d,account_id:u}));s(f,{successLabel:`Updated`})})},Mn={command:`status`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection.status`,builder:e=>e.command(kn).command(jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nn={command:`protection`,describe:`Operations for advanced-tcp-protection.configs.tcp.protection`,builder:e=>e.command(Mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pn={command:`tcp`,describe:`Operations for advanced-tcp-protection.configs.tcp`,builder:e=>e.command(En).command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fn={command:`configs`,describe:`Operations for advanced-tcp-protection.configs`,builder:e=>e.command(Be).command(st).command(Ut).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},In={command:`advanced-tcp-protection`,describe:`Advanced Tcp Protection operations`,builder:e=>e.command(Fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/apps`,body:`json`};function Ln(e){return e.usage(`$0 magic-transit apps create
93
93
 
94
- 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 Rn={command:`create`,describe:`Create a new App`,builder:Ln,handler:async e=>l({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(P,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Display name for the app.`)),e.type===void 0&&(e.type=await g(`type`,`Category of the app.`));let f=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),p=await c(`Creating`,async()=>l.send(P,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var zn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`};function Bn(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
94
+ 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 Rn={command:`create`,describe:`Create a new App`,builder:Ln,handler:async e=>l({command:`magic-transit apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({hostnames:e.hostnames,name:v(e.name,`name`,`text`),type:v(e.type,`type`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(P,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`Display name for the app.`)),e.type===void 0&&(e.type=await u(`type`,`Category of the app.`));let f=_({hostnames:e.hostnames,name:v(e.name,`name`,`text`),type:v(e.type,`type`,`text`)}),p=await c(`Creating`,async()=>l.send(P,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var zn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`};function Bn(e){return e.usage(`$0 magic-transit apps delete <account-app-id>
95
95
 
96
- 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 Vn={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Bn,handler:async e=>l({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(zn,{account_id:l,account_app_id:e[`account-app-id`]}));o(u,{successLabel:`Deleted`})})};var Hn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/apps`};function Un(e){return e.usage(`$0 magic-transit apps list
96
+ 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 Vn={command:`delete <account-app-id>`,describe:`Delete Account App`,builder:Bn,handler:async e=>l({command:`magic-transit apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(zn,{account_id:l,account_app_id:e[`account-app-id`]}));s(u,{successLabel:`Deleted`})})};var Hn={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/apps`};function Un(e){return e.usage(`$0 magic-transit apps list
97
97
 
98
- Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wn={command:`list`,describe:`List Apps`,builder:Un,handler:async e=>l({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Hn,{account_id:l}));o(u,{successLabel:`Loaded`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`,body:`json`};function Gn(e){return e.usage(`$0 magic-transit apps update <account-app-id>
98
+ Lists Apps associated with an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wn={command:`list`,describe:`List Apps`,builder:Un,handler:async e=>l({command:`magic-transit apps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Hn,{account_id:l}));s(u,{successLabel:`Loaded`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/apps/${t.account_app_id}`,body:`json`};function Gn(e){return e.usage(`$0 magic-transit apps update <account-app-id>
99
99
 
100
- 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 Kn={command:`update <account-app-id>`,describe:`Update an App`,builder:Gn,handler:async e=>l({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(F,{body:t,account_id:u,account_app_id:e[`account-app-id`]}));o(r,{successLabel:`Updated`});return}let f=m({hostnames:e.hostnames,name:h(e.name,`name`,`text`),type:h(e.type,`type`,`text`)}),p=await c(`Updating`,async()=>l.send(F,{body:f,account_id:u,account_app_id:e[`account-app-id`]}));o(p,{successLabel:`Updated`})})},qn={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(Rn).command(Vn).command(Wn).command(Kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`,body:`json`};function Jn(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
100
+ 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 Kn={command:`update <account-app-id>`,describe:`Update an App`,builder:Gn,handler:async e=>l({command:`magic-transit apps update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/apps/${e[`account-app-id`]==null?`<account-app-id>`:encodeURIComponent(String(e[`account-app-id`]))}`,pathParams:{"account-app-id":String(e[`account-app-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({hostnames:e.hostnames,name:v(e.name,`name`,`text`),type:v(e.type,`type`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(F,{body:n,account_id:u,account_app_id:e[`account-app-id`]}));s(r,{successLabel:`Updated`});return}let d=_({hostnames:e.hostnames,name:v(e.name,`name`,`text`),type:v(e.type,`type`,`text`)}),f=await c(`Updating`,async()=>l.send(F,{body:d,account_id:u,account_app_id:e[`account-app-id`]}));s(f,{successLabel:`Updated`})})},qn={command:`apps`,describe:`Application-aware traffic policies for Magic WAN that steer traffic by app type`,builder:e=>e.command(Rn).command(Vn).command(Wn).command(Kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`,body:`json`};function Jn(e){return e.usage(`$0 magic-transit bgp-filter-profiles create
101
101
 
102
- 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=>h(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 Yn={command:`create`,describe:`Create BGP Filter Profile`,builder:Jn,handler:async e=>l({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(I,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e[`match-action`]===void 0&&(e[`match-action`]=await _(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),e.name===void 0&&(e.name=await g(`name`,`Friendly name for the filter profile`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),p=await c(`Creating`,async()=>l.send(I,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var Xn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function Zn(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
102
+ 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=>v(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 Yn={command:`create`,describe:`Create BGP Filter Profile`,builder:Jn,handler:async e=>l({command:`magic-transit bgp-filter-profiles create`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit bgp-filter-profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),match_action:e[`match-action`],name:v(e.name,`name`,`text`),targets:e.targets}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(I,{body:e,account_id:f}));s(n,{successLabel:`Created`});return}if(e[`match-action`]===void 0&&(e[`match-action`]=await d(`match-action`,`Action to take when a route matches one of the targets in this profile`,[`allow`,`deny`])),e.name===void 0&&(e.name=await u(`name`,`Friendly name for the filter profile`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let p=_({description:v(e.description,`description`,`text`),match_action:e[`match-action`],name:v(e.name,`name`,`text`),targets:e.targets}),m=await c(`Creating`,async()=>l.send(I,{body:p,account_id:f}));s(m,{successLabel:`Created`})})};var Xn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function Zn(e){return e.usage(`$0 magic-transit bgp-filter-profiles delete <profile-id>
103
103
 
104
- 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 Qn={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Zn,handler:async e=>l({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Xn,{account_id:l,profile_id:e[`profile-id`]}));o(u,{successLabel:`Deleted`})})};var $n={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function er(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
104
+ 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 Qn={command:`delete <profile-id>`,describe:`Delete BGP Filter Profile`,builder:Zn,handler:async e=>l({command:`magic-transit bgp-filter-profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit bgp-filter-profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Xn,{account_id:l,profile_id:e[`profile-id`]}));s(u,{successLabel:`Deleted`})})};var $n={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`};function er(e){return e.usage(`$0 magic-transit bgp-filter-profiles get <profile-id>
105
105
 
106
- 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 tr={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:er,handler:async e=>l({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($n,{account_id:l,profile_id:e[`profile-id`]}));o(u,{successLabel:`Loaded`})})};var nr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`};function rr(e){return e.usage(`$0 magic-transit bgp-filter-profiles list
106
+ 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 tr={command:`get <profile-id>`,describe:`Get BGP Filter Profile`,builder:er,handler:async e=>l({command:`magic-transit bgp-filter-profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit bgp-filter-profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send($n,{account_id:l,profile_id:e[`profile-id`]}));s(u,{successLabel:`Loaded`})})};var nr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles`};function rr(e){return e.usage(`$0 magic-transit bgp-filter-profiles list
107
107
 
108
- 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 ir={command:`list`,describe:`List BGP Filter Profiles`,builder:rr,handler:async e=>l({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(nr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`,body:`json`};function ar(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
108
+ 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 ir={command:`list`,describe:`List BGP Filter Profiles`,builder:rr,handler:async e=>l({command:`magic-transit bgp-filter-profiles list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(nr,{account_id:l}));s(u,{successLabel:`Loaded`})})};var L={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/filter_profiles/${t.profile_id}`,body:`json`};function ar(e){return e.usage(`$0 magic-transit bgp-filter-profiles update <profile-id>
109
109
 
110
- 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=>h(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 or={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:ar,handler:async e=>l({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(L,{body:t,account_id:u,profile_id:e[`profile-id`]}));o(r,{successLabel:`Updated`});return}let f=m({description:h(e.description,`description`,`text`),match_action:e[`match-action`],name:h(e.name,`name`,`text`),targets:e.targets}),p=await c(`Updating`,async()=>l.send(L,{body:f,account_id:u,profile_id:e[`profile-id`]}));o(p,{successLabel:`Updated`})})},sr={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Yn).command(Qn).command(tr).command(ir).command(or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`};function lr(e){return e.usage(`$0 magic-transit bgp-settings get
110
+ 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=>v(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 or={command:`update <profile-id>`,describe:`Update BGP Filter Profile`,builder:ar,handler:async e=>l({command:`magic-transit bgp-filter-profiles update`,classification:{safeFlags:[`match-action`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit bgp-filter-profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/filter_profiles/${e[`profile-id`]==null?`<profile-id>`:encodeURIComponent(String(e[`profile-id`]))}`,pathParams:{"profile-id":String(e[`profile-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),match_action:e[`match-action`],name:v(e.name,`name`,`text`),targets:e.targets}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(L,{body:n,account_id:u,profile_id:e[`profile-id`]}));s(r,{successLabel:`Updated`});return}let d=_({description:v(e.description,`description`,`text`),match_action:e[`match-action`],name:v(e.name,`name`,`text`),targets:e.targets}),f=await c(`Updating`,async()=>l.send(L,{body:d,account_id:u,profile_id:e[`profile-id`]}));s(f,{successLabel:`Updated`})})},sr={command:`bgp-filter-profiles`,describe:`BGP filter profiles for controlling which routes are allowed or denied on Magic Transit tunnels`,builder:e=>e.command(Yn).command(Qn).command(tr).command(ir).command(or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var cr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`};function lr(e){return e.usage(`$0 magic-transit bgp-settings get
111
111
 
112
- 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 ur={command:`get`,describe:`Get BGP Settings`,builder:lr,handler:async e=>l({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(cr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var R={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`,body:`json`};function dr(e){return e.usage(`$0 magic-transit bgp-settings update
112
+ 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 ur={command:`get`,describe:`Get BGP Settings`,builder:lr,handler:async e=>l({command:`magic-transit bgp-settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(cr,{account_id:l}));s(u,{successLabel:`Loaded`})})};var R={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/bgp/settings`,body:`json`};function dr(e){return e.usage(`$0 magic-transit bgp-settings update
113
113
 
114
- 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 fr={command:`update`,describe:`Update BGP Settings`,builder:dr,handler:async e=>l({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(R,{body:e,account_id:u}));o(t,{successLabel:`Updated`});return}let f=m({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}),p=await c(`Updating`,async()=>l.send(R,{body:f,account_id:u}));o(p,{successLabel:`Updated`})})},pr={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(ur).command(fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mr(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
114
+ 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 fr={command:`update`,describe:`Update BGP Settings`,builder:dr,handler:async e=>l({command:`magic-transit bgp-settings update`,classification:{safeFlags:[`redistribute-static:wan`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit bgp-settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/bgp/settings`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Updating`,async()=>l.send(R,{body:e,account_id:u}));s(n,{successLabel:`Updated`});return}let d=_({cloudflare_asn:e[`cloudflare-asn`],redistribute:{"static:wan":e[`redistribute-static:wan`]}}),f=await c(`Updating`,async()=>l.send(R,{body:d,account_id:u}));s(f,{successLabel:`Updated`})})},pr={command:`bgp-settings`,describe:`BGP settings for controlling default ASN and route redistribution on Magic Transit tunnels`,builder:e=>e.command(ur).command(fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mr(e){return e.usage(`$0 magic-transit cf-interconnects bulk-update
115
115
 
116
- 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 hr={command:`bulk-update`,describe:`Update multiple interconnects`,builder:mr,handler:async e=>l({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let e=u,t=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/cf_interconnects`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Updated`});return}let m=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));o(m,{successLabel:`Updated`})})};function gr(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
116
+ 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 hr={command:`bulk-update`,describe:`Update multiple interconnects`,builder:mr,handler:async e=>l({command:`magic-transit cf-interconnects bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit cf-interconnects bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}let u=e.body===void 0?void 0:g(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let e=u,n=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));s(p,{successLabel:`Updated`})})};function gr(e){return e.usage(`$0 magic-transit cf-interconnects get <cf-interconnect-id>
117
117
 
118
- 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 _r={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:gr,handler:async e=>l({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function vr(e){return e.usage(`$0 magic-transit cf-interconnects list
118
+ 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 _r={command:`get <cf-interconnect-id>`,describe:`List interconnect Details`,builder:gr,handler:async e=>l({command:`magic-transit cf-interconnects get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit cf-interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};function vr(e){return e.usage(`$0 magic-transit cf-interconnects list
119
119
 
120
- 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 yr={command:`list`,describe:`List interconnects`,builder:vr,handler:async e=>l({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();s({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 r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function br(e){return e.usage(`$0 magic-transit cf-interconnects update <cf-interconnect-id>
120
+ 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 yr={command:`list`,describe:`List interconnects`,builder:vr,handler:async e=>l({command:`magic-transit cf-interconnects list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();r({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(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/cf_interconnects`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};function br(e){return e.usage(`$0 magic-transit cf-interconnects update <cf-interconnect-id>
121
121
 
122
122
  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:"IPv4 prefixes in this list will be advertised to the customer device, in addition to the routes in the Magic\nrouting table. Each entry must be a network address in CIDR notation with no host bits set (for example\n`192.0.2.0/24`, not `192.0.2.1/24`) and must not repeat another entry.\n"}).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.
123
123
 
@@ -134,32 +134,32 @@ character:
134
134
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
135
135
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
136
136
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
137
- 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=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the 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=>h(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,
137
+ 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=>v(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=>v(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=>v(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,
138
138
  use a /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix
139
139
  may be used. Version 1.5 interconnects require a /31 prefix and may
140
140
  also use a prefix from the account's authorized prefixes; otherwise,
141
141
  select the subnet from RFC 1918 or the approved link-local ranges.
142
- `}).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 xr={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:br,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{as_no:e[`bgp-as-no`],cloudflare_endpoint:h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:e[`bgp-customer-asn`],customer_endpoint:h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:h(e.description,`description`,`text`),gre:{cloudflare_endpoint:h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`],source:h(e[`health-check-source`],`health-check-source`,`text`)},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`)}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${g}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}let _={};e[`automatic-return-routing`]!==void 0&&p(_,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-as-no`]!==void 0&&p(_,[`bgp`,`as_no`],e[`bgp-as-no`]),e[`bgp-cloudflare-endpoint`]!==void 0&&p(_,[`bgp`,`cloudflare_endpoint`],h(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),e[`bgp-customer-asn`]!==void 0&&p(_,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-customer-endpoint`]!==void 0&&p(_,[`bgp`,`customer_endpoint`],h(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),e[`bgp-export-filter-id`]!==void 0&&p(_,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(_,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(_,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(_,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e.description!==void 0&&p(_,[`description`],h(e.description,`description`,`text`)),e[`gre-cloudflare-endpoint`]!==void 0&&p(_,[`gre`,`cloudflare_endpoint`],h(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),e[`health-check-enabled`]!==void 0&&p(_,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(_,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(_,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(_,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(_,[`health_check`,`direction`],e[`health-check-direction`]),e[`health-check-source`]!==void 0&&p(_,[`health_check`,`source`],h(e[`health-check-source`],`health-check-source`,`text`)),e[`interface-address`]!==void 0&&p(_,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(_,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(_,[`mtu`],e.mtu),e.name!==void 0&&p(_,[`name`],h(e.name,`name`,`text`));let v=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${g}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Updated`})})},Sr={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(hr).command(_r).command(yr).command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Cr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`,body:`json`};function wr(e){return e.usage(`$0 magic-transit cf1-sites create
142
+ `}).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 xr={command:`update <cf-interconnect-id>`,describe:`Update interconnect`,builder:br,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit cf-interconnects update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf_interconnects/${e[`cf-interconnect-id`]==null?`<cf-interconnect-id>`:encodeURIComponent(String(e[`cf-interconnect-id`]))}`,pathParams:{"cf-interconnect-id":String(e[`cf-interconnect-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({automatic_return_routing:e[`automatic-return-routing`],bgp:{as_no:e[`bgp-as-no`],cloudflare_endpoint:v(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`),customer_asn:e[`bgp-customer-asn`],customer_endpoint:v(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`),export_filter_id:v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},description:v(e.description,`description`,`text`),gre:{cloudflare_endpoint:v(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)},health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`],source:v(e[`health-check-source`],`health-check-source`,`text`)},interface_address:v(e[`interface-address`],`interface-address`,`text`),interface_address6:v(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:v(e.name,`name`,`text`)}):g(e.body)});return}let u=e.body===void 0?void 0:g(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let n=u,r=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:n,headers:Object.keys(l).length>0?l:void 0}));s(r,{successLabel:`Updated`});return}let m={};e[`automatic-return-routing`]!==void 0&&p(m,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-as-no`]!==void 0&&p(m,[`bgp`,`as_no`],e[`bgp-as-no`]),e[`bgp-cloudflare-endpoint`]!==void 0&&p(m,[`bgp`,`cloudflare_endpoint`],v(e[`bgp-cloudflare-endpoint`],`bgp-cloudflare-endpoint`,`text`)),e[`bgp-customer-asn`]!==void 0&&p(m,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-customer-endpoint`]!==void 0&&p(m,[`bgp`,`customer_endpoint`],v(e[`bgp-customer-endpoint`],`bgp-customer-endpoint`,`text`)),e[`bgp-export-filter-id`]!==void 0&&p(m,[`bgp`,`export_filter_id`],v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(m,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(m,[`bgp`,`import_filter_id`],v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(m,[`bgp`,`md5_key`],v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e.description!==void 0&&p(m,[`description`],v(e.description,`description`,`text`)),e[`gre-cloudflare-endpoint`]!==void 0&&p(m,[`gre`,`cloudflare_endpoint`],v(e[`gre-cloudflare-endpoint`],`gre-cloudflare-endpoint`,`text`)),e[`health-check-enabled`]!==void 0&&p(m,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(m,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(m,[`health_check`,`target`,`saved`],v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(m,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(m,[`health_check`,`direction`],e[`health-check-direction`]),e[`health-check-source`]!==void 0&&p(m,[`health_check`,`source`],v(e[`health-check-source`],`health-check-source`,`text`)),e[`interface-address`]!==void 0&&p(m,[`interface_address`],v(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(m,[`interface_address6`],v(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(m,[`mtu`],e.mtu),e.name!==void 0&&p(m,[`name`],v(e.name,`name`,`text`));let h=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/cf_interconnects/${encodeURIComponent(String(e[`cf-interconnect-id`]))}`,{body:m,headers:Object.keys(l).length>0?l:void 0}));s(h,{successLabel:`Updated`})})},Sr={command:`cf-interconnects`,describe:`Cloudflare Network Interconnect (CNI) links for direct physical or virtual peering`,builder:e=>e.command(hr).command(_r).command(yr).command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Cr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`,body:`json`};function wr(e){return e.usage(`$0 magic-transit cf1-sites create
143
143
 
144
- 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 Tr={command:`create`,describe:`Create CF1 Sites`,builder:wr,handler:async e=>l({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(Cr,{body:e,account_id:u}));o(t,{successLabel:`Created`})}})};var Er={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Dr(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
144
+ 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 Tr={command:`create`,describe:`Create CF1 Sites`,builder:wr,handler:async e=>l({command:`magic-transit cf1-sites create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(Cr,{body:e,account_id:u}));s(n,{successLabel:`Created`})}})};var Er={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Dr(e){return e.usage(`$0 magic-transit cf1-sites delete <cf1-site-id>
145
145
 
146
- 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 Or={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:Dr,handler:async e=>l({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Er,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(u,{successLabel:`Deleted`})})};var kr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Ar(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
146
+ 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 Or={command:`delete <cf1-site-id>`,describe:`Delete CF1 Site`,builder:Dr,handler:async e=>l({command:`magic-transit cf1-sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Er,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));s(u,{successLabel:`Deleted`})})};var kr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`};function Ar(e){return e.usage(`$0 magic-transit cf1-sites get <cf1-site-id>
147
147
 
148
- 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 jr={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:Ar,handler:async e=>l({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(kr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(u,{successLabel:`Loaded`})})};var Mr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`};function Nr(e){return e.usage(`$0 magic-transit cf1-sites list
148
+ 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 jr={command:`get <cf1-site-id>`,describe:`Get CF1 Site`,builder:Ar,handler:async e=>l({command:`magic-transit cf1-sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(kr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));s(u,{successLabel:`Loaded`})})};var Mr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites`};function Nr(e){return e.usage(`$0 magic-transit cf1-sites list
149
149
 
150
- 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 Pr={command:`list`,describe:`List CF1 Sites`,builder:Nr,handler:async e=>l({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Mr,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Fr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps`,body:`json`};function Ir(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
150
+ 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 Pr={command:`list`,describe:`List CF1 Sites`,builder:Nr,handler:async e=>l({command:`magic-transit cf1-sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Mr,{account_id:l}));s(u,{successLabel:`Loaded`})})};var Fr={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps`,body:`json`};function Ir(e){return e.usage(`$0 magic-transit cf1-sites ramps create <cf1-site-id>
151
151
 
152
- 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 Lr={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:Ir,handler:async e=>l({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(Fr,{body:t,account_id:u,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Created`})}})};var Rr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function zr(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
152
+ 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 Lr={command:`create <cf1-site-id>`,describe:`Create CF1 Site Ramps`,builder:Ir,handler:async e=>l({command:`magic-transit cf1-sites ramps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(Fr,{body:n,account_id:u,cf1_site_id:e[`cf1-site-id`]}));s(r,{successLabel:`Created`})}})};var Rr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function zr(e){return e.usage(`$0 magic-transit cf1-sites ramps delete <ramp-id>
153
153
 
154
- 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 Br={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:zr,handler:async e=>l({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps/${e[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(e[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``),"ramp-id":String(e[`ramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Rr,{account_id:l,cf1_site_id:e[`cf1-site-id`],ramp_id:e[`ramp-id`]}));o(u,{successLabel:`Deleted`})})};var Vr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function Hr(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
154
+ 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 Br={command:`delete <ramp-id>`,describe:`Delete CF1 Site Ramp`,builder:zr,handler:async e=>l({command:`magic-transit cf1-sites ramps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps/${e[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(e[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``),"ramp-id":String(e[`ramp-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Rr,{account_id:l,cf1_site_id:e[`cf1-site-id`],ramp_id:e[`ramp-id`]}));s(u,{successLabel:`Deleted`})})};var Vr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps/${t.ramp_id}`};function Hr(e){return e.usage(`$0 magic-transit cf1-sites ramps get <ramp-id>
155
155
 
156
- 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 Ur={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:Hr,handler:async e=>l({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps/${e[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(e[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``),"ramp-id":String(e[`ramp-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Vr,{account_id:l,cf1_site_id:e[`cf1-site-id`],ramp_id:e[`ramp-id`]}));o(u,{successLabel:`Loaded`})})};var Wr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps`};function Gr(e){return e.usage(`$0 magic-transit cf1-sites ramps list
156
+ 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 Ur={command:`get <ramp-id>`,describe:`Get CF1 Site Ramp`,builder:Hr,handler:async e=>l({command:`magic-transit cf1-sites ramps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps/${e[`ramp-id`]==null?`<ramp-id>`:encodeURIComponent(String(e[`ramp-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``),"ramp-id":String(e[`ramp-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Vr,{account_id:l,cf1_site_id:e[`cf1-site-id`],ramp_id:e[`ramp-id`]}));s(u,{successLabel:`Loaded`})})};var Wr={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}/ramps`};function Gr(e){return e.usage(`$0 magic-transit cf1-sites ramps list
157
157
 
158
- 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 Kr={command:`list`,describe:`List CF1 Site Ramps`,builder:Gr,handler:async e=>l({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Wr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));o(u,{successLabel:`Loaded`})})},qr={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(Lr).command(Br).command(Ur).command(Kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`,body:`json`};function Jr(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
158
+ 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 Kr={command:`list`,describe:`List CF1 Site Ramps`,builder:Gr,handler:async e=>l({command:`magic-transit cf1-sites ramps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}/ramps`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Wr,{account_id:l,cf1_site_id:e[`cf1-site-id`]}));s(u,{successLabel:`Loaded`})})},qr={command:`ramps`,describe:`Operations for cf1-sites.ramps`,builder:e=>e.command(Lr).command(Br).command(Ur).command(Kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/cf1_sites/${t.cf1_site_id}`,body:`json`};function Jr(e){return e.usage(`$0 magic-transit cf1-sites update <cf1-site-id>
159
159
 
160
- 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 Yr={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Jr,handler:async e=>l({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(z,{body:t,account_id:u,cf1_site_id:e[`cf1-site-id`]}));o(r,{successLabel:`Updated`});return}let f=m({description:h(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:h(e[`location-name`],`location-name`,`text`)},name:h(e.name,`name`,`text`)}),p=await c(`Updating`,async()=>l.send(z,{body:f,account_id:u,cf1_site_id:e[`cf1-site-id`]}));o(p,{successLabel:`Updated`})})},Xr={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(Tr).command(Or).command(jr).command(Pr).command(Yr).command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zr(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
160
+ 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 Yr={command:`update <cf1-site-id>`,describe:`Update CF1 Site`,builder:Jr,handler:async e=>l({command:`magic-transit cf1-sites update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit cf1-sites update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/cf1_sites/${e[`cf1-site-id`]==null?`<cf1-site-id>`:encodeURIComponent(String(e[`cf1-site-id`]))}`,pathParams:{"cf1-site-id":String(e[`cf1-site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:v(e[`location-name`],`location-name`,`text`)},name:v(e.name,`name`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(z,{body:n,account_id:u,cf1_site_id:e[`cf1-site-id`]}));s(r,{successLabel:`Updated`});return}let d=_({description:v(e.description,`description`,`text`),location:{lat:e[`location-lat`],long:e[`location-long`],name:v(e[`location-name`],`location-name`,`text`)},name:v(e.name,`name`,`text`)}),f=await c(`Updating`,async()=>l.send(z,{body:d,account_id:u,cf1_site_id:e[`cf1-site-id`]}));s(f,{successLabel:`Updated`})})},Xr={command:`cf1-sites`,describe:`Operations for cf1-sites`,builder:e=>e.command(Tr).command(Or).command(jr).command(Pr).command(Yr).command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zr(e){return e.usage(`$0 magic-transit gre-tunnels bulk-update
161
161
 
162
- 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 Qr={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Zr,handler:async e=>l({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let e=u,t=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/gre_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Updated`});return}let m=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(m,{successLabel:`Updated`})})};function $r(e){return e.usage(`$0 magic-transit gre-tunnels create
162
+ 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 Qr={command:`bulk-update`,describe:`Update multiple GRE tunnels`,builder:Zr,handler:async e=>l({command:`magic-transit gre-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit gre-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}let u=e.body===void 0?void 0:g(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let e=u,n=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));s(p,{successLabel:`Updated`})})};function $r(e){return e.usage(`$0 magic-transit gre-tunnels create
163
163
 
164
164
  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.\nEach entry must be a network address in CIDR notation with no host bits set (for example `192.0.2.0/24`, not\n`192.0.2.1/24`) and must not repeat another entry. IPv6 prefixes are accepted only when the tunnel has an\n`interface_address6`.\n"}).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.
165
165
 
@@ -176,17 +176,17 @@ character:
176
176
  In other words, MD5 keys may contain any printable ASCII character aside from newline (0x0A),
177
177
  quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09), form feed
178
178
  (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one or more of
179
- these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const ei={command:`create`,describe:`Create a GRE tunnel`,builder:$r,handler:async e=>l({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let e=u,t=await c(`Creating`,async()=>n(f,`POST`,`/accounts/${_}/magic/gre_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let v={};e[`automatic-return-routing`]!==void 0&&p(v,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(v,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(v,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(v,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(v,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(v,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&p(v,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(v,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(v,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(v,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(v,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(v,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(v,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(v,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(v,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(v,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(v,[`mtu`],e.mtu),e.name!==void 0&&p(v,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(v,[`ttl`],e.ttl);let y=await c(`Creating`,async()=>n(f,`POST`,`/accounts/${_}/magic/gre_tunnels`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};function ti(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
179
+ these disallowed characters will be rejected.`}).option(`cloudflare-gre-endpoint`,{type:`string`,description:`The IP address assigned to the Cloudflare side of the GRE tunnel.`}).option(`customer-gre-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the GRE tunnel.`}).option(`description`,{type:`string`,description:`An optional description of the GRE tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>v(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=>v(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=>v(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`,default:1476}).option(`name`,{type:`string`,description:`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`}).option(`ttl`,{type:`number`,description:`Time To Live (TTL) in number of hops of the GRE tunnel.`,default:64}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const ei={command:`create`,describe:`Create a GRE tunnel`,builder:$r,handler:async e=>l({command:`magic-transit gre-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit gre-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_gre_endpoint:v(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:v(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:v(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:v(e[`interface-address`],`interface-address`,`text`),interface_address6:v(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:v(e.name,`name`,`text`),ttl:e.ttl}):g(e.body)});return}let d=e.body===void 0?void 0:g(e.body),f=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let e=d,n=await c(`Creating`,async()=>t(f,`POST`,`/accounts/${m}/magic/gre_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await u(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await u(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await u(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await u(`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 h={};e[`automatic-return-routing`]!==void 0&&p(h,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(h,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(h,[`bgp`,`export_filter_id`],v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(h,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(h,[`bgp`,`import_filter_id`],v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(h,[`bgp`,`md5_key`],v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-gre-endpoint`]!==void 0&&p(h,[`cloudflare_gre_endpoint`],v(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(h,[`customer_gre_endpoint`],v(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(h,[`description`],v(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(h,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(h,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(h,[`health_check`,`target`,`saved`],v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(h,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(h,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(h,[`interface_address`],v(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(h,[`interface_address6`],v(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(h,[`mtu`],e.mtu),e.name!==void 0&&p(h,[`name`],v(e.name,`name`,`text`)),e.ttl!==void 0&&p(h,[`ttl`],e.ttl);let y=await c(`Creating`,async()=>t(f,`POST`,`/accounts/${m}/magic/gre_tunnels`,{body:h,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};function ti(e){return e.usage(`$0 magic-transit gre-tunnels delete <gre-tunnel-id>
180
180
 
181
- Disables and removes a specific static GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ni={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:ti,handler:async e=>l({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function ri(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
181
+ Disables and removes a specific static GRE tunnel. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`gre-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ni={command:`delete <gre-tunnel-id>`,describe:`Delete GRE Tunnel`,builder:ti,handler:async e=>l({command:`magic-transit gre-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit gre-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();if(e.accountId=d,!await f({force:!!e.force}))return;let p=await c(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(p,{successLabel:`Deleted`})})};function ri(e){return e.usage(`$0 magic-transit gre-tunnels get <gre-tunnel-id>
182
182
 
183
- 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 ii={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:ri,handler:async e=>l({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function ai(e){return e.usage(`$0 magic-transit gre-tunnels list
183
+ 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 ii={command:`get <gre-tunnel-id>`,describe:`List GRE Tunnel Details`,builder:ri,handler:async e=>l({command:`magic-transit gre-tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit gre-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};function ai(e){return e.usage(`$0 magic-transit gre-tunnels list
184
184
 
185
- 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 oi={command:`list`,describe:`List GRE tunnels`,builder:ai,handler:async e=>l({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();s({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 r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function si(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
185
+ 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 oi={command:`list`,describe:`List GRE tunnels`,builder:ai,handler:async e=>l({command:`magic-transit gre-tunnels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();r({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(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/gre_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};function si(e){return e.usage(`$0 magic-transit gre-tunnels update <gre-tunnel-id>
186
186
 
187
- 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=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`mtu`,{type:`number`,description:`Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.`}).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 ci={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:si,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],cloudflare_gre_endpoint:h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:h(e.name,`name`,`text`),ttl:e.ttl}):d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${_}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await g(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await g(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel.`));let v={};e[`automatic-return-routing`]!==void 0&&p(v,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`cloudflare-gre-endpoint`]!==void 0&&p(v,[`cloudflare_gre_endpoint`],h(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(v,[`customer_gre_endpoint`],h(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(v,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(v,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(v,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(v,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(v,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(v,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(v,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(v,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(v,[`mtu`],e.mtu),e.name!==void 0&&p(v,[`name`],h(e.name,`name`,`text`)),e.ttl!==void 0&&p(v,[`ttl`],e.ttl);let y=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${_}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},li={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command(Qr).command(ei).command(ni).command(ii).command(oi).command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
187
+ 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=>v(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=>v(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=>v(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 ci={command:`update <gre-tunnel-id>`,describe:`Update GRE Tunnel`,builder:si,handler:async e=>l({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`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit gre-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/gre_tunnels/${e[`gre-tunnel-id`]==null?`<gre-tunnel-id>`:encodeURIComponent(String(e[`gre-tunnel-id`]))}`,pathParams:{"gre-tunnel-id":String(e[`gre-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({automatic_return_routing:e[`automatic-return-routing`],cloudflare_gre_endpoint:v(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`),customer_gre_endpoint:v(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`),description:v(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:v(e[`interface-address`],`interface-address`,`text`),interface_address6:v(e[`interface-address6`],`interface-address6`,`text`),mtu:e.mtu,name:v(e.name,`name`,`text`),ttl:e.ttl}):g(e.body)});return}let d=e.body===void 0?void 0:g(e.body),f=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let n=d,r=await c(`Updating`,async()=>t(f,`PUT`,`/accounts/${m}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:n,headers:Object.keys(l).length>0?l:void 0}));s(r,{successLabel:`Updated`});return}e[`cloudflare-gre-endpoint`]===void 0&&(e[`cloudflare-gre-endpoint`]=await u(`cloudflare-gre-endpoint`,`The IP address assigned to the Cloudflare side of the GRE tunnel.`)),e[`customer-gre-endpoint`]===void 0&&(e[`customer-gre-endpoint`]=await u(`customer-gre-endpoint`,`The IP address assigned to the customer side of the GRE tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await u(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await u(`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 h={};e[`automatic-return-routing`]!==void 0&&p(h,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`cloudflare-gre-endpoint`]!==void 0&&p(h,[`cloudflare_gre_endpoint`],v(e[`cloudflare-gre-endpoint`],`cloudflare-gre-endpoint`,`text`)),e[`customer-gre-endpoint`]!==void 0&&p(h,[`customer_gre_endpoint`],v(e[`customer-gre-endpoint`],`customer-gre-endpoint`,`text`)),e.description!==void 0&&p(h,[`description`],v(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(h,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(h,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(h,[`health_check`,`target`,`saved`],v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(h,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(h,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(h,[`interface_address`],v(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(h,[`interface_address6`],v(e[`interface-address6`],`interface-address6`,`text`)),e.mtu!==void 0&&p(h,[`mtu`],e.mtu),e.name!==void 0&&p(h,[`name`],v(e.name,`name`,`text`)),e.ttl!==void 0&&p(h,[`ttl`],e.ttl);let y=await c(`Updating`,async()=>t(f,`PUT`,`/accounts/${m}/magic/gre_tunnels/${encodeURIComponent(String(e[`gre-tunnel-id`]))}`,{body:h,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Updated`})})},li={command:`gre-tunnels`,describe:`GRE tunnel endpoints that connect your network to Cloudflare for Magic Transit`,builder:e=>e.command(Qr).command(ei).command(ni).command(ii).command(oi).command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(e){return e.usage(`$0 magic-transit ipsec-tunnels bulk-update
188
188
 
189
- 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 di={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:ui,handler:async e=>l({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let e=u,t=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Updated`});return}let m=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${p}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(m,{successLabel:`Updated`})})};function fi(e){return e.usage(`$0 magic-transit ipsec-tunnels create
189
+ 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 di={command:`bulk-update`,describe:`Update multiple IPsec tunnels`,builder:ui,handler:async e=>l({command:`magic-transit ipsec-tunnels bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}let u=e.body===void 0?void 0:g(e.body),d=await n(e),f=e.local?o:await a();if(e.accountId=f,e.body!==void 0){let e=u,n=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Updated`});return}let p=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${f}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));s(p,{successLabel:`Updated`})})};function fi(e){return e.usage(`$0 magic-transit ipsec-tunnels create
190
190
 
191
191
  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.\nEach entry must be a network address in CIDR notation with no host bits set (for example `192.0.2.0/24`, not\n`192.0.2.1/24`) and must not repeat another entry. IPv6 prefixes are accepted only when the tunnel has an\n`interface_address6`.\n"}).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.
192
192
 
@@ -210,17 +210,17 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
210
210
 
211
211
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
212
212
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
213
- cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const pi={command:`create`,describe:`Create an IPsec tunnel`,builder:fi,handler:async e=>l({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let e=u,t=await c(`Creating`,async()=>n(f,`POST`,`/accounts/${_}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(t,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let v={};e[`automatic-return-routing`]!==void 0&&p(v,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(v,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(v,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(v,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(v,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(v,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(v,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(v,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(v,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(v,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(v,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(v,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(v,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(v,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(v,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(v,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(v,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(v,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(v,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(v,[`replay_protection`],e[`replay-protection`]);let y=await c(`Creating`,async()=>n(f,`POST`,`/accounts/${_}/magic/ipsec_tunnels`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Created`})})};function mi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
213
+ cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>v(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=>v(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=>v(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction.",default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const pi={command:`create`,describe:`Create an IPsec tunnel`,builder:fi,handler:async e=>l({command:`magic-transit ipsec-tunnels create`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:v(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:v(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:v(e[`customer-endpoint`],`customer-endpoint`,`text`),description:v(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:v(e[`interface-address`],`interface-address`,`text`),interface_address6:v(e[`interface-address6`],`interface-address6`,`text`),name:v(e.name,`name`,`text`),psk:v(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):g(e.body),sensitiveBodyPaths:[[`psk`]]});return}let d=e.body===void 0?void 0:g(e.body),f=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let e=d,n=await c(`Creating`,async()=>t(f,`POST`,`/accounts/${m}/magic/ipsec_tunnels`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await u(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await u(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let h={};e[`automatic-return-routing`]!==void 0&&p(h,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(h,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(h,[`bgp`,`export_filter_id`],v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(h,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(h,[`bgp`,`import_filter_id`],v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(h,[`bgp`,`md5_key`],v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(h,[`cloudflare_endpoint`],v(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(h,[`custom_remote_identities`,`fqdn_id`],v(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(h,[`customer_endpoint`],v(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(h,[`description`],v(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(h,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(h,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(h,[`health_check`,`target`,`saved`],v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(h,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(h,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(h,[`interface_address`],v(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(h,[`interface_address6`],v(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(h,[`name`],v(e.name,`name`,`text`)),e.psk!==void 0&&p(h,[`psk`],v(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(h,[`replay_protection`],e[`replay-protection`]);let y=await c(`Creating`,async()=>t(f,`POST`,`/accounts/${m}/magic/ipsec_tunnels`,{body:h,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};function mi(e){return e.usage(`$0 magic-transit ipsec-tunnels delete <ipsec-tunnel-id>
214
214
 
215
- Disables and removes a specific static IPsec Tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hi={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:mi,handler:async e=>l({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await v({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};function gi(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
215
+ Disables and removes a specific static IPsec Tunnel associated with an account. Use \`?validate_only=true\` as an optional query parameter to only run validation without persisting changes.`).positional(`ipsec-tunnel-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hi={command:`delete <ipsec-tunnel-id>`,describe:`Delete IPsec Tunnel`,builder:mi,handler:async e=>l({command:`magic-transit ipsec-tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();if(e.accountId=d,!await f({force:!!e.force}))return;let p=await c(`Deleting`,async()=>t(u,`DELETE`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(p,{successLabel:`Deleted`})})};function gi(e){return e.usage(`$0 magic-transit ipsec-tunnels get <ipsec-tunnel-id>
216
216
 
217
- 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 _i={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:gi,handler:async e=>l({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};function vi(e){return e.usage(`$0 magic-transit ipsec-tunnels list
217
+ 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 _i={command:`get <ipsec-tunnel-id>`,describe:`List IPsec tunnel details`,builder:gi,handler:async e=>l({command:`magic-transit ipsec-tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};function vi(e){return e.usage(`$0 magic-transit ipsec-tunnels list
218
218
 
219
- 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 yi={command:`list`,describe:`List IPsec tunnels`,builder:vi,handler:async e=>l({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();s({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 r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};var bi={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/ipsec_tunnels/${t.ipsec_tunnel_id}/psk_generate`};function xi(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-generate <ipsec-tunnel-id>
219
+ 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 yi={command:`list`,describe:`List IPsec tunnels`,builder:vi,handler:async e=>l({command:`magic-transit ipsec-tunnels list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let e=await i();r({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(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/ipsec_tunnels`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};var bi={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/ipsec_tunnels/${t.ipsec_tunnel_id}/psk_generate`};function xi(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-generate <ipsec-tunnel-id>
220
220
 
221
- 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 Si={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:xi,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(bi,{account_id:l,ipsec_tunnel_id:e[`ipsec-tunnel-id`]}));o(u,{successLabel:`Created`})})};var Ci={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/ipsec_tunnels/psk`,query:[`validate_only`],body:`json`};function wi(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
221
+ 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 Si={command:`psk-generate <ipsec-tunnel-id>`,describe:`Generate Pre-Shared Key (PSK) for IPsec tunnels`,builder:xi,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels psk-generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}/psk_generate`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(bi,{account_id:l,ipsec_tunnel_id:e[`ipsec-tunnel-id`]}));s(u,{successLabel:`Created`})})};var Ci={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/ipsec_tunnels/psk`,query:[`validate_only`],body:`json`};function wi(e){return e.usage(`$0 magic-transit ipsec-tunnels psk-set
222
222
 
223
- 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 Ti={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:wi,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},e,async()=>{let n={validate_only:e[`validate-only`]};if(e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?m({psks:u(e.psks,`psks`)}):d(e.body)});return}let l=e.body===void 0?void 0:d(e.body),f=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let e=l;new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await c(`Creating`,async()=>f.send(Ci,{body:e,account_id:p,...n}));o(t,{successLabel:`Created`});return}if(e.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let h=m({psks:u(e.psks,`psks`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await c(`Creating`,async()=>f.send(Ci,{body:h,account_id:p,...n}));o(g,{successLabel:`Created`})})};function Ei(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
223
+ 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. Shape: [{"psk": string}].`}).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 Ti={command:`psk-set`,describe:`Set Pre-Shared Keys (PSK) for IPsec tunnels`,builder:wi,handler:async e=>l({command:`magic-transit ipsec-tunnels psk-set`,classification:{safeFlags:[`validate-only`,`dry-run`]}},e,async()=>{let t={validate_only:e[`validate-only`]};if(e.dryRun){let n=await i();r({command:`cf magic-transit ipsec-tunnels psk-set`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/magic/ipsec_tunnels/psk`,pathParams:{},query:t,bodyKind:`json`,body:e.body===void 0?_({psks:h(e.psks,`psks`)}):g(e.body)});return}let l=e.body===void 0?void 0:g(e.body),u=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=l;new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await c(`Creating`,async()=>u.send(Ci,{body:e,account_id:d,...t}));s(n,{successLabel:`Created`});return}if(e.psks===void 0)throw Error(`--psks is required (or pass --body with this field set).`);let f=_({psks:h(e.psks,`psks`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>u.send(Ci,{body:f,account_id:d,...t}));s(p,{successLabel:`Created`})})};function Ei(e){return e.usage(`$0 magic-transit ipsec-tunnels update <ipsec-tunnel-id>
224
224
 
225
225
  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.\nEach entry must be a network address in CIDR notation with no host bits set (for example `192.0.2.0/24`, not\n`192.0.2.1/24`) and must not repeat another entry. IPv6 prefixes are accepted only when the tunnel has an\n`interface_address6`.\n"}).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.
226
226
 
@@ -244,112 +244,112 @@ Must be of the form \`<custom label>.<account ID>.custom.ipsec.cloudflare.com\`.
244
244
 
245
245
  This custom ID does not need to be unique. Two IPsec tunnels may have the same custom
246
246
  fqdn_id. However, if another IPsec tunnel has the same value then the two tunnels
247
- cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`health-check-target-saved`,{type:`string`,description:`The saved health check target. Setting the value to the empty string indicates that the calculated default value will be used.`}).option(`health-check-type`,{type:`string`,description:"The type of healthcheck to run, reply or request. The default value is `reply`.",choices:[`reply`,`request`]}).coerce(`health-check-type`,e=>h(e,`health-check-type`,`text`)).option(`health-check-direction`,{type:`string`,description:`The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.`,choices:[`unidirectional`,`bidirectional`]}).coerce(`health-check-direction`,e=>h(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const Di={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Ei,handler:async e=>l({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:h(e[`customer-endpoint`],`customer-endpoint`,`text`),description:h(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:h(e[`interface-address`],`interface-address`,`text`),interface_address6:h(e[`interface-address6`],`interface-address6`,`text`),name:h(e.name,`name`,`text`),psk:h(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):d(e.body),sensitiveBodyPaths:[[`psk`]]});return}let u=e.body===void 0?void 0:d(e.body),f=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body!==void 0){let t=u,r=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${_}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await g(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await g(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let v={};e[`automatic-return-routing`]!==void 0&&p(v,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(v,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(v,[`bgp`,`export_filter_id`],h(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(v,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(v,[`bgp`,`import_filter_id`],h(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(v,[`bgp`,`md5_key`],h(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(v,[`cloudflare_endpoint`],h(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(v,[`custom_remote_identities`,`fqdn_id`],h(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(v,[`customer_endpoint`],h(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(v,[`description`],h(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(v,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(v,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(v,[`health_check`,`target`,`saved`],h(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(v,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(v,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(v,[`interface_address`],h(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(v,[`interface_address6`],h(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(v,[`name`],h(e.name,`name`,`text`)),e.psk!==void 0&&p(v,[`psk`],h(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(v,[`replay_protection`],e[`replay-protection`]);let y=await c(`Updating`,async()=>n(f,`PUT`,`/accounts/${_}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},Oi={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(di).command(pi).command(hi).command(_i).command(yi).command(Si).command(Ti).command(Di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ki={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function Ai(e){return e.usage(`$0 magic-transit pcaps create
247
+ cannot have the same cloudflare_endpoint.`}).option(`customer-endpoint`,{type:`string`,description:`The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work.`}).option(`description`,{type:`string`,description:`An optional description forthe IPsec tunnel.`}).option(`health-check-enabled`,{type:`boolean`,description:`Determines whether to run healthchecks for a tunnel.`}).option(`health-check-rate`,{type:`string`,description:"How frequent the health check is run. The default value is `mid`.",choices:[`low`,`mid`,`high`]}).coerce(`health-check-rate`,e=>v(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=>v(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=>v(e,`health-check-direction`,`text`)).option(`interface-address`,{type:`string`,description:`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`}).option(`interface-address6`,{type:`string`,description:`A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127`}).option(`name`,{type:`string`,description:`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`}).option(`psk`,{type:`string`,description:`A randomly generated or provided string for use in the IPsec tunnel.`}).option(`replay-protection`,{type:`boolean`,description:"If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`bgp-customer-asn`,`bgp-export-filter-id`,`bgp-extra-prefixes`,`bgp-import-filter-id`,`bgp-md5-key`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`bgp-customer-asn`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const Di={command:`update <ipsec-tunnel-id>`,describe:`Update IPsec Tunnel`,builder:Ei,handler:async e=>l({command:`magic-transit ipsec-tunnels update`,classification:{safeFlags:[`automatic-return-routing`,`health-check-enabled`,`health-check-rate`,`health-check-type`,`health-check-direction`,`replay-protection`,`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit ipsec-tunnels update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/ipsec_tunnels/${e[`ipsec-tunnel-id`]==null?`<ipsec-tunnel-id>`:encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,pathParams:{"ipsec-tunnel-id":String(e[`ipsec-tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({automatic_return_routing:e[`automatic-return-routing`],bgp:{customer_asn:e[`bgp-customer-asn`],export_filter_id:v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`),extra_prefixes:e[`bgp-extra-prefixes`],import_filter_id:v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`),md5_key:v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},cloudflare_endpoint:v(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`),custom_remote_identities:{fqdn_id:v(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)},customer_endpoint:v(e[`customer-endpoint`],`customer-endpoint`,`text`),description:v(e.description,`description`,`text`),health_check:{enabled:e[`health-check-enabled`],rate:e[`health-check-rate`],target:{saved:v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)},type:e[`health-check-type`],direction:e[`health-check-direction`]},interface_address:v(e[`interface-address`],`interface-address`,`text`),interface_address6:v(e[`interface-address6`],`interface-address6`,`text`),name:v(e.name,`name`,`text`),psk:v(e.psk,`psk`,`text`),replay_protection:e[`replay-protection`]}):g(e.body),sensitiveBodyPaths:[[`psk`]]});return}let d=e.body===void 0?void 0:g(e.body),f=await n(e),m=e.local?o:await a();if(e.accountId=m,e.body!==void 0){let n=d,r=await c(`Updating`,async()=>t(f,`PUT`,`/accounts/${m}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:n,headers:Object.keys(l).length>0?l:void 0}));s(r,{successLabel:`Updated`});return}e[`cloudflare-endpoint`]===void 0&&(e[`cloudflare-endpoint`]=await u(`cloudflare-endpoint`,`The IP address assigned to the Cloudflare side of the IPsec tunnel.`)),e[`interface-address`]===void 0&&(e[`interface-address`]=await u(`interface-address`,`A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the IPsec tunnel. The name cannot share a name with other tunnels.`));let h={};e[`automatic-return-routing`]!==void 0&&p(h,[`automatic_return_routing`],e[`automatic-return-routing`]),e[`bgp-customer-asn`]!==void 0&&p(h,[`bgp`,`customer_asn`],e[`bgp-customer-asn`]),e[`bgp-export-filter-id`]!==void 0&&p(h,[`bgp`,`export_filter_id`],v(e[`bgp-export-filter-id`],`bgp-export-filter-id`,`text`)),e[`bgp-extra-prefixes`]!==void 0&&p(h,[`bgp`,`extra_prefixes`],e[`bgp-extra-prefixes`]),e[`bgp-import-filter-id`]!==void 0&&p(h,[`bgp`,`import_filter_id`],v(e[`bgp-import-filter-id`],`bgp-import-filter-id`,`text`)),e[`bgp-md5-key`]!==void 0&&p(h,[`bgp`,`md5_key`],v(e[`bgp-md5-key`],`bgp-md5-key`,`text`)),e[`cloudflare-endpoint`]!==void 0&&p(h,[`cloudflare_endpoint`],v(e[`cloudflare-endpoint`],`cloudflare-endpoint`,`text`)),e[`custom-remote-identities-fqdn-id`]!==void 0&&p(h,[`custom_remote_identities`,`fqdn_id`],v(e[`custom-remote-identities-fqdn-id`],`custom-remote-identities-fqdn-id`,`text`)),e[`customer-endpoint`]!==void 0&&p(h,[`customer_endpoint`],v(e[`customer-endpoint`],`customer-endpoint`,`text`)),e.description!==void 0&&p(h,[`description`],v(e.description,`description`,`text`)),e[`health-check-enabled`]!==void 0&&p(h,[`health_check`,`enabled`],e[`health-check-enabled`]),e[`health-check-rate`]!==void 0&&p(h,[`health_check`,`rate`],e[`health-check-rate`]),e[`health-check-target-saved`]!==void 0&&p(h,[`health_check`,`target`,`saved`],v(e[`health-check-target-saved`],`health-check-target-saved`,`text`)),e[`health-check-type`]!==void 0&&p(h,[`health_check`,`type`],e[`health-check-type`]),e[`health-check-direction`]!==void 0&&p(h,[`health_check`,`direction`],e[`health-check-direction`]),e[`interface-address`]!==void 0&&p(h,[`interface_address`],v(e[`interface-address`],`interface-address`,`text`)),e[`interface-address6`]!==void 0&&p(h,[`interface_address6`],v(e[`interface-address6`],`interface-address6`,`text`)),e.name!==void 0&&p(h,[`name`],v(e.name,`name`,`text`)),e.psk!==void 0&&p(h,[`psk`],v(e.psk,`psk`,`text`)),e[`replay-protection`]!==void 0&&p(h,[`replay_protection`],e[`replay-protection`]);let y=await c(`Updating`,async()=>t(f,`PUT`,`/accounts/${m}/magic/ipsec_tunnels/${encodeURIComponent(String(e[`ipsec-tunnel-id`]))}`,{body:h,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Updated`})})},Oi={command:`ipsec-tunnels`,describe:`IPsec tunnel endpoints with pre-shared key management for encrypted transit`,builder:e=>e.command(di).command(pi).command(hi).command(_i).command(yi).command(Si).command(Ti).command(Di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ki={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps`,body:`json`};function Ai(e){return e.usage(`$0 magic-transit pcaps create
248
248
 
249
- Create new PCAP request for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ji={command:`create`,describe:`Create PCAP request`,builder:Ai,handler:async e=>l({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(ki,{body:e,account_id:u}));o(t,{successLabel:`Created`})}})};function Mi(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
249
+ Create new PCAP request for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ji={command:`create`,describe:`Create PCAP request`,builder:Ai,handler:async e=>l({command:`magic-transit pcaps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:g(e.body)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(ki,{body:e,account_id:u}));s(n,{successLabel:`Created`})}})};function Mi(e){return e.usage(`$0 magic-transit pcaps download get <pcap-id>
250
250
 
251
- 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 Ni={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:Mi,handler:async e=>l({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>ee(`/accounts/${n}/pcaps/${encodeURIComponent(String(e[`pcap-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(e.text===!0?o.toString(`utf-8`):o)})},Pi={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fi={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}`};function Ii(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
251
+ 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 Ni={command:`get <pcap-id>`,describe:`Download Simple PCAP`,builder:Mi,handler:async e=>l({command:`magic-transit pcaps download get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/download`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}await n(e);let t=e.local?o:await a();e.accountId=t;let s=await c(`Loading`,async()=>ee(`/accounts/${t}/pcaps/${encodeURIComponent(String(e[`pcap-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));y(e.text===!0?s.toString(`utf-8`):s)})},Pi={command:`download`,describe:`Operations for pcaps.download`,builder:e=>e.command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fi={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}`};function Ii(e){return e.usage(`$0 magic-transit pcaps get <pcap-id>
252
252
 
253
- 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 Li={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:Ii,handler:async e=>l({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fi,{account_id:l,pcap_id:e[`pcap-id`]}));o(u,{successLabel:`Loaded`})})};var Ri={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps`};function zi(e){return e.usage(`$0 magic-transit pcaps list
253
+ 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 Li={command:`get <pcap-id>`,describe:`Get PCAP request`,builder:Ii,handler:async e=>l({command:`magic-transit pcaps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Fi,{account_id:l,pcap_id:e[`pcap-id`]}));s(u,{successLabel:`Loaded`})})};var Ri={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps`};function zi(e){return e.usage(`$0 magic-transit pcaps list
254
254
 
255
- 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 Bi={command:`list`,describe:`List packet capture requests`,builder:zi,handler:async e=>l({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ri,{account_id:l}));o(u,{successLabel:`Loaded`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`,body:`json`};function Vi(e){return e.usage(`$0 magic-transit pcaps ownership create
255
+ 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 Bi={command:`list`,describe:`List packet capture requests`,builder:zi,handler:async e=>l({command:`magic-transit pcaps list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ri,{account_id:l}));s(u,{successLabel:`Loaded`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`,body:`json`};function Vi(e){return e.usage(`$0 magic-transit pcaps ownership create
256
256
 
257
- 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 Hi={command:`create`,describe:`Add buckets for full packet captures`,builder:Vi,handler:async e=>l({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(B,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let f=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`)}),p=await c(`Creating`,async()=>l.send(B,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var Ui={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/${t.ownership_id}`,response:!1};function Wi(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
257
+ 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 Hi={command:`create`,describe:`Add buckets for full packet captures`,builder:Vi,handler:async e=>l({command:`magic-transit pcaps ownership create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({destination_conf:v(e[`destination-conf`],`destination-conf`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(B,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await u(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures."));let f=_({destination_conf:v(e[`destination-conf`],`destination-conf`,`text`)}),p=await c(`Creating`,async()=>l.send(B,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var Ui={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/${t.ownership_id}`,response:!1};function Wi(e){return e.usage(`$0 magic-transit pcaps ownership delete <ownership-id>
258
258
 
259
- 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 Gi={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Wi,handler:async e=>l({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/${e[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(e[`ownership-id`]))}`,pathParams:{"ownership-id":String(e[`ownership-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Ui,{account_id:l,ownership_id:e[`ownership-id`]}));o(u,{successLabel:`Deleted`})})};var Ki={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`};function qi(e){return e.usage(`$0 magic-transit pcaps ownership get
259
+ 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 Gi={command:`delete <ownership-id>`,describe:`Delete buckets for full packet captures`,builder:Wi,handler:async e=>l({command:`magic-transit pcaps ownership delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps ownership delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/${e[`ownership-id`]==null?`<ownership-id>`:encodeURIComponent(String(e[`ownership-id`]))}`,pathParams:{"ownership-id":String(e[`ownership-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Ui,{account_id:l,ownership_id:e[`ownership-id`]}));s(u,{successLabel:`Deleted`})})};var Ki={method:`GET`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership`};function qi(e){return e.usage(`$0 magic-transit pcaps ownership get
260
260
 
261
- 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 Ji={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:qi,handler:async e=>l({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ki,{account_id:l}));o(u,{successLabel:`Loaded`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/validate`,body:`json`};function Yi(e){return e.usage(`$0 magic-transit pcaps ownership validate
261
+ 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 Ji={command:`get`,describe:`List PCAPs Bucket Ownership`,builder:qi,handler:async e=>l({command:`magic-transit pcaps ownership get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ki,{account_id:l}));s(u,{successLabel:`Loaded`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/pcaps/ownership/validate`,body:`json`};function Yi(e){return e.usage(`$0 magic-transit pcaps ownership validate
262
262
 
263
- 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 Xi={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Yi,handler:async e=>l({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Validating`,async()=>l.send(V,{body:e,account_id:u}));o(t,{successLabel:`Validated`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await g(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await g(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let f=m({destination_conf:h(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:h(e[`ownership-challenge`],`ownership-challenge`,`text`)}),p=await c(`Validating`,async()=>l.send(V,{body:f,account_id:u}));o(p,{successLabel:`Validated`})})},Zi={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Hi).command(Gi).command(Ji).command(Xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qi={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}/stop`,response:!1};function $i(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
263
+ 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 Xi={command:`validate`,describe:`Validate buckets for full packet captures`,builder:Yi,handler:async e=>l({command:`magic-transit pcaps ownership validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/ownership/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({destination_conf:v(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:v(e[`ownership-challenge`],`ownership-challenge`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Validating`,async()=>l.send(V,{body:e,account_id:d}));s(n,{successLabel:`Validated`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await u(`destination-conf`,"The full URI for the bucket. This field only applies to `full` packet captures.")),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await u(`ownership-challenge`,`The ownership challenge filename stored in the bucket.`));let f=_({destination_conf:v(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:v(e[`ownership-challenge`],`ownership-challenge`,`text`)}),p=await c(`Validating`,async()=>l.send(V,{body:f,account_id:d}));s(p,{successLabel:`Validated`})})},Zi={command:`ownership`,describe:`Operations for pcaps.ownership`,builder:e=>e.command(Hi).command(Gi).command(Ji).command(Xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qi={method:`PUT`,path:t=>e`/accounts/${t.account_id}/pcaps/${t.pcap_id}/stop`,response:!1};function $i(e){return e.usage(`$0 magic-transit pcaps stop <pcap-id>
264
264
 
265
- 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 ea={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:$i,handler:async e=>l({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`}))return;let u=await c(`Updating`,async()=>n.send(Qi,{account_id:l,pcap_id:e[`pcap-id`]}));o(u,{successLabel:`Updated`})})},ta={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(ji).command(Li).command(Bi).command(ea).command(Pi).command(Zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups`,body:`json`};function na(e){return e.usage(`$0 magic-transit redundancy-groups create
265
+ 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 ea={command:`stop <pcap-id>`,describe:`Stop full PCAP`,builder:$i,handler:async e=>l({command:`magic-transit pcaps stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit pcaps stop`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/pcaps/${e[`pcap-id`]==null?`<pcap-id>`:encodeURIComponent(String(e[`pcap-id`]))}/stop`,pathParams:{"pcap-id":String(e[`pcap-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force,message:`This operation halts an in-progress full packet capture. Any unsaved capture data will be lost.`}))return;let u=await c(`Updating`,async()=>t.send(Qi,{account_id:l,pcap_id:e[`pcap-id`]}));s(u,{successLabel:`Updated`})})},ta={command:`pcaps`,describe:`Packet capture requests for debugging traffic flowing through Magic Transit tunnels`,builder:e=>e.command(ji).command(Li).command(Bi).command(ea).command(Pi).command(Zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups`,body:`json`};function na(e){return e.usage(`$0 magic-transit redundancy-groups create
266
266
 
267
- 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 ra={command:`create`,describe:`Create a Redundancy Group`,builder:na,handler:async e=>l({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(H,{body:e,account_id:f}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let p=m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}),_=await c(`Creating`,async()=>l.send(H,{body:p,account_id:f}));o(_,{successLabel:`Created`})})};var ia={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function aa(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
267
+ 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. Shape: [{"id": string, "type": "gre" | "ipsec" | "cni"}].`}).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 ra={command:`create`,describe:`Create a Redundancy Group`,builder:na,handler:async e=>l({command:`magic-transit redundancy-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit redundancy-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),members:h(e.members,`members`),name:v(e.name,`name`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(H,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`Human-readable name for the redundancy group`));let f=_({description:v(e.description,`description`,`text`),members:h(e.members,`members`),name:v(e.name,`name`,`text`)}),p=await c(`Creating`,async()=>l.send(H,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var ia={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function aa(e){return e.usage(`$0 magic-transit redundancy-groups delete <redundancy-group-id>
268
268
 
269
- 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 oa={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:aa,handler:async e=>l({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ia,{account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(u,{successLabel:`Deleted`})})};var sa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function ca(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
269
+ 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 oa={command:`delete <redundancy-group-id>`,describe:`Delete a Redundancy Group`,builder:aa,handler:async e=>l({command:`magic-transit redundancy-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit redundancy-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(ia,{account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));s(u,{successLabel:`Deleted`})})};var sa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`};function ca(e){return e.usage(`$0 magic-transit redundancy-groups get <redundancy-group-id>
270
270
 
271
- 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 la={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:ca,handler:async e=>l({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(sa,{account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));o(u,{successLabel:`Loaded`})})};var ua={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups`};function da(e){return e.usage(`$0 magic-transit redundancy-groups list
271
+ 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 la={command:`get <redundancy-group-id>`,describe:`Get Redundancy Group Details`,builder:ca,handler:async e=>l({command:`magic-transit redundancy-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit redundancy-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(sa,{account_id:l,redundancy_group_id:e[`redundancy-group-id`]}));s(u,{successLabel:`Loaded`})})};var ua={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups`};function da(e){return e.usage(`$0 magic-transit redundancy-groups list
272
272
 
273
- 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 fa={command:`list`,describe:`List Redundancy Groups`,builder:da,handler:async e=>l({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ua,{account_id:l}));o(u,{successLabel:`Loaded`})})};var U={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`,body:`json`};function pa(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
273
+ 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 fa={command:`list`,describe:`List Redundancy Groups`,builder:da,handler:async e=>l({command:`magic-transit redundancy-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(ua,{account_id:l}));s(u,{successLabel:`Loaded`})})};var U={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/redundancy_groups/${t.redundancy_group_id}`,body:`json`};function pa(e){return e.usage(`$0 magic-transit redundancy-groups update <redundancy-group-id>
274
274
 
275
- 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 ma={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:pa,handler:async e=>l({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(U,{body:t,account_id:f,redundancy_group_id:e[`redundancy-group-id`]}));o(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await g(`name`,`Human-readable name for the redundancy group`));let p=m({description:h(e.description,`description`,`text`),members:u(e.members,`members`),name:h(e.name,`name`,`text`)}),_=await c(`Updating`,async()=>l.send(U,{body:p,account_id:f,redundancy_group_id:e[`redundancy-group-id`]}));o(_,{successLabel:`Updated`})})},ha={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(ra).command(oa).command(la).command(fa).command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function ga(e){return e.usage(`$0 magic-transit routes bulk-update
275
+ 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. Shape: [{"id": string, "type": "gre" | "ipsec" | "cni"}].`}).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 ma={command:`update <redundancy-group-id>`,describe:`Update a Redundancy Group`,builder:pa,handler:async e=>l({command:`magic-transit redundancy-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit redundancy-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/redundancy_groups/${e[`redundancy-group-id`]==null?`<redundancy-group-id>`:encodeURIComponent(String(e[`redundancy-group-id`]))}`,pathParams:{"redundancy-group-id":String(e[`redundancy-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),members:h(e.members,`members`),name:v(e.name,`name`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(U,{body:n,account_id:d,redundancy_group_id:e[`redundancy-group-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await u(`name`,`Human-readable name for the redundancy group`));let f=_({description:v(e.description,`description`,`text`),members:h(e.members,`members`),name:v(e.name,`name`,`text`)}),p=await c(`Updating`,async()=>l.send(U,{body:f,account_id:d,redundancy_group_id:e[`redundancy-group-id`]}));s(p,{successLabel:`Updated`})})},ha={command:`redundancy-groups`,describe:`Operations for redundancy-groups`,builder:e=>e.command(ra).command(oa).command(la).command(fa).command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function ga(e){return e.usage(`$0 magic-transit routes bulk-update
276
276
 
277
- 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 _a={command:`bulk-update`,describe:`Update Many Routes`,builder:ga,handler:async e=>l({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:u(e.routes,`routes`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let e=n,t=await c(`Updating`,async()=>l.send(W,{body:e,account_id:f}));o(t,{successLabel:`Updated`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=m({routes:u(e.routes,`routes`)}),h=await c(`Updating`,async()=>l.send(W,{body:p,account_id:f}));o(h,{successLabel:`Updated`})})};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function va(e){return e.usage(`$0 magic-transit routes create
277
+ 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. Shape: [{"nexthop": string, "prefix": string, "priority": number, "description"?: string, "scope"?: {...}, ...more}]. ? marks optional keys.`}).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 _a={command:`bulk-update`,describe:`Update Many Routes`,builder:ga,handler:async e=>l({command:`magic-transit routes bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({routes:h(e.routes,`routes`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Updating`,async()=>l.send(W,{body:e,account_id:u}));s(n,{successLabel:`Updated`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let d=_({routes:h(e.routes,`routes`)}),f=await c(`Updating`,async()=>l.send(W,{body:d,account_id:u}));s(f,{successLabel:`Updated`})})};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function va(e){return e.usage(`$0 magic-transit routes create
278
278
 
279
- 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 ya={command:`create`,describe:`Create a Route`,builder:va,handler:async e=>l({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(G,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let f=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),p=await c(`Creating`,async()=>l.send(G,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var ba={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function xa(e){return e.usage(`$0 magic-transit routes delete <route-id>
279
+ 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 ya={command:`create`,describe:`Create a Route`,builder:va,handler:async e=>l({command:`magic-transit routes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),nexthop:v(e.nexthop,`nexthop`,`text`),prefix:v(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(G,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}if(e.nexthop===void 0&&(e.nexthop=await u(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await u(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let f=_({description:v(e.description,`description`,`text`),nexthop:v(e.nexthop,`nexthop`,`text`),prefix:v(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),p=await c(`Creating`,async()=>l.send(G,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var ba={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function xa(e){return e.usage(`$0 magic-transit routes delete <route-id>
280
280
 
281
- 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 Sa={command:`delete <route-id>`,describe:`Delete Route`,builder:xa,handler:async e=>l({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(ba,{account_id:l,route_id:e[`route-id`]}));o(u,{successLabel:`Deleted`})})};var K={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function Ca(e){return e.usage(`$0 magic-transit routes empty
281
+ 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 Sa={command:`delete <route-id>`,describe:`Delete Route`,builder:xa,handler:async e=>l({command:`magic-transit routes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(ba,{account_id:l,route_id:e[`route-id`]}));s(u,{successLabel:`Deleted`})})};var K={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/routes`,body:`json`};function Ca(e){return e.usage(`$0 magic-transit routes empty
282
282
 
283
- 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 wa={command:`empty`,describe:`Delete Many Routes`,builder:Ca,handler:async e=>l({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({routes:u(e.routes,`routes`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,!await v({force:!!e.force}))return;if(e.body!==void 0){let e=n,t=await c(`Deleting`,async()=>l.send(K,{body:e,account_id:f}));o(t,{successLabel:`Deleted`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let p=m({routes:u(e.routes,`routes`)}),h=await c(`Deleting`,async()=>l.send(K,{body:p,account_id:f}));o(h,{successLabel:`Deleted`})})};var Ta={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Ea(e){return e.usage(`$0 magic-transit routes get <route-id>
283
+ 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. Shape: [{}].`}).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 wa={command:`empty`,describe:`Delete Many Routes`,builder:Ca,handler:async e=>l({command:`magic-transit routes empty`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes empty`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({routes:h(e.routes,`routes`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await f({force:!!e.force}))return;if(e.body!==void 0){let e=t,n=await c(`Deleting`,async()=>l.send(K,{body:e,account_id:u}));s(n,{successLabel:`Deleted`});return}if(e.routes===void 0)throw Error(`--routes is required (or pass --body with this field set).`);let d=_({routes:h(e.routes,`routes`)}),p=await c(`Deleting`,async()=>l.send(K,{body:d,account_id:u}));s(p,{successLabel:`Deleted`})})};var Ta={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`};function Ea(e){return e.usage(`$0 magic-transit routes get <route-id>
284
284
 
285
- 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 Da={command:`get <route-id>`,describe:`Route Details`,builder:Ea,handler:async e=>l({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ta,{account_id:l,route_id:e[`route-id`]}));o(u,{successLabel:`Loaded`})})};var Oa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes`};function ka(e){return e.usage(`$0 magic-transit routes list
285
+ 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 Da={command:`get <route-id>`,describe:`Route Details`,builder:Ea,handler:async e=>l({command:`magic-transit routes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Ta,{account_id:l,route_id:e[`route-id`]}));s(u,{successLabel:`Loaded`})})};var Oa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/routes`};function ka(e){return e.usage(`$0 magic-transit routes list
286
286
 
287
- List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Aa={command:`list`,describe:`List Routes`,builder:ka,handler:async e=>l({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({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 n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Oa,{account_id:l}));o(u,{successLabel:`Loaded`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`,body:`json`};function ja(e){return e.usage(`$0 magic-transit routes update <route-id>
287
+ List all Magic static routes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Aa={command:`list`,describe:`List Routes`,builder:ka,handler:async e=>l({command:`magic-transit routes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();r({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 t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Oa,{account_id:l}));s(u,{successLabel:`Loaded`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/routes/${t.route_id}`,body:`json`};function ja(e){return e.usage(`$0 magic-transit routes update <route-id>
288
288
 
289
- 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 Ma={command:`update <route-id>`,describe:`Update Route`,builder:ja,handler:async e=>l({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(q,{body:t,account_id:u,route_id:e[`route-id`]}));o(r,{successLabel:`Updated`});return}if(e.nexthop===void 0&&(e.nexthop=await g(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await g(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let f=m({description:h(e.description,`description`,`text`),nexthop:h(e.nexthop,`nexthop`,`text`),prefix:h(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),p=await c(`Updating`,async()=>l.send(q,{body:f,account_id:u,route_id:e[`route-id`]}));o(p,{successLabel:`Updated`})})},Na={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(_a).command(ya).command(Sa).command(wa).command(Da).command(Aa).command(Ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`,body:`json`};function Pa(e){return e.usage(`$0 magic-transit sites acls create <site-id>
289
+ 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 Ma={command:`update <route-id>`,describe:`Update Route`,builder:ja,handler:async e=>l({command:`magic-transit routes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit routes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),nexthop:v(e.nexthop,`nexthop`,`text`),prefix:v(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(q,{body:n,account_id:d,route_id:e[`route-id`]}));s(r,{successLabel:`Updated`});return}if(e.nexthop===void 0&&(e.nexthop=await u(`nexthop`,`The next-hop IP Address for the static route.`)),e.prefix===void 0&&(e.prefix=await u(`prefix`,`IP Prefix in Classless Inter-Domain Routing format.`)),e.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);let f=_({description:v(e.description,`description`,`text`),nexthop:v(e.nexthop,`nexthop`,`text`),prefix:v(e.prefix,`prefix`,`text`),priority:e.priority,scope:{colo_names:e[`scope-colo-names`],colo_regions:e[`scope-colo-regions`]},weight:e.weight}),p=await c(`Updating`,async()=>l.send(q,{body:f,account_id:d,route_id:e[`route-id`]}));s(p,{successLabel:`Updated`})})},Na={command:`routes`,describe:`Static routes that direct IP prefix traffic through specific GRE/IPsec tunnels`,builder:e=>e.command(_a).command(ya).command(Sa).command(wa).command(Da).command(Aa).command(Ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`,body:`json`};function Pa(e){return e.usage(`$0 magic-transit sites acls create <site-id>
290
290
 
291
- 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 Fa={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:Pa,handler:async e=>l({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(J,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}e[`lan-1-lan-id`]===void 0&&(e[`lan-1-lan-id`]=await g(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e[`lan-2-lan-id`]===void 0&&(e[`lan-2-lan-id`]=await g(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the ACL.`));let f=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),p=await c(`Creating`,async()=>l.send(J,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Created`})})};var Ia={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function La(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
291
+ 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 Fa={command:`create <site-id>`,describe:`Create a new Site ACL`,builder:Pa,handler:async e=>l({command:`magic-transit sites acls create`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(J,{body:n,account_id:d,site_id:e[`site-id`]}));s(r,{successLabel:`Created`});return}e[`lan-1-lan-id`]===void 0&&(e[`lan-1-lan-id`]=await u(`lan-1-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e[`lan-2-lan-id`]===void 0&&(e[`lan-2-lan-id`]=await u(`lan-2-lan-id`,`The identifier for the LAN you want to create an ACL policy with.`)),e.name===void 0&&(e.name=await u(`name`,`The name of the ACL.`));let f=_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),p=await c(`Creating`,async()=>l.send(J,{body:f,account_id:d,site_id:e[`site-id`]}));s(p,{successLabel:`Created`})})};var Ia={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function La(e){return e.usage(`$0 magic-transit sites acls delete <acl-id>
292
292
 
293
- Remove a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ra={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:La,handler:async e=>l({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Ia,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Deleted`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function za(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
293
+ Remove a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ra={command:`delete <acl-id>`,describe:`Delete Site ACL`,builder:La,handler:async e=>l({command:`magic-transit sites acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Ia,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(u,{successLabel:`Deleted`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function za(e){return e.usage(`$0 magic-transit sites acls edit <acl-id>
294
294
 
295
- Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Ba={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:za,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Y,{body:t,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let f=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),p=await c(`Updating`,async()=>l.send(Y,{body:f,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(p,{successLabel:`Updated`})})};var Va={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ha(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
295
+ Patch a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Ba={command:`edit <acl-id>`,describe:`Patch Site ACL`,builder:za,handler:async e=>l({command:`magic-transit sites acls edit`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Y,{body:n,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(r,{successLabel:`Updated`});return}let d=_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>l.send(Y,{body:d,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(f,{successLabel:`Updated`})})};var Va={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`};function Ha(e){return e.usage(`$0 magic-transit sites acls get <acl-id>
296
296
 
297
- Get a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`get <acl-id>`,describe:`Site ACL Details`,builder:Ha,handler:async e=>l({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Va,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(u,{successLabel:`Loaded`})})};var Wa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`};function Ga(e){return e.usage(`$0 magic-transit sites acls list
297
+ Get a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`get <acl-id>`,describe:`Site ACL Details`,builder:Ha,handler:async e=>l({command:`magic-transit sites acls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Va,{account_id:l,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(u,{successLabel:`Loaded`})})};var Wa={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls`};function Ga(e){return e.usage(`$0 magic-transit sites acls list
298
298
 
299
- Lists Site ACLs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ka={command:`list`,describe:`List Site ACLs`,builder:Ga,handler:async e=>l({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Wa,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function qa(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
299
+ Lists Site ACLs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ka={command:`list`,describe:`List Site ACLs`,builder:Ga,handler:async e=>l({command:`magic-transit sites acls list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Wa,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/acls/${t.acl_id}`,body:`json`};function qa(e){return e.usage(`$0 magic-transit sites acls update <acl-id>
300
300
 
301
- Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Ja={command:`update <acl-id>`,describe:`Update Site ACL`,builder:qa,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(X,{body:t,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(r,{successLabel:`Updated`});return}let f=m({description:h(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:h(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:h(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:h(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:h(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:h(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),p=await c(`Updating`,async()=>l.send(X,{body:f,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));o(p,{successLabel:`Updated`})})},Ya={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Fa).command(Ra).command(Ba).command(Ua).command(Ka).command(Ja).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Xa(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
301
+ Update a specific Site ACL.`).positional(`acl-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`description`,{type:`string`,description:`Description for the ACL.`}).option(`forward-locally`,{type:`boolean`,description:`The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.`}).option(`lan-1-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-1-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-1-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-1-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-lan-id`,{type:`string`,description:`The identifier for the LAN you want to create an ACL policy with.`}).option(`lan-2-lan-name`,{type:`string`,description:`The name of the LAN based on the provided lan_id.`}).option(`lan-2-port-ranges`,{type:`string`,array:!0,description:`Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.`}).option(`lan-2-ports`,{type:`string`,array:!0,description:`Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.`}).option(`name`,{type:`string`,description:`The name of the ACL.`}).option(`protocols`,{type:`string`,array:!0,description:`The protocols field`}).option(`unidirectional`,{type:`boolean`,description:`The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`lan-1-lan-id`,`lan-1-lan-name`,`lan-1-port-ranges`,`lan-1-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-1-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-1-* flag is set`)}return!0}).check(e=>{let t=[`lan-2-lan-id`,`lan-2-lan-name`,`lan-2-port-ranges`,`lan-2-ports`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`lan-2-lan-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --lan-2-* flag is set`)}return!0})}const Ja={command:`update <acl-id>`,describe:`Update Site ACL`,builder:qa,handler:async e=>l({command:`magic-transit sites acls update`,classification:{safeFlags:[`forward-locally`,`unidirectional`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/acls/${e[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(e[`acl-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"acl-id":String(e[`acl-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(X,{body:n,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(r,{successLabel:`Updated`});return}let d=_({description:v(e.description,`description`,`text`),forward_locally:e[`forward-locally`],lan_1:{lan_id:v(e[`lan-1-lan-id`],`lan-1-lan-id`,`text`),lan_name:v(e[`lan-1-lan-name`],`lan-1-lan-name`,`text`),port_ranges:e[`lan-1-port-ranges`],ports:e[`lan-1-ports`]},lan_2:{lan_id:v(e[`lan-2-lan-id`],`lan-2-lan-id`,`text`),lan_name:v(e[`lan-2-lan-name`],`lan-2-lan-name`,`text`),port_ranges:e[`lan-2-port-ranges`],ports:e[`lan-2-ports`]},name:v(e.name,`name`,`text`),protocols:e.protocols,unidirectional:e.unidirectional}),f=await c(`Updating`,async()=>l.send(X,{body:d,account_id:u,site_id:e[`site-id`],acl_id:e[`acl-id`]}));s(f,{successLabel:`Updated`})})},Ya={command:`acls`,describe:`Operations for sites.acls`,builder:e=>e.command(Fa).command(Ra).command(Ba).command(Ua).command(Ka).command(Ja).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`,body:`json`};function Xa(e){return e.usage(`$0 magic-transit sites app-configuration create <site-id>
302
302
 
303
- Creates a new App Config for a site`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Za={command:`create <site-id>`,describe:`Create a new App Config`,builder:Xa,handler:async e=>l({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(Z,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let f=m({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}),p=await c(`Creating`,async()=>l.send(Z,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Created`})})};var Qa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`};function $a(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
303
+ Creates a new App Config for a site`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`breakout`,{type:`boolean`,description:`Whether to breakout traffic to the app's endpoints directly. Null preserves default behavior.`}).option(`preferred-wans`,{type:`string`,array:!0,description:`WAN interfaces to prefer over default WANs, highest-priority first. Can only be specified for breakout rules (breakout must be true).`}).option(`priority`,{type:`number`,description:`Priority of traffic. 0 is default, anything greater is prioritized. (Currently only 0 and 1 are supported)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Za={command:`create <site-id>`,describe:`Create a new App Config`,builder:Xa,handler:async e=>l({command:`magic-transit sites app-configuration create`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites app-configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(Z,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Created`});return}let d=_({breakout:e.breakout,preferred_wans:e[`preferred-wans`],priority:e.priority}),f=await c(`Creating`,async()=>l.send(Z,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Created`})})};var Qa={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`};function $a(e){return e.usage(`$0 magic-transit sites app-configuration delete <app-config-id>
304
304
 
305
- 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 eo={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:$a,handler:async e=>l({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Qa,{account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(u,{successLabel:`Deleted`})})};var to={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`};function no(e){return e.usage(`$0 magic-transit sites app-configuration list
305
+ 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 eo={command:`delete <app-config-id>`,describe:`Delete App Config`,builder:$a,handler:async e=>l({command:`magic-transit sites app-configuration delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites app-configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Qa,{account_id:l,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));s(u,{successLabel:`Deleted`})})};var to={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs`};function no(e){return e.usage(`$0 magic-transit sites app-configuration list
306
306
 
307
- 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 ro={command:`list`,describe:`List App Configs`,builder:no,handler:async e=>l({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(to,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`,body:`json`};function io(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
307
+ 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 ro={command:`list`,describe:`List App Configs`,builder:no,handler:async e=>l({command:`magic-transit sites app-configuration list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites app-configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(to,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/app_configs/${t.app_config_id}`,body:`json`};function io(e){return e.usage(`$0 magic-transit sites app-configuration update <app-config-id>
308
308
 
309
- 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 ao={command:`update <app-config-id>`,describe:`Update an App Config`,builder:io,handler:async e=>l({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Q,{body:t,account_id:u,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(r,{successLabel:`Updated`});return}let f=m({account_app_id:h(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:h(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}),p=await c(`Updating`,async()=>l.send(Q,{body:f,account_id:u,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));o(p,{successLabel:`Updated`})})},oo={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(Za).command(eo).command(ro).command(ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var so={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites`,body:`json`};function co(e){return e.usage(`$0 magic-transit sites create
309
+ 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 ao={command:`update <app-config-id>`,describe:`Update an App Config`,builder:io,handler:async e=>l({command:`magic-transit sites app-configuration update`,classification:{safeFlags:[`breakout`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites app-configuration update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/app_configs/${e[`app-config-id`]==null?`<app-config-id>`:encodeURIComponent(String(e[`app-config-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"app-config-id":String(e[`app-config-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({account_app_id:v(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:v(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Q,{body:n,account_id:u,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));s(r,{successLabel:`Updated`});return}let d=_({account_app_id:v(e[`account-app-id`],`account-app-id`,`text`),breakout:e.breakout,managed_app_id:v(e[`managed-app-id`],`managed-app-id`,`text`),preferred_wans:e[`preferred-wans`],priority:e.priority}),f=await c(`Updating`,async()=>l.send(Q,{body:d,account_id:u,site_id:e[`site-id`],app_config_id:e[`app-config-id`]}));s(f,{successLabel:`Updated`})})},oo={command:`app-configuration`,describe:`Operations for sites.app-configuration`,builder:e=>e.command(Za).command(eo).command(ro).command(ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var so={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites`,body:`json`};function co(e){return e.usage(`$0 magic-transit sites create
310
310
 
311
- 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 lo={command:`create`,describe:`Create a new Site`,builder:co,handler:async e=>l({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(so,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`The name of the site.`));let f=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),p=await c(`Creating`,async()=>l.send(so,{body:f,account_id:u}));o(p,{successLabel:`Created`})})};var uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`};function fo(e){return e.usage(`$0 magic-transit sites delete <site-id>
311
+ 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 lo={command:`create`,describe:`Create a new Site`,builder:co,handler:async e=>l({command:`magic-transit sites create`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(so,{body:e,account_id:d}));s(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`The name of the site.`));let f=_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),p=await c(`Creating`,async()=>l.send(so,{body:f,account_id:d}));s(p,{successLabel:`Created`})})};var uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`};function fo(e){return e.usage(`$0 magic-transit sites delete <site-id>
312
312
 
313
- 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 po={command:`delete <site-id>`,describe:`Delete Site`,builder:fo,handler:async e=>l({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(uo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Deleted`})})};var mo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function ho(e){return e.usage(`$0 magic-transit sites edit <site-id>
313
+ 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 po={command:`delete <site-id>`,describe:`Delete Site`,builder:fo,handler:async e=>l({command:`magic-transit sites delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(uo,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Deleted`})})};var mo={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function ho(e){return e.usage(`$0 magic-transit sites edit <site-id>
314
314
 
315
- 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 go={command:`edit <site-id>`,describe:`Patch Site`,builder:ho,handler:async e=>l({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(mo,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let f=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),p=await c(`Updating`,async()=>l.send(mo,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Updated`})})};function _o(e){return e.usage(`$0 magic-transit sites get <site-id>
315
+ 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 go={command:`edit <site-id>`,describe:`Patch Site`,builder:ho,handler:async e=>l({command:`magic-transit sites edit`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(mo,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Updated`});return}let d=_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Updating`,async()=>l.send(mo,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Updated`})})};function _o(e){return e.usage(`$0 magic-transit sites get <site-id>
316
316
 
317
- Get a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vo={command:`get <site-id>`,describe:`Site Details`,builder:_o,handler:async e=>l({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();s({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(e[`site-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})};var yo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`,body:`json`};function bo(e){return e.usage(`$0 magic-transit sites lans create <site-id>
317
+ Get a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`x-magic-new-hc-target`,{type:`string`,description:`If true, the health check target in the response body will be presented using the new object format. Defaults to false.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vo={command:`get <site-id>`,describe:`Site Details`,builder:_o,handler:async e=>l({command:`magic-transit sites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`x-magic-new-hc-target`]!==void 0&&(l[`x-magic-new-hc-target`]=String(e[`x-magic-new-hc-target`])),e.dryRun){let t=await i();r({command:`cf magic-transit sites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let u=await n(e),d=e.local?o:await a();e.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/magic/sites/${encodeURIComponent(String(e[`site-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));s(f,{successLabel:`Loaded`})})};var yo={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`,body:`json`};function bo(e){return e.usage(`$0 magic-transit sites lans create <site-id>
318
318
 
319
- Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(yo,{body:t,account_id:p,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let g=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),_=await c(`Creating`,async()=>l.send(yo,{body:g,account_id:p,site_id:e[`site-id`]}));o(_,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
319
+ Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"local_alias_prefix": string, "remote_prefix": string}].`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"next_hop": string, "prefix": string, "nat"?: {...}}]. ? marks optional keys.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"code": number, "type": "text" | "hex" | "ip" | ...more, "value": string}].`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": string}.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const xo={command:`create <site-id>`,describe:`Create a new Site LAN`,builder:bo,handler:async e=>l({command:`magic-transit sites lans create`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(yo,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Created`});return}let d=_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),f=await c(`Creating`,async()=>l.send(yo,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Created`})})};var So={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function Co(e){return e.usage(`$0 magic-transit sites lans delete <lan-id>
320
320
 
321
- Remove a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const wo={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Co,handler:async e=>l({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(So,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Deleted`})})};var To={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Eo(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
321
+ Remove a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const wo={command:`delete <lan-id>`,describe:`Delete Site LAN`,builder:Co,handler:async e=>l({command:`magic-transit sites lans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(So,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(u,{successLabel:`Deleted`})})};var To={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Eo(e){return e.usage(`$0 magic-transit sites lans edit <lan-id>
322
322
 
323
- Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(To,{body:t,account_id:p,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let g=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),_=await c(`Updating`,async()=>l.send(To,{body:g,account_id:p,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(_,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
323
+ Patch a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"local_alias_prefix": string, "remote_prefix": string}].`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"next_hop": string, "prefix": string, "nat"?: {...}}]. ? marks optional keys.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"code": number, "type": "text" | "hex" | "ip" | ...more, "value": string}].`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": string}.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Do={command:`edit <lan-id>`,describe:`Patch Site LAN`,builder:Eo,handler:async e=>l({command:`magic-transit sites lans edit`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(To,{body:n,account_id:u,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(r,{successLabel:`Updated`});return}let d=_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),f=await c(`Updating`,async()=>l.send(To,{body:d,account_id:u,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(f,{successLabel:`Updated`})})};var Oo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`};function ko(e){return e.usage(`$0 magic-transit sites lans get <lan-id>
324
324
 
325
- Get a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ao={command:`get <lan-id>`,describe:`Site LAN Details`,builder:ko,handler:async e=>l({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Oo,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(u,{successLabel:`Loaded`})})};var jo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`};function Mo(e){return e.usage(`$0 magic-transit sites lans list
325
+ Get a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ao={command:`get <lan-id>`,describe:`Site LAN Details`,builder:ko,handler:async e=>l({command:`magic-transit sites lans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Oo,{account_id:l,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(u,{successLabel:`Loaded`})})};var jo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans`};function Mo(e){return e.usage(`$0 magic-transit sites lans list
326
326
 
327
- Lists Site LANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const No={command:`list`,describe:`List Site LANs`,builder:Mo,handler:async e=>l({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(jo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Po={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Fo(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
327
+ Lists Site LANs associated with an account.`).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const No={command:`list`,describe:`List Site LANs`,builder:Mo,handler:async e=>l({command:`magic-transit sites lans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(jo,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Loaded`})})};var Po={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/lans/${t.lan_id}`,body:`json`};function Fo(e){return e.usage(`$0 magic-transit sites lans update <lan-id>
328
328
 
329
- Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json.`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Po,{body:t,account_id:p,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(r,{successLabel:`Updated`});return}let g=m({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:h(e.name,`name`,`text`),nat:{static_prefix:h(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:u(e[`remote-subnets`],`remote-subnets`),routed_subnets:u(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:u(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:h(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:h(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:h(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:f(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:h(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),_=await c(`Updating`,async()=>l.send(Po,{body:g,account_id:p,site_id:e[`site-id`],lan_id:e[`lan-id`]}));o(_,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
329
+ Update a specific Site LAN.`).positional(`lan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`bond-id`,{type:`number`,description:`The bond_id field`}).option(`ha-link`,{type:`boolean`,description:`mark true to use this LAN for HA probing. only works for site with HA turned on. only one LAN can be set as the ha_link.`}).option(`is-breakout`,{type:`boolean`,description:`mark true to use this LAN for source-based breakout traffic`}).option(`is-prioritized`,{type:`boolean`,description:`mark true to use this LAN for source-based prioritized traffic`}).option(`name`,{type:`string`,description:`The name field`}).option(`nat-static-prefix`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`remote-subnets`,{type:`string`,description:`The remote_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"local_alias_prefix": string, "remote_prefix": string}].`}).option(`routed-subnets`,{type:`string`,description:`The routed_subnets field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"next_hop": string, "prefix": string, "nat"?: {...}}]. ? marks optional keys.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-dhcp-relay-server-addresses`,{type:`string`,array:!0,description:`List of DHCP server IPs.`}).option(`static-addressing-dhcp-server-dhcp-options`,{type:`string`,description:`Optional list of custom DHCP options to include in DHCP responses. Only valid when DHCP server is enabled. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"code": number, "type": "text" | "hex" | "ip" | ...more, "value": string}].`}).option(`static-addressing-dhcp-server-dhcp-pool-end`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dhcp-pool-start`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-server`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-dhcp-server-dns-servers`,{type:`string`,array:!0,description:`The static_addressing.dhcp_server.dns_servers field`}).option(`static-addressing-dhcp-server-reservations`,{type:`string`,description:`Mapping of MAC addresses to IP addresses. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": string}.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-virtual-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-dhcp-relay-server-addresses`,`static-addressing-dhcp-server-dhcp-options`,`static-addressing-dhcp-server-dhcp-pool-end`,`static-addressing-dhcp-server-dhcp-pool-start`,`static-addressing-dhcp-server-dns-server`,`static-addressing-dhcp-server-dns-servers`,`static-addressing-dhcp-server-reservations`,`static-addressing-secondary-address`,`static-addressing-virtual-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const Io={command:`update <lan-id>`,describe:`Update Site LAN`,builder:Fo,handler:async e=>l({command:`magic-transit sites lans update`,classification:{safeFlags:[`ha-link`,`is-breakout`,`is-prioritized`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites lans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/lans/${e[`lan-id`]==null?`<lan-id>`:encodeURIComponent(String(e[`lan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"lan-id":String(e[`lan-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Po,{body:n,account_id:u,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(r,{successLabel:`Updated`});return}let d=_({bond_id:e[`bond-id`],ha_link:e[`ha-link`],is_breakout:e[`is-breakout`],is_prioritized:e[`is-prioritized`],name:v(e.name,`name`,`text`),nat:{static_prefix:v(e[`nat-static-prefix`],`nat-static-prefix`,`text`)},physport:e.physport,remote_subnets:h(e[`remote-subnets`],`remote-subnets`),routed_subnets:h(e[`routed-subnets`],`routed-subnets`),static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),dhcp_relay:{server_addresses:e[`static-addressing-dhcp-relay-server-addresses`]},dhcp_server:{dhcp_options:h(e[`static-addressing-dhcp-server-dhcp-options`],`static-addressing-dhcp-server-dhcp-options`),dhcp_pool_end:v(e[`static-addressing-dhcp-server-dhcp-pool-end`],`static-addressing-dhcp-server-dhcp-pool-end`,`text`),dhcp_pool_start:v(e[`static-addressing-dhcp-server-dhcp-pool-start`],`static-addressing-dhcp-server-dhcp-pool-start`,`text`),dns_server:v(e[`static-addressing-dhcp-server-dns-server`],`static-addressing-dhcp-server-dns-server`,`text`),dns_servers:e[`static-addressing-dhcp-server-dns-servers`],reservations:m(e[`static-addressing-dhcp-server-reservations`],`static-addressing-dhcp-server-reservations`)},secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),virtual_address:v(e[`static-addressing-virtual-address`],`static-addressing-virtual-address`,`text`)},vlan_tag:e[`vlan-tag`]},[[`static_addressing`,`dhcp_server`,`reservations`]]),f=await c(`Updating`,async()=>l.send(Po,{body:d,account_id:u,site_id:e[`site-id`],lan_id:e[`lan-id`]}));s(f,{successLabel:`Updated`})})},Lo={command:`lans`,describe:`Operations for sites.lans`,builder:e=>e.command(xo).command(wo).command(Do).command(Ao).command(No).command(Io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ro={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites`,query:[`connectorid`]};function zo(e){return e.usage(`$0 magic-transit sites list
330
330
 
331
- Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.`).option(`connectorid`,{type:`string`,description:`Identifier`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bo={command:`list`,describe:`List Sites`,builder:zo,handler:async e=>l({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={connectorid:e.connectorid};if(e.dryRun){let e=await i();s({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ro,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function Vo(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
331
+ Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.`).option(`connectorid`,{type:`string`,description:`Identifier`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bo={command:`list`,describe:`List Sites`,builder:zo,handler:async e=>l({command:`magic-transit sites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={connectorid:e.connectorid};if(e.dryRun){let e=await i();r({command:`cf magic-transit sites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/sites`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ro,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function Vo(e){return e.usage(`$0 magic-transit sites netflow-config create <site-id>
332
332
 
333
- 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 Ho={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:Vo,handler:async e=>l({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send($,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}let f=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),p=await c(`Creating`,async()=>l.send($,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Created`})})};var Uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Wo(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
333
+ 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 Ho={command:`create <site-id>`,describe:`Create NetFlow Configuration`,builder:Vo,handler:async e=>l({command:`magic-transit sites netflow-config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites netflow-config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send($,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Created`});return}let d=_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Creating`,async()=>l.send($,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Created`})})};var Uo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Wo(e){return e.usage(`$0 magic-transit sites netflow-config delete <site-id>
334
334
 
335
- 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 Go={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:Wo,handler:async e=>l({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(Uo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Deleted`})})};var Ko={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function qo(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
335
+ 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 Go={command:`delete <site-id>`,describe:`Delete NetFlow Configuration`,builder:Wo,handler:async e=>l({command:`magic-transit sites netflow-config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites netflow-config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(Uo,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Deleted`})})};var Ko={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function qo(e){return e.usage(`$0 magic-transit sites netflow-config edit <site-id>
336
336
 
337
- 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 Jo={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:qo,handler:async e=>l({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Ko,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let f=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),p=await c(`Updating`,async()=>l.send(Ko,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Updated`})})};var Yo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Xo(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
337
+ 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 Jo={command:`edit <site-id>`,describe:`Update NetFlow Configuration`,builder:qo,handler:async e=>l({command:`magic-transit sites netflow-config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites netflow-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Ko,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Updated`});return}let d=_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Updating`,async()=>l.send(Ko,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Updated`})})};var Yo={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`};function Xo(e){return e.usage(`$0 magic-transit sites netflow-config get <site-id>
338
338
 
339
- 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 Zo={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:Xo,handler:async e=>l({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Yo,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var Qo={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function $o(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
339
+ 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 Zo={command:`get <site-id>`,describe:`NetFlow Configuration Details`,builder:Xo,handler:async e=>l({command:`magic-transit sites netflow-config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites netflow-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(Yo,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Loaded`})})};var Qo={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/netflow_config`,body:`json`};function $o(e){return e.usage(`$0 magic-transit sites netflow-config update <site-id>
340
340
 
341
- 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 es={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:$o,handler:async e=>l({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(Qo,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let f=m({active_timeout:e[`active-timeout`],collector_ip:h(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),p=await c(`Updating`,async()=>l.send(Qo,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Updated`})})},ts={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(Ho).command(Go).command(Jo).command(Zo).command(es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ns={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function rs(e){return e.usage(`$0 magic-transit sites update <site-id>
341
+ 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 es={command:`update <site-id>`,describe:`Update NetFlow Configuration`,builder:$o,handler:async e=>l({command:`magic-transit sites netflow-config update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites netflow-config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/netflow_config`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(Qo,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Updated`});return}let d=_({active_timeout:e[`active-timeout`],collector_ip:v(e[`collector-ip`],`collector-ip`,`text`),collector_port:e[`collector-port`],inactive_timeout:e[`inactive-timeout`],sampling_rate:e[`sampling-rate`]}),f=await c(`Updating`,async()=>l.send(Qo,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Updated`})})},ts={command:`netflow-config`,describe:`Operations for sites.netflow-config`,builder:e=>e.command(Ho).command(Go).command(Jo).command(Zo).command(es).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ns={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}`,body:`json`};function rs(e){return e.usage(`$0 magic-transit sites update <site-id>
342
342
 
343
- Update a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`ha-mode`,{type:`boolean`,description:`Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const is={command:`update <site-id>`,describe:`Update Site`,builder:rs,handler:async e=>l({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(ns,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Updated`});return}let f=m({connector_id:h(e[`connector-id`],`connector-id`,`text`),description:h(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:h(e[`location-lat`],`location-lat`,`text`),lon:h(e[`location-lon`],`location-lon`,`text`)},name:h(e.name,`name`,`text`),secondary_connector_id:h(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),p=await c(`Updating`,async()=>l.send(ns,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Updated`})})};var as={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`,body:`json`};function os(e){return e.usage(`$0 magic-transit sites wans create <site-id>
343
+ Update a specific Site.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Magic Connector identifier tag.`}).option(`description`,{type:`string`,description:`The description field`}).option(`ha-mode`,{type:`boolean`,description:`Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.`}).option(`location-lat`,{type:`string`,description:`Latitude`}).option(`location-lon`,{type:`string`,description:`Longitude`}).option(`name`,{type:`string`,description:`The name of the site.`}).option(`secondary-connector-id`,{type:`string`,description:`Magic Connector identifier tag. Used when high availability mode is on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const is={command:`update <site-id>`,describe:`Update Site`,builder:rs,handler:async e=>l({command:`magic-transit sites update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(ns,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Updated`});return}let d=_({connector_id:v(e[`connector-id`],`connector-id`,`text`),description:v(e.description,`description`,`text`),ha_mode:e[`ha-mode`],location:{lat:v(e[`location-lat`],`location-lat`,`text`),lon:v(e[`location-lon`],`location-lon`,`text`)},name:v(e.name,`name`,`text`),secondary_connector_id:v(e[`secondary-connector-id`],`secondary-connector-id`,`text`)}),f=await c(`Updating`,async()=>l.send(ns,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Updated`})})};var as={method:`POST`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`,body:`json`};function os(e){return e.usage(`$0 magic-transit sites wans create <site-id>
344
344
 
345
- Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>h(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`,`static-addressing-secondary-gateway-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`,`static-addressing-gateway-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(as,{body:t,account_id:u,site_id:e[`site-id`]}));o(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let f=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),p=await c(`Creating`,async()=>l.send(as,{body:f,account_id:u,site_id:e[`site-id`]}));o(p,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
345
+ Creates a new Site WAN.`).positional(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`health-check-rate`,{type:`string`,description:"Magic WAN health check rate for tunnels created on this link. The default value is `mid`.",choices:[`low`,`mid`,`high`],default:`mid`}).coerce(`health-check-rate`,e=>v(e,`health-check-rate`,`text`)).option(`load-balance-inner-flows`,{type:`boolean`,description:`The load_balance_inner_flows field`,default:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`physport`,{type:`number`,description:`The physport field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site.`}).option(`vlan-tag`,{type:`number`,description:`VLAN ID. Use zero for untagged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`static-addressing-address`,`static-addressing-gateway-address`,`static-addressing-secondary-address`,`static-addressing-secondary-gateway-address`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`static-addressing-address`,`static-addressing-gateway-address`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --static-addressing-* flag is set`)}return!0})}const ss={command:`create <site-id>`,describe:`Create a new Site WAN`,builder:os,handler:async e=>l({command:`magic-transit sites wans create`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Creating`,async()=>l.send(as,{body:n,account_id:u,site_id:e[`site-id`]}));s(r,{successLabel:`Created`});return}if(e.physport===void 0)throw Error(`--physport is required (or pass --body with this field set).`);let d=_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Creating`,async()=>l.send(as,{body:d,account_id:u,site_id:e[`site-id`]}));s(f,{successLabel:`Created`})})};var cs={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function ls(e){return e.usage(`$0 magic-transit sites wans delete <wan-id>
346
346
 
347
- Remove a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const us={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:ls,handler:async e=>l({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await v({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(cs,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(u,{successLabel:`Deleted`})})};var ds={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function fs(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
347
+ Remove a specific Site WAN.`).positional(`wan-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`site-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const us={command:`delete <wan-id>`,describe:`Delete Site WAN`,builder:ls,handler:async e=>l({command:`magic-transit sites wans delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await c(`Deleting`,async()=>t.send(cs,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(u,{successLabel:`Deleted`})})};var ds={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function fs(e){return e.usage(`$0 magic-transit sites wans edit <wan-id>
348
348
 
349
- 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=>h(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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const ps={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:fs,handler:async e=>l({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(ds,{body:t,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let f=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),p=await c(`Updating`,async()=>l.send(ds,{body:f,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(p,{successLabel:`Updated`})})};var ms={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function hs(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
349
+ 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=>v(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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const ps={command:`edit <wan-id>`,describe:`Patch Site WAN`,builder:fs,handler:async e=>l({command:`magic-transit sites wans edit`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(ds,{body:n,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(r,{successLabel:`Updated`});return}let d=_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Updating`,async()=>l.send(ds,{body:d,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(f,{successLabel:`Updated`})})};var ms={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`};function hs(e){return e.usage(`$0 magic-transit sites wans get <wan-id>
350
350
 
351
- 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 gs={command:`get <wan-id>`,describe:`Site WAN Details`,builder:hs,handler:async e=>l({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ms,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(u,{successLabel:`Loaded`})})};var _s={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`};function vs(e){return e.usage(`$0 magic-transit sites wans list
351
+ 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 gs={command:`get <wan-id>`,describe:`Site WAN Details`,builder:hs,handler:async e=>l({command:`magic-transit sites wans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(ms,{account_id:l,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(u,{successLabel:`Loaded`})})};var _s={method:`GET`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans`};function vs(e){return e.usage(`$0 magic-transit sites wans list
352
352
 
353
- 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 ys={command:`list`,describe:`List Site WANs`,builder:vs,handler:async e=>l({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(_s,{account_id:l,site_id:e[`site-id`]}));o(u,{successLabel:`Loaded`})})};var bs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function xs(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
353
+ 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 ys={command:`list`,describe:`List Site WANs`,builder:vs,handler:async e=>l({command:`magic-transit sites wans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans`,pathParams:{"site-id":String(e[`site-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(_s,{account_id:l,site_id:e[`site-id`]}));s(u,{successLabel:`Loaded`})})};var bs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/magic/sites/${t.site_id}/wans/${t.wan_id}`,body:`json`};function xs(e){return e.usage(`$0 magic-transit sites wans update <wan-id>
354
354
 
355
- 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=>h(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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const Ss={command:`update <wan-id>`,describe:`Update Site WAN`,builder:xs,handler:async e=>l({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(bs,{body:t,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(r,{successLabel:`Updated`});return}let f=m({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:h(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:h(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:h(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:h(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:h(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),p=await c(`Updating`,async()=>l.send(bs,{body:f,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));o(p,{successLabel:`Updated`})})},Cs={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(ss).command(us).command(ps).command(gs).command(ys).command(Ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ws={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(lo).command(po).command(go).command(vo).command(Bo).command(is).command(Ya).command(oo).command(Lo).command(ts).command(Cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ts={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(Se).command(In).command(qn).command(sr).command(pr).command(Sr).command(Xr).command(li).command(Oi).command(ta).command(ha).command(Na).command(ws).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ts as default};
355
+ 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=>v(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(`provisioned-download-kbps`,{type:`number`,description:`Provisioned download rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`provisioned-upload-kbps`,{type:`number`,description:`Provisioned upload rate of the WAN circuit in kilobits per second. Set to null to remove it.`}).option(`static-addressing-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-gateway-address`,{type:`string`,description:`A valid IPv4 address.`}).option(`static-addressing-secondary-address`,{type:`string`,description:`A valid CIDR notation representing an IP range.`}).option(`static-addressing-secondary-gateway-address`,{type:`string`,description:`Gateway address for the secondary connector of a high availability site. Set to null to remove it.`}).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)`})}const Ss={command:`update <wan-id>`,describe:`Update Site WAN`,builder:xs,handler:async e=>l({command:`magic-transit sites wans update`,classification:{safeFlags:[`health-check-rate`,`load-balance-inner-flows`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf magic-transit sites wans update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/magic/sites/${e[`site-id`]==null?`<site-id>`:encodeURIComponent(String(e[`site-id`]))}/wans/${e[`wan-id`]==null?`<wan-id>`:encodeURIComponent(String(e[`wan-id`]))}`,pathParams:{"site-id":String(e[`site-id`]??``),"wan-id":String(e[`wan-id`]??``)},bodyKind:`json`,body:e.body===void 0?_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}):g(e.body)});return}let t=e.body===void 0?void 0:g(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(bs,{body:n,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(r,{successLabel:`Updated`});return}let d=_({health_check_rate:e[`health-check-rate`],load_balance_inner_flows:e[`load-balance-inner-flows`],name:v(e.name,`name`,`text`),physport:e.physport,priority:e.priority,provisioned_download_kbps:e[`provisioned-download-kbps`],provisioned_upload_kbps:e[`provisioned-upload-kbps`],static_addressing:{address:v(e[`static-addressing-address`],`static-addressing-address`,`text`),gateway_address:v(e[`static-addressing-gateway-address`],`static-addressing-gateway-address`,`text`),secondary_address:v(e[`static-addressing-secondary-address`],`static-addressing-secondary-address`,`text`),secondary_gateway_address:v(e[`static-addressing-secondary-gateway-address`],`static-addressing-secondary-gateway-address`,`text`)},vlan_tag:e[`vlan-tag`]}),f=await c(`Updating`,async()=>l.send(bs,{body:d,account_id:u,site_id:e[`site-id`],wan_id:e[`wan-id`]}));s(f,{successLabel:`Updated`})})},Cs={command:`wans`,describe:`Operations for sites.wans`,builder:e=>e.command(ss).command(us).command(ps).command(gs).command(ys).command(Ss).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ws={command:`sites`,describe:`Magic WAN branch sites — base CRUD, LAN/WAN interface configuration, ACLs, connectors, app configuration, and NetFlow config`,builder:e=>e.command(lo).command(po).command(go).command(vo).command(Bo).command(is).command(Ya).command(oo).command(Lo).command(ts).command(Cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ts={command:`magic-transit`,describe:`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,builder:e=>e.command(Se).command(In).command(qn).command(sr).command(pr).command(Sr).command(Xr).command(li).command(Oi).command(ta).command(ha).command(Na).command(ws).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ts as default};