cf 1.0.0-beta.13 → 1.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/_meta/commands.json +1562 -1776
  2. package/dist/_meta/hand-written-commands.json +342 -22
  3. package/dist/_meta/schemas.json +611 -956
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/{account-tags-CaXDDeZ4.mjs → account-tags-RhvWOkOf.mjs} +4 -4
  7. package/dist/{accounts-BALwxDQY.mjs → accounts--3lrEkmu.mjs} +9 -15
  8. package/dist/{acm-CP9EaXQN.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-DRlaxqrI.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-vGhlfZBx.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-CJtbWfB9.mjs → ai-CRkQ4pjC.mjs} +1 -1
  12. package/dist/{ai-audit-C0BJNqZZ.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/{ai-gateway-BQtv3U3x.mjs → ai-gateway-CbhvQK4L.mjs} +4 -4
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CFTaYk_X.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-1hun27JC.mjs → alerting-CpbCB8br.mjs} +3 -3
  17. package/dist/{analytics-DXUSjvzT.mjs → analytics-DkY9dOP1.mjs} +3 -3
  18. package/dist/{analytics_engine-CQsnL09C.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-BXhrfR6-.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/{argo-LPUCTnee.mjs → argo-DhC5L_aN.mjs} +3 -3
  21. package/dist/{artifacts-Dt6easua.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-CVznAM2Z.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-eQr-kQCH.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-CGLsxbc6.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-pNQrX_9O.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-sD7Frryg.mjs → autoconfig-RQ3HS4m1.mjs} +1 -1
  28. package/dist/{basin-catalog-ZQICw-zF.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-Dy1-dV_B.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-xb98Cj3Y.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-Ck3okE2k.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/{browser-run-DJGJSzFX.mjs → browser-run-hHD1RT43.mjs} +3 -3
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-HmSXqjGn.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-CYxcZtkG.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-D9tSfovH.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-CpiveTFC.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/{cf-BxsXrVeh.mjs → cf-oRSQKirD.mjs} +1 -1
  40. package/dist/{chunk-DSGVRFIS-C1_SEtRK.mjs → chunk-DSGVRFIS-CPI5cYtB.mjs} +1 -1
  41. package/dist/{chunk-NDZDTP46-Bjx_wtJe.mjs → chunk-NDZDTP46-Civns3WA.mjs} +1 -1
  42. package/dist/{cli-DeJc9U8z.mjs → cli-ht4q6i2y.mjs} +1 -1
  43. package/dist/{client-certificates-CF6YZyvP.mjs → client-certificates-balaN_my.mjs} +1 -1
  44. package/dist/{client-side-security-BLoe9kS5.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  45. package/dist/{cloud-connector-DXRUHsjt.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  46. package/dist/{cloudflared--1Ws1RJy.mjs → cloudflared-D83U8Yn3.mjs} +1 -1
  47. package/dist/{cloudforce-one-CBLxXi6v.mjs → cloudforce-one-CXdeqJ9l.mjs} +126 -168
  48. package/dist/{command-Dh7RmjFu.mjs → command-9VAc7b30.mjs} +1 -1
  49. package/dist/{command-Cu7dcaHT.mjs → command-B_Ixlz8Q.mjs} +1 -1
  50. package/dist/{command-oNVwyjGB.mjs → command-BtDY_MKv.mjs} +1 -1
  51. package/dist/{command-CG6RvZs0.mjs → command-CUNMrMou.mjs} +1 -1
  52. package/dist/{command-D3fyhdy-.mjs → command-Ckb9FufU.mjs} +1 -1
  53. package/dist/{command-BDe67N_n.mjs → command-CtVUNm__.mjs} +1 -1
  54. package/dist/{command-DUhX8Dcr.mjs → command-CyJQ40fc.mjs} +1 -1
  55. package/dist/{command-UiHLJ8Ji.mjs → command-DPX9sJVi.mjs} +1 -1
  56. package/dist/{command-BlIb6RR2.mjs → command-DXaRn1ls.mjs} +1 -1
  57. package/dist/{command-CcuLC6CJ.mjs → command-DjEJaOwV.mjs} +1 -1
  58. package/dist/{command-_rqD0hXF.mjs → command-DtgJilOK.mjs} +1 -1
  59. package/dist/{command-BvfKhMl7.mjs → command-OHov3PEc.mjs} +1 -1
  60. package/dist/{command-DwXiDOeH.mjs → command-OWe3v69l.mjs} +1 -1
  61. package/dist/{command-83uVfXh9.mjs → command-SmWD-MeI.mjs} +1 -1
  62. package/dist/{completions-D06AO7A8.mjs → completions-CuqAO3N_.mjs} +1 -1
  63. package/dist/{connector-interrupts-DelTmNyw.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-BwxR3G8d.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-Bqq-hrpJ.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  66. package/dist/{connectors-D-m3rEpk.mjs → connectors-6lVSr-fd.mjs} +1 -1
  67. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  68. package/dist/containers-ncw3bd3a.mjs +376 -0
  69. package/dist/{content-scan-W0BNzbQp.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  70. package/dist/{context-q7UaYK69.mjs → context-BBLtgdR1.mjs} +1 -1
  71. package/dist/{cps-BZ6hqRb5.mjs → cps-C5phNoVU.mjs} +2 -2
  72. package/dist/{csamScanner-Bo1t3CLh.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  73. package/dist/{ct-alerting-E03faC7p.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  74. package/dist/{custom-certificates-CUySSPzi.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  75. package/dist/{custom-csrs-gNpWkJPQ.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  76. package/dist/{custom-hostnames-abGBAbx7.mjs → custom-hostnames-wGtmFbz1.mjs} +3 -3
  77. package/dist/{custom-nameservers-BgNXol1P.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  78. package/dist/{custom-pages-DMKX3aoD.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  79. package/dist/d1-EQMUlHTJ.mjs +94 -0
  80. package/dist/{dcv-delegation-B5YUEWu0.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  81. package/dist/{deploy-CWNm1-5v.mjs → deploy-B22sEVHd.mjs} +1 -1
  82. package/dist/{deploy-context-Dr6bxNcB.mjs → deploy-context-DmG9rgPO.mjs} +1 -1
  83. package/dist/{deploy-input-Cc0_2QlW.mjs → deploy-input-BCjcuP6u.mjs} +1 -1
  84. package/dist/{dev-ZA8itQE7.mjs → dev-ClhhXuNU.mjs} +1 -1
  85. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  86. package/dist/dist-DmRM6WSZ.mjs +449 -0
  87. package/dist/{dls-DIl16mLp.mjs → dls-BEHj4X9T.mjs} +1 -1
  88. package/dist/{dns-firewall-BZwJXHLj.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  89. package/dist/{dns-QUpgljRG.mjs → dns-n4mfYBZg.mjs} +3 -3
  90. package/dist/{durable-objects-BCj4ykpU.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  91. package/dist/{email-auth-DlHIYhCk.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  92. package/dist/{email-routing-UKVS4DYy.mjs → email-routing-WcSPt22u.mjs} +5 -5
  93. package/dist/{email-security-CZjfRIg0.mjs → email-security-BXu3OGay.mjs} +15 -15
  94. package/dist/{email-sending-Dquc880C.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  95. package/dist/{fieldExtractors-BbwDRquU.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  96. package/dist/{firewall--mTfDnCJ.mjs → firewall-CRtYO0Ha.mjs} +5 -5
  97. package/dist/{flagship-cfoSwwM9.mjs → flagship-DvTFZSay.mjs} +3 -3
  98. package/dist/{fraud-Dcsq3EYK.mjs → fraud-uSyibsit.mjs} +5 -5
  99. package/dist/{google-tag-gateway-DPKSkZQi.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  100. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  101. package/dist/{healthchecks-D78hIIBC.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  102. package/dist/{hostnames-sF999-6H.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  103. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  104. package/dist/{iam-Bvg_PayW.mjs → iam-Dl3cU9GI.mjs} +1 -1
  105. package/dist/{images-DI_lEZ4L.mjs → images-C2OkI1j7.mjs} +6 -6
  106. package/dist/index.mjs +1 -1
  107. package/dist/{init-1w_mcgk3.mjs → init-Da8pe296.mjs} +1 -1
  108. package/dist/{intel-BxElBUMP.mjs → intel-DoB1g_K7.mjs} +2 -2
  109. package/dist/{ips-DWoaKxi7.mjs → ips-BRt68epr.mjs} +1 -1
  110. package/dist/{k2-tFjaftl-.mjs → k2-_eq5ZY2t.mjs} +1 -1
  111. package/dist/{keyless-certificates-BrvxHU4J.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  112. package/dist/{keys-DcwTYKRf.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  113. package/dist/{kv-htXS-7uP.mjs → kv-BTYCXKML.mjs} +4 -4
  114. package/dist/{lazy-command-BDiIwpss.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  115. package/dist/{leaked-credential-checks-bvGrLOmQ.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  116. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  117. package/dist/{local-DlT72Xpn.mjs → local-BcPM4I0s.mjs} +1 -1
  118. package/dist/local-BundUuDT.mjs +2 -0
  119. package/dist/{local-runtime-CokO6qaX.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  120. package/dist/{login-Ccw-mYwT.mjs → login-BBYC_BtH.mjs} +1 -1
  121. package/dist/{login-BGF_I_LT.mjs → login-D2uoWhWh.mjs} +1 -1
  122. package/dist/{logo-matches-tE8LTKgg.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  123. package/dist/{logos-Bj845Mcw.mjs → logos-X5B8z7Iv.mjs} +1 -1
  124. package/dist/{logpush-Cs8JdvKi.mjs → logpush-C2ENi1et.mjs} +3 -3
  125. package/dist/{logs-C92XZvNu.mjs → logs-BKDz7kBW.mjs} +1 -1
  126. package/dist/{magic-cloud-networking-hNp5MMw-.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  127. package/dist/{magic-network-monitoring-68GuWAnv.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  128. package/dist/{magic-transit-DNd7gu4j.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  129. package/dist/{managed-defense-B_wCAuFD.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  130. package/dist/{managed-transforms-DZdxHPOh.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  131. package/dist/{matches-B65CkflD.mjs → matches-rPMLS3Ip.mjs} +1 -1
  132. package/dist/{mcp-DrJW5ayK.mjs → mcp-DXUMvEWt.mjs} +4 -4
  133. package/dist/{mesh-DfVzYTn1.mjs → mesh-MmBCQ37q.mjs} +2 -2
  134. package/dist/{monetization-BGaI8CMO.mjs → monetization-DQE5VtUO.mjs} +2 -2
  135. package/dist/{mtls-certificates-BsU2emDD.mjs → mtls-certificates-DwkEb-Hy.mjs} +1 -1
  136. package/dist/{network-BEMD8P0U.mjs → network-BcfobxQY.mjs} +1 -1
  137. package/dist/{network-interconnects-DMu_fcbo.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -6
  138. package/dist/{o11y-C1a4gDGF.mjs → o11y-BBv7nedp.mjs} +13 -13
  139. package/dist/{oauth-Bj5Ne1o8.mjs → oauth-BUr8bPwo.mjs} +1 -1
  140. package/dist/{oauth-clients-p4Etdqy_.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  141. package/dist/{oauth-mspHHU5U.mjs → oauth-n8um6MFk.mjs} +1 -1
  142. package/dist/{oauth-scopes-B2IabFza.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  143. package/dist/organization-CJeOVWH7.mjs +71 -0
  144. package/dist/{organizations-5S6xEp7T.mjs → organizations-BpfoqZcG.mjs} +1 -1
  145. package/dist/{origin-ca-certificates-_VJAoK1D.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  146. package/dist/{origin-post-quantum-encryption-GcldDsT2.mjs → origin-post-quantum-encryption-CM-If38w.mjs} +2 -2
  147. package/dist/{origin-tls-client-auth-DZHld9fA.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +1 -1
  148. package/dist/{page-rules-o1tAMMsD.mjs → page-rules-DOeekMrj.mjs} +4 -4
  149. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  150. package/dist/{pay-per-crawl-BsnOxGYU.mjs → pay-per-crawl-qJpseNNx.mjs} +1 -1
  151. package/dist/{pay-per-use-BXWMCSyE.mjs → pay-per-use-C1MWKJ4O.mjs} +3 -3
  152. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  153. package/dist/{precursor-B6DjBib6.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  154. package/dist/previews-BEheHO3T.mjs +4 -0
  155. package/dist/{progress-BtkTVcHI.mjs → progress-CQqDtgmF.mjs} +1 -1
  156. package/dist/{prompt-RlgRrmbm.mjs → prompt-C8FyienX.mjs} +1 -1
  157. package/dist/{queries-yLwoJRHV.mjs → queries-DJ8looyq.mjs} +1 -1
  158. package/dist/{queues-CnJRaE1o.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  159. package/dist/{r2-CuC6-zQX.mjs → r2-CdJKpP2w.mjs} +13 -13
  160. package/dist/{radar-DrQLcbkq.mjs → radar-CdvQL4xm.mjs} +1 -1
  161. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  162. package/dist/{realtime-CjsnzHxD.mjs → realtime-onrXppzh.mjs} +9 -9
  163. package/dist/{registrar-BgOsxTnX.mjs → registrar-CbEBc5IE.mjs} +2 -2
  164. package/dist/{registrar-sandbox-3ikBD9fB.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  165. package/dist/{registry-CHowrQsZ.mjs → registry-PI6sO95I.mjs} +1 -1
  166. package/dist/{reporting-hE127s5r.mjs → reporting-bXZY6obP.mjs} +1 -1
  167. package/dist/{request-headers-DiJeDAn1.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  168. package/dist/{request-tracers-BCwLxmPN.mjs → request-tracers-CihskC2A.mjs} +1 -1
  169. package/dist/{resource-sharing-2qvWUuMa.mjs → resource-sharing-DDqcCHVs.mjs} +2 -2
  170. package/dist/{resource-tagging-Dwx7iL3v.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  171. package/dist/{rules-DxVQ6jIg.mjs → rules-CAW0-Wde.mjs} +1 -1
  172. package/dist/{rulesets-Cdh8YjI9.mjs → rulesets-CPir63Qc.mjs} +3 -3
  173. package/dist/{rum-a4CMq4Qu.mjs → rum-BfwTcuup.mjs} +1 -1
  174. package/dist/{run-BvHwWWUX.mjs → run-CW2Cgi0S.mjs} +1 -1
  175. package/dist/run-DEynXvCc.mjs +2 -0
  176. package/dist/{schema-flags-BzoBGPWk.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  177. package/dist/{scim-B8XlXl8v.mjs → scim-CtZ1FeQE.mjs} +1 -1
  178. package/dist/{secrets-store-Cqhedh_i.mjs → secrets-store-BIuBYUJT.mjs} +1 -1
  179. package/dist/{security-insights-le2-DteL.mjs → security-insights-DfUus0bs.mjs} +3 -3
  180. package/dist/{security-txt-cCArWXur.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  181. package/dist/{session-C1BhT1ZJ.mjs → session-BcM8Vyyx.mjs} +1 -1
  182. package/dist/{shared-BPjcpXuA.mjs → shared-CpS23WwR.mjs} +1 -1
  183. package/dist/{smart-shield-Csyh8hwB.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  184. package/dist/{snippets-DUWx25q6.mjs → snippets-DLO3iFAg.mjs} +1 -1
  185. package/dist/{spawn-IysxuTNW.mjs → spawn-D07wH-MH.mjs} +1 -1
  186. package/dist/{spectrum-Da3UYSOR.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  187. package/dist/{speed-NxlMnB2e.mjs → speed-DX5X2EIR.mjs} +1 -1
  188. package/dist/sql-CF044HDW.mjs +4 -0
  189. package/dist/src-BMATTZU_.mjs +125 -0
  190. package/dist/{ssl-BtaX2WEJ.mjs → ssl-CM-rChEC.mjs} +5 -5
  191. package/dist/{startup-profile-CdJWgNjd.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  192. package/dist/startup-profile-D662WI9s.mjs +2 -0
  193. package/dist/state-D7uNYnoi.mjs +2 -0
  194. package/dist/{state-BDSvdSdP.mjs → state-DIiIGEtR.mjs} +1 -1
  195. package/dist/{stream-C1Ijjzn4.mjs → stream-5EmUOQvy.mjs} +3 -3
  196. package/dist/{submit-MdkuU_Pt.mjs → submit-lEAaRSMR.mjs} +1 -1
  197. package/dist/{tags-CA1xMM96.mjs → tags-CX23P4jg.mjs} +1 -1
  198. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  199. package/dist/{telemetry-Cm39QJ-M.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  200. package/dist/{tenant-BB6Oszcl.mjs → tenant-DnI7QziH.mjs} +1 -1
  201. package/dist/{tenant-custom-nameservers-BsbgYAEo.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  202. package/dist/{tunnels-CRFtyHWz.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  203. package/dist/{turnstile-DBXWo_Xe.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  204. package/dist/{update-check-CMXSdres.mjs → update-check-HFkPml6x.mjs} +1 -1
  205. package/dist/update-check-aTutXNRd.mjs +2 -0
  206. package/dist/update-check-worker.mjs +1 -1
  207. package/dist/{url-info-t-XAs0Mk.mjs → url-info-Dos9VOXV.mjs} +1 -1
  208. package/dist/{url-normalization-Cs4F8e0a.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  209. package/dist/{url-scanner-CBIoDbTx.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  210. package/dist/{user-CevdOMoa.mjs → user-rXca0J9M.mjs} +12 -12
  211. package/dist/{values-CjNlkbIh.mjs → values-D-rrZrDa.mjs} +1 -1
  212. package/dist/{vectorize-9d9tPmg5.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  213. package/dist/version-BGnqDvNR.mjs +2 -0
  214. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  215. package/dist/{web-assets-BHot_MU8.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  216. package/dist/{web3-CYfWAF6b.mjs → web3-MI0GQDnu.mjs} +5 -5
  217. package/dist/workers-By6Pf8fv.mjs +40 -0
  218. package/dist/{workers-builds-Dw7ho3So.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  219. package/dist/{workers-for-platforms-A3yjyLh3.mjs → workers-for-platforms-DL8fC1qR.mjs} +2 -2
  220. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  221. package/dist/workflows-ByQLnV0E.mjs +52 -0
  222. package/dist/{zaraz-BsD2dMI3.mjs → zaraz-CgbpmA85.mjs} +1 -1
  223. package/dist/{zero-trust-CA3iGQbG.mjs → zero-trust-CpjTkkWt.mjs} +42 -42
  224. package/dist/{zone-D2M4EZD0.mjs → zone-DnKIe6po.mjs} +1 -1
  225. package/dist/{zones-BoOC_JzC.mjs → zones--5ZzsDmQ.mjs} +15 -15
  226. package/package.json +12 -12
  227. package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
  228. package/dist/access-C_G2MZnA.mjs +0 -2
  229. package/dist/ai-search-DGU1Y5By.mjs +0 -79
  230. package/dist/auth-CrmVwfpJ.mjs +0 -2
  231. package/dist/bot-management-DTgPwL7O.mjs +0 -9
  232. package/dist/build-B1L6xrgC.mjs +0 -2
  233. package/dist/containers-CVNfEjJs.mjs +0 -78
  234. package/dist/containers-DeoZyeQe.mjs +0 -375
  235. package/dist/d1-CE08YqYk.mjs +0 -93
  236. package/dist/diagnostics-UMbG6m4n.mjs +0 -15
  237. package/dist/dist-BHEmAAHr.mjs +0 -487
  238. package/dist/hyperdrive-qWACKfA4.mjs +0 -37
  239. package/dist/load-balancers-BNTUt4yG.mjs +0 -76
  240. package/dist/local-DlDumOSC.mjs +0 -2
  241. package/dist/organization-CdXt7AVZ.mjs +0 -75
  242. package/dist/pages-CmiOhjSl.mjs +0 -54
  243. package/dist/pipelines-DWLQC0F6.mjs +0 -44
  244. package/dist/previews-dUKEBGSM.mjs +0 -4
  245. package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
  246. package/dist/run-CkbrPJPx.mjs +0 -2
  247. package/dist/sql-CNdHAlQ8.mjs +0 -4
  248. package/dist/src-JfLDUxFr.mjs +0 -125
  249. package/dist/startup-profile-B2l0ChVu.mjs +0 -2
  250. package/dist/state-JB4_BU1o.mjs +0 -2
  251. package/dist/telemetry-BsYO3nxG.mjs +0 -2
  252. package/dist/update-check-C2oVEbXx.mjs +0 -2
  253. package/dist/version-BdVUXLnK.mjs +0 -2
  254. package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
  255. package/dist/workers-S17M0n3h.mjs +0 -40
  256. package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
  257. package/dist/workflows-BgGrVpSR.mjs +0 -43
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-RlgRrmbm.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-C8FyienX.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]}));a(f,{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
5
 
6
6
  Lists Logpush jobs for an account or zone for a dataset.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:_,handler:async l=>c({command:`logpush account-datasets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/jobs`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountDatasets.jobs.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]}));a(f,{successLabel:`Loaded`})})},v={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 logpush account-jobs create
7
7
 
8
- Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:/* @__PURE__ */ `access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 x={command:`create`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
8
+ Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:/* @__PURE__ */ `access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).coerce(`dataset`,e=>d(e,`dataset`,`text`)).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).coerce(`frequency`,e=>d(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).coerce(`kind`,e=>d(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>d(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>d(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 x={command:`create`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({dataset:p.dataset,destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:p.frequency,kind:p.kind,logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:p[`output-options-output-type`],record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:p[`output-options-timestamp-format`]},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({dataset:p.dataset,destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:p.frequency,kind:p.kind,logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:p[`output-options-output-type`],record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:p[`output-options-timestamp-format`]},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
9
9
 
10
10
  Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:S,handler:async l=>c({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the Logpush job.`})){process.stderr.write(`Aborted.
11
11
  `);return}let f=await s(`Deleting`,async()=>c.logpush.accountJobs.delete({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]}));a(f,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logpush account-jobs get <job-id>
@@ -14,7 +14,7 @@ Gets the details of a Logpush job.`).positional(`job-id`,{type:`string`,descript
14
14
 
15
15
  Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Logpush jobs`,builder:E,handler:async l=>c({command:`logpush account-jobs list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountJobs.list({account_or_zone:u,account_or_zone_id:d}));a(f,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logpush account-jobs update <job-id>
16
16
 
17
- Updates a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 k={command:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${f[`job-id`]==null?`<job-id>`:encodeURIComponent(String(f[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(f[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}):l(f.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body),t=await s(`Updating`,async()=>c.logpush.accountJobs.update({...e,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(t,{successLabel:`Updated`});return}let h=u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}),g=await s(`Updating`,async()=>c.logpush.accountJobs.update({...h,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(g,{successLabel:`Updated`})})},A={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logpush account-ownership create
17
+ Updates a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).coerce(`frequency`,e=>d(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).coerce(`kind`,e=>d(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>d(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>d(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 k={command:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${f[`job-id`]==null?`<job-id>`:encodeURIComponent(String(f[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(f[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:f.frequency,kind:f.kind,logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:f[`output-options-output-type`],record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:f[`output-options-timestamp-format`]},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}):l(f.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body),t=await s(`Updating`,async()=>c.logpush.accountJobs.update({...e,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(t,{successLabel:`Updated`});return}let h=u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:f.frequency,kind:f.kind,logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:f[`output-options-output-type`],record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:f[`output-options-timestamp-format`]},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}),g=await s(`Updating`,async()=>c.logpush.accountJobs.update({...h,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(g,{successLabel:`Updated`})})},A={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logpush account-ownership create
18
18
 
19
19
  Gets a new ownership challenge sent to your destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 M={command:`create`,describe:`Get ownership challenge`,builder:j,handler:async p=>c({command:`logpush account-ownership create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/ownership`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountOwnership.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountOwnership.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function N(e){return e.usage(`$0 logpush account-ownership validate create
20
20
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-RlgRrmbm.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";function v(e){return e.usage(`$0 logs datasets available
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C8FyienX.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";function v(e){return e.usage(`$0 logs datasets available
3
3
 
4
4
  Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`available`,describe:`List available account or zone datasets`,builder:v,handler:async t=>l({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.logs.datasets.available({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 logs datasets create
5
5
 
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{i as l,n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-RlgRrmbm.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";import{n as _,t as v}from"./raw-fetch-B4NvWuZD.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{i as l,n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C8FyienX.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";import{n as _,t as v}from"./raw-fetch-DbXN3SlE.mjs";function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
3
 
4
- Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Create Catalog Sync`,builder:y,handler:async h=>c({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),destination_type:f(h[`destination-type`],`destination-type`,`text`),name:f(h.name,`name`,`text`),policy:f(h.policy,`policy`,`text`),update_mode:f(h[`update-mode`],`update-mode`,`text`)}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}h[`destination-type`]===void 0&&(h[`destination-type`]=await m(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),h.name===void 0&&(h.name=await p(`name`,`The name field`)),h[`update-mode`]===void 0&&(h[`update-mode`]=await m(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`destination-type`]!==void 0&&l(v,[`destination_type`],f(h[`destination-type`],`destination-type`,`text`)),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.policy!==void 0&&l(v,[`policy`],f(h.policy,`policy`,`text`)),h[`update-mode`]!==void 0&&l(v,[`update_mode`],f(h[`update-mode`],`update-mode`,`text`));let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function te(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
4
+ Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>f(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Create Catalog Sync`,builder:y,handler:async h=>c({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),destination_type:h[`destination-type`],name:f(h.name,`name`,`text`),policy:f(h.policy,`policy`,`text`),update_mode:h[`update-mode`]}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}h[`destination-type`]===void 0&&(h[`destination-type`]=await m(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),h.name===void 0&&(h.name=await p(`name`,`The name field`)),h[`update-mode`]===void 0&&(h[`update-mode`]=await m(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`destination-type`]!==void 0&&l(v,[`destination_type`],h[`destination-type`]),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.policy!==void 0&&l(v,[`policy`],f(h.policy,`policy`,`text`)),h[`update-mode`]!==void 0&&l(v,[`update_mode`],h[`update-mode`]);let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function te(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
5
 
6
6
  Delete a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`delete-destination`,{type:`boolean`,description:`Delete destination`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <sync-id>`,describe:`Delete Catalog Sync`,builder:te,handler:async t=>c({command:`magic-cloud-networking catalog-syncs delete`,classification:{safeFlags:[`delete-destination`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{let c={delete_destination:t[`delete-destination`]};if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();if(t.accountId=u,!await h({force:!!t.force})){process.stderr.write(`Aborted.
7
7
  `);return}let d=await s(`Deleting`,async()=>l.magicCloudNetworking.catalogSyncs.delete({account_id:u,sync_id:t[`sync-id`],...c}));a(d,{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 magic-cloud-networking catalog-syncs edit <sync-id>
8
8
 
9
- Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).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 S={command:`edit <sync-id>`,describe:`Patch Catalog Sync`,builder:x,handler:async t=>c({command:`magic-cloud-networking catalog-syncs edit`,classification:{safeFlags:[`update-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:f(t[`update-mode`],`update-mode`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:e,account_id:l,sync_id:t[`sync-id`]}));a(n,{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:f(t[`update-mode`],`update-mode`,`text`)}),m=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:p,account_id:l,sync_id:t[`sync-id`]}));a(m,{successLabel:`Updated`})})};function C(e){return e.usage(`$0 magic-cloud-networking catalog-syncs get <sync-id>
9
+ Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>f(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <sync-id>`,describe:`Patch Catalog Sync`,builder:x,handler:async t=>c({command:`magic-cloud-networking catalog-syncs edit`,classification:{safeFlags:[`update-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:t[`update-mode`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:e,account_id:l,sync_id:t[`sync-id`]}));a(n,{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:t[`update-mode`]}),m=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:p,account_id:l,sync_id:t[`sync-id`]}));a(m,{successLabel:`Updated`})})};function C(e){return e.usage(`$0 magic-cloud-networking catalog-syncs get <sync-id>
10
10
 
11
11
  Read a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <sync-id>`,describe:`Read Catalog Sync`,builder:C,handler:async t=>c({command:`magic-cloud-networking catalog-syncs get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicCloudNetworking.catalogSyncs.get({account_id:l,sync_id:t[`sync-id`]}));a(u,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 magic-cloud-networking catalog-syncs list
12
12
 
@@ -16,9 +16,9 @@ List prebuilt catalog sync policies (Closed Beta).`).option(`destination-type`,{
16
16
 
17
17
  Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`refresh <sync-id>`,describe:`Run Catalog Sync`,builder:A,handler:async t=>c({command:`magic-cloud-networking catalog-syncs refresh`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}/refresh`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.magicCloudNetworking.catalogSyncs.refresh({account_id:l,sync_id:t[`sync-id`]}));a(u,{successLabel:`Created`})})};function M(e){return e.usage(`$0 magic-cloud-networking catalog-syncs update <sync-id>
18
18
 
19
- Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update <sync-id>`,describe:`Update Catalog Sync`,builder:M,handler:async t=>c({command:`magic-cloud-networking catalog-syncs update`,classification:{safeFlags:[`update-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:f(t[`update-mode`],`update-mode`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:e,account_id:l,sync_id:t[`sync-id`]}));a(n,{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:f(t[`update-mode`],`update-mode`,`text`)}),m=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:p,account_id:l,sync_id:t[`sync-id`]}));a(m,{successLabel:`Updated`})})},P={command:`catalog-syncs`,describe:`Operations for catalog-syncs`,builder:e=>e.command(ee).command(b).command(S).command(w).command(E).command(j).command(N).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 magic-cloud-networking cloud-integrations create
19
+ Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).coerce(`update-mode`,e=>f(e,`update-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update <sync-id>`,describe:`Update Catalog Sync`,builder:M,handler:async t=>c({command:`magic-cloud-networking catalog-syncs update`,classification:{safeFlags:[`update-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking catalog-syncs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/catalog-syncs/${t[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(t[`sync-id`]))}`,pathParams:{"sync-id":String(t[`sync-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:t[`update-mode`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:e,account_id:l,sync_id:t[`sync-id`]}));a(n,{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`),policy:f(t.policy,`policy`,`text`),update_mode:t[`update-mode`]}),m=await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:p,account_id:l,sync_id:t[`sync-id`]}));a(m,{successLabel:`Updated`})})},P={command:`catalog-syncs`,describe:`Operations for catalog-syncs`,builder:e=>e.command(ee).command(b).command(S).command(w).command(E).command(j).command(N).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 magic-cloud-networking cloud-integrations create
20
20
 
21
- Create a new Cloud Integration (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`]}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create Cloud Integration`,builder:F,handler:async h=>c({command:`magic-cloud-networking cloud-integrations create`,classification:{safeFlags:[`cloud-type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking cloud-integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({cloud_type:f(h[`cloud-type`],`cloud-type`,`text`),description:f(h.description,`description`,`text`),friendly_name:f(h[`friendly-name`],`friendly-name`,`text`)}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`])),h[`friendly-name`]===void 0&&(h[`friendly-name`]=await p(`friendly-name`,`The friendly_name field`));let v={};h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],f(h[`cloud-type`],`cloud-type`,`text`)),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`friendly-name`]!==void 0&&l(v,[`friendly_name`],f(h[`friendly-name`],`friendly-name`,`text`));let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function L(e){return e.usage(`$0 magic-cloud-networking cloud-integrations delete <provider-id>
21
+ Create a new Cloud Integration (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`]}).coerce(`cloud-type`,e=>f(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create Cloud Integration`,builder:F,handler:async h=>c({command:`magic-cloud-networking cloud-integrations create`,classification:{safeFlags:[`cloud-type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking cloud-integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({cloud_type:h[`cloud-type`],description:f(h.description,`description`,`text`),friendly_name:f(h[`friendly-name`],`friendly-name`,`text`)}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`])),h[`friendly-name`]===void 0&&(h[`friendly-name`]=await p(`friendly-name`,`The friendly_name field`));let v={};h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],h[`cloud-type`]),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`friendly-name`]!==void 0&&l(v,[`friendly_name`],f(h[`friendly-name`],`friendly-name`,`text`));let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function L(e){return e.usage(`$0 magic-cloud-networking cloud-integrations delete <provider-id>
22
22
 
23
23
  Delete a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <provider-id>`,describe:`Delete Cloud Integration`,builder:L,handler:async t=>c({command:`magic-cloud-networking cloud-integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking cloud-integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/providers/${t[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(t[`provider-id`]))}`,pathParams:{"provider-id":String(t[`provider-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
24
24
  `);return}let u=await s(`Deleting`,async()=>c.magicCloudNetworking.cloudIntegrations.delete({account_id:l,provider_id:t[`provider-id`]}));a(u,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover-all
@@ -45,7 +45,7 @@ Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`str
45
45
 
46
46
  Apply an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`apply <onramp-id>`,describe:`Apply On-ramp`,builder:ue,handler:async t=>c({command:`magic-cloud-networking on-ramps apply`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking on-ramps apply`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps/${t[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(t[`onramp-id`]))}/apply`,pathParams:{"onramp-id":String(t[`onramp-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.magicCloudNetworking.onRamps.apply({account_id:l,onramp_id:t[`onramp-id`]}));a(u,{successLabel:`Created`})})};function fe(e){return e.usage(`$0 magic-cloud-networking on-ramps create
47
47
 
48
- Create a new On-ramp (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`adopted-hub-id`,{type:`string`,description:`The adopted_hub_id field`}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`cloud-asn`,{type:`number`,description:`Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`]}).option(`description`,{type:`string`,description:`The description field`}).option(`dynamic-routing`,{type:`boolean`,description:`Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.`}).option(`hub-provider-id`,{type:`string`,description:`The hub_provider_id field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`region`,{type:`string`,description:`The region field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`OnrampTypeSingle`,`OnrampTypeHub`]}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`create`,describe:`Create On-ramp`,builder:fe,handler:async h=>c({command:`magic-cloud-networking on-ramps create`,classification:{safeFlags:[`cloud-type`,`dynamic-routing`,`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking on-ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({adopted_hub_id:f(h[`adopted-hub-id`],`adopted-hub-id`,`text`),attached_hubs:h[`attached-hubs`],attached_vpcs:h[`attached-vpcs`],cloud_asn:h[`cloud-asn`],cloud_type:f(h[`cloud-type`],`cloud-type`,`text`),description:f(h.description,`description`,`text`),dynamic_routing:h[`dynamic-routing`],hub_provider_id:f(h[`hub-provider-id`],`hub-provider-id`,`text`),install_routes_in_cloud:h[`install-routes-in-cloud`],install_routes_in_magic_wan:h[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:h[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:h[`manage-vpc-to-hub-attachments`],name:f(h.name,`name`,`text`),region:f(h.region,`region`,`text`),type:f(h.type,`type`,`text`),vpc:f(h.vpc,`vpc`,`text`)}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}if(h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`])),h[`dynamic-routing`]===void 0)throw Error(`--dynamic-routing is required (or pass --body with this field set).`);if(h[`install-routes-in-cloud`]===void 0)throw Error(`--install-routes-in-cloud is required (or pass --body with this field set).`);if(h[`install-routes-in-magic-wan`]===void 0)throw Error(`--install-routes-in-magic-wan is required (or pass --body with this field set).`);h.name===void 0&&(h.name=await p(`name`,`The name field`)),h.type===void 0&&(h.type=await m(`type`,`The type field`,[`OnrampTypeSingle`,`OnrampTypeHub`]));let v={};h[`adopted-hub-id`]!==void 0&&l(v,[`adopted_hub_id`],f(h[`adopted-hub-id`],`adopted-hub-id`,`text`)),h[`attached-hubs`]!==void 0&&l(v,[`attached_hubs`],h[`attached-hubs`]),h[`attached-vpcs`]!==void 0&&l(v,[`attached_vpcs`],h[`attached-vpcs`]),h[`cloud-asn`]!==void 0&&l(v,[`cloud_asn`],h[`cloud-asn`]),h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],f(h[`cloud-type`],`cloud-type`,`text`)),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`dynamic-routing`]!==void 0&&l(v,[`dynamic_routing`],h[`dynamic-routing`]),h[`hub-provider-id`]!==void 0&&l(v,[`hub_provider_id`],f(h[`hub-provider-id`],`hub-provider-id`,`text`)),h[`install-routes-in-cloud`]!==void 0&&l(v,[`install_routes_in_cloud`],h[`install-routes-in-cloud`]),h[`install-routes-in-magic-wan`]!==void 0&&l(v,[`install_routes_in_magic_wan`],h[`install-routes-in-magic-wan`]),h[`manage-hub-to-hub-attachments`]!==void 0&&l(v,[`manage_hub_to_hub_attachments`],h[`manage-hub-to-hub-attachments`]),h[`manage-vpc-to-hub-attachments`]!==void 0&&l(v,[`manage_vpc_to_hub_attachments`],h[`manage-vpc-to-hub-attachments`]),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.region!==void 0&&l(v,[`region`],f(h.region,`region`,`text`)),h.type!==void 0&&l(v,[`type`],f(h.type,`type`,`text`)),h.vpc!==void 0&&l(v,[`vpc`],f(h.vpc,`vpc`,`text`));let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function me(e){return e.usage(`$0 magic-cloud-networking on-ramps delete <onramp-id>
48
+ Create a new On-ramp (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`adopted-hub-id`,{type:`string`,description:`The adopted_hub_id field`}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`cloud-asn`,{type:`number`,description:`Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`]}).coerce(`cloud-type`,e=>f(e,`cloud-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`dynamic-routing`,{type:`boolean`,description:`Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.`}).option(`hub-provider-id`,{type:`string`,description:`The hub_provider_id field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`region`,{type:`string`,description:`The region field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`OnrampTypeSingle`,`OnrampTypeHub`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`create`,describe:`Create On-ramp`,builder:fe,handler:async h=>c({command:`magic-cloud-networking on-ramps create`,classification:{safeFlags:[`cloud-type`,`dynamic-routing`,`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){let e=await r();o({command:`cf magic-cloud-networking on-ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({adopted_hub_id:f(h[`adopted-hub-id`],`adopted-hub-id`,`text`),attached_hubs:h[`attached-hubs`],attached_vpcs:h[`attached-vpcs`],cloud_asn:h[`cloud-asn`],cloud_type:h[`cloud-type`],description:f(h.description,`description`,`text`),dynamic_routing:h[`dynamic-routing`],hub_provider_id:f(h[`hub-provider-id`],`hub-provider-id`,`text`),install_routes_in_cloud:h[`install-routes-in-cloud`],install_routes_in_magic_wan:h[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:h[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:h[`manage-vpc-to-hub-attachments`],name:f(h.name,`name`,`text`),region:f(h.region,`region`,`text`),type:h.type,vpc:f(h.vpc,`vpc`,`text`)}):u(h.body)});return}let g=await n(h),_=h.local?e:await i();if(h.accountId=_,h.body){let e=u(h.body),n=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}if(h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`])),h[`dynamic-routing`]===void 0)throw Error(`--dynamic-routing is required (or pass --body with this field set).`);if(h[`install-routes-in-cloud`]===void 0)throw Error(`--install-routes-in-cloud is required (or pass --body with this field set).`);if(h[`install-routes-in-magic-wan`]===void 0)throw Error(`--install-routes-in-magic-wan is required (or pass --body with this field set).`);h.name===void 0&&(h.name=await p(`name`,`The name field`)),h.type===void 0&&(h.type=await m(`type`,`The type field`,[`OnrampTypeSingle`,`OnrampTypeHub`]));let v={};h[`adopted-hub-id`]!==void 0&&l(v,[`adopted_hub_id`],f(h[`adopted-hub-id`],`adopted-hub-id`,`text`)),h[`attached-hubs`]!==void 0&&l(v,[`attached_hubs`],h[`attached-hubs`]),h[`attached-vpcs`]!==void 0&&l(v,[`attached_vpcs`],h[`attached-vpcs`]),h[`cloud-asn`]!==void 0&&l(v,[`cloud_asn`],h[`cloud-asn`]),h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],h[`cloud-type`]),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`dynamic-routing`]!==void 0&&l(v,[`dynamic_routing`],h[`dynamic-routing`]),h[`hub-provider-id`]!==void 0&&l(v,[`hub_provider_id`],f(h[`hub-provider-id`],`hub-provider-id`,`text`)),h[`install-routes-in-cloud`]!==void 0&&l(v,[`install_routes_in_cloud`],h[`install-routes-in-cloud`]),h[`install-routes-in-magic-wan`]!==void 0&&l(v,[`install_routes_in_magic_wan`],h[`install-routes-in-magic-wan`]),h[`manage-hub-to-hub-attachments`]!==void 0&&l(v,[`manage_hub_to_hub_attachments`],h[`manage-hub-to-hub-attachments`]),h[`manage-vpc-to-hub-attachments`]!==void 0&&l(v,[`manage_vpc_to_hub_attachments`],h[`manage-vpc-to-hub-attachments`]),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.region!==void 0&&l(v,[`region`],f(h.region,`region`,`text`)),h.type!==void 0&&l(v,[`type`],h.type),h.vpc!==void 0&&l(v,[`vpc`],f(h.vpc,`vpc`,`text`));let y=await s(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Created`})})};function me(e){return e.usage(`$0 magic-cloud-networking on-ramps delete <onramp-id>
49
49
 
50
50
  Delete an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`destroy`,{type:`boolean`,description:`Destroy`}).option(`force`,{type:`boolean`,description:`Force`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`delete <onramp-id>`,describe:`Delete On-ramp`,builder:me,handler:async t=>c({command:`magic-cloud-networking on-ramps delete`,classification:{safeFlags:[`destroy`,`force`,`dry-run`]}},t,async()=>{let c={destroy:t.destroy,force:t.force};if(t.dryRun){let e=await r();o({command:`cf magic-cloud-networking on-ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/magic/cloud/onramps/${t[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(t[`onramp-id`]))}`,pathParams:{"onramp-id":String(t[`onramp-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();if(t.accountId=u,!await h({force:!!t.force})){process.stderr.write(`Aborted.
51
51
  `);return}let d=await s(`Deleting`,async()=>l.magicCloudNetworking.onRamps.delete({account_id:u,onramp_id:t[`onramp-id`],...c}));a(d,{successLabel:`Deleted`})})};function ge(e){return e.usage(`$0 magic-cloud-networking on-ramps edit <onramp-id>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-RlgRrmbm.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
2
+ import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C8FyienX.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
3
3
 
4
4
  Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account configuration`,builder:g,handler:async t=>c({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({default_sampling:t[`default-sampling`],name:f(t.name,`name`,`text`),router_ips:t[`router-ips`],warp_devices:u(t[`warp-devices`],`warp-devices`)}):l(t.body)});return}let c=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...e,account_id:m}));a(n,{successLabel:`Created`});return}if(t[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await p(`name`,`The account name.`));let h=d({default_sampling:t[`default-sampling`],name:f(t.name,`name`,`text`),router_ips:t[`router-ips`],warp_devices:u(t[`warp-devices`],`warp-devices`)}),g=await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...h,account_id:m}));a(g,{successLabel:`Created`})})};function v(e){return e.usage(`$0 magic-network-monitoring configs delete
5
5
 
@@ -20,17 +20,17 @@ Create multiple network monitoring rules for account in a single request. Suppor
20
20
 
21
21
  Update multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update`,describe:`Update rules in bulk`,builder:P,handler:async u=>c({command:`magic-network-monitoring rules bulk update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await n(u),d=u.local?e:await i();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),r=null;for(let i=0;i<e.length;i+=100){let a=e.slice(i,i+100),o=Math.floor(i/100)+1;r=await s(`Updating: batch ${o}/${n}`,async()=>t(c,`PUT`,`/accounts/${d}/mnm/rules/bulk`,{body:a}))}a(r,{successLabel:`Updated`});return}let n=await s(`Updating`,async()=>t(c,`PUT`,`/accounts/${d}/mnm/rules/bulk`,{body:e}));a(n,{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},I={command:`bulk`,describe:`Operations for rules.bulk`,builder:e=>e.command(ee).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 magic-network-monitoring rules create
22
22
 
23
- Create network monitoring rules for account. Currently only supports creating a single rule per API request.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`],default:`1m`}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).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 R={command:`create`,describe:`Create rules`,builder:L,handler:async t=>c({command:`magic-network-monitoring rules create`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.magicNetworkMonitoring.rules.create({body:e,account_id:u}));a(n,{successLabel:`Created`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}),g=await s(`Creating`,async()=>c.magicNetworkMonitoring.rules.create({body:h,account_id:u}));a(g,{successLabel:`Created`})})};function z(e){return e.usage(`$0 magic-network-monitoring rules delete <rule-id>
23
+ Create network monitoring rules for account. Currently only supports creating a single rule per API request.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`],default:`1m`}).coerce(`duration`,e=>f(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>f(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>f(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>f(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create rules`,builder:L,handler:async t=>c({command:`magic-network-monitoring rules create`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.magicNetworkMonitoring.rules.create({body:e,account_id:u}));a(n,{successLabel:`Created`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}),g=await s(`Creating`,async()=>c.magicNetworkMonitoring.rules.create({body:h,account_id:u}));a(g,{successLabel:`Created`})})};function z(e){return e.usage(`$0 magic-network-monitoring rules delete <rule-id>
24
24
 
25
25
  Delete a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <rule-id>`,describe:`Delete rule`,builder:z,handler:async t=>c({command:`magic-network-monitoring rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
26
26
  `);return}let u=await s(`Deleting`,async()=>c.magicNetworkMonitoring.rules.delete({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 magic-network-monitoring rules edit <rule-id>
27
27
 
28
- Update a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).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 H={command:`edit <rule-id>`,describe:`Update rule`,builder:V,handler:async t=>c({command:`magic-network-monitoring rules edit`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.edit({body:e,account_id:u,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}),g=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.edit({body:h,account_id:u,rule_id:t[`rule-id`]}));a(g,{successLabel:`Updated`})})};function U(e){return e.usage(`$0 magic-network-monitoring rules get <rule-id>
28
+ Update a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>f(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>f(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>f(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>f(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`edit <rule-id>`,describe:`Update rule`,builder:V,handler:async t=>c({command:`magic-network-monitoring rules edit`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.edit({body:e,account_id:u,rule_id:t[`rule-id`]}));a(n,{successLabel:`Updated`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}),g=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.edit({body:h,account_id:u,rule_id:t[`rule-id`]}));a(g,{successLabel:`Updated`})})};function U(e){return e.usage(`$0 magic-network-monitoring rules get <rule-id>
29
29
 
30
30
  List a single network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <rule-id>`,describe:`Get rule`,builder:U,handler:async t=>c({command:`magic-network-monitoring rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules/${t[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(t[`rule-id`]))}`,pathParams:{"rule-id":String(t[`rule-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicNetworkMonitoring.rules.get({account_id:l,rule_id:t[`rule-id`]}));a(u,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 magic-network-monitoring rules list
31
31
 
32
32
  Lists network monitoring rules for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List rules`,builder:G,handler:async t=>c({command:`magic-network-monitoring rules list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.magicNetworkMonitoring.rules.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 magic-network-monitoring rules update
33
33
 
34
- Update network monitoring rules for account.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update`,describe:`Update rules`,builder:q,handler:async t=>c({command:`magic-network-monitoring rules update`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.update({body:e,account_id:u}));a(n,{successLabel:`Updated`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:f(t.duration,`duration`,`text`),name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:f(t[`prefix-match`],`prefix-match`,`text`),prefixes:t.prefixes,type:f(t.type,`type`,`text`),zscore_sensitivity:f(t[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:f(t[`zscore-target`],`zscore-target`,`text`)}),g=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.update({body:h,account_id:u}));a(g,{successLabel:`Updated`})})},Y={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).command(J).command(M).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 magic-network-monitoring vpc-flows tokens create
34
+ Update network monitoring rules for account.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>f(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>f(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>f(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>f(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>f(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update`,describe:`Update rules`,builder:q,handler:async t=>c({command:`magic-network-monitoring rules update`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.update({body:e,account_id:u}));a(n,{successLabel:`Updated`});return}if(t[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),t.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=d({automatic_advertisement:t[`automatic-advertisement`],bandwidth_threshold:t[`bandwidth-threshold`],duration:t.duration,name:f(t.name,`name`,`text`),packet_threshold:t[`packet-threshold`],prefix_match:t[`prefix-match`],prefixes:t.prefixes,type:t.type,zscore_sensitivity:t[`zscore-sensitivity`],zscore_target:t[`zscore-target`]}),g=await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.update({body:h,account_id:u}));a(g,{successLabel:`Updated`})})},Y={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).command(J).command(M).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 magic-network-monitoring vpc-flows tokens create
35
35
 
36
36
  Generate authentication token for VPC flow logs export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`create`,describe:`Generate authentication token for VPC flow logs export.`,builder:X,handler:async t=>c({command:`magic-network-monitoring vpc-flows tokens create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf magic-network-monitoring vpc-flows tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/vpc-flows/token`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.magicNetworkMonitoring.vpcFlows.tokens.create({account_id:l}));a(u,{successLabel:`Created`})})},Q={command:`tokens`,describe:`Operations for vpc-flows.tokens`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`vpc-flows`,describe:`Ingest VPC flow logs from cloud providers for network visibility and anomaly detection`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},te={command:`magic-network-monitoring`,describe:`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,builder:e=>e.command(k).command(Y).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};