cf 1.0.0-beta.16 → 1.0.0-beta.18

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 (239) hide show
  1. package/dist/_meta/commands.json +6117 -4540
  2. package/dist/_meta/schemas.json +5016 -3257
  3. package/dist/{abuse-reports-17K-TRhO.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
  4. package/dist/{access-BwB7sg1D.mjs → access-BtsMwesh.mjs} +1 -1
  5. package/dist/{accounts-BnIGu_ac.mjs → accounts-X5QVzEUW.mjs} +27 -21
  6. package/dist/{acm-CQRcu_zw.mjs → acm-C_NepMi6.mjs} +1 -1
  7. package/dist/{addressing-Qcm9jd3C.mjs → addressing-BkQY1hoA.mjs} +18 -18
  8. package/dist/{agent-memory-B3xN9I6-.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
  9. package/dist/{ai-BRKOCckA.mjs → ai-Bb0_Zknm.mjs} +1 -1
  10. package/dist/{ai-audit-Cd9Rc2Fc.mjs → ai-audit-DuEjVdML.mjs} +1 -1
  11. package/dist/{ai-gateway-BWU5064V.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
  12. package/dist/ai-search-DDRpxyOM.mjs +79 -0
  13. package/dist/{ai-security-Dn0Ee6QS.mjs → ai-security-A2STvE1b.mjs} +5 -5
  14. package/dist/{alerting-BXTiMfXo.mjs → alerting-CIwSk-Ks.mjs} +1 -1
  15. package/dist/{analytics-Jyd04TRW.mjs → analytics-H--uM3DA.mjs} +7 -7
  16. package/dist/{analytics-engine-CzrNfUeh.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
  17. package/dist/{api-security-DRBHZaf_.mjs → api-security-D-pcnhUL.mjs} +26 -26
  18. package/dist/{argo-DiQt0pSb.mjs → argo-Lvmcx3am.mjs} +1 -1
  19. package/dist/{artifacts-eBZ4YN53.mjs → artifacts-xT5S-mVa.mjs} +1 -1
  20. package/dist/{audit-logs-Bb4HTZay.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
  21. package/dist/{auth-C6My1gI6.mjs → auth-B73lQS2h.mjs} +1 -1
  22. package/dist/auth-DMzEmOhG.mjs +2 -0
  23. package/dist/{auth-eVI_UEt8.mjs → auth-Db1KT0vm.mjs} +1 -1
  24. package/dist/{auth-token-Cfj2yehs.mjs → auth-token-D9XIPlwf.mjs} +1 -1
  25. package/dist/{autoconfig-B0ESZ8DJ.mjs → autoconfig-9po_tqsS.mjs} +1 -1
  26. package/dist/{basin-catalog-Cwk1RSMX.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
  27. package/dist/{billing-CfV8oi6A.mjs → billing-Bm2JNSGa.mjs} +6 -6
  28. package/dist/body-parser-DnBfDdx3.mjs +2 -0
  29. package/dist/{bot-management-CH4_Kewx.mjs → bot-management-CSr38g-O.mjs} +4 -4
  30. package/dist/{botnet-feed-Cg_Wp8ei.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
  31. package/dist/{brand-protection-Cp2ckWou.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
  32. package/dist/browser-run-BcWxzhAn.mjs +42 -0
  33. package/dist/build-BRJnyeu8.mjs +2 -0
  34. package/dist/{build-sBpqm9ga.mjs → build-i8l2qGVZ.mjs} +1 -1
  35. package/dist/{builds-B2RBgVL9.mjs → builds-BMwDzi7G.mjs} +39 -39
  36. package/dist/{cache-yvrYPvRI.mjs → cache-_VaTLC5T.mjs} +1 -1
  37. package/dist/chunk-JP6R7L72-C0kFUelb.mjs +2 -0
  38. package/dist/cli-P3q5DG3W.mjs +6 -0
  39. package/dist/{client-side-security-D50iZjd_.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
  40. package/dist/{cloud-connector-wvSGdxWT.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
  41. package/dist/{cloudforce-one-j6vlmaMB.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
  42. package/dist/{command-CM_f48gs.mjs → command-BXiA79DP.mjs} +1 -1
  43. package/dist/{command-CmUtmu5j.mjs → command-BbsPxJBT.mjs} +1 -1
  44. package/dist/{command-BDpm-U8z.mjs → command-Bkc04OyY.mjs} +1 -1
  45. package/dist/{command-BSbhJRmu.mjs → command-BtTc28ql.mjs} +1 -1
  46. package/dist/{command-DFRsim8q.mjs → command-CBZhxmKD.mjs} +1 -1
  47. package/dist/{command-BbO3sBQ2.mjs → command-CL7LLXM7.mjs} +1 -1
  48. package/dist/{command-DQojhTEQ.mjs → command-CYyfigfC.mjs} +1 -1
  49. package/dist/{command-DiqRELHF.mjs → command-CxWLFv5Y.mjs} +1 -1
  50. package/dist/{command-74P4_CTx.mjs → command-DDcBC4px.mjs} +1 -1
  51. package/dist/{command-Dr4PEvB2.mjs → command-NoxvOARP.mjs} +1 -1
  52. package/dist/{completions-oD1EcuHk.mjs → completions-CrDmwKnK.mjs} +1 -1
  53. package/dist/{connector-interrupts-DP4rbOe8.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
  54. package/dist/{connector-telemetry-events-BQGBQwzR.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
  55. package/dist/{connector-telemetry-snapshots-DBO0Mdcj.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
  56. package/dist/{connectors-BSVr3Kz1.mjs → connectors-DvVlxGDx.mjs} +1 -1
  57. package/dist/{containers-BTqAeVV2.mjs → containers-Bt2zFsFd.mjs} +8 -8
  58. package/dist/{containers-BOpKpipz.mjs → containers-BtcOgwm5.mjs} +2 -2
  59. package/dist/{content-scan-B9Keyxe-.mjs → content-scan-DldLmTjy.mjs} +1 -1
  60. package/dist/{context-B-vEsyrK.mjs → context-C_a8oSY9.mjs} +1 -1
  61. package/dist/cps-REo1OWP1.mjs +6 -0
  62. package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
  63. package/dist/{custom-csrs-DM5X-K6H.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
  64. package/dist/{custom-hostnames-BBjqaiFF.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
  65. package/dist/{custom-nameservers-C0NDMLPJ.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
  66. package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
  67. package/dist/{d1-hin5PmxW.mjs → d1-DvCiQibO.mjs} +8 -8
  68. package/dist/{deploy-Bo7FtE44.mjs → deploy-K664XPOb.mjs} +1 -1
  69. package/dist/{deploy-context-ClvBD87y.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
  70. package/dist/{deploy-input-BqJ7GVZ-.mjs → deploy-input-KK6yyBN_.mjs} +1 -1
  71. package/dist/{dev-EtnMYA7K.mjs → dev-CnoMHxf4.mjs} +1 -1
  72. package/dist/{diagnostics-LZuMrGjK.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
  73. package/dist/{dls-Bq8k3iy-.mjs → dls-DoqfqutH.mjs} +1 -1
  74. package/dist/{dns-ry5E2Bsa.mjs → dns-DC6WcO3m.mjs} +21 -21
  75. package/dist/{dns-firewall-zavP5Qxj.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
  76. package/dist/{docs-B08YtL0U.mjs → docs-CqNRBHab.mjs} +1 -1
  77. package/dist/{durable-objects-B9fo41B1.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
  78. package/dist/{email-auth-D9LGjFlh.mjs → email-auth--NHg1TjG.mjs} +1 -1
  79. package/dist/{email-routing-6iDnNPhY.mjs → email-routing-COjENK55.mjs} +13 -13
  80. package/dist/{email-security-ty4ufRnJ.mjs → email-security-rdjH95T2.mjs} +38 -38
  81. package/dist/{email-sending-d7LO_Cz_.mjs → email-sending-26VJhR6Q.mjs} +18 -18
  82. package/dist/{field-extractors-DkgQ7PSw.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
  83. package/dist/{firewall-Q88YyEwD.mjs → firewall-D8K93ffF.mjs} +20 -20
  84. package/dist/{flagship-CzI8zhd6.mjs → flagship-CHdmCmvQ.mjs} +11 -11
  85. package/dist/{fraud-CvFXTR0w.mjs → fraud-CY4TV5Vc.mjs} +1 -1
  86. package/dist/{google-tag-gateway-Y2zbyey8.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
  87. package/dist/healthchecks-B52Mf3uL.mjs +22 -0
  88. package/dist/{hostnames-B3k7fIUL.mjs → hostnames-BMITIM8P.mjs} +1 -1
  89. package/dist/{hyperdrive-BWGYz95H.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
  90. package/dist/{iam-AXco_qmt.mjs → iam-o1n9eUXf.mjs} +9 -9
  91. package/dist/{images-BzYh8y0u.mjs → images-CJHAGxX6.mjs} +37 -37
  92. package/dist/index.mjs +1 -1
  93. package/dist/{init-DlenHBtS.mjs → init-CqQDL6i3.mjs} +1 -1
  94. package/dist/{intel-BBi3i_GU.mjs → intel-B3S1gxUg.mjs} +1 -1
  95. package/dist/{ips-CWG2b7AM.mjs → ips-q_UJMiy8.mjs} +1 -1
  96. package/dist/{k2-DXdMe3Cb.mjs → k2-BNqVZnDN.mjs} +2 -2
  97. package/dist/{kv-FUd7UdDu.mjs → kv-B0nXSOcW.mjs} +1 -1
  98. package/dist/{lazy-command-BC8rIlHu.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
  99. package/dist/{leaked-credential-checks-BufVA9vL.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
  100. package/dist/load-balancers-DJtMztJ0.mjs +76 -0
  101. package/dist/{login-DVbXZ_Tv.mjs → login-D-1FiBNv.mjs} +1 -1
  102. package/dist/{login-BJr2PBaJ.mjs → login-chQP8825.mjs} +1 -1
  103. package/dist/{logo-matches-BluaPvMa.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
  104. package/dist/{logos-CXtmYWEJ.mjs → logos-tnIahhcu.mjs} +1 -1
  105. package/dist/{logpush-DCYgrqz0.mjs → logpush-D4s3pJRw.mjs} +24 -24
  106. package/dist/{logs-as60IP29.mjs → logs-cw7UL5V2.mjs} +3 -3
  107. package/dist/{magic-cloud-networking-0RsHugUF.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
  108. package/dist/{magic-network-monitoring-CPqvZdcb.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
  109. package/dist/{magic-transit-ClPyGzOE.mjs → magic-transit-BFopRdPs.mjs} +170 -170
  110. package/dist/{managed-defense-P4_QWSbK.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
  111. package/dist/{managed-transforms-CUwQXMij.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
  112. package/dist/{matches-BjckDBW1.mjs → matches-ClJ_24EY.mjs} +1 -1
  113. package/dist/{mcp-C2EG2c7L.mjs → mcp-50os3IRG.mjs} +10 -10
  114. package/dist/{mesh-CpMZA7Xt.mjs → mesh-jxtQP8sS.mjs} +2 -2
  115. package/dist/{migrate-6e5mJ79R.mjs → migrate-DerOyuv2.mjs} +1 -1
  116. package/dist/{monetization-DypuCZmU.mjs → monetization-D6cCDi-h.mjs} +4 -4
  117. package/dist/{network-DQ5Ridgy.mjs → network-dnWHB2uY.mjs} +27 -25
  118. package/dist/{network-interconnects-ifU4JhGE.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
  119. package/dist/{o11y-CzssfRHt.mjs → o11y-oMSg1pG4.mjs} +49 -49
  120. package/dist/{oauth-BNTiErBG.mjs → oauth-BfBdHhPS.mjs} +1 -1
  121. package/dist/{oauth-BDdhqasa.mjs → oauth-DDOiiH7h.mjs} +1 -1
  122. package/dist/{oauth-clients-gknNcBdV.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
  123. package/dist/{oauth-scopes-BJeSanuF.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
  124. package/dist/open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs +4 -0
  125. package/dist/organization-94lHeeOs.mjs +75 -0
  126. package/dist/{organizations-kfFFW4uO.mjs → organizations-BJf3UTFi.mjs} +1 -1
  127. package/dist/{origin-post-quantum-encryption-DfrnptJ1.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
  128. package/dist/{page-rules-ByrDMDBZ.mjs → page-rules-BUI-50oz.mjs} +4 -4
  129. package/dist/pages-CcdpCzHs.mjs +54 -0
  130. package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
  131. package/dist/{pay-per-use-49EXt75f.mjs → pay-per-use-t066I5wm.mjs} +7 -7
  132. package/dist/{pipelines-Bvgh1BQZ.mjs → pipelines-Co6S044l.mjs} +8 -8
  133. package/dist/precursor-BftyvS86.mjs +4 -0
  134. package/dist/previews-BLhnhElx.mjs +7 -0
  135. package/dist/{progress-R-1tIuep.mjs → progress-Q5w9PNTT.mjs} +1 -1
  136. package/dist/{prompt-dgLm0iFJ.mjs → prompt-C0hKSr-R.mjs} +1 -1
  137. package/dist/{queries-EbIadtC5.mjs → queries-4MubO6Sz.mjs} +3 -3
  138. package/dist/{queues-C4GZ-O3f.mjs → queues-CteS5M92.mjs} +17 -17
  139. package/dist/{r2-DEuFfWBR.mjs → r2-2QpT_Gso.mjs} +24 -24
  140. package/dist/{radar-CDOERVcR.mjs → radar-ODKaK4FJ.mjs} +1 -1
  141. package/dist/{raw-fetch-BapeoreV.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
  142. package/dist/{realtime-D_A9Qgly.mjs → realtime-DkfU8uEX.mjs} +84 -84
  143. package/dist/registrar-DM6JTVPS.mjs +43 -0
  144. package/dist/{registrar-sandbox-BF3cYO3n.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
  145. package/dist/{reporting-BWm9jIF8.mjs → reporting-5yFNXbJg.mjs} +1 -1
  146. package/dist/{request-headers-BRxv6NkA.mjs → request-headers-DXvswze2.mjs} +1 -1
  147. package/dist/request-tracers-BarLZY95.mjs +4 -0
  148. package/dist/{resource-sharing-C186jZv0.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
  149. package/dist/{rules-DYnGIU_0.mjs → rules-_C31X4Jz.mjs} +6 -6
  150. package/dist/{rulesets-BcNrbVcq.mjs → rulesets-8RwxoFhG.mjs} +6 -6
  151. package/dist/{rum-BDyRecfp.mjs → rum-CAUcpXpM.mjs} +6 -6
  152. package/dist/{run-BvDCuZ8q.mjs → run-DtFLvOHB.mjs} +1 -1
  153. package/dist/run-LcOb9rhI.mjs +2 -0
  154. package/dist/{schema-flags-DcKjAxI1.mjs → schema-flags-DibfxEF6.mjs} +1 -1
  155. package/dist/{scim-zn-CNCsc.mjs → scim-DX5XrQ4w.mjs} +1 -1
  156. package/dist/{secrets-store-CFhyQUV6.mjs → secrets-store-DSqqrr25.mjs} +1 -1
  157. package/dist/{security-insights-D8XgtCed.mjs → security-insights-FSktO04S.mjs} +1 -1
  158. package/dist/{security-txt-CCM-Vro0.mjs → security-txt-D2g3lQdg.mjs} +1 -1
  159. package/dist/{shared-ouAF7o4S.mjs → shared-eefMO8R4.mjs} +1 -1
  160. package/dist/smart-shield-IVb2sR0C.mjs +24 -0
  161. package/dist/{snippets-B2jBY0m_.mjs → snippets-cWwWficN.mjs} +2 -2
  162. package/dist/{spawn-DQttFH05.mjs → spawn-BW2bJmKO.mjs} +1 -1
  163. package/dist/{spectrum-Cf_4cGE8.mjs → spectrum-DYiIBYRB.mjs} +1 -1
  164. package/dist/{speed-DoXdyIYK.mjs → speed-C7uiW2Wf.mjs} +1 -1
  165. package/dist/{sql-Bze4h80q.mjs → sql-TGV8qQMj.mjs} +1 -1
  166. package/dist/{src-BguQDHjS.mjs → src-BUH-P_zd.mjs} +5 -5
  167. package/dist/ssl-xQP_HbWN.mjs +139 -0
  168. package/dist/{stream-BcReYIHJ.mjs → stream-CfWgj8Cr.mjs} +55 -55
  169. package/dist/{submit-ldFVNfNC.mjs → submit-DxGr1T40.mjs} +1 -1
  170. package/dist/tags-LEJ2VYhQ.mjs +23 -0
  171. package/dist/{telemetry-Cojgz4Sv.mjs → telemetry-BHne10Yy.mjs} +1 -1
  172. package/dist/telemetry-BavSU4ku.mjs +2 -0
  173. package/dist/{tenant-AZ0EAsmT.mjs → tenant-7d5vwc6K.mjs} +1 -1
  174. package/dist/{tenant-custom-nameservers-aozjaasc.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
  175. package/dist/{tunnels-CXez5LPB.mjs → tunnels-DlGODvwT.mjs} +4 -4
  176. package/dist/{turnstile-B2NQ8Nsk.mjs → turnstile-DhLkdhij.mjs} +5 -5
  177. package/dist/update-check-nLfkSfdz.mjs +2 -0
  178. package/dist/update-check-worker.mjs +1 -1
  179. package/dist/{update-check-BlyKN8m0.mjs → update-check-wvjOsnGK.mjs} +1 -1
  180. package/dist/{url-info-D_UqGiWD.mjs → url-info-CeoV5dBc.mjs} +1 -1
  181. package/dist/{url-normalization-CF1YHpIN.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
  182. package/dist/{url-scanner-ChF3GO2U.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
  183. package/dist/{user-BfWRsdJh.mjs → user-D33B3alX.mjs} +59 -59
  184. package/dist/{vectorize-CRYbWKg5.mjs → vectorize-Wp9De13y.mjs} +17 -17
  185. package/dist/version-B2RUUqGT.mjs +2 -0
  186. package/dist/{waiting-rooms-Crp7MVd9.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
  187. package/dist/{web-assets-CgyrPnT-.mjs → web-assets-ew0iaP7c.mjs} +35 -35
  188. package/dist/{web3-Cd0Yd0eQ.mjs → web3-BUyXBaqq.mjs} +6 -6
  189. package/dist/{workers-builds-f2nVw7EZ.mjs → workers-builds-DzU9NGno.mjs} +7 -7
  190. package/dist/{workers-for-platforms-DjeKp2uy.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
  191. package/dist/{workers-CTwJpTfJ.mjs → workers-pP5tsDbD.mjs} +25 -22
  192. package/dist/{workers-vpc-B_L3TEg2.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
  193. package/dist/{workflows-CBPGf65x.mjs → workflows-DXYGKtqq.mjs} +1 -1
  194. package/dist/wrangler-migration-R9TQ_4Qd.mjs +946 -0
  195. package/dist/zaraz-DoH4QD0u.mjs +22 -0
  196. package/dist/{zero-trust-B9xY8zcn.mjs → zero-trust-DKt20rzE.mjs} +461 -458
  197. package/dist/{zone-CmwVqTI2.mjs → zone-BXM3p0JR.mjs} +1 -1
  198. package/dist/{zones-Bf0VVpMf.mjs → zones-CJdtqEBx.mjs} +21 -21
  199. package/package.json +11 -11
  200. package/dist/account-tags-povXTDAu.mjs +0 -15
  201. package/dist/ai-search-CJ3b8eot.mjs +0 -79
  202. package/dist/auth-OFqV2M4q.mjs +0 -2
  203. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  204. package/dist/browser-run-CfQ30dB6.mjs +0 -42
  205. package/dist/build-Bm6kGyzo.mjs +0 -2
  206. package/dist/certificate-authorities-BdMRaOnD.mjs +0 -6
  207. package/dist/cli-CsnoQloF.mjs +0 -6
  208. package/dist/client-certificates-CuWGvZSr.mjs +0 -13
  209. package/dist/cps-VRP794c5.mjs +0 -6
  210. package/dist/csam-scanner-C1jOgXVu.mjs +0 -10
  211. package/dist/ct-alerting-Y9vfa6Fo.mjs +0 -5
  212. package/dist/custom-certificates-CojTEC0E.mjs +0 -17
  213. package/dist/custom-pages-M4RUxcn6.mjs +0 -21
  214. package/dist/dcv-delegation-KOO8syyQ.mjs +0 -4
  215. package/dist/healthchecks-4Hz-6xYi.mjs +0 -22
  216. package/dist/keyless-certificates-B4ta_OGS.mjs +0 -13
  217. package/dist/keys-B9zvFzrf.mjs +0 -4
  218. package/dist/load-balancers-CWd9mSWM.mjs +0 -76
  219. package/dist/mtls-certificates-B5AWTU6u.mjs +0 -13
  220. package/dist/organization-CXAM41sd.mjs +0 -71
  221. package/dist/origin-ca-certificates-DwhYV3m_.mjs +0 -11
  222. package/dist/origin-tls-client-auth-COSxTc2q.mjs +0 -30
  223. package/dist/pages-DuGcBC6k.mjs +0 -54
  224. package/dist/pay-per-crawl-B3_Gn9Cj.mjs +0 -38
  225. package/dist/precursor-VobQf--m.mjs +0 -4
  226. package/dist/previews-DkwFHNRx.mjs +0 -7
  227. package/dist/registrar-X1YLlnmg.mjs +0 -43
  228. package/dist/request-tracers-CHWpiejG.mjs +0 -4
  229. package/dist/resource-tagging-BTagOZli.mjs +0 -4
  230. package/dist/run-roYb_Odh.mjs +0 -2
  231. package/dist/smart-shield-DwW7N92r.mjs +0 -24
  232. package/dist/ssl-u_0gUhPA.mjs +0 -45
  233. package/dist/tags-D_Hc_A-r.mjs +0 -4
  234. package/dist/telemetry-Ct_2AaO4.mjs +0 -2
  235. package/dist/update-check-BnGDxswi.mjs +0 -2
  236. package/dist/values-CLfxkAUJ.mjs +0 -4
  237. package/dist/version-CVlh2Zaq.mjs +0 -2
  238. package/dist/wrangler-migration-DxTB5yPT.mjs +0 -2
  239. package/dist/zaraz-3VDxl0gF.mjs +0 -22
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-eVI_UEt8.mjs";import{a as i,i as a,t as o}from"./context-B-vEsyrK.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-R-1tIuep.mjs";import{t as u}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as d,r as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-dgLm0iFJ.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`,body:`json`};function v(e){return e.usage(`$0 load-balancers account create
3
-
4
- Create a new account or zone-scoped load balancer.`).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`,default:!0}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`,default:!1}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`],default:`none`}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`],default:``}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).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 y={command:`create`,describe:`Create account or zone Load Balancer`,builder:v,handler:async e=>u({command:`load-balancers account create`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}):d(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,g=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(_,{body:t,account_or_zone:u,account_or_zone_id:g}));s(r,{successLabel:`Created`});return}if(e[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);e[`fallback-pool`]===void 0&&(e[`fallback-pool`]=await h(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),e.name===void 0&&(e.name=await h(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let v=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}),y=await l(`Creating`,async()=>n.send(_,{body:v,account_or_zone:u,account_or_zone_id:g}));s(y,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`};function ee(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
-
6
- Delete a configured account or zone-scoped load balancer.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer 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 x={command:`delete <load-balancer-id>`,describe:`Delete account or zone Load Balancer`,builder:ee,handler:async e=>u({command:`load-balancers account delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await g({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}let f=await l(`Deleting`,async()=>n.send(b,{account_or_zone:u,account_or_zone_id:d,load_balancer_id:e[`load-balancer-id`]}));s(f,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`,body:`json`};function te(e){return e.usage(`$0 load-balancers account edit <load-balancer-id>
8
-
9
- Apply changes to an existing account or zone-scoped load balancer, overwriting the supplied properties.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,demandOption:!0}).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`]}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`]}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The editable properties shared by load balancer create, update, and patch requests. Operations layer their own `required` constraints on top via `allOf`."})}const ne={command:`edit <load-balancer-id>`,describe:`Patch account or zone Load Balancer`,builder:te,handler:async e=>u({command:`load-balancers account edit`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}):d(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(S,{body:t,account_or_zone:u,account_or_zone_id:h,load_balancer_id:e[`load-balancer-id`]}));s(r,{successLabel:`Updated`});return}let g=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}),_=await l(`Updating`,async()=>n.send(S,{body:g,account_or_zone:u,account_or_zone_id:h,load_balancer_id:e[`load-balancer-id`]}));s(_,{successLabel:`Updated`})})};var re={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`};function ie(e){return e.usage(`$0 load-balancers account get <load-balancer-id>
10
-
11
- Fetch a single configured account or zone-scoped load balancer.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get <load-balancer-id>`,describe:`account or zone Load Balancer Details`,builder:ie,handler:async e=>u({command:`load-balancers account get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(re,{account_or_zone:u,account_or_zone_id:d,load_balancer_id:e[`load-balancer-id`]}));s(f,{successLabel:`Loaded`})})};var oe={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers`};function se(e){return e.usage(`$0 load-balancers account list
12
-
13
- List configured account or zone-scoped load balancers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List account or zone Load Balancers`,builder:se,handler:async e=>u({command:`load-balancers account list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(oe,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/load_balancers/${t.load_balancer_id}`,body:`json`};function le(e){return e.usage(`$0 load-balancers account update <load-balancer-id>
14
-
15
- Update a configured account or zone-scoped load balancer.`).positional(`load-balancer-id`,{type:`string`,description:`Load balancer ID`,demandOption:!0}).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).coerce(`location-strategy-mode`,e=>m(e,`location-strategy-mode`,`text`)).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).coerce(`location-strategy-prefer-ecs`,e=>m(e,`location-strategy-prefer-ecs`,`text`)).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`]}).coerce(`session-affinity`,e=>m(e,`session-affinity`,`text`)).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).coerce(`session-affinity-attributes-samesite`,e=>m(e,`session-affinity-attributes-samesite`,`text`)).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).coerce(`session-affinity-attributes-secure`,e=>m(e,`session-affinity-attributes-secure`,`text`)).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).coerce(`session-affinity-attributes-zero-downtime-failover`,e=>m(e,`session-affinity-attributes-zero-downtime-failover`,`text`)).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`]}).coerce(`steering-policy`,e=>m(e,`steering-policy`,`text`)).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update <load-balancer-id>`,describe:`Update account or zone Load Balancer`,builder:le,handler:async e=>u({command:`load-balancers account update`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf load-balancers account update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/load_balancers/${e[`load-balancer-id`]==null?`<load-balancer-id>`:encodeURIComponent(String(e[`load-balancer-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"load-balancer-id":String(e[`load-balancer-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}):d(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,g=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(C,{body:t,account_or_zone:u,account_or_zone_id:g,load_balancer_id:e[`load-balancer-id`]}));s(r,{successLabel:`Updated`});return}if(e[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);e[`fallback-pool`]===void 0&&(e[`fallback-pool`]=await h(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),e.name===void 0&&(e.name=await h(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let _=p({adaptive_routing:{failover_across_pools:e[`adaptive-routing-failover-across-pools`]},default_pools:e[`default-pools`],description:m(e.description,`description`,`text`),enabled:e.enabled,fallback_pool:m(e[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:e[`location-strategy-mode`],prefer_ecs:e[`location-strategy-prefer-ecs`]},name:m(e.name,`name`,`text`),networks:e.networks,proxied:e.proxied,random_steering:{default_weight:e[`random-steering-default-weight`]},rules:f(e.rules,`rules`),session_affinity:e[`session-affinity`],session_affinity_attributes:{drain_duration:e[`session-affinity-attributes-drain-duration`],headers:e[`session-affinity-attributes-headers`],require_all_headers:e[`session-affinity-attributes-require-all-headers`],samesite:e[`session-affinity-attributes-samesite`],secure:e[`session-affinity-attributes-secure`],zero_downtime_failover:e[`session-affinity-attributes-zero-downtime-failover`]},session_affinity_ttl:e[`session-affinity-ttl`],steering_policy:e[`steering-policy`],ttl:e.ttl}),v=await l(`Updating`,async()=>n.send(C,{body:_,account_or_zone:u,account_or_zone_id:g,load_balancer_id:e[`load-balancer-id`]}));s(v,{successLabel:`Updated`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/usage`};function T(e){return e.usage(`$0 load-balancers account usage list
16
-
17
- Get current load balancer resource usage counts for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Load Balancer Usage`,builder:T,handler:async e=>u({command:`load-balancers account usage list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf load-balancers account usage list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/usage`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(w,{account_id:a}));s(u,{successLabel:`Loaded`})})},D={command:`usage`,describe:`Operations for account.usage`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`account`,describe:`Operations for account`,builder:e=>e.command(y).command(x).command(ne).command(ae).command(ce).command(ue).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups`,body:`json`,errors:{412:`PreconditionFailedError`}};function A(e){return e.usage(`$0 load-balancers monitor-groups create
18
-
19
- Create a new monitor group.`).option(`description`,{type:`string`,description:`A short description of the monitor group`}).option(`members`,{type:`string`,description:`List of monitors in this group. 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 j={command:`create`,describe:`Create Monitor Group`,builder:A,handler:async e=>u({command:`load-balancers monitor-groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(k,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await h(`description`,`A short description of the monitor group`)),e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let u=p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}),g=await l(`Creating`,async()=>n.send(k,{body:u,account_id:a}));s(g,{successLabel:`Created`})})};var M={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,errors:{412:`PreconditionFailedError`}};function N(e){return e.usage(`$0 load-balancers monitor-groups delete <monitor-group-id>
20
-
21
- Delete a configured monitor group.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group 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 P={command:`delete <monitor-group-id>`,describe:`Delete Monitor Group`,builder:N,handler:async e=>u({command:`load-balancers monitor-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force})){process.stderr.write(`Aborted.
22
- `);return}let u=await l(`Deleting`,async()=>n.send(M,{account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(u,{successLabel:`Deleted`})})};var F={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,body:`json`,errors:{412:`PreconditionFailedError`}};function I(e){return e.usage(`$0 load-balancers monitor-groups edit <monitor-group-id>
23
-
24
- Apply changes to an existing monitor group, overwriting the supplied properties.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the monitor group`}).option(`members`,{type:`string`,description:`List of monitors in this group. 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 L={command:`edit <monitor-group-id>`,describe:`Patch Monitor Group`,builder:I,handler:async e=>u({command:`load-balancers monitor-groups edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(F,{body:t,account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(r,{successLabel:`Updated`});return}if(e.description===void 0&&(e.description=await h(`description`,`A short description of the monitor group`)),e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let u=p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}),g=await l(`Updating`,async()=>n.send(F,{body:u,account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(g,{successLabel:`Updated`})})};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`};function z(e){return e.usage(`$0 load-balancers monitor-groups get <monitor-group-id>
25
-
26
- Fetch a single configured monitor group.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <monitor-group-id>`,describe:`Monitor Group Details`,builder:z,handler:async e=>u({command:`load-balancers monitor-groups get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(R,{account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(u,{successLabel:`Loaded`})})};var V={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups`};function H(e){return e.usage(`$0 load-balancers monitor-groups list
27
-
28
- List configured monitor groups.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List Monitor Groups`,builder:H,handler:async e=>u({command:`load-balancers monitor-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf load-balancers monitor-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/monitor_groups`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(V,{account_id:a}));s(u,{successLabel:`Loaded`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}/references`};function fe(e){return e.usage(`$0 load-balancers monitor-groups references list
29
-
30
- Get the list of resources that reference the provided monitor group.`).option(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List Monitor Group References`,builder:fe,handler:async e=>u({command:`load-balancers monitor-groups references list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups references list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}/references`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(de,{account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(u,{successLabel:`Loaded`})})},me={command:`references`,describe:`List references to monitor groups used by load balancer pools`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitor_groups/${t.monitor_group_id}`,body:`json`,errors:{412:`PreconditionFailedError`}};function he(e){return e.usage(`$0 load-balancers monitor-groups update <monitor-group-id>
31
-
32
- Modify a configured monitor group.`).positional(`monitor-group-id`,{type:`string`,description:`Monitor group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the monitor group`}).option(`members`,{type:`string`,description:`List of monitors in this group. 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 ge={command:`update <monitor-group-id>`,describe:`Update Monitor Group`,builder:he,handler:async e=>u({command:`load-balancers monitor-groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitor-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitor_groups/${e[`monitor-group-id`]==null?`<monitor-group-id>`:encodeURIComponent(String(e[`monitor-group-id`]))}`,pathParams:{"monitor-group-id":String(e[`monitor-group-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(W,{body:t,account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(r,{successLabel:`Updated`});return}if(e.description===void 0&&(e.description=await h(`description`,`A short description of the monitor group`)),e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let u=p({description:m(e.description,`description`,`text`),members:f(e.members,`members`)}),g=await l(`Updating`,async()=>n.send(W,{body:u,account_id:a,monitor_group_id:e[`monitor-group-id`]}));s(g,{successLabel:`Updated`})})},_e={command:`monitor-groups`,describe:`Group monitors together for shared configuration and bulk management`,builder:e=>e.command(j).command(P).command(L).command(B).command(U).command(ge).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors`,body:`json`};function ve(e){return e.usage(`$0 load-balancers monitors create
33
-
34
- Create a configured monitor.`).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).coerce(`type`,e=>m(e,`type`,`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 ye={command:`create`,describe:`Create Monitor`,builder:ve,handler:async e=>u({command:`load-balancers monitors create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(G,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}),f=await l(`Creating`,async()=>n.send(G,{body:u,account_id:a}));s(f,{successLabel:`Created`})})};var be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`};function xe(e){return e.usage(`$0 load-balancers monitors delete <monitor-id>
35
-
36
- Delete a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor 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 Se={command:`delete <monitor-id>`,describe:`Delete Monitor`,builder:xe,handler:async e=>u({command:`load-balancers monitors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force})){process.stderr.write(`Aborted.
37
- `);return}let u=await l(`Deleting`,async()=>n.send(be,{account_id:a,monitor_id:e[`monitor-id`]}));s(u,{successLabel:`Deleted`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`,body:`json`};function Ce(e){return e.usage(`$0 load-balancers monitors edit <monitor-id>
38
-
39
- Apply changes to an existing monitor, overwriting the supplied properties.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).coerce(`type`,e=>m(e,`type`,`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 we={command:`edit <monitor-id>`,describe:`Patch Monitor`,builder:Ce,handler:async e=>u({command:`load-balancers monitors edit`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(K,{body:t,account_id:a,monitor_id:e[`monitor-id`]}));s(r,{successLabel:`Updated`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}),f=await l(`Updating`,async()=>n.send(K,{body:u,account_id:a,monitor_id:e[`monitor-id`]}));s(f,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`};function Ee(e){return e.usage(`$0 load-balancers monitors get <monitor-id>
40
-
41
- List a single configured monitor for an account.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get <monitor-id>`,describe:`Monitor Details`,builder:Ee,handler:async e=>u({command:`load-balancers monitors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Te,{account_id:a,monitor_id:e[`monitor-id`]}));s(u,{successLabel:`Loaded`})})};var Oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors`};function ke(e){return e.usage(`$0 load-balancers monitors list
42
-
43
- List configured monitors for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`list`,describe:`List Monitors`,builder:ke,handler:async e=>u({command:`load-balancers monitors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf load-balancers monitors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/monitors`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Oe,{account_id:a}));s(u,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}/preview`,body:`json`};function je(e){return e.usage(`$0 load-balancers monitors previews create <monitor-id>
44
-
45
- Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).coerce(`type`,e=>m(e,`type`,`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 Me={command:`create <monitor-id>`,describe:`Preview Monitor`,builder:je,handler:async e=>u({command:`load-balancers monitors previews create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}/preview`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(q,{body:t,account_id:a,monitor_id:e[`monitor-id`]}));s(r,{successLabel:`Created`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}),f=await l(`Creating`,async()=>n.send(q,{body:u,account_id:a,monitor_id:e[`monitor-id`]}));s(f,{successLabel:`Created`})})},Ne={command:`previews`,describe:`Health check configurations that probe origin servers and determine pool availability`,builder:e=>e.command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}/references`};function Fe(e){return e.usage(`$0 load-balancers monitors references get <monitor-id>
46
-
47
- Get the list of resources that reference the provided monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`get <monitor-id>`,describe:`List Monitor References`,builder:Fe,handler:async e=>u({command:`load-balancers monitors references get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors references get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}/references`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Pe,{account_id:a,monitor_id:e[`monitor-id`]}));s(u,{successLabel:`Loaded`})})},Le={command:`references`,describe:`Health check configurations that probe origin servers and determine pool availability`,builder:e=>e.command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:t=>e`/accounts/${t.account_id}/load_balancers/monitors/${t.monitor_id}`,body:`json`};function Re(e){return e.usage(`$0 load-balancers monitors update <monitor-id>
48
-
49
- Modify a configured monitor.`).positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).coerce(`type`,e=>m(e,`type`,`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 ze={command:`update <monitor-id>`,describe:`Update Monitor`,builder:Re,handler:async e=>u({command:`load-balancers monitors update`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers monitors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/monitors/${e[`monitor-id`]==null?`<monitor-id>`:encodeURIComponent(String(e[`monitor-id`]))}`,pathParams:{"monitor-id":String(e[`monitor-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(J,{body:t,account_id:a,monitor_id:e[`monitor-id`]}));s(r,{successLabel:`Updated`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}),f=await l(`Updating`,async()=>n.send(J,{body:u,account_id:a,monitor_id:e[`monitor-id`]}));s(f,{successLabel:`Updated`})})},Be={command:`monitors`,describe:`Health check configurations that probe origin servers and determine pool availability`,builder:e=>e.command(ye).command(Se).command(we).command(De).command(Ae).command(ze).command(Ne).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ve={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools`,body:`json`};function He(e){return e.usage("$0 load-balancers pools bulk-edit\n\nApply changes to a number of existing pools, overwriting the supplied properties. Pools are ordered by ascending `name`. Returns the list of affected pools. Supports the standard pagination query parameters, either `limit`/`offset` or `per_page`/`page`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ue={command:`bulk-edit`,describe:`Patch Pools`,builder:He,handler:async e=>u({command:`load-balancers pools bulk-edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:d(e.body)});return}let a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body){let t=d(e.body),n=await l(`Updating`,async()=>a.send(Ve,{body:t,account_id:u}));s(n,{successLabel:`Updated`});return}let f=await l(`Updating`,async()=>n(a,`PATCH`,`/accounts/${u}/load_balancers/pools`));s(f,{successLabel:`Updated`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools`,body:`json`};function We(e){return e.usage(`$0 load-balancers pools create
50
-
51
- Create a new pool.`).option(`description`,{type:`string`,description:`A human-readable description of the pool.`,default:``}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`,default:!0}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).coerce(`load-shedding-default-policy`,e=>m(e,`load-shedding-default-policy`,`text`)).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).coerce(`load-shedding-session-policy`,e=>m(e,`load-shedding-session-policy`,`text`)).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`,default:1}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`,default:``}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).coerce(`origin-steering-policy`,e=>m(e,`origin-steering-policy`,`text`)).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 Ge={command:`create`,describe:`Create Pool`,builder:We,handler:async e=>u({command:`load-balancers pools create`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await h(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`)),e.origins===void 0)throw Error(`--origins is required (or pass --body with this field set).`);let u=p({description:m(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}),g=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(g,{successLabel:`Created`})})};var Ke={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`};function qe(e){return e.usage(`$0 load-balancers pools delete <pool-id>
52
-
53
- Delete a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool 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 Je={command:`delete <pool-id>`,describe:`Delete Pool`,builder:qe,handler:async e=>u({command:`load-balancers pools delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force})){process.stderr.write(`Aborted.
54
- `);return}let u=await l(`Deleting`,async()=>n.send(Ke,{account_id:a,pool_id:e[`pool-id`]}));s(u,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`,body:`json`};function Ye(e){return e.usage(`$0 load-balancers pools edit <pool-id>
55
-
56
- Apply changes to an existing pool, overwriting the supplied properties.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).coerce(`load-shedding-default-policy`,e=>m(e,`load-shedding-default-policy`,`text`)).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).coerce(`load-shedding-session-policy`,e=>m(e,`load-shedding-session-policy`,`text`)).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).coerce(`origin-steering-policy`,e=>m(e,`origin-steering-policy`,`text`)).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 Xe={command:`edit <pool-id>`,describe:`Patch Pool`,builder:Ye,handler:async e=>u({command:`load-balancers pools edit`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(X,{body:t,account_id:a,pool_id:e[`pool-id`]}));s(r,{successLabel:`Updated`});return}let u=p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}),h=await l(`Updating`,async()=>n.send(X,{body:u,account_id:a,pool_id:e[`pool-id`]}));s(h,{successLabel:`Updated`})})};var Ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`};function Qe(e){return e.usage(`$0 load-balancers pools get <pool-id>
57
-
58
- Fetch a single configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`get <pool-id>`,describe:`Pool Details`,builder:Qe,handler:async e=>u({command:`load-balancers pools get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ze,{account_id:a,pool_id:e[`pool-id`]}));s(u,{successLabel:`Loaded`})})};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}/preview`,body:`json`};function et(e){return e.usage(`$0 load-balancers pools health create <pool-id>
59
-
60
- Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).coerce(`type`,e=>m(e,`type`,`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 tt={command:`create <pool-id>`,describe:`Preview Pool`,builder:et,handler:async e=>u({command:`load-balancers pools health create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools health create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/preview`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Z,{body:t,account_id:a,pool_id:e[`pool-id`]}));s(r,{successLabel:`Created`});return}let u=p({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:m(e.description,`description`,`text`),expected_body:m(e[`expected-body`],`expected-body`,`text`),expected_codes:m(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:m(e.method,`method`,`text`),path:m(e.path,`path`,`text`),port:e.port,probe_zone:m(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type}),f=await l(`Creating`,async()=>n.send(Z,{body:u,account_id:a,pool_id:e[`pool-id`]}));s(f,{successLabel:`Created`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}/health`};function rt(e){return e.usage(`$0 load-balancers pools health get <pool-id>
61
-
62
- Fetch the latest pool health status for a single pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get <pool-id>`,describe:`Pool Health Details`,builder:rt,handler:async e=>u({command:`load-balancers pools health get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools health get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/health`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(nt,{account_id:a,pool_id:e[`pool-id`]}));s(u,{successLabel:`Loaded`})})},at={command:`health`,describe:`Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences`,builder:e=>e.command(tt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools`,query:[`monitor`]};function st(e){return e.usage(`$0 load-balancers pools list
63
-
64
- List configured pools.`).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`List Pools`,builder:st,handler:async e=>u({command:`load-balancers pools list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={monitor:e.monitor};if(e.dryRun){let e=await i();c({command:`cf load-balancers pools list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/pools`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ot,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}/references`};function ut(e){return e.usage(`$0 load-balancers pools references get <pool-id>
65
-
66
- Get the list of resources that reference the provided pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get <pool-id>`,describe:`List Pool References`,builder:ut,handler:async e=>u({command:`load-balancers pools references get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools references get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}/references`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(lt,{account_id:a,pool_id:e[`pool-id`]}));s(u,{successLabel:`Loaded`})})},ft={command:`references`,describe:`Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences`,builder:e=>e.command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/load_balancers/pools/${t.pool_id}`,body:`json`};function pt(e){return e.usage(`$0 load-balancers pools update <pool-id>
67
-
68
- Modify a configured pool.`).positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means every Cloudflare data center.`}).option(`description`,{type:`string`,description:`A human-readable description of the pool.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) or disable this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any).`}).option(`health-sources`,{type:`string`,array:!0,description:`A list of health sources, ordered from highest to lowest priority, used to evaluate individual origin health and overall pool health. The load balancer uses the first source that has data and falls back to the next. Currently accepted values are null or the exact array ["regional", "global"]; any other combination is rejected. Null (the default) behaves like ["local", "global"]. ["regional", "global"] makes each region steer on its own health, falling back to the global decision when a region has no fresh data. Setting regional requires at least one region in check_regions.`}).option(`latitude`,{type:`number`,description:`The latitude of the data center containing the origins used in this pool in decimal degrees. If this is set, longitude must also be set.`}).option(`load-shedding-default-percent`,{type:`number`,description:`The percent of traffic to shed from the pool, according to the default policy. Applies to new sessions and traffic without session affinity.`}).option(`load-shedding-default-policy`,{type:`string`,description:`The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.`,choices:[`random`,`hash`]}).coerce(`load-shedding-default-policy`,e=>m(e,`load-shedding-default-policy`,`text`)).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`]}).coerce(`load-shedding-session-policy`,e=>m(e,`load-shedding-session-policy`,`text`)).option(`longitude`,{type:`number`,description:`The longitude of the data center containing the origins used in this pool in decimal degrees. If this is set, latitude must also be set.`}).option(`minimum-origins`,{type:`number`,description:`The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and will failover to the next available pool.`}).option(`monitor`,{type:`string`,description:`The ID of the Monitor to use for checking the health of origins within this pool.`}).option(`monitor-group`,{type:`string`,description:`The ID of the Monitor Group to use for checking the health of origins within this pool.`}).option(`name`,{type:`string`,description:`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`}).option(`notification-email`,{type:`string`,description:`This field is now deprecated. It has been moved to Cloudflare's Centralized Notification service https://developers.cloudflare.com/fundamentals/notifications/. The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.`}).option(`notification-filter-origin-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-origin-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`notification-filter-pool-disable`,{type:`boolean`,description:`If set true, disable notifications for this type of resource (pool or origin).`}).option(`notification-filter-pool-healthy`,{type:`boolean`,description:`If present, send notifications only for this health status (e.g. false for only DOWN events). Use null to reset (all events).`}).option(`origin-steering-policy`,{type:`string`,description:'The type of origin steering policy to use.\n- `"random"`: Select an origin randomly.\n- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.\n- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin\'s number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.',choices:[`random`,`hash`,`least_outstanding_requests`,`least_connections`]}).coerce(`origin-steering-policy`,e=>m(e,`origin-steering-policy`,`text`)).option(`origins`,{type:`string`,description:`The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. 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 mt={command:`update <pool-id>`,describe:`Update Pool`,builder:pt,handler:async e=>u({command:`load-balancers pools update`,classification:{safeFlags:[`enabled`,`load-shedding-default-policy`,`load-shedding-session-policy`,`notification-filter-origin-disable`,`notification-filter-origin-healthy`,`notification-filter-pool-disable`,`notification-filter-pool-healthy`,`origin-steering-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers pools update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/pools/${e[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(e[`pool-id`]))}`,pathParams:{"pool-id":String(e[`pool-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(Q,{body:t,account_id:a,pool_id:e[`pool-id`]}));s(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await h(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`)),e.origins===void 0)throw Error(`--origins is required (or pass --body with this field set).`);let u=p({check_regions:e[`check-regions`],description:m(e.description,`description`,`text`),enabled:e.enabled,health_sources:e[`health-sources`],latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:e[`load-shedding-default-policy`],session_percent:e[`load-shedding-session-percent`],session_policy:e[`load-shedding-session-policy`]},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:m(e.monitor,`monitor`,`text`),monitor_group:m(e[`monitor-group`],`monitor-group`,`text`),name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:e[`notification-filter-origin-disable`],healthy:e[`notification-filter-origin-healthy`]},pool:{disable:e[`notification-filter-pool-disable`],healthy:e[`notification-filter-pool-healthy`]}},origin_steering:{policy:e[`origin-steering-policy`]},origins:f(e.origins,`origins`)}),g=await l(`Updating`,async()=>n.send(Q,{body:u,account_id:a,pool_id:e[`pool-id`]}));s(g,{successLabel:`Updated`})})},ht={command:`pools`,describe:`Origin server pools with weighted traffic distribution, health thresholds, and geographic preferences`,builder:e=>e.command(Ue).command(Ge).command(Je).command(Xe).command($e).command(ct).command(mt).command(at).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var gt={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/preview/${t.preview_id}`};function _t(e){return e.usage(`$0 load-balancers previews get <preview-id>
69
-
70
- Get the result of a previous preview operation using the provided preview_id.`).positional(`preview-id`,{type:`string`,description:`Preview ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`get <preview-id>`,describe:`Preview Result`,builder:_t,handler:async e=>u({command:`load-balancers previews get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/preview/${e[`preview-id`]==null?`<preview-id>`:encodeURIComponent(String(e[`preview-id`]))}`,pathParams:{"preview-id":String(e[`preview-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(gt,{account_id:a,preview_id:e[`preview-id`]}));s(u,{successLabel:`Loaded`})})},yt={command:`previews`,describe:`Preview the result of a health check monitor configuration before applying it`,builder:e=>e.command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bt={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/regions/${t.region_id}`};function xt(e){return e.usage(`$0 load-balancers regions get <region-id>
71
-
72
- Get a single region mapping.`).positional(`region-id`,{type:`string`,description:`A list of Cloudflare regions. WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const St={command:`get <region-id>`,describe:`Get Region`,builder:xt,handler:async e=>u({command:`load-balancers regions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf load-balancers regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/load_balancers/regions/${e[`region-id`]==null?`<region-id>`:encodeURIComponent(String(e[`region-id`]))}`,pathParams:{"region-id":String(e[`region-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(bt,{account_id:a,region_id:e[`region-id`]}));s(u,{successLabel:`Loaded`})})};var Ct={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/regions`,query:[`subdivision_code`,`subdivision_code_a2`,`country_code_a2`]};function wt(e){return e.usage(`$0 load-balancers regions list
73
-
74
- List all region mappings.`).option(`subdivision-code`,{type:`string`,description:`Two-letter subdivision code followed in ISO 3166-2.`}).option(`subdivision-code-a2`,{type:`string`,description:`Two-letter subdivision code followed in ISO 3166-2.`}).option(`country-code-a2`,{type:`string`,description:`Two-letter alpha-2 country code followed in ISO 3166-1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tt={command:`list`,describe:`List Regions`,builder:wt,handler:async e=>u({command:`load-balancers regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={subdivision_code:e[`subdivision-code`],subdivision_code_a2:e[`subdivision-code-a2`],country_code_a2:e[`country-code-a2`]};if(e.dryRun){let e=await i();c({command:`cf load-balancers regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/regions`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Ct,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},$={command:`regions`,describe:`Geographic regions used for regional pool steering and traffic policies`,builder:e=>e.command(St).command(Tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Et={method:`GET`,path:t=>e`/accounts/${t.account_id}/load_balancers/search`,query:[`query`,`references`,`page`,`per_page`]};function Dt(e){return e.usage(`$0 load-balancers searches list
75
-
76
- Search for Load Balancing resources.`).option(`query`,{type:`string`,description:`Search query term.`}).option(`references`,{type:`string`,description:`The type of references to include. "*" to include both referral and referrer references. "" to not include any reference information.`,choices:[``,`*`,`referral`,`referrer`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`list`,describe:`Search Resources`,builder:Dt,handler:async e=>u({command:`load-balancers searches list`,classification:{safeFlags:[`references`,`dry-run`]}},e,async()=>{let n={query:e.query,references:e.references,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf load-balancers searches list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/load_balancers/search`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Et,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},kt={command:`searches`,describe:`Search across all load balancer resources (pools, monitors, load balancers) by name or reference`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},At={command:`load-balancers`,describe:`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,builder:e=>e.command(O).command(_e).command(Be).command(ht).command(yt).command($).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{At as default};
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-eVI_UEt8.mjs";import{a as r,t as i}from"./context-B-vEsyrK.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-R-1tIuep.mjs";import{t as c}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.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-dgLm0iFJ.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/mtls_certificates/${t.mtls_certificate_id}/associations`};function h(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
3
-
4
- Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:h,handler:async e=>c({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mtls_certificates/${e[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(e[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(e[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(m,{account_id:l,mtls_certificate_id:e[`mtls-certificate-id`]}));a(u,{successLabel:`Loaded`})})},_={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/mtls_certificates`,body:`json`};function y(e){return e.usage(`$0 mtls-certificates create
5
-
6
- Upload a certificate that you want to use with mTLS-enabled Cloudflare services, such as Bring Your Own CA (BYO-CA) for mTLS. To create certificates issued by the Cloudflare managed CA, use the [Create Client Certificate endpoint](/api/resources/client_certificates/methods/create/).`).option(`ca`,{type:`boolean`,description:`Indicates whether the certificate is a CA or leaf certificate.`}).option(`certificates`,{type:`string`,description:`The uploaded root CA certificate.`}).option(`name`,{type:`string`,description:`Optional unique name for the certificate. Only used for human readability.`}).option(`private-key`,{type:`string`,description:`The private key for the certificate. This field is only needed for specific use cases such as using a custom certificate with Zero Trust's block page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Upload mTLS certificate`,builder:y,handler:async e=>c({command:`mtls-certificates create`,classification:{safeFlags:[`ca`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mtls_certificates`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({ca:e.ca,certificates:d(e.certificates,`certificates`,`text`),name:d(e.name,`name`,`text`),private_key:d(e[`private-key`],`private-key`,`text`)}):l(e.body),sensitiveBodyPaths:[[`private_key`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(v,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}if(e.ca===void 0)throw Error(`--ca is required (or pass --body with this field set).`);e.certificates===void 0&&(e.certificates=await f(`certificates`,`The uploaded root CA certificate.`));let m=u({ca:e.ca,certificates:d(e.certificates,`certificates`,`text`),name:d(e.name,`name`,`text`),private_key:d(e[`private-key`],`private-key`,`text`)}),h=await s(`Creating`,async()=>c.send(v,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mtls_certificates/${t.mtls_certificate_id}`};function S(e){return e.usage(`$0 mtls-certificates delete <mtls-certificate-id>
7
-
8
- Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,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 <mtls-certificate-id>`,describe:`Delete mTLS certificate`,builder:S,handler:async e=>c({command:`mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mtls_certificates/${e[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(e[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(e[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
9
- `);return}let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,mtls_certificate_id:e[`mtls-certificate-id`]}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/mtls_certificates/${t.mtls_certificate_id}`};function T(e){return e.usage(`$0 mtls-certificates get <mtls-certificate-id>
10
-
11
- Fetches a single mTLS certificate uploaded to your account. To get a certificate issued by the Cloudflare managed CA, use the [Client Certificate Details endpoint](/api/resources/client_certificates/methods/get/).`).positional(`mtls-certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <mtls-certificate-id>`,describe:`Get mTLS certificate`,builder:T,handler:async e=>c({command:`mtls-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mtls_certificates/${e[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(e[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(e[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,mtls_certificate_id:e[`mtls-certificate-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/mtls_certificates`,query:[`type`],joined:[`type`]};function O(e){return e.usage(`$0 mtls-certificates list
12
-
13
- Lists all mTLS certificates uploaded to your account, such as Bring Your Own CA (BYO-CA) for mTLS. To list certificates issued by the Cloudflare managed CA, use the [List Client Certificates endpoint](/api/resources/client_certificates/methods/list/).`).option(`type`,{type:`string`,description:`Filters results by certificate type. Multiple types can be comma-separated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List mTLS certificates`,builder:O,handler:async e=>c({command:`mtls-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={type:e.type};if(e.dryRun){let e=await r();o({command:`cf mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mtls_certificates`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(D,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},A={command:`mtls-certificates`,describe:`mtls-certificates`,builder:e=>e.command(b).command(C).command(E).command(k).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-eVI_UEt8.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-R-1tIuep.mjs";import{t as a}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-dgLm0iFJ.mjs";var p={method:`GET`,path:t=>e`/organizations/${t.organization_id}/accounts`,query:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`],joined:[`account_pubname`,`account_pubname.startsWith`,`account_pubname.endsWith`,`account_pubname.contains`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`order_by`,`direction`,`include_tags`,`include_total`,`page_token`,`page_size`]};function m(e){return e.usage(`$0 organization account list
3
-
4
- Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
- a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
6
- a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
7
- a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
8
- a particular string.`}).option(`name`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name is equal to a
9
- particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
10
- particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
11
- string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
12
- string.`}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.\nWhen not specified, results are ordered by internal account ID.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-tags`,{type:`boolean`,description:`Include Account tags from the resource tag mirror. Omit this parameter to preserve the existing Account response shape.`}).option(`include-total`,{type:`boolean`,description:`Whether to calculate and return the exact result_info.total_size for cursor
13
- pagination. Defaults to true. When false, total_size is omitted. page_size and
14
- include_total may change between pages; next_page_token remains the authoritative
15
- continuation signal.
16
- Legacy page/per_page requests always calculate total_count.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
17
- provided will retrieve the next page.
18
-
19
- Parameters used to filter the retrieved list must remain in subsequent
20
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`list`,describe:`List organization accounts`,builder:m,handler:async e=>a({command:`organization account list`,classification:{safeFlags:[`order-by`,`direction`,`include-tags`,`include-total`,`dry-run`]}},e,async()=>{let a={account_pubname:e[`account-pubname`],"account_pubname.startsWith":e[`account-pubname-starts-with`],"account_pubname.endsWith":e[`account-pubname-ends-with`],"account_pubname.contains":e[`account-pubname-contains`],name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],order_by:e[`order-by`],direction:e.direction,include_tags:e[`include-tags`],include_total:e[`include-total`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/accounts`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(p,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},g={command:`account`,describe:`Operations for account`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`POST`,path:()=>`/organizations`,body:`json`};function ee(e){return e.usage(`$0 organization create
21
-
22
- Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities. Authentication: Use a Global API key, or a User API Token with the \`User Details Write\` permission.`).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`References an Organization in the Cloudflare data model.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --profile-* flag is set`)}return!0})}const te={command:`create`,describe:`Create organization`,builder:ee,handler:async e=>a({command:`organization create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(_,{body:t}));n(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let s=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Creating`,async()=>a.send(_,{body:s}));n(d,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}`};function y(e){return e.usage(`$0 organization delete <organization-id>
23
-
24
- Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. Sub-organization deletion availability depends on the organization's capabilities. **Access Control:** Restricted to enterprise organizations. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <organization-id>`,describe:`Delete organization`,builder:y,handler:async e=>a({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this empty organization? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
- `);return}let o=await i(`Deleting`,async()=>a.send(v,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/organizations/${t.organization_id}`};function S(e){return e.usage("$0 organization get <organization-id>\n\nRetrieve the details of a certain organization. Authentication: A Global API key for a user with `com.cloudflare.api.tenant.unit.read` is required. User API Tokens are not currently supported and return HTTP `403` with error code `10000`.").positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <organization-id>`,describe:`Get organization`,builder:S,handler:async e=>a({command:`organization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(x,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Loaded`})})};var w={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/invites/${t.member_code}`,body:`json`};function T(e){return e.usage(`$0 organization invite update <member-code>
26
-
27
- Accept or reject an invitation to a specific organization. Authentication: A Global API key for the invited user is required. User API Tokens are not currently supported. No additional permission is required; the invitation must belong to the authenticated user.`).positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).coerce(`status`,e=>l(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const E={command:`update <member-code>`,describe:`Handle organization invite`,builder:T,handler:async e=>a({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/invites/${e[`member-code`]==null?`<member-code>`:encodeURIComponent(String(e[`member-code`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-code":String(e[`member-code`]??``)},bodyKind:`json`,body:e.body===void 0?c({status:e.status}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send(w,{body:t,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await d(`status`,`The status field`,[`accept`,`reject`]));let s=c({status:e.status}),l=await i(`Updating`,async()=>a.send(w,{body:s,organization_id:e[`organization-id`],member_code:e[`member-code`]}));n(l,{successLabel:`Updated`})})},D={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`GET`,path:()=>`/organizations`,query:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`],joined:[`id`,`name`,`name.startsWith`,`name.endsWith`,`name.contains`,`containing.account`,`containing.user`,`containing.organization`,`parent.id`,`page_token`,`page_size`]};function k(e){return e.usage("$0 organization list\n\nRetrieve a list of organizations a particular user has access to. Authentication: Use a Global API key, or a User API Token with the `User Details Read` or `User Details Write` permission.").option(`id`,{type:`string`,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
28
- by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
29
- particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
30
- particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
31
- string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name contains a particular
32
- string.`}).option(`containing-account`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
33
- account.`}).option(`containing-user`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
34
- user.
35
-
36
- IMPORTANT: Just because an organization "contains" a user is not a
37
- representation of any authorization or privilege to manage any resources
38
- therein. An organization "containing" a user simply means the user is managed by
39
- that organization.`}).option(`containing-organization`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
40
- organization.`}).option(`parent-id`,{type:`string`,description:`Filter the list of organizations to the ones that are a sub-organization
41
- of the specified organization.
42
-
43
- "null" is a valid value to provide for this parameter. It means "where
44
- an organization has no parent (i.e. it is a 'root' organization)."`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
45
- provided will retrieve the next page.
46
-
47
- Parameters used to filter the retrieved list must remain in subsequent
48
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List organizations the user has access to`,builder:k,handler:async e=>a({command:`organization list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={id:e.id,name:e.name,"name.startsWith":e[`name-starts-with`],"name.endsWith":e[`name-ends-with`],"name.contains":e[`name-contains`],"containing.account":e[`containing-account`],"containing.user":e[`containing-user`],"containing.organization":e[`containing-organization`],"parent.id":e[`parent-id`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(O,a));n(s,{successLabel:`Loaded`})})};var j={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members:batchCreate`,body:`json`};function M(e){return e.usage(`$0 organization member batch create <organization-id>
49
-
50
- Batch create multiple memberships that grant access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`members`,{type:`string`,description:`The members field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create <organization-id>`,describe:`Batch create organization members`,builder:M,handler:async e=>a({command:`organization member batch create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member batch create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members:batchCreate`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({members:s(e.members,`members`)}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(j,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Created`});return}if(e.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let l=c({members:s(e.members,`members`)}),u=await i(`Creating`,async()=>a.send(j,{body:l,organization_id:e[`organization-id`]}));n(u,{successLabel:`Created`})})},P={command:`batch`,describe:`Operations for member.batch`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/organizations/${t.organization_id}/members`,body:`json`};function I(e){return e.usage(`$0 organization member create <organization-id>
51
-
52
- Create a membership that grants access to a specific Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.create\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-status`,{type:`string`,description:`The member.status field`,choices:[`active`,`canceled`]}).coerce(`member-status`,e=>l(e,`member-status`,`text`)).option(`member-user-email`,{type:`string`,description:`The member.user.email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`create <organization-id>`,describe:`Create organization member`,builder:I,handler:async e=>a({command:`organization member create`,classification:{safeFlags:[`member-status`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(F,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Created`});return}e[`member-user-email`]===void 0&&(e[`member-user-email`]=await u(`member-user-email`,`The member.user.email field`));let s=c({member:{status:e[`member-status`],user:{email:l(e[`member-user-email`],`member-user-email`,`text`)}}}),d=await i(`Creating`,async()=>a.send(F,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Created`})})};var ne={method:`DELETE`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`,response:!1};function R(e){return e.usage(`$0 organization member delete <member-id>
53
-
54
- Delete a membership to a particular Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.delete\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const z={command:`delete <member-id>`,describe:`Delete organization member`,builder:R,handler:async e=>a({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await f({force:!!e.force,message:`Delete this organization membership? The member will lose access to this organization and its sub-organizations.`})){process.stderr.write(`Aborted.
55
- `);return}let o=await i(`Deleting`,async()=>a.send(ne,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Deleted`})})};var B={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members/${t.member_id}`};function V(e){return e.usage(`$0 organization member get <member-id>
56
-
57
- Retrieve a single membership from an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.read\` is required. User API Tokens are not currently supported.`).positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <member-id>`,describe:`Get organization member`,builder:V,handler:async e=>a({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(B,{organization_id:e[`organization-id`],member_id:e[`member-id`]}));n(o,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/organizations/${t.organization_id}/members`,query:[`status`,`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`],joined:[`user.email`,`user.email.contains`,`user.email.startsWith`,`user.email.endsWith`,`page_token`,`page_size`]};function W(e){return e.usage(`$0 organization member list
58
-
59
- List memberships for an Organization. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.member.list\` is required. User API Tokens are not currently supported.`).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
60
- provided will retrieve the next page.
61
-
62
- Parameters used to filter the retrieved list must remain in subsequent
63
- requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List organization members`,builder:W,handler:async e=>a({command:`organization member list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={status:e.status,"user.email":e[`user-email`],"user.email.contains":e[`user-email-contains`],"user.email.startsWith":e[`user-email-starts-with`],"user.email.endsWith":e[`user-email-ends-with`],page_token:e[`page-token`],page_size:e[`page-size`]};if(e.dryRun){r({command:`cf organization member list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/members`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(U,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},K={command:`member`,describe:`Operations for member`,builder:e=>e.command(L).command(z).command(H).command(G).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/organizations/${t.organization_id}/profile`};function J(e){return e.usage(`$0 organization profile get <organization-id>
64
-
65
- Get an organizations profile if it exists. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.read\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a profile for.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <organization-id>`,describe:`Get organization profile`,builder:J,handler:async e=>a({command:`organization profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(q,{organization_id:e[`organization-id`]}));n(o,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/organizations/${t.organization_id}/profile`,body:`json`,response:!1};function Z(e){return e.usage(`$0 organization profile update <organization-id>
66
-
67
- Modify organization profile. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata 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 re={command:`update <organization-id>`,describe:`Modify organization profile.`,builder:Z,handler:async e=>a({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/profile`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send(X,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e[`business-address`]===void 0&&(e[`business-address`]=await u(`business-address`,`The business_address field`)),e[`business-email`]===void 0&&(e[`business-email`]=await u(`business-email`,`The business_email field`)),e[`business-name`]===void 0&&(e[`business-name`]=await u(`business-name`,`The business_name field`)),e[`business-phone`]===void 0&&(e[`business-phone`]=await u(`business-phone`,`The business_phone field`)),e[`external-metadata`]===void 0&&(e[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let s=c({business_address:l(e[`business-address`],`business-address`,`text`),business_email:l(e[`business-email`],`business-email`,`text`),business_name:l(e[`business-name`],`business-name`,`text`),business_phone:l(e[`business-phone`],`business-phone`,`text`),external_metadata:l(e[`external-metadata`],`external-metadata`,`text`)}),d=await i(`Updating`,async()=>a.send(X,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ie={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(Y).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ae={method:`GET`,path:t=>e`/organizations/${t.organization_id}/shares`,query:[`status`,`kind`,`target_type`,`resource_types`,`order`,`direction`,`page`,`per_page`]};function oe(e){return e.usage(`$0 organization share list
68
-
69
- Lists all organization shares.`).option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List organization shares`,builder:oe,handler:async e=>a({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},e,async()=>{let a={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`]};if(e.dryRun){r({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}/shares`,pathParams:{"organization-id":String(e[`organization-id`]??``)},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(ae,{organization_id:e[`organization-id`],...a}));n(s,{successLabel:`Loaded`})})},Q={command:`share`,describe:`Operations for share`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`PUT`,path:t=>e`/organizations/${t.organization_id}`,body:`json`};function ce(e){return e.usage(`$0 organization update <organization-id>
70
-
71
- Update an organization's name. Authentication: A Global API key for a user with \`com.cloudflare.api.tenant.unit.update\` is required. User API Tokens are not currently supported.`).positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`Organization ID`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new details of the organization. Only accepts updates to "name" currently.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --profile-* flag is set`)}return!0})}const le={command:`update <organization-id>`,describe:`Update organization`,builder:ce,handler:async e=>a({command:`organization update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${e[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(e[`organization-id`]))}`,pathParams:{"organization-id":String(e[`organization-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Updating`,async()=>a.send($,{body:t,organization_id:e[`organization-id`]}));n(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await u(`name`,`The name field`));let s=c({name:l(e.name,`name`,`text`),parent:{id:l(e[`parent-id`],`parent-id`,`text`)},profile:{business_address:l(e[`profile-business-address`],`profile-business-address`,`text`),business_email:l(e[`profile-business-email`],`profile-business-email`,`text`),business_name:l(e[`profile-business-name`],`profile-business-name`,`text`),business_phone:l(e[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:l(e[`profile-external-metadata`],`profile-external-metadata`,`text`)}}),d=await i(`Updating`,async()=>a.send($,{body:s,organization_id:e[`organization-id`]}));n(d,{successLabel:`Updated`})})},ue={command:`organization`,describe:`organization`,builder:e=>e.command(te).command(b).command(C).command(A).command(le).command(g).command(D).command(K).command(ie).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-eVI_UEt8.mjs";import{t as n}from"./output-Co4xdFf6.mjs";import{t as r}from"./dry-run-C2KjGX10.mjs";import{t as i}from"./progress-R-1tIuep.mjs";import{t as a}from"./run-BvDCuZ8q.mjs";import"./telemetry-Ct_2AaO4.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-dgLm0iFJ.mjs";var f={method:`POST`,path:()=>`/certificates`,body:`json`};function p(e){return e.usage(`$0 origin-ca-certificates create
3
-
4
- Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).coerce(`request-type`,e=>c(e,`request-type`,`text`)).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).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:`Create Certificate`,builder:p,handler:async e=>a({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:e.body===void 0?s({csr:c(e.csr,`csr`,`text`),hostnames:e.hostnames,request_type:e[`request-type`],requested_validity:e[`requested-validity`]}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body),r=await i(`Creating`,async()=>a.send(f,{body:t}));n(r,{successLabel:`Created`});return}if(e.csr===void 0&&(e.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),e.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);e[`request-type`]===void 0&&(e[`request-type`]=await u(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=s({csr:c(e.csr,`csr`,`text`),hostnames:e.hostnames,request_type:e[`request-type`],requested_validity:e[`requested-validity`]}),p=await i(`Creating`,async()=>a.send(f,{body:d}));n(p,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/certificates/${t.certificate_id}`};function g(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
-
6
- Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,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 _={command:`delete <certificate-id>`,describe:`Revoke Certificate`,builder:g,handler:async e=>a({command:`origin-ca-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let a=await t(e);if(!await d({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}let o=await i(`Deleting`,async()=>a.send(h,{certificate_id:e[`certificate-id`]}));n(o,{successLabel:`Deleted`})})};var v={method:`GET`,path:t=>e`/certificates/${t.certificate_id}`};function y(e){return e.usage(`$0 origin-ca-certificates get <certificate-id>
8
-
9
- Get an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).positional(`certificate-id`,{type:`string`,description:`The x509 serial number of the Origin CA certificate.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <certificate-id>`,describe:`Get Certificate`,builder:y,handler:async e=>a({command:`origin-ca-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf origin-ca-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let a=await t(e),o=await i(`Loading`,async()=>a.send(v,{certificate_id:e[`certificate-id`]}));n(o,{successLabel:`Loaded`})})};var x={method:`GET`,path:()=>`/certificates`,query:[`zone_id`,`page`,`per_page`,`limit`,`offset`]};function S(e){return e.usage(`$0 origin-ca-certificates list
10
-
11
- List all existing Origin CA certificates for a given zone. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`zone-id`,{type:`string`,description:`Identifier.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List Certificates`,builder:S,handler:async e=>a({command:`origin-ca-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={zone_id:e[`zone-id`],page:e.page,per_page:e[`per-page`],limit:e.limit,offset:e.offset};if(e.dryRun){r({command:`cf origin-ca-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(x,a));n(s,{successLabel:`Loaded`})})},w={command:`origin-ca-certificates`,describe:`origin-ca-certificates`,builder:e=>e.command(m).command(_).command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};