cf 1.0.0-beta.27 → 1.0.0-beta.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +7966 -5034
  3. package/dist/_meta/hand-written-commands.json +40 -10
  4. package/dist/_meta/schemas.json +3153 -3736
  5. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/ai-DWWRIQIt.mjs +30 -0
  12. package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
  19. package/dist/api-Dnt6lRJG.mjs +3 -0
  20. package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
  21. package/dist/argo-BPwbzHY7.mjs +14 -0
  22. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  23. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  24. package/dist/auth-Czr8ChBB.mjs +2 -0
  25. package/dist/auth-DA1PHaHi.mjs +2 -0
  26. package/dist/auth-Dwfa4S3h.mjs +7 -0
  27. package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  28. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
  29. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  30. package/dist/billing-TERxOuLR.mjs +22 -0
  31. package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
  32. package/dist/body-parser-HN91kAf0.mjs +2 -0
  33. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  34. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  35. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  36. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  37. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  38. package/dist/build-CCwo_ydV.mjs +2 -0
  39. package/dist/build-yQOzZg6Z.mjs +2 -0
  40. package/dist/builds-tMa3sbQU.mjs +62 -0
  41. package/dist/cache-b_EPh6Is.mjs +36 -0
  42. package/dist/cf-DmvZ2L51.mjs +18 -0
  43. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  44. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  45. package/dist/cli-Cc7ujzAy.mjs +4 -0
  46. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  47. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  48. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  49. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  50. package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
  51. package/dist/command-BVct0Dvr.mjs +2 -0
  52. package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
  53. package/dist/command-CJ3ldWrA.mjs +2 -0
  54. package/dist/command-CyOdBNur.mjs +2 -0
  55. package/dist/command-D2XkyO1e.mjs +2 -0
  56. package/dist/command-DHODgfFZ.mjs +2 -0
  57. package/dist/command-DIIaZx_f.mjs +2 -0
  58. package/dist/command-DONwHpqZ.mjs +2 -0
  59. package/dist/command-DdYnSf-8.mjs +2 -0
  60. package/dist/command-DqOU7Ql2.mjs +2 -0
  61. package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
  62. package/dist/command-NqM0lo4a.mjs +2 -0
  63. package/dist/command-bwVDyMv4.mjs +2 -0
  64. package/dist/command-yzqs4m83.mjs +2 -0
  65. package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
  66. package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
  67. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  68. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  69. package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  70. package/dist/containers-BiA_bpPR.mjs +76 -0
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
  72. package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  76. package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
  77. package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
  78. package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
  79. package/dist/custom-pages-CWwjtfbj.mjs +38 -0
  80. package/dist/d1-N81q-FAr.mjs +50 -0
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/deploy-Ok4ncy06.mjs +2 -0
  84. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  85. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  86. package/dist/dev-DxbkJkzc.mjs +4 -0
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  88. package/dist/dialog-CD94-Kzw.mjs +2 -0
  89. package/dist/discover-D9FNaCDK.mjs +2 -0
  90. package/dist/discover-DGsMj9ZN.mjs +2 -0
  91. package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
  92. package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
  93. package/dist/dns-Burep9O7.mjs +142 -0
  94. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  95. package/dist/docs-BFVK88kB.mjs +3 -0
  96. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  97. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  98. package/dist/email-auth--2KCzZNA.mjs +6 -0
  99. package/dist/email-routing-DzaExfVf.mjs +44 -0
  100. package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
  101. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  102. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  103. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  104. package/dist/errors-C_bGcR0X.mjs +11 -0
  105. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  106. package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
  107. package/dist/flagship-9E5gwNki.mjs +24 -0
  108. package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
  109. package/dist/generate-BzOnRBij.mjs +2 -0
  110. package/dist/generate-DfxZtpn9.mjs +2 -0
  111. package/dist/get-3XNn0upb.mjs +2 -0
  112. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  113. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  114. package/dist/gt-BV-jij5q.mjs +4 -0
  115. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  116. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  117. package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
  118. package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
  119. package/dist/index.mjs +1 -1
  120. package/dist/init-BgCF9K8h.mjs +43 -0
  121. package/dist/intel-BQ58CJLt.mjs +62 -0
  122. package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
  123. package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
  124. package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
  125. package/dist/k2-Bc_hjmiv.mjs +10 -0
  126. package/dist/kv-DbShBhhg.mjs +12 -0
  127. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  128. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  129. package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
  130. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  131. package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
  132. package/dist/local-DRxctCh9.mjs +2 -0
  133. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  134. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  135. package/dist/log-DBAHla_W.mjs +2 -0
  136. package/dist/login-CK3nn9a5.mjs +2 -0
  137. package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
  138. package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
  139. package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
  140. package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
  141. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  142. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  143. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  144. package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
  145. package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
  146. package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  147. package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
  148. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  149. package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
  150. package/dist/o11y-eYYs59X9.mjs +88 -0
  151. package/dist/oauth-BgDZMd72.mjs +5 -0
  152. package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
  153. package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
  154. package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
  155. package/dist/organizations-BllV7l_c.mjs +70 -0
  156. package/dist/output-hFMAotFl.mjs +2 -0
  157. package/dist/package-oNVeacC9.mjs +2 -0
  158. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  159. package/dist/pages-5spcBpX1.mjs +48 -0
  160. package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
  161. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  162. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  163. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  164. package/dist/previews-Bv1HMMtO.mjs +6 -0
  165. package/dist/progress-DE_G09u2.mjs +2 -0
  166. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  167. package/dist/prompt-D274Im1O.mjs +4 -0
  168. package/dist/queues-DGCYUr4g.mjs +52 -0
  169. package/dist/r2-DtCk-Nfi.mjs +112 -0
  170. package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
  171. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  172. package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
  173. package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
  174. package/dist/registrar-Cl1snz8z.mjs +43 -0
  175. package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
  176. package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  177. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  178. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  179. package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
  180. package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
  181. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  182. package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
  183. package/dist/run-C5yPsiO2.mjs +2 -0
  184. package/dist/run-CXWkMU3x.mjs +2 -0
  185. package/dist/schema-CfZOW8Zw.mjs +2 -0
  186. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  187. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  188. package/dist/scim-0OufLKru.mjs +16 -0
  189. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  190. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  191. package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  192. package/dist/session-COdP8BXD.mjs +2 -0
  193. package/dist/shared-D_2KLpP3.mjs +2 -0
  194. package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  195. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  196. package/dist/snippets-DrrdpLnS.mjs +18 -0
  197. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  198. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  199. package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
  200. package/dist/sql-BCuLxGSf.mjs +4 -0
  201. package/dist/src-ByCoEqOw.mjs +133 -0
  202. package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
  203. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  204. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  205. package/dist/state-B6r-b_-d.mjs +2 -0
  206. package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
  207. package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
  208. package/dist/stream-CzlqY8hq.mjs +89 -0
  209. package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
  210. package/dist/telemetry-COlodX5Z.mjs +2 -0
  211. package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  212. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  213. package/dist/tenants-CRirmhxS.mjs +13 -0
  214. package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
  215. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  216. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  217. package/dist/ui-dWsVmFCG.mjs +2 -0
  218. package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
  219. package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  222. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  223. package/dist/user-Bk1BIqZ5.mjs +103 -0
  224. package/dist/vectorize-CgOfmWYq.mjs +30 -0
  225. package/dist/verify-B9ILCohg.mjs +2 -0
  226. package/dist/verify-BCuWaO-L.mjs +2 -0
  227. package/dist/version-CcuBNjqg.mjs +2 -0
  228. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  229. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
  230. package/dist/web3-CRpQ5sl4.mjs +26 -0
  231. package/dist/workers-BZMvamn0.mjs +39 -0
  232. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  233. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  234. package/dist/workflows-Dd88_Nqc.mjs +48 -0
  235. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
  236. package/dist/zaraz-BFK0p28R.mjs +22 -0
  237. package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
  238. package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
  239. package/package.json +20 -20
  240. package/dist/ai-DqEN_hhg.mjs +0 -30
  241. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  242. package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
  243. package/dist/ai-search-DbZIxdio.mjs +0 -74
  244. package/dist/alerting-BjGwBxZT.mjs +0 -52
  245. package/dist/analytics-C7kT_H-W.mjs +0 -17
  246. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  247. package/dist/api-X3wKppsT.mjs +0 -3
  248. package/dist/argo-D1VONzu-.mjs +0 -14
  249. package/dist/auth-CspwoBlp.mjs +0 -2
  250. package/dist/auth-D499YE2n.mjs +0 -7
  251. package/dist/auth-FK2eLQ02.mjs +0 -2
  252. package/dist/billing-DRNww0iC.mjs +0 -24
  253. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  254. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  255. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  256. package/dist/build-CRm2TQq8.mjs +0 -2
  257. package/dist/build-DO_GNhRl.mjs +0 -2
  258. package/dist/builds-CoazxuN-.mjs +0 -64
  259. package/dist/cache-jlLJLSu7.mjs +0 -36
  260. package/dist/cf-hP0SOgC6.mjs +0 -18
  261. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
  262. package/dist/cli-Nqf58-1c.mjs +0 -4
  263. package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
  264. package/dist/command-BASaTmJc.mjs +0 -2
  265. package/dist/command-Bih1HLr3.mjs +0 -2
  266. package/dist/command-ByYf12-8.mjs +0 -2
  267. package/dist/command-C0qCuw03.mjs +0 -2
  268. package/dist/command-C2FVMd1b.mjs +0 -2
  269. package/dist/command-C4OgtX_x.mjs +0 -2
  270. package/dist/command-C5Kqc5Km.mjs +0 -2
  271. package/dist/command-CFxyp8Uo.mjs +0 -2
  272. package/dist/command-CZAR85ba.mjs +0 -2
  273. package/dist/command-CelQVrZL.mjs +0 -2
  274. package/dist/command-CrAlzysj.mjs +0 -2
  275. package/dist/command-MxFFWqMg.mjs +0 -2
  276. package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
  277. package/dist/containers-BOBEs1Gk.mjs +0 -75
  278. package/dist/create-BtmuVqVL.mjs +0 -2
  279. package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
  280. package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
  281. package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
  282. package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
  283. package/dist/custom-pages-DAkKVzgR.mjs +0 -38
  284. package/dist/d1-CDIyRdh4.mjs +0 -52
  285. package/dist/deploy-BaC5Ty7F.mjs +0 -2
  286. package/dist/deploy-context-DTTgNGro.mjs +0 -56
  287. package/dist/deploy-input-mAy06fAI.mjs +0 -2
  288. package/dist/dev-De-HszNT.mjs +0 -4
  289. package/dist/dialog-D5lus4M4.mjs +0 -2
  290. package/dist/discover-6kAmVMPp.mjs +0 -2
  291. package/dist/discover-C06Syc2B.mjs +0 -2
  292. package/dist/dns-wMjf1t6-.mjs +0 -152
  293. package/dist/docs-BA7qslb2.mjs +0 -3
  294. package/dist/email-auth-BShMFXn4.mjs +0 -6
  295. package/dist/email-domains-CDSbVclP.mjs +0 -14
  296. package/dist/email-routing-CBCkbg_F.mjs +0 -44
  297. package/dist/error-sanitization-B025CygB.mjs +0 -2
  298. package/dist/errors-DatLr-iR.mjs +0 -11
  299. package/dist/field-extractors-BwGdMnTr.mjs +0 -8
  300. package/dist/flagship-Bat5EZCk.mjs +0 -24
  301. package/dist/generate-CeeWW3eX.mjs +0 -3
  302. package/dist/generate-D6V4Q58z.mjs +0 -2
  303. package/dist/get-Be821dio.mjs +0 -2
  304. package/dist/gt-BQkaDQDq.mjs +0 -3
  305. package/dist/healthchecks-uC43QKQd.mjs +0 -20
  306. package/dist/init-BEVVz4_P.mjs +0 -43
  307. package/dist/intel-DRy4rHrt.mjs +0 -62
  308. package/dist/k2-wsanPL3y.mjs +0 -10
  309. package/dist/kv-BLSPcEnH.mjs +0 -12
  310. package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
  311. package/dist/load-balancers-gap5u4b1.mjs +0 -84
  312. package/dist/local-CFsO9Tkg.mjs +0 -2
  313. package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
  314. package/dist/log-DZfik9Jk.mjs +0 -2
  315. package/dist/login-BfuOf-Yi.mjs +0 -2
  316. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  317. package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
  318. package/dist/o11y-oEUpMC3O.mjs +0 -86
  319. package/dist/oauth-BmSFLp_s.mjs +0 -4
  320. package/dist/organization-CEnlXwrl.mjs +0 -70
  321. package/dist/organizations-Dt86ToxE.mjs +0 -4
  322. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  323. package/dist/output-BJEgbI0G.mjs +0 -2
  324. package/dist/package-CiRJBRHO.mjs +0 -2
  325. package/dist/page-rules-J6LhwR-s.mjs +0 -38
  326. package/dist/pages-BksdnChs.mjs +0 -48
  327. package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
  328. package/dist/pipelines-B5AoB3f3.mjs +0 -40
  329. package/dist/previews-DzJ85fsr.mjs +0 -6
  330. package/dist/progress-DLri-rA7.mjs +0 -2
  331. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  332. package/dist/prompt-D0dXwuME.mjs +0 -4
  333. package/dist/queues-BsAck4To.mjs +0 -52
  334. package/dist/r2-BYjdHDEZ.mjs +0 -112
  335. package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
  336. package/dist/registrar-D4wdgWpo.mjs +0 -43
  337. package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
  338. package/dist/request-headers-CoxHUNcB.mjs +0 -2
  339. package/dist/request-tracers-817HTytF.mjs +0 -4
  340. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  341. package/dist/rulesets-CKyc-Xlx.mjs +0 -42
  342. package/dist/run-Ciw_GIrC.mjs +0 -2
  343. package/dist/run-DD45EQTm.mjs +0 -2
  344. package/dist/schema-DuLIZRhA.mjs +0 -2
  345. package/dist/schema-flags-DrqvwQNw.mjs +0 -4
  346. package/dist/scim-C4iRWNYB.mjs +0 -16
  347. package/dist/session-D2yuwO4i.mjs +0 -2
  348. package/dist/shared--uVkAAd7.mjs +0 -2
  349. package/dist/smart-shield-Dn95hqUH.mjs +0 -22
  350. package/dist/snippets-BNUKOajz.mjs +0 -18
  351. package/dist/spawn-DuT4snxu.mjs +0 -5
  352. package/dist/sql-BX1pBqj3.mjs +0 -4
  353. package/dist/src-DPnUfK4c.mjs +0 -131
  354. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  355. package/dist/state-Uwfrmw5I.mjs +0 -2
  356. package/dist/stream-BRzr6yh0.mjs +0 -89
  357. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  358. package/dist/tunnels-DQVXKUKA.mjs +0 -27
  359. package/dist/ui-FYultowZ.mjs +0 -2
  360. package/dist/url-scanner-BH4PLy16.mjs +0 -16
  361. package/dist/user-Bn82Qw0Y.mjs +0 -103
  362. package/dist/vectorize-DoVVz_sh.mjs +0 -30
  363. package/dist/version-Zr2oF8mY.mjs +0 -2
  364. package/dist/waiting-rooms-QUW131o3.mjs +0 -52
  365. package/dist/web3-TY9s6Swn.mjs +0 -26
  366. package/dist/workers-B3uJqJKc.mjs +0 -39
  367. package/dist/workers-builds-BgGY0IGk.mjs +0 -14
  368. package/dist/workflows-6m85DdqF.mjs +0 -48
  369. package/dist/zaraz-8WSJ7l0L.mjs +0 -22
  370. package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
@@ -1,103 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./get-CRKvqCu6.mjs";import{n,o as r}from"./auth-FK2eLQ02.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{t as s}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as c,n as l,r as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var ee={method:`GET`,path:()=>`/user/audit_logs`,query:[`id`,`export`,`action.type`,`actor.ip`,`actor.email`,`since`,`before`,`zone.name`,`direction`,`per_page`,`page`,`hide_user_logs`]};function te(e){return e.usage(`$0 user audit-logs list
3
-
4
- Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:`Since`}).option(`before`,{type:`string`,description:`Before`}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get user audit logs`,builder:te,handler:async e=>s({command:`user audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},e,async()=>{let t={id:e.id,export:e.export,"action.type":e[`action-type`],"actor.ip":e[`actor-ip`],"actor.email":e[`actor-email`],since:e.since,before:e.before,"zone.name":e[`zone-name`],direction:e.direction,per_page:e[`per-page`],page:e.page,hide_user_logs:e[`hide-user-logs`]};if(e.dryRun){a({command:`cf user audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/audit_logs`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(ee,t));i(s,{successLabel:`Loaded`})})},ne={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var re={method:`GET`,path:()=>`/user/billing/history`,query:[`page`,`per_page`,`order`,`occurred_at`,`type`,`action`]};function ie(e){return e.usage(`$0 user billing history list
5
-
6
- Accesses your billing history object.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order billing history by.`,choices:[`type`,`occurred_at`,`action`]}).option(`occurred-at`,{type:`string`,description:`When the billing item was created.`}).option(`type`,{type:`string`,description:`The billing item type.`}).option(`action`,{type:`string`,description:`The billing item action.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`Billing History Details`,builder:ie,handler:async e=>s({command:`user billing history list`,classification:{safeFlags:[`order`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],order:e.order,occurred_at:e[`occurred-at`],type:e.type,action:e.action};if(e.dryRun){a({command:`cf user billing history list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/billing/history`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(re,t));i(s,{successLabel:`Loaded`})})},oe={command:`history`,describe:`Operations for billing.history`,builder:e=>e.command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var se={method:`GET`,path:()=>`/user/billing/profile`};function ce(e){return e.usage(`$0 user billing profile get
7
-
8
- Accesses your billing profile object.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get`,describe:`Billing Profile Details`,builder:ce,handler:async e=>s({command:`user billing profile get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user billing profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/billing/profile`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(se));i(r,{successLabel:`Loaded`})})},ue={command:`profile`,describe:`Operations for billing.profile`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},de={command:`billing`,describe:`View billing history and payment profile for your user (deprecated — prefer account-level billing)`,builder:e=>e.command(oe).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _={method:`PATCH`,path:()=>`/user`,body:`json`};function fe(e){return e.usage(`$0 user edit
9
-
10
- Edit part of your user details.`).option(`country`,{type:`string`,description:`The country in which the user lives.`}).option(`first-name`,{type:`string`,description:`User's first name`}).option(`last-name`,{type:`string`,description:`User's last name`}).option(`telephone`,{type:`string`,description:`User's telephone number`}).option(`zipcode`,{type:`string`,description:`The zipcode or postal code where the user lives.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`edit`,describe:`Edit User`,builder:fe,handler:async e=>s({command:`user edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),telephone:f(e.telephone,`telephone`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(_,{body:n}));i(r,{successLabel:`Updated`});return}let r=d({country:f(e.country,`country`,`text`),first_name:f(e[`first-name`],`first-name`,`text`),last_name:f(e[`last-name`],`last-name`,`text`),telephone:f(e.telephone,`telephone`,`text`),zipcode:f(e.zipcode,`zipcode`,`text`)}),s=await o(`Updating`,async()=>t.send(_,{body:r}));i(s,{successLabel:`Updated`})})};var v={method:`POST`,path:()=>`/user/firewall/access_rules/rules`,body:`json`};function me(e){return e.usage(`$0 user firewall access-rules create
11
-
12
- Creates a new IP Access rule for all zones owned by the current user. Note: To create an IP Access rule that applies to a specific zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>f(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>f(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).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 he={command:`create`,describe:`Create an IP Access rule`,builder:me,handler:async e=>s({command:`user firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:f(e.notes,`notes`,`text`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(v,{body:n}));i(r,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await m(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let r=d({configuration:{target:e[`configuration-target`],value:f(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:f(e.notes,`notes`,`text`)}),s=await o(`Creating`,async()=>t.send(v,{body:r}));i(s,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/user/firewall/access_rules/rules/${t.rule_id}`};function b(e){return e.usage(`$0 user firewall access-rules delete <rule-id>
13
-
14
- Deletes an IP Access rule at the user level. Note: Deleting a user-level rule will affect all zones owned by the user.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,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 <rule-id>`,describe:`Delete an IP Access rule`,builder:b,handler:async e=>s({command:`user firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await h({force:!!e.force,message:`This operation deletes the user-level IP Access Rule and affects every zone owned by the user.`}))return;let r=await o(`Deleting`,async()=>t.send(y,{rule_id:e[`rule-id`]}));i(r,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/user/firewall/access_rules/rules/${t.rule_id}`,body:`json`};function C(e){return e.usage(`$0 user firewall access-rules edit <rule-id>
15
-
16
- Updates an IP Access rule defined at the user level. You can only update the rule action (\`mode\` parameter) and notes.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>f(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).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 w={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:C,handler:async e=>s({command:`user firewall access-rules edit`,classification:{safeFlags:[`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({mode:e[`access-rule-mode`],notes:f(e.notes,`notes`,`text`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(S,{body:n,rule_id:e[`rule-id`]}));i(r,{successLabel:`Updated`});return}let r=d({mode:e[`access-rule-mode`],notes:f(e.notes,`notes`,`text`)}),s=await o(`Updating`,async()=>t.send(S,{body:r,rule_id:e[`rule-id`]}));i(s,{successLabel:`Updated`})})};var T={method:`GET`,path:t=>e`/user/firewall/access_rules/rules/${t.rule_id}`};function E(e){return e.usage(`$0 user firewall access-rules get <rule-id>
17
-
18
- Fetches the details of an IP Access rule defined at the user level.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:E,handler:async e=>s({command:`user firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(T,{rule_id:e[`rule-id`]}));i(r,{successLabel:`Loaded`})})};var O={method:`GET`,path:()=>`/user/firewall/access_rules/rules`,query:[`mode`,`configuration.target`,`configuration.value`,`notes`,`match`,`page`,`per_page`,`order`,`direction`]};function k(e){return e.usage(`$0 user firewall access-rules list
19
-
20
- Fetches IP Access rules of the user. You can filter the results using several optional parameters.`).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
21
- Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List IP Access rules`,builder:k,handler:async e=>s({command:`user firewall access-rules list`,classification:{safeFlags:[`access-rule-mode`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let t={mode:e[`access-rule-mode`],"configuration.target":e[`configuration-target`],"configuration.value":e[`configuration-value`],notes:e.notes,match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){a({command:`cf user firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(O,t));i(s,{successLabel:`Loaded`})})},j={command:`access-rules`,describe:`Operations for firewall.access-rules`,builder:e=>e.command(he).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`firewall`,describe:`Firewall operations`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 user get
22
-
23
- Retrieves detailed information about the currently authenticated user, including email, name, and account memberships.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get`,describe:`User Details`,builder:N,handler:async e=>s({command:`user get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(t));i(s,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/user/invites/${t.invite_id}`};function I(e){return e.usage(`$0 user invites get <invite-id>
24
-
25
- Gets the details of an invitation.`).positional(`invite-id`,{type:`string`,description:`Invite identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <invite-id>`,describe:`Invitation Details`,builder:I,handler:async e=>s({command:`user invites get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user invites get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/invites/${e[`invite-id`]==null?`<invite-id>`:encodeURIComponent(String(e[`invite-id`]))}`,pathParams:{"invite-id":String(e[`invite-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(F,{invite_id:e[`invite-id`]}));i(r,{successLabel:`Loaded`})})};var R={method:`GET`,path:()=>`/user/invites`};function ge(e){return e.usage(`$0 user invites list
26
-
27
- Lists all invitations associated with my user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List Invitations`,builder:ge,handler:async e=>s({command:`user invites list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user invites list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/invites`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(R));i(r,{successLabel:`Loaded`})})};var z={method:`PATCH`,path:t=>e`/user/invites/${t.invite_id}`,body:`json`};function ve(e){return e.usage(`$0 user invites respond <invite-id>
28
-
29
- Responds to an invitation.`).positional(`invite-id`,{type:`string`,description:`Invite identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Status of your response to the invitation (rejected or accepted).`,choices:[`accepted`,`rejected`]}).coerce(`status`,e=>f(e,`status`,`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:`respond <invite-id>`,describe:`Respond to Invitation`,builder:ve,handler:async e=>s({command:`user invites respond`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user invites respond`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/invites/${e[`invite-id`]==null?`<invite-id>`:encodeURIComponent(String(e[`invite-id`]))}`,pathParams:{"invite-id":String(e[`invite-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({status:e.status}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(z,{body:n,invite_id:e[`invite-id`]}));i(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await m(`status`,`Status of your response to the invitation (rejected or accepted).`,[`accepted`,`rejected`]));let r=d({status:e.status}),s=await o(`Updating`,async()=>t.send(z,{body:r,invite_id:e[`invite-id`]}));i(s,{successLabel:`Updated`})})},be={command:`invites`,describe:`Operations for invites`,builder:e=>e.command(L).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:()=>`/user/load_balancers/monitors`,body:`json`};function xe(e){return e.usage(`$0 user load-balancers monitors create
30
-
31
- 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(`header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).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=>f(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 Se={command:`create`,describe:`Create Monitor`,builder:xe,handler:async e=>s({command:`user load-balancers monitors create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(B,{body:n}));i(r,{successLabel:`Created`});return}let r=d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),s=await o(`Creating`,async()=>t.send(B,{body:r}));i(s,{successLabel:`Created`})})};var Ce={method:`DELETE`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}`};function we(e){return e.usage(`$0 user load-balancers monitors delete <monitor-id>
32
-
33
- 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 Te={command:`delete <monitor-id>`,describe:`Delete Monitor`,builder:we,handler:async e=>s({command:`user load-balancers monitors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e);if(!await h({force:!!e.force}))return;let r=await o(`Deleting`,async()=>t.send(Ce,{monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}`,body:`json`};function Ee(e){return e.usage(`$0 user load-balancers monitors edit <monitor-id>
34
-
35
- 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(`header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).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=>f(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 De={command:`edit <monitor-id>`,describe:`Patch Monitor`,builder:Ee,handler:async e=>s({command:`user load-balancers monitors edit`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/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?d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(V,{body:n,monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Updated`});return}let r=d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),s=await o(`Updating`,async()=>t.send(V,{body:r,monitor_id:e[`monitor-id`]}));i(s,{successLabel:`Updated`})})};var Oe={method:`GET`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}`};function ke(e){return e.usage(`$0 user load-balancers monitors get <monitor-id>
36
-
37
- Fetch a single configured monitor for a user.`).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 Ae={command:`get <monitor-id>`,describe:`Monitor Details`,builder:ke,handler:async e=>s({command:`user load-balancers monitors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(Oe,{monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Loaded`})})};var je={method:`GET`,path:()=>`/user/load_balancers/monitors`};function Me(e){return e.usage(`$0 user load-balancers monitors list
38
-
39
- List configured monitors for a user.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`list`,describe:`List Monitors`,builder:Me,handler:async e=>s({command:`user load-balancers monitors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/monitors`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(je));i(r,{successLabel:`Loaded`})})};var H={method:`POST`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}/preview`,body:`json`};function Pe(e){return e.usage(`$0 user load-balancers monitors preview create <monitor-id>
40
-
41
- 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(`header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).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=>f(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 Fe={command:`create <monitor-id>`,describe:`Preview Monitor`,builder:Pe,handler:async e=>s({command:`user load-balancers monitors preview create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors preview create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/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?d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(H,{body:n,monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Created`});return}let r=d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),s=await o(`Creating`,async()=>t.send(H,{body:r,monitor_id:e[`monitor-id`]}));i(s,{successLabel:`Created`})})},Ie={command:`preview`,describe:`Preview how a monitor configuration evaluates pool health before applying it`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Le={method:`GET`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}/references`};function Re(e){return e.usage(`$0 user load-balancers monitors references list
42
-
43
- Get the list of resources that reference the provided monitor.`).option(`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 ze={command:`list`,describe:`List Monitor References`,builder:Re,handler:async e=>s({command:`user load-balancers monitors references list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors references list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(Le,{monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Loaded`})})},Be={command:`references`,describe:`List load balancing resources that use a monitor`,builder:e=>e.command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`PUT`,path:t=>e`/user/load_balancers/monitors/${t.monitor_id}`,body:`json`};function Ve(e){return e.usage(`$0 user load-balancers monitors update <monitor-id>
44
-
45
- 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(`header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).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=>f(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 He={command:`update <monitor-id>`,describe:`Update Monitor`,builder:Ve,handler:async e=>s({command:`user load-balancers monitors update`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers monitors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/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?d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(U,{body:n,monitor_id:e[`monitor-id`]}));i(r,{successLabel:`Updated`});return}let r=d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),s=await o(`Updating`,async()=>t.send(U,{body:r,monitor_id:e[`monitor-id`]}));i(s,{successLabel:`Updated`})})},Ue={command:`monitors`,describe:`Health check configurations that probe origin servers and determine pool availability`,builder:e=>e.command(Se).command(Te).command(De).command(Ae).command(Ne).command(He).command(Ie).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`POST`,path:()=>`/user/load_balancers/pools`,body:`json`};function We(e){return e.usage(`$0 user load-balancers pools create
46
-
47
- Create a new pool.`).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.`,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(`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=>f(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=>f(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(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).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=>f(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=>s({command:`user 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){a({command:`cf user load-balancers pools create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),networks:e.networks,notification_email:f(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:c(e.origins,`origins`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(W,{body:n}));i(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await p(`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 r=d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),networks:e.networks,notification_email:f(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:c(e.origins,`origins`)}),s=await o(`Creating`,async()=>t.send(W,{body:r}));i(s,{successLabel:`Created`})})};var Ke={method:`DELETE`,path:t=>e`/user/load_balancers/pools/${t.pool_id}`};function qe(e){return e.usage(`$0 user load-balancers pools delete <pool-id>
48
-
49
- 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=>s({command:`user load-balancers pools delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e);if(!await h({force:!!e.force}))return;let r=await o(`Deleting`,async()=>t.send(Ke,{pool_id:e[`pool-id`]}));i(r,{successLabel:`Deleted`})})};var G={method:`PATCH`,path:t=>e`/user/load_balancers/pools/${t.pool_id}`,body:`json`};function Ye(e){return e.usage(`$0 user load-balancers pools edit pools pool <pool-id>
50
-
51
- 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=>f(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=>f(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=>f(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:`pool <pool-id>`,describe:`Patch Pool`,builder:Ye,handler:async e=>s({command:`user load-balancers pools edit pools pool`,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){a({command:`cf user load-balancers pools edit pools pool`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/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?d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),notification_email:f(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:c(e.origins,`origins`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(G,{body:n,pool_id:e[`pool-id`]}));i(r,{successLabel:`Updated`});return}let r=d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),notification_email:f(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:c(e.origins,`origins`)}),s=await o(`Updating`,async()=>t.send(G,{body:r,pool_id:e[`pool-id`]}));i(s,{successLabel:`Updated`})})};var K={method:`PATCH`,path:()=>`/user/load_balancers/pools`,body:`json`};function Ze(e){return e.usage("$0 user load-balancers pools edit pools pools\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(`notification-email`,{type:`string`,description:'The email address to send health status notifications to. This field is now deprecated in favor of Cloudflare Notifications for Load Balancing, so only resetting this field with an empty string `""` is accepted.'}).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 Qe={command:`pools`,describe:`Patch Pools`,builder:Ze,handler:async e=>s({command:`user load-balancers pools edit pools pools`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools edit pools pools`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({notification_email:f(e[`notification-email`],`notification-email`,`text`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(K,{body:n}));i(r,{successLabel:`Updated`});return}let r=d({notification_email:f(e[`notification-email`],`notification-email`,`text`)}),s=await o(`Updating`,async()=>t.send(K,{body:r}));i(s,{successLabel:`Updated`})})},$e={command:`pools`,describe:`Update one or multiple origin pools`,builder:e=>e.command(Xe).command(Qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},et={command:`edit`,describe:`Operations for load-balancers.pools.edit`,builder:e=>e.command($e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var tt={method:`GET`,path:t=>e`/user/load_balancers/pools/${t.pool_id}`};function nt(e){return e.usage(`$0 user load-balancers pools get <pool-id>
52
-
53
- 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 rt={command:`get <pool-id>`,describe:`Pool Details`,builder:nt,handler:async e=>s({command:`user load-balancers pools get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(tt,{pool_id:e[`pool-id`]}));i(r,{successLabel:`Loaded`})})};var it={method:`GET`,path:t=>e`/user/load_balancers/pools/${t.pool_id}/health`};function at(e){return e.usage(`$0 user load-balancers pools health get <pool-id>
54
-
55
- 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 ot={command:`get <pool-id>`,describe:`Pool Health Details`,builder:at,handler:async e=>s({command:`user load-balancers pools health get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools health get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(it,{pool_id:e[`pool-id`]}));i(r,{successLabel:`Loaded`})})},st={command:`health`,describe:`View the current health of an origin pool`,builder:e=>e.command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ct={method:`GET`,path:()=>`/user/load_balancers/pools`,query:[`monitor`]};function lt(e){return e.usage(`$0 user load-balancers pools list
56
-
57
- 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 ut={command:`list`,describe:`List Pools`,builder:lt,handler:async e=>s({command:`user load-balancers pools list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={monitor:e.monitor};if(e.dryRun){a({command:`cf user load-balancers pools list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(ct,t));i(s,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/user/load_balancers/pools/${t.pool_id}/preview`,body:`json`};function dt(e){return e.usage(`$0 user load-balancers pools preview create <pool-id>
58
-
59
- 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(`header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors. Provide as a JSON object or @path/to/file.json.`}).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=>f(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 ft={command:`create <pool-id>`,describe:`Preview Pool`,builder:dt,handler:async e=>s({command:`user load-balancers pools preview create`,classification:{safeFlags:[`allow-insecure`,`follow-redirects`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools preview create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/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?d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(q,{body:n,pool_id:e[`pool-id`]}));i(r,{successLabel:`Created`});return}let r=d({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:f(e.description,`description`,`text`),expected_body:f(e[`expected-body`],`expected-body`,`text`),expected_codes:f(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],header:u(e.header,`header`),interval:e.interval,method:f(e.method,`method`,`text`),path:f(e.path,`path`,`text`),port:e.port,probe_zone:f(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:e.type},[[`header`]]),s=await o(`Creating`,async()=>t.send(q,{body:r,pool_id:e[`pool-id`]}));i(s,{successLabel:`Created`})})},pt={command:`preview`,describe:`Preview pool health with a monitor configuration before applying it`,builder:e=>e.command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var mt={method:`GET`,path:t=>e`/user/load_balancers/pools/${t.pool_id}/references`};function ht(e){return e.usage(`$0 user load-balancers pools references list
60
-
61
- Get the list of resources that reference the provided pool.`).option(`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 gt={command:`list`,describe:`List Pool References`,builder:ht,handler:async e=>s({command:`user load-balancers pools references list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers pools references list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(mt,{pool_id:e[`pool-id`]}));i(r,{successLabel:`Loaded`})})},_t={command:`references`,describe:`List load balancing resources that use an origin pool`,builder:e=>e.command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PUT`,path:t=>e`/user/load_balancers/pools/${t.pool_id}`,body:`json`};function vt(e){return e.usage(`$0 user load-balancers pools update <pool-id>
62
-
63
- 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=>f(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=>f(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(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).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=>f(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 yt={command:`update <pool-id>`,describe:`Update Pool`,builder:vt,handler:async e=>s({command:`user 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){a({command:`cf user load-balancers pools update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/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?d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),networks:e.networks,notification_email:f(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:c(e.origins,`origins`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(J,{body:n,pool_id:e[`pool-id`]}));i(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await p(`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 r=d({check_regions:e[`check-regions`],description:f(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:f(e.monitor,`monitor`,`text`),monitor_group:f(e[`monitor-group`],`monitor-group`,`text`),name:f(e.name,`name`,`text`),networks:e.networks,notification_email:f(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:c(e.origins,`origins`)}),s=await o(`Updating`,async()=>t.send(J,{body:r,pool_id:e[`pool-id`]}));i(s,{successLabel:`Updated`})})},bt={command:`pools`,describe:`Origin server pools with health thresholds, steering preferences, and failover behavior`,builder:e=>e.command(Ge).command(Je).command(rt).command(ut).command(yt).command(et).command(st).command(pt).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xt={method:`GET`,path:t=>e`/user/load_balancers/preview/${t.preview_id}`};function St(e){return e.usage(`$0 user load-balancers preview get <preview-id>
64
-
65
- 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 Ct={command:`get <preview-id>`,describe:`Preview Result`,builder:St,handler:async e=>s({command:`user load-balancers preview get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user load-balancers preview get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/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 t=await n(e),r=await o(`Loading`,async()=>t.send(xt,{preview_id:e[`preview-id`]}));i(r,{successLabel:`Loaded`})})},wt={command:`preview`,describe:`Retrieve the results of a monitor or pool health preview`,builder:e=>e.command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Tt={method:`GET`,path:()=>`/user/load_balancers/regions`,query:[`subdivision_code`,`country_code`]};function Et(e){return e.usage(`$0 user load-balancers regions list
66
-
67
- List all region mappings in the user context.`).option(`subdivision-code`,{type:`string`,description:`Two-letter subdivision code followed in ISO 3166-2.`}).option(`country-code`,{type:`string`,description:`Two-letter alpha-2 country code as defined in ISO 3166-1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dt={command:`list`,describe:`List Regions`,builder:Et,handler:async e=>s({command:`user load-balancers regions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={subdivision_code:e[`subdivision-code`],country_code:e[`country-code`]};if(e.dryRun){a({command:`cf user load-balancers regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/regions`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(Tt,t));i(s,{successLabel:`Loaded`})})},Ot={command:`regions`,describe:`Geographic regions used for regional pool steering and traffic policies`,builder:e=>e.command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},kt={command:`load-balancers`,describe:`Operations for load-balancers`,builder:e=>e.command(Ue).command(bt).command(wt).command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var At={method:`GET`,path:()=>`/user/load_balancing_analytics/events`,query:[`until`,`pool_name`,`origin_healthy`,`pool_id`,`since`,`origin_name`,`pool_healthy`]};function jt(e){return e.usage(`$0 user load-balancing-analytics events list
68
-
69
- List origin health changes.`).option(`until`,{type:`string`,description:`End date and time of requesting data period in the ISO8601 format.`}).option(`pool-name`,{type:`string`,description:`The name for the pool to filter.`}).option(`origin-healthy`,{type:`boolean`,description:`If true, filter events where the origin status is healthy. If false, filter events where the origin status is unhealthy.`}).option(`pool-id`,{type:`string`,description:`Pool ID`}).option(`since`,{type:`string`,description:`Start date and time of requesting data period in the ISO8601 format.`}).option(`origin-name`,{type:`string`,description:`The name for the origin to filter.`}).option(`pool-healthy`,{type:`boolean`,description:`If true, filter events where the pool status is healthy. If false, filter events where the pool status is unhealthy.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`list`,describe:`List Healthcheck Events`,builder:jt,handler:async e=>s({command:`user load-balancing-analytics events list`,classification:{safeFlags:[`origin-healthy`,`pool-healthy`,`dry-run`]}},e,async()=>{let t={until:e.until,pool_name:e[`pool-name`],origin_healthy:e[`origin-healthy`],pool_id:e[`pool-id`],since:e.since,origin_name:e[`origin-name`],pool_healthy:e[`pool-healthy`]};if(e.dryRun){a({command:`cf user load-balancing-analytics events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/load_balancing_analytics/events`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(At,t));i(s,{successLabel:`Loaded`})})},Nt={command:`events`,describe:`Origin health changes recorded by Load Balancing analytics`,builder:e=>e.command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`load-balancing-analytics`,describe:`Operations for load-balancing-analytics`,builder:e=>e.command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ft={method:`DELETE`,path:t=>e`/memberships/${t.membership_id}`};function It(e){return e.usage(`$0 user memberships delete <membership-id>
70
-
71
- Remove the associated member from an account.`).positional(`membership-id`,{type:`string`,description:`Membership 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 Lt={command:`delete <membership-id>`,describe:`Delete Membership`,builder:It,handler:async e=>s({command:`user memberships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user memberships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await h({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let r=await o(`Deleting`,async()=>t.send(Ft,{membership_id:e[`membership-id`]}));i(r,{successLabel:`Deleted`})})};function Rt(e){return e.usage(`$0 user memberships list
72
-
73
- List memberships of accounts the user can access.`).option(`account-name`,{type:`string`,description:`Account name`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of memberships per page.`}).option(`order`,{type:`string`,description:`Field to order memberships by.`,choices:[`id`,`account.name`,`status`]}).option(`direction`,{type:`string`,description:`Direction to order memberships.`,choices:[`asc`,`desc`]}).option(`name`,{type:`string`,description:`Account name`}).option(`status`,{type:`string`,description:`Status of this membership.`,choices:[`accepted`,`pending`,`rejected`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zt={command:`list`,describe:`List Memberships`,builder:Rt,handler:async e=>s({command:`user memberships list`,classification:{safeFlags:[`order`,`direction`,`status`,`dry-run`]}},e,async()=>{let t={"account.name":e[`account-name`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,name:e.name,status:e.status};if(e.dryRun){a({command:`cf user memberships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/memberships`,pathParams:{},query:t,bodyKind:`none`});return}let s=await n(e),c=await o(`Loading`,async()=>s.send(r,t));i(c,{successLabel:`Loaded`})})};var Y={method:`PUT`,path:t=>e`/memberships/${t.membership_id}`,body:`json`};function Bt(e){return e.usage(`$0 user memberships update <membership-id>
74
-
75
- Accept or reject this account invitation.`).positional(`membership-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Whether to accept or reject this account invitation.`,choices:[`accepted`,`rejected`]}).coerce(`status`,e=>f(e,`status`,`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 Vt={command:`update <membership-id>`,describe:`Update Membership`,builder:Bt,handler:async e=>s({command:`user memberships update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user memberships update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({status:e.status}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(Y,{body:n,membership_id:e[`membership-id`]}));i(r,{successLabel:`Updated`});return}e.status===void 0&&(e.status=await m(`status`,`Whether to accept or reject this account invitation.`,[`accepted`,`rejected`]));let r=d({status:e.status}),s=await o(`Updating`,async()=>t.send(Y,{body:r,membership_id:e[`membership-id`]}));i(s,{successLabel:`Updated`})})};var Ht={method:`GET`,path:t=>e`/user/memberships/${t.membership_id}`};function Ut(e){return e.usage(`$0 user memberships user-memberships-get <membership-id>
76
-
77
- Get a specific membership for the currently authenticated user.`).positional(`membership-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wt={command:`user-memberships-get <membership-id>`,describe:`Get User Membership`,builder:Ut,handler:async e=>s({command:`user memberships user-memberships-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user memberships user-memberships-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(Ht,{membership_id:e[`membership-id`]}));i(r,{successLabel:`Loaded`})})};var Gt={method:`GET`,path:t=>e`/memberships/${t.membership_id}`};function Kt(e){return e.usage(`$0 user memberships user-s-account-memberships-membership-details <membership-id>
78
-
79
- Get a specific membership.`).positional(`membership-id`,{type:`string`,description:`Membership identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qt={command:`user-s-account-memberships-membership-details <membership-id>`,describe:`Membership Details`,builder:Kt,handler:async e=>s({command:`user memberships user-s-account-memberships-membership-details`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user memberships user-s-account-memberships-membership-details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/memberships/${e[`membership-id`]==null?`<membership-id>`:encodeURIComponent(String(e[`membership-id`]))}`,pathParams:{"membership-id":String(e[`membership-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(Gt,{membership_id:e[`membership-id`]}));i(r,{successLabel:`Loaded`})})},Jt={command:`memberships`,describe:`Operations for memberships`,builder:e=>e.command(Lt).command(zt).command(Vt).command(Wt).command(qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yt={method:`DELETE`,path:t=>e`/user/subscriptions/${t.identifier}`};function Xt(e){return e.usage(`$0 user subscriptions delete <identifier>
80
-
81
- Deletes a user's subscription.`).positional(`identifier`,{type:`string`,description:`Subscription 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 Zt={command:`delete <identifier>`,describe:`Delete User Subscription`,builder:Xt,handler:async e=>s({command:`user subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/subscriptions/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`none`});return}let t=await n(e);if(!await h({force:!!e.force}))return;let r=await o(`Deleting`,async()=>t.send(Yt,{identifier:e.identifier}));i(r,{successLabel:`Deleted`})})};var Qt={method:`GET`,path:()=>`/user/subscriptions`};function $t(e){return e.usage(`$0 user subscriptions get
82
-
83
- Lists all of a user's subscriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const en={command:`get`,describe:`Get User Subscriptions`,builder:$t,handler:async e=>s({command:`user subscriptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/subscriptions`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(Qt));i(r,{successLabel:`Loaded`})})};var X={method:`PUT`,path:t=>e`/user/subscriptions/${t.identifier}`,body:`json`};function tn(e){return e.usage(`$0 user subscriptions update <identifier>
84
-
85
- Updates a user's subscriptions.`).positional(`identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).coerce(`frequency`,e=>f(e,`frequency`,`text`)).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const nn={command:`update <identifier>`,describe:`Update User Subscription`,builder:tn,handler:async e=>s({command:`user subscriptions update`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/subscriptions/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?d({app:{install_id:f(e[`app-install-id`],`app-install-id`,`text`)},component_values:c(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:f(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:f(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:f(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:f(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send(X,{body:n,identifier:e.identifier}));i(r,{successLabel:`Updated`});return}let r=d({app:{install_id:f(e[`app-install-id`],`app-install-id`,`text`)},component_values:c(e[`component-values`],`component-values`),frequency:e.frequency,rate_plan:{currency:f(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:f(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:f(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:f(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}),s=await o(`Updating`,async()=>t.send(X,{body:r,identifier:e.identifier}));i(s,{successLabel:`Updated`})})},rn={command:`subscriptions`,describe:`View and manage zone-level plan subscriptions owned by your user`,builder:e=>e.command(Zt).command(en).command(nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:()=>`/user/tokens`,body:`json`};function an(e){return e.usage(`$0 user tokens create
86
-
87
- Create a new access token.`).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. 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 on={command:`create`,describe:`Create Token`,builder:an,handler:async e=>s({command:`user tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:f(e[`expires-on`],`expires-on`,`text`),name:f(e.name,`name`,`text`),not_before:f(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`)}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Creating`,async()=>t.send(Z,{body:n}));i(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await p(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let r=d({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:f(e[`expires-on`],`expires-on`,`text`),name:f(e.name,`name`,`text`),not_before:f(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`)}),s=await o(`Creating`,async()=>t.send(Z,{body:r}));i(s,{successLabel:`Created`})})};var sn={method:`DELETE`,path:t=>e`/user/tokens/${t.token_id}`};function cn(e){return e.usage(`$0 user tokens delete <token-id>
88
-
89
- Destroy a token.`).positional(`token-id`,{type:`string`,description:`Token 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 ln={command:`delete <token-id>`,describe:`Delete Token`,builder:cn,handler:async e=>s({command:`user tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await h({force:!!e.force,message:`Are you sure? This action cannot be undone.`}))return;let r=await o(`Deleting`,async()=>t.send(sn,{token_id:e[`token-id`]}));i(r,{successLabel:`Deleted`})})};var Q={method:`GET`,path:t=>e`/user/tokens/${t.token_id}`};function un(e){return e.usage(`$0 user tokens get <token-id>
90
-
91
- Get information about a specific token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dn={command:`get <token-id>`,describe:`Token Details`,builder:un,handler:async e=>s({command:`user tokens get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user tokens get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(Q,{token_id:e[`token-id`]}));i(r,{successLabel:`Loaded`})})};var fn={method:`GET`,path:()=>`/user/tokens`,query:[`page`,`per_page`,`direction`,`include_expired`]};function pn(e){return e.usage(`$0 user tokens list
92
-
93
- List all access tokens you created. Results include active, disabled, and recently-expired tokens when include_expired is set to true.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Direction to order results.`,choices:[`asc`,`desc`]}).option(`include-expired`,{type:`boolean`,description:`When true, includes recently-expired tokens in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mn={command:`list`,describe:`List Tokens`,builder:pn,handler:async e=>s({command:`user tokens list`,classification:{safeFlags:[`direction`,`include-expired`,`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`],direction:e.direction,include_expired:e[`include-expired`]};if(e.dryRun){a({command:`cf user tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(fn,t));i(s,{successLabel:`Loaded`})})};var hn={method:`GET`,path:()=>`/user/tokens/permission_groups`,query:[`name`,`scope`]};function gn(e){return e.usage(`$0 user tokens permission-groups list
94
-
95
- Find all available permission groups for API Tokens.`).option(`name`,{type:`string`,description:`Filter by the name of the permission group.
96
- The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
97
- The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _n={command:`list`,describe:`List Token Permission Groups`,builder:gn,handler:async e=>s({command:`user tokens permission-groups list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={name:e.name,scope:e.scope};if(e.dryRun){a({command:`cf user tokens permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/permission_groups`,pathParams:{},query:t,bodyKind:`none`});return}let r=await n(e),s=await o(`Loading`,async()=>r.send(hn,t));i(s,{successLabel:`Loaded`})})},vn={command:`permission-groups`,describe:`Operations for tokens.permission-groups`,builder:e=>e.command(_n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yn={method:`PUT`,path:t=>e`/user/tokens/${t.token_id}/value`};function bn(e){return e.usage(`$0 user tokens roll <token-id>
98
-
99
- Roll the token secret.`).positional(`token-id`,{type:`string`,description:`Token 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 xn={command:`roll <token-id>`,describe:`Roll Token`,builder:bn,handler:async e=>s({command:`user tokens roll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf user tokens roll`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}/value`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`none`});return}let t=await n(e);if(!await h({force:!!e.force,message:`Rolling this token will invalidate the current secret and generate a new one. Any integrations using the current secret will stop working.`}))return;let r=await o(`Deleting`,async()=>t.send(yn,{token_id:e[`token-id`]}));i(r,{successLabel:`Deleted`})})};var $={method:`PUT`,path:t=>e`/user/tokens/${t.token_id}`,body:`json`};function Sn(e){return e.usage(`$0 user tokens update <token-id>
100
-
101
- Update an existing token.`).positional(`token-id`,{type:`string`,description:`Token identifier tag.`,demandOption:!0}).option(`condition-request-ip-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`condition-request-ip-not-in`,{type:`string`,array:!0,description:`List of IPv4/IPv6 CIDR addresses.`}).option(`expires-on`,{type:`string`,description:`The expiration time on or after which the JWT MUST NOT be accepted for processing.`}).option(`name`,{type:`string`,description:`Token name.`}).option(`not-before`,{type:`string`,description:`The time before which the token MUST NOT be accepted for processing.`}).option(`policies`,{type:`string`,description:`List of access policies assigned to the token. Provide as a JSON array of objects or @path/to/file.json.`}).option(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).coerce(`status`,e=>f(e,`status`,`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 Cn={command:`update <token-id>`,describe:`Update Token`,builder:Sn,handler:async e=>s({command:`user tokens update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/tokens/${e[`token-id`]==null?`<token-id>`:encodeURIComponent(String(e[`token-id`]))}`,pathParams:{"token-id":String(e[`token-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:f(e[`expires-on`],`expires-on`,`text`),name:f(e.name,`name`,`text`),not_before:f(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`),status:e.status}):l(e.body)});return}let t=await n(e);if(e.body){let n=l(e.body),r=await o(`Updating`,async()=>t.send($,{body:n,token_id:e[`token-id`]}));i(r,{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await p(`name`,`Token name.`)),e.policies===void 0)throw Error(`--policies is required (or pass --body with this field set).`);let r=d({condition:{request_ip:{in:e[`condition-request-ip-in`],not_in:e[`condition-request-ip-not-in`]}},expires_on:f(e[`expires-on`],`expires-on`,`text`),name:f(e.name,`name`,`text`),not_before:f(e[`not-before`],`not-before`,`text`),policies:c(e.policies,`policies`),status:e.status}),s=await o(`Updating`,async()=>t.send($,{body:r,token_id:e[`token-id`]}));i(s,{successLabel:`Updated`})})};var wn={method:`GET`,path:()=>`/user/tokens/verify`};function Tn(e){return e.usage(`$0 user tokens verify
102
-
103
- Test whether a token works.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const En={command:`verify`,describe:`Verify Token`,builder:Tn,handler:async e=>s({command:`user tokens verify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf user tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/verify`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=await o(`Loading`,async()=>t.send(wn));i(r,{successLabel:`Loaded`})})},Dn={command:`tokens`,describe:`Create and manage personal API tokens scoped to your user for programmatic API access`,builder:e=>e.command(on).command(ln).command(dn).command(mn).command(xn).command(Cn).command(En).command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},On={command:`user`,describe:`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,builder:e=>e.command(pe).command(P).command(ne).command(de).command(M).command(be).command(kt).command(Pt).command(Jt).command(rn).command(Dn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{On as default};
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D0dXwuME.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes`,body:`json`};function y(e){return e.usage(`$0 vectorize create
3
-
4
- Creates and returns a new Vectorize Index.`).option(`index-config-dimensions`,{type:`number`,description:`Specifies the number of dimensions for the index`}).option(`index-config-metric`,{type:`string`,description:`Specifies the type of metric to use calculating distance.`,choices:[`cosine`,`euclidean`,`dot-product`]}).coerce(`index-config-metric`,e=>p(e,`index-config-metric`,`text`)).option(`index-config-preset`,{type:`string`,description:`Specifies the preset to use for the index.`,choices:[`@cf/baai/bge-small-en-v1.5`,`@cf/baai/bge-base-en-v1.5`,`@cf/baai/bge-large-en-v1.5`,`openai/text-embedding-ada-002`,`cohere/embed-multilingual-v2.0`]}).coerce(`index-config-preset`,e=>p(e,`index-config-preset`,`text`)).option(`description`,{type:`string`,description:`Specifies the description of the index.`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`index-config-dimensions`,[`index-config-preset`]).implies(`index-config-dimensions`,[`index-config-metric`]).conflicts(`index-config-metric`,[`index-config-preset`]).implies(`index-config-metric`,[`index-config-dimensions`]).conflicts(`index-config-preset`,[`index-config-dimensions`,`index-config-metric`])}const b={command:`create`,describe:`Create Vectorize Index`,builder:y,handler:async e=>l({command:`vectorize create`,classification:{safeFlags:[`index-config-metric`,`index-config-preset`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({config:{dimensions:e[`index-config-dimensions`],metric:e[`index-config-metric`],preset:e[`index-config-preset`]},description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(v,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let d=f({config:{dimensions:e[`index-config-dimensions`],metric:e[`index-config-metric`],preset:e[`index-config-preset`]},description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),m=await c(`Creating`,async()=>n.send(v,{body:d,account_id:l}));o(m,{successLabel:`Created`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/delete_by_ids`,body:`json`};function S(e){return e.usage(`$0 vectorize delete-by-ids <index-name>
5
-
6
- Delete a set of vectors from an index by their vector identifiers.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`A list of vector identifiers to delete from the index indicated by the path.`}).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 C={command:`delete-by-ids <index-name>`,describe:`Delete Vectors By Identifier`,builder:S,handler:async e=>l({command:`vectorize delete-by-ids`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize delete-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/delete_by_ids`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({ids:e.ids}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(x,{body:t,account_id:l,index_name:e[`index-name`]}));o(r,{successLabel:`Created`});return}let d=f({ids:e.ids}),p=await c(`Creating`,async()=>n.send(x,{body:d,account_id:l,index_name:e[`index-name`]}));o(p,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}`};function T(e){return e.usage(`$0 vectorize delete <index-name>
7
-
8
- Deletes the specified Vectorize Index.`).positional(`index-name`,{type:`string`,description:`Index name`,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 E={command:`delete <index-name>`,describe:`Delete Vectorize Index`,builder:T,handler:async e=>l({command:`vectorize delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(w,{account_id:l,index_name:e[`index-name`]}));o(u,{successLabel:`Deleted`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/get_by_ids`,body:`json`};function O(e){return e.usage(`$0 vectorize get-by-ids <index-name>
9
-
10
- Get a set of vectors from an index by their vector identifiers.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`ids`,{type:`string`,array:!0,description:`A list of vector identifiers to retrieve from the index indicated by the path.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`get-by-ids <index-name>`,describe:`Get Vectors By Identifier`,builder:O,handler:async e=>l({command:`vectorize get-by-ids`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize get-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/get_by_ids`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({ids:e.ids}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(D,{body:t,account_id:l,index_name:e[`index-name`]}));o(r,{successLabel:`Created`});return}let d=f({ids:e.ids}),p=await c(`Creating`,async()=>n.send(D,{body:d,account_id:l,index_name:e[`index-name`]}));o(p,{successLabel:`Created`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}`};function j(e){return e.usage(`$0 vectorize get <index-name>
11
-
12
- Returns the specified Vectorize Index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <index-name>`,describe:`Get Vectorize Index`,builder:j,handler:async e=>l({command:`vectorize get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(A,{account_id:l,index_name:e[`index-name`]}));o(u,{successLabel:`Loaded`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/info`};function P(e){return e.usage(`$0 vectorize info <index-name>
13
-
14
- Get information about a vectorize index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`info <index-name>`,describe:`Get Vectorize Index Info`,builder:P,handler:async e=>l({command:`vectorize info`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/info`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(N,{account_id:l,index_name:e[`index-name`]}));o(u,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 vectorize insert <index-name>
15
-
16
- Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`unparsable-behavior`,{type:`string`,description:`Behavior for ndjson parse failures.`,choices:[`error`,`discard`]}).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const L={command:`insert <index-name>`,describe:`Insert Vectors`,builder:I,handler:async e=>l({command:`vectorize insert`,classification:{safeFlags:[`unparsable-behavior`,`dry-run`]}},e,async()=>{let l={"unparsable-behavior":e[`unparsable-behavior`]};if(e.dryRun){let t=await i();s({command:`cf vectorize insert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/insert`,pathParams:{"index-name":String(e[`index-name`]??``)},query:l,bodyKind:`octet-stream`,body:e.body});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.file){let t=m(e.file),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${d}/vectorize/v2/indexes/${encodeURIComponent(String(e[`index-name`]))}/insert`,{body:t,headers:{"Content-Type":`application/x-ndjson`}}));o(r,{successLabel:`Created`})}else if(e.body){let t=p(e.body,`body`,`binary`),r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${d}/vectorize/v2/indexes/${encodeURIComponent(String(e[`index-name`]))}/insert${r?`?`+r:``}`,{body:t,headers:{"Content-Type":`application/x-ndjson`}}));o(i,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var R={method:`GET`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/list`,query:[`count`,`cursor`]};function z(e){return e.usage(`$0 vectorize list-vectors <index-name>
17
-
18
- Returns a paginated list of vector identifiers from the specified index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`count`,{type:`number`,description:`Maximum number of vectors to return`}).option(`cursor`,{type:`string`,description:`Cursor for pagination to get the next page of results`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`list-vectors <index-name>`,describe:`List Vectors`,builder:z,handler:async e=>l({command:`vectorize list-vectors`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={count:e.count,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf vectorize list-vectors`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/list`,pathParams:{"index-name":String(e[`index-name`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(R,{account_id:u,index_name:e[`index-name`],...n}));o(d,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes`};function V(e){return e.usage(`$0 vectorize list
19
-
20
- Returns a list of Vectorize Indexes`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List Vectorize Indexes`,builder:V,handler:async e=>l({command:`vectorize list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf vectorize list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(B,{account_id:l}));o(u,{successLabel:`Loaded`})})};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/metadata_index/create`,body:`json`};function W(e){return e.usage(`$0 vectorize metadata-index create <index-name>
21
-
22
- Enable metadata filtering based on metadata property. Limited to 10 properties.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`index-type`,{type:`string`,description:`Specifies the type of metadata property to index.`,choices:[`string`,`number`,`boolean`]}).coerce(`index-type`,e=>p(e,`index-type`,`text`)).option(`property-name`,{type:`string`,description:`Specifies the metadata property to index.`}).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 G={command:`create <index-name>`,describe:`Create Metadata Index`,builder:W,handler:async e=>l({command:`vectorize metadata-index create`,classification:{safeFlags:[`index-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize metadata-index create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/metadata_index/create`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({indexType:e[`index-type`],propertyName:p(e[`property-name`],`property-name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(U,{body:t,account_id:l,index_name:e[`index-name`]}));o(r,{successLabel:`Created`});return}e[`index-type`]===void 0&&(e[`index-type`]=await g(`index-type`,`Specifies the type of metadata property to index.`,[`string`,`number`,`boolean`])),e[`property-name`]===void 0&&(e[`property-name`]=await h(`property-name`,`Specifies the metadata property to index.`));let d=f({indexType:e[`index-type`],propertyName:p(e[`property-name`],`property-name`,`text`)}),m=await c(`Creating`,async()=>n.send(U,{body:d,account_id:l,index_name:e[`index-name`]}));o(m,{successLabel:`Created`})})};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/metadata_index/delete`,body:`json`};function q(e){return e.usage(`$0 vectorize metadata-index delete <index-name>
23
-
24
- Allow Vectorize to delete the specified metadata index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`property-name`,{type:`string`,description:`Specifies the metadata property for which the index must be deleted.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`delete <index-name>`,describe:`Delete Metadata Index`,builder:q,handler:async e=>l({command:`vectorize metadata-index delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize metadata-index delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/metadata_index/delete`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({propertyName:p(e[`property-name`],`property-name`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force,message:`This operation deletes a metadata index destructively.`}))return;if(e.body){let t=u(e.body),r=await c(`Deleting`,async()=>n.send(K,{body:t,account_id:l,index_name:e[`index-name`]}));o(r,{successLabel:`Deleted`});return}e[`property-name`]===void 0&&(e[`property-name`]=await h(`property-name`,`Specifies the metadata property for which the index must be deleted.`));let d=f({propertyName:p(e[`property-name`],`property-name`,`text`)}),m=await c(`Deleting`,async()=>n.send(K,{body:d,account_id:l,index_name:e[`index-name`]}));o(m,{successLabel:`Deleted`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/metadata_index/list`};function X(e){return e.usage(`$0 vectorize metadata-index list
25
-
26
- List Metadata Indexes for the specified Vectorize Index.`).option(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Metadata Indexes`,builder:X,handler:async e=>l({command:`vectorize metadata-index list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize metadata-index list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/metadata_index/list`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Y,{account_id:l,index_name:e[`index-name`]}));o(u,{successLabel:`Loaded`})})},Q={command:`metadata-index`,describe:`Metadata indexes for filtered vector search`,builder:e=>e.command(G).command(J).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/vectorize/v2/indexes/${t.index_name}/query`,body:`json`};function te(e){return e.usage(`$0 vectorize query <index-name>
27
-
28
- Finds vectors closest to a given vector in an index.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`filter`,{type:`string`,description:`A metadata filter expression used to limit nearest neighbor results. Provide as a JSON object or @path/to/file.json.`}).option(`return-metadata`,{type:`string`,description:`Whether to return no metadata, indexed metadata or all metadata associated with the closest vectors.`,choices:[`none`,`indexed`,`all`],default:`none`}).coerce(`return-metadata`,e=>p(e,`return-metadata`,`text`)).option(`return-values`,{type:`boolean`,description:`Whether to return the values associated with the closest vectors.`,default:!1}).option(`top-k`,{type:`number`,description:`The number of nearest neighbors to find.`,default:5}).option(`vector`,{type:`string`,array:!0,description:`The search vector that will be used to find the nearest neighbors.`}).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 ne={command:`query <index-name>`,describe:`Query Vectors`,builder:te,handler:async e=>l({command:`vectorize query`,classification:{safeFlags:[`return-metadata`,`return-values`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf vectorize query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/query`,pathParams:{"index-name":String(e[`index-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({filter:d(e.filter,`filter`),returnMetadata:e[`return-metadata`],returnValues:e[`return-values`],topK:e[`top-k`],vector:e.vector},[[`filter`]]):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Loading`,async()=>n.send($,{body:t,account_id:l,index_name:e[`index-name`]}));o(r,{successLabel:`Loaded`});return}if(e.vector===void 0)throw Error(`--vector is required (or pass --body with this field set).`);let p=f({filter:d(e.filter,`filter`),returnMetadata:e[`return-metadata`],returnValues:e[`return-values`],topK:e[`top-k`],vector:e.vector},[[`filter`]]),m=await c(`Loading`,async()=>n.send($,{body:p,account_id:l,index_name:e[`index-name`]}));o(m,{successLabel:`Loaded`})})};function re(e){return e.usage(`$0 vectorize upsert <index-name>
29
-
30
- Upserts vectors into the specified index, creating them if they do not exist and returns a mutation id corresponding to the vectors enqueued for upsertion.`).positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).option(`unparsable-behavior`,{type:`string`,description:`Behavior for ndjson parse failures.`,choices:[`error`,`discard`]}).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const ie={command:`upsert <index-name>`,describe:`Upsert Vectors`,builder:re,handler:async e=>l({command:`vectorize upsert`,classification:{safeFlags:[`unparsable-behavior`,`dry-run`]}},e,async()=>{let l={"unparsable-behavior":e[`unparsable-behavior`]};if(e.dryRun){let t=await i();s({command:`cf vectorize upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/vectorize/v2/indexes/${e[`index-name`]==null?`<index-name>`:encodeURIComponent(String(e[`index-name`]))}/upsert`,pathParams:{"index-name":String(e[`index-name`]??``)},query:l,bodyKind:`octet-stream`,body:e.body});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.file){let t=m(e.file),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${d}/vectorize/v2/indexes/${encodeURIComponent(String(e[`index-name`]))}/upsert`,{body:t,headers:{"Content-Type":`application/x-ndjson`}}));o(r,{successLabel:`Created`})}else if(e.body){let t=p(e.body,`body`,`binary`),r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${d}/vectorize/v2/indexes/${encodeURIComponent(String(e[`index-name`]))}/upsert${r?`?`+r:``}`,{body:t,headers:{"Content-Type":`application/x-ndjson`}}));o(i,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ae={command:`vectorize`,describe:`Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers`,builder:e=>e.command(b).command(E).command(C).command(M).command(k).command(F).command(L).command(H).command(ee).command(ne).command(ie).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./package-CiRJBRHO.mjs";const t=process.env.CLI_VERSION??e,n=`cf-cli/${t}`;export{t as n,n as t};