cf 0.2.0 → 0.4.0

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 (278) hide show
  1. package/dist/_meta/agent-context.json +76 -70
  2. package/dist/_meta/commands.json +47761 -55490
  3. package/dist/_meta/schemas.json +31106 -34818
  4. package/dist/abuse-reports-Dy76QPNP.mjs +8 -0
  5. package/dist/accounts-CjtZ8x1z.mjs +22 -0
  6. package/dist/acm-C2lYIWs1.mjs +3 -0
  7. package/dist/addressing-CHFK6uxW.mjs +12 -0
  8. package/dist/{agent-context-D26woB9J.mjs → agent-context-CgGCT0xU.mjs} +1 -1
  9. package/dist/ai-DS3i-I1a.mjs +2 -0
  10. package/dist/ai-gateway-RIsegO2x.mjs +8 -0
  11. package/dist/ai-search-Dcj4BauG.mjs +7 -0
  12. package/dist/ai_gateway-w7YwfcPE.mjs +4 -0
  13. package/dist/alerting-Bk85NNf5.mjs +6 -0
  14. package/dist/analytics-CkhhhZWZ.mjs +20 -0
  15. package/dist/analytics_engine-B7qgDJCA.mjs +2 -0
  16. package/dist/api-gateway-CWdR4Ne7.mjs +33 -0
  17. package/dist/argo-DnJRVnGX.mjs +2 -0
  18. package/dist/artifacts-BVWKiJUl.mjs +4 -0
  19. package/dist/audit-logs-DjTstbzL.mjs +2 -0
  20. package/dist/auth-BqDOIrKX.mjs +150 -0
  21. package/dist/auth-DKkSwnxh.mjs +5 -0
  22. package/dist/billing-3rEqF83h.mjs +2 -0
  23. package/dist/body-parser-CBpeIUns.mjs +2 -0
  24. package/dist/bot-management-CJxD1pqi.mjs +5 -0
  25. package/dist/botnet-feed-MG91D7BR.mjs +3 -0
  26. package/dist/brand-protection-CK7gJi06.mjs +3 -0
  27. package/dist/browser-rendering-Rae0AUt0.mjs +4 -0
  28. package/dist/{build-5jmmOZhm.mjs → build-BE4o4imx.mjs} +131 -131
  29. package/dist/cache-B7pRbpTy.mjs +5 -0
  30. package/dist/calls-DXRWsZ8n.mjs +4 -0
  31. package/dist/certificate-authorities-BR3gXBLs.mjs +2 -0
  32. package/dist/chunk-6IEM75FG-U3L9fKgi.mjs +2 -0
  33. package/dist/cli-types-CMNMD1V7.mjs +2 -0
  34. package/dist/client-certificates-B0ebLJdk.mjs +3 -0
  35. package/dist/cloud-connector-BOjaggJk.mjs +2 -0
  36. package/dist/cloudforce-one-B6HYfk5Z.mjs +21 -0
  37. package/dist/{completions-BKrxcfhN.mjs → completions-D_9WsLG7.mjs} +1 -1
  38. package/dist/config-7CBz8Xm0.mjs +2 -0
  39. package/dist/connectivity-welFvZ7X.mjs +3 -0
  40. package/dist/connector-interrupts-DTV3F-50.mjs +2 -0
  41. package/dist/connector-telemetry-events-kDqb_AGm.mjs +2 -0
  42. package/dist/connector-telemetry-snapshots-DC-wD75E.mjs +2 -0
  43. package/dist/connectors-3vjrdFLB.mjs +3 -0
  44. package/dist/content-scanning-CnW2A0pv.mjs +4 -0
  45. package/dist/context-CONbNKO-.mjs +2 -0
  46. package/dist/custom-certificates-CnYh6Yi-.mjs +5 -0
  47. package/dist/custom-hostnames-C2upqZso.mjs +5 -0
  48. package/dist/custom-nameservers-BGkAD_PZ.mjs +3 -0
  49. package/dist/custom-pages-5fCSP8in.mjs +4 -0
  50. package/dist/d1-CyiRbZZn.mjs +4 -0
  51. package/dist/data-security-Casx4OS_.mjs +6 -0
  52. package/dist/dcv-delegation-DVYO10oA.mjs +2 -0
  53. package/dist/{deploy-DbkiIzUr.mjs → deploy-KBRFIatG.mjs} +1 -1
  54. package/dist/{dev-C6iSuQZm.mjs → dev-pPazzZvt.mjs} +1 -1
  55. package/dist/diagnostics-BqYDoDfw.mjs +3 -0
  56. package/dist/dispatch-namespaces-Cz2rajnP.mjs +7 -0
  57. package/dist/{dist-CnSubA1Z.mjs → dist-DA54ZQu0.mjs} +1 -1
  58. package/dist/dist-DpDjsWWn.mjs +306 -0
  59. package/dist/dns-62t95Xif.mjs +29 -0
  60. package/dist/dns-firewall-Coy8d47t.mjs +57 -0
  61. package/dist/durable-objects-BSuRERkw.mjs +2 -0
  62. package/dist/email-routing-BDUYYeV3.mjs +10 -0
  63. package/dist/email-security-ChHA6eqQ.mjs +8 -0
  64. package/dist/email-sending-CVrRqn6S.mjs +3 -0
  65. package/dist/filters-qJpU9uAS.mjs +4 -0
  66. package/dist/firewall-C3DDwfwh.mjs +11 -0
  67. package/dist/fraud-DY3YXFVf.mjs +20 -0
  68. package/dist/google-tag-gateway-B00MHDfB.mjs +2 -0
  69. package/dist/healthchecks-Drvb79v0.mjs +4 -0
  70. package/dist/hostnames-BdAQo1Mr.mjs +3 -0
  71. package/dist/hyperdrive-99OJV9nl.mjs +18 -0
  72. package/dist/iam-BRbpg3lN.mjs +6 -0
  73. package/dist/images-D1jI3r3O.mjs +7 -0
  74. package/dist/index.mjs +1 -1
  75. package/dist/intel-C3ajLpXd.mjs +3 -0
  76. package/dist/{ips-B8fwxKZD.mjs → ips-B6JETVOY.mjs} +1 -1
  77. package/dist/keyless-certificates-C4MZ4xnf.mjs +3 -0
  78. package/dist/kv-CSWoD9ks.mjs +5 -0
  79. package/dist/leaked-credential-checks-Dgs2oKm9.mjs +3 -0
  80. package/dist/load-balancers-Du1tNuUt.mjs +6 -0
  81. package/dist/logpush-SuJyO-uX.mjs +4 -0
  82. package/dist/logs-DcDNRPRl.mjs +3 -0
  83. package/dist/magic-cloud-networking-D-T0RCvi.mjs +5 -0
  84. package/dist/magic-network-monitoring-CqtvOePQ.mjs +4 -0
  85. package/dist/magic-transit-BTbkhBtF.mjs +89 -0
  86. package/dist/managed-transforms-CfUBSz9p.mjs +3 -0
  87. package/dist/mtls-certificates-Cf1O8c2E.mjs +3 -0
  88. package/dist/network-interconnects-DsiNytOU.mjs +36 -0
  89. package/dist/observability-CLqZ7OSi.mjs +4 -0
  90. package/dist/open-YWOUIZ5Y-BpqIuBsR.mjs +4 -0
  91. package/dist/organizations-aRi1bhFC.mjs +41 -0
  92. package/dist/origin-ca-certificates-BB4H89a_.mjs +3 -0
  93. package/dist/origin-post-quantum-encryption-DurP3PXG.mjs +2 -0
  94. package/dist/origin-tls-client-auth-CnQNy9-l.mjs +4 -0
  95. package/dist/output-CUxZRM5A.mjs +2 -0
  96. package/dist/page-rules-CYqtPU1p.mjs +18 -0
  97. package/dist/page-shield-D8l9ZMUl.mjs +37 -0
  98. package/dist/pages-ChurJ2H7.mjs +11 -0
  99. package/dist/pipelines-CeyujvRf.mjs +6 -0
  100. package/dist/{progress-CjcQ6ato.mjs → progress-Cent9Lsg.mjs} +1 -1
  101. package/dist/queues-Rf_n11Cx.mjs +6 -0
  102. package/dist/r2-BtuTO3vQ.mjs +21 -0
  103. package/dist/r2-data-catalog-Debz38kv.mjs +14 -0
  104. package/dist/radar-CzGM92uM.mjs +2 -0
  105. package/dist/rate-limits-Bbk7HxP7.mjs +5 -0
  106. package/dist/raw-fetch-DnbAMFBp.mjs +2 -0
  107. package/dist/realtime-kit-CivLpkpg.mjs +18 -0
  108. package/dist/registrar-8IeA5DKd.mjs +46 -0
  109. package/dist/request-tracers-D1aH4NmL.mjs +2 -0
  110. package/dist/{resolve-BuJRWSk0.mjs → resolve-D1mG0REg.mjs} +1 -1
  111. package/dist/resource-sharing-B-Pcto7-.mjs +5 -0
  112. package/dist/resource-tagging-Bpb6Qq1M.mjs +16 -0
  113. package/dist/rules-B10XWY10.mjs +4 -0
  114. package/dist/rulesets-lYczEcJp.mjs +8 -0
  115. package/dist/rum-B5GUKa4I.mjs +4 -0
  116. package/dist/{schema-CHBfkARI.mjs → schema-hefO-tzo.mjs} +1 -1
  117. package/dist/schema-validation-DTq517Em.mjs +24 -0
  118. package/dist/scim-BiLfOQ89.mjs +3 -0
  119. package/dist/secrets-store-CBX0dvHL.mjs +25 -0
  120. package/dist/security-center-AVpTOBK3.mjs +2 -0
  121. package/dist/security-txt-DVlh8y9l.mjs +3 -0
  122. package/dist/session-CsvPYFj8.mjs +5 -0
  123. package/dist/shared-0bwWVDLo.mjs +2 -0
  124. package/dist/smart-shield-DblHIce0.mjs +3 -0
  125. package/dist/snippets-DrpqSXYC.mjs +4 -0
  126. package/dist/{spawn-13QQ0IwO.mjs → spawn-DK7pott_.mjs} +1 -1
  127. package/dist/spectrum-CnrG0jIC.mjs +63 -0
  128. package/dist/speed-BzRY3Xlh.mjs +4 -0
  129. package/dist/{src-B9cKsgsg.mjs → src-D9_Gq68b.mjs} +12 -12
  130. package/dist/ssl-Cp6tQkZH.mjs +15 -0
  131. package/dist/stream-CGTRN4ZN.mjs +14 -0
  132. package/dist/tenants-o_M62Y1n.mjs +2 -0
  133. package/dist/token-validation-Ca5AGEns.mjs +10 -0
  134. package/dist/{tools-B7QiNu-d.mjs → tools-DtNNmO6l.mjs} +1 -1
  135. package/dist/turnstile-l7mo9BWL.mjs +23 -0
  136. package/dist/{ui-BXjU1dX1.mjs → ui-B97lRnOv.mjs} +1 -1
  137. package/dist/url-normalization-D1CogSIG.mjs +3 -0
  138. package/dist/url-scanner-BnJHJqcz.mjs +2 -0
  139. package/dist/user-CiyYZ69X.mjs +10 -0
  140. package/dist/vectorize-D3LgMLOn.mjs +4 -0
  141. package/dist/{versions-DzyrlUAi.mjs → versions-B6E8WQyA.mjs} +1 -1
  142. package/dist/waiting-rooms-Bhy_nuV3.mjs +11 -0
  143. package/dist/web3-DlHE0CZc.mjs +4 -0
  144. package/dist/workers-DRAkU6YR.mjs +18 -0
  145. package/dist/workers-builds-BmNjiHDZ.mjs +7 -0
  146. package/dist/workflows-z6oapEJs.mjs +4 -0
  147. package/dist/zaraz-CyzfYOEU.mjs +2 -0
  148. package/dist/zero-trust-fyyIelWx.mjs +118 -0
  149. package/dist/zero_trust-BAhlNkjo.mjs +3 -0
  150. package/dist/zones-MSULnDwW.mjs +21 -0
  151. package/package.json +7 -6
  152. package/dist/abuse-reports-KtfZhi6j.mjs +0 -8
  153. package/dist/accounts-BopMfODC.mjs +0 -21
  154. package/dist/acm-BT4vlnEJ.mjs +0 -3
  155. package/dist/addressing-B3uFxHst.mjs +0 -13
  156. package/dist/ai-DWHqwMap.mjs +0 -2
  157. package/dist/ai-gateway-CbKEO-3o.mjs +0 -8
  158. package/dist/ai-search-VnOQ5n--.mjs +0 -7
  159. package/dist/alerting-BmmgIlIO.mjs +0 -6
  160. package/dist/analytics-isY03taL.mjs +0 -20
  161. package/dist/api-gateway-DXurEbA-.mjs +0 -33
  162. package/dist/argo-B02BL_hp.mjs +0 -2
  163. package/dist/audit-logs-DcgR9xUc.mjs +0 -2
  164. package/dist/auth-CQcAgnOy.mjs +0 -135
  165. package/dist/auth-DenWm_X0.mjs +0 -6
  166. package/dist/autorag-CmrwnGVj.mjs +0 -2
  167. package/dist/billing-CaW1ZAB1.mjs +0 -2
  168. package/dist/body-parser-Br-BoYk-.mjs +0 -2
  169. package/dist/bot-management-CeBsFx68.mjs +0 -5
  170. package/dist/botnet-feed-B396vQeQ.mjs +0 -3
  171. package/dist/brand-protection-D4V1v5Kl.mjs +0 -3
  172. package/dist/browser-rendering-GF7rNtKI.mjs +0 -4
  173. package/dist/builds-C_ySULja.mjs +0 -2
  174. package/dist/cache-DmXizSMi.mjs +0 -5
  175. package/dist/calls-x4KQpTB4.mjs +0 -4
  176. package/dist/certificate-authorities-hC0SG-Ga.mjs +0 -2
  177. package/dist/client-certificates-BGVsDyeJ.mjs +0 -3
  178. package/dist/cloud-connector-BClQpEzI.mjs +0 -2
  179. package/dist/cloudforce-one-BfhFrO6M.mjs +0 -21
  180. package/dist/config-DYzlVxcB.mjs +0 -2
  181. package/dist/connectivity-G0NP6LtW.mjs +0 -3
  182. package/dist/content-scanning-DEtPJ7aF.mjs +0 -4
  183. package/dist/context-CC0Rhkhy.mjs +0 -2
  184. package/dist/custom-certificates-rJXFpUWu.mjs +0 -5
  185. package/dist/custom-hostnames-Be5mgLeF.mjs +0 -5
  186. package/dist/custom-nameservers-CoFdy6hD.mjs +0 -3
  187. package/dist/custom-pages-D-oErw57.mjs +0 -4
  188. package/dist/d1-C95ckPKI.mjs +0 -3
  189. package/dist/dcv-delegation-CWSkbGuc.mjs +0 -2
  190. package/dist/diagnostics-DEEhPnXj.mjs +0 -3
  191. package/dist/dispatch-namespaces-BzXeV7PH.mjs +0 -7
  192. package/dist/dist-DNBSHor6.mjs +0 -301
  193. package/dist/dns-firewall-BQXD_NxG.mjs +0 -57
  194. package/dist/dns-qW-3TZOT.mjs +0 -29
  195. package/dist/durable-objects-CgWFYEJJ.mjs +0 -2
  196. package/dist/email-routing-tdNJaCpJ.mjs +0 -10
  197. package/dist/email-security-DTVHNr2h.mjs +0 -60
  198. package/dist/email-sending-DsFTvE31.mjs +0 -3
  199. package/dist/filters-DO1Is_tI.mjs +0 -4
  200. package/dist/firewall-DbUhVTCg.mjs +0 -11
  201. package/dist/fraud-Bzr4njYb.mjs +0 -8
  202. package/dist/google-tag-gateway-BQxkA90M.mjs +0 -2
  203. package/dist/healthchecks-BBAs-lS_.mjs +0 -4
  204. package/dist/hostnames-Dz9PEUKS.mjs +0 -3
  205. package/dist/hyperdrive-B1iUJddG.mjs +0 -18
  206. package/dist/iam-CJM8gHpG.mjs +0 -6
  207. package/dist/images-DEoBmtFS.mjs +0 -5
  208. package/dist/intel-BM6xkZ0C.mjs +0 -3
  209. package/dist/keyless-certificates-DffYnd4b.mjs +0 -3
  210. package/dist/kv-BTceLtWZ.mjs +0 -5
  211. package/dist/leaked-credential-checks-CALfvoCo.mjs +0 -3
  212. package/dist/load-balancers-C1Ho1gCF.mjs +0 -6
  213. package/dist/logpush-CSYhgevA.mjs +0 -4
  214. package/dist/logs-DlIwmMpt.mjs +0 -3
  215. package/dist/magic-cloud-networking-Czu0pZ0a.mjs +0 -5
  216. package/dist/magic-network-monitoring-d7GJE5Yt.mjs +0 -4
  217. package/dist/magic-transit-qQmA-981.mjs +0 -89
  218. package/dist/managed-transforms-Dd6AnbWE.mjs +0 -3
  219. package/dist/mtls-certificates-C0rlCRGs.mjs +0 -3
  220. package/dist/network-interconnects-CxG2deY0.mjs +0 -36
  221. package/dist/organizations-DyEAiGiR.mjs +0 -41
  222. package/dist/origin-ca-certificates-S8RcoMF6.mjs +0 -3
  223. package/dist/origin-post-quantum-encryption-B8ZcpLu5.mjs +0 -2
  224. package/dist/origin-tls-client-auth-BlxMmQrE.mjs +0 -5
  225. package/dist/output-D7_yAFVR.mjs +0 -2
  226. package/dist/page-rules-DP-w6TAm.mjs +0 -18
  227. package/dist/page-shield-Bf7kFp8c.mjs +0 -37
  228. package/dist/pages-D0Y_XRqW.mjs +0 -10
  229. package/dist/pipelines-C-SPESAk.mjs +0 -6
  230. package/dist/queues-wv6CZsi8.mjs +0 -6
  231. package/dist/r2-DuXjp9n5.mjs +0 -21
  232. package/dist/r2-data-catalog-DQCMrmNO.mjs +0 -14
  233. package/dist/radar-BW_ZHP8X.mjs +0 -2
  234. package/dist/rate-limits-DLTkIvwr.mjs +0 -5
  235. package/dist/raw-fetch-hRv-6P3D.mjs +0 -2
  236. package/dist/realtime-kit-Ch7Vg3vj.mjs +0 -6
  237. package/dist/registrar-DIIv6fWd.mjs +0 -46
  238. package/dist/request-tracers-DMej0Drs.mjs +0 -2
  239. package/dist/resource-sharing-CYJ7cMWq.mjs +0 -5
  240. package/dist/resource-tagging-Dnz65MgH.mjs +0 -16
  241. package/dist/rules-DLJpOYbC.mjs +0 -4
  242. package/dist/rulesets-D9nqEJT5.mjs +0 -8
  243. package/dist/rum-DBVmdPkp.mjs +0 -4
  244. package/dist/schema-validation-MCd3xdtX.mjs +0 -4
  245. package/dist/scim-DZA3VXog.mjs +0 -3
  246. package/dist/scm-CilfPOue.mjs +0 -2
  247. package/dist/secrets-store-BrvcZSOM.mjs +0 -21
  248. package/dist/security-center-BU6f3Cm1.mjs +0 -2
  249. package/dist/security-txt-BPIbP3dG.mjs +0 -3
  250. package/dist/session-H7IV2BrM.mjs +0 -2
  251. package/dist/shared-DEzmTsEC.mjs +0 -2
  252. package/dist/smart-shield-e8XFBkiF.mjs +0 -3
  253. package/dist/snippets-B4M3MMb8.mjs +0 -4
  254. package/dist/spectrum-B0adfSRI.mjs +0 -59
  255. package/dist/speed-BVcUtkAz.mjs +0 -4
  256. package/dist/ssl-BAa91gsc.mjs +0 -15
  257. package/dist/stream-D53sxKb3.mjs +0 -14
  258. package/dist/tenants-bH5pt3dJ.mjs +0 -2
  259. package/dist/token-validation-M61Vx_Tw.mjs +0 -4
  260. package/dist/turnstile-wAU0Gc2Z.mjs +0 -23
  261. package/dist/url-normalization-DZrWDgB5.mjs +0 -3
  262. package/dist/url-scanner-Zo49edNp.mjs +0 -2
  263. package/dist/user-DbXlVReB.mjs +0 -10
  264. package/dist/vectorize-CUnTM0DT.mjs +0 -4
  265. package/dist/vuln-scanner-Br_2lQp1.mjs +0 -2
  266. package/dist/waiting-rooms-BZW0X69-.mjs +0 -11
  267. package/dist/web3-DueyOQtx.mjs +0 -4
  268. package/dist/workers-builds-BM_aoeUR.mjs +0 -7
  269. package/dist/workers-nV_vBCfV.mjs +0 -16
  270. package/dist/workflows-CQITmo-s.mjs +0 -4
  271. package/dist/zaraz-DIbpF5Op.mjs +0 -2
  272. package/dist/zero-trust-CKp8j512.mjs +0 -119
  273. package/dist/zones-BZ5tZDbH.mjs +0 -28
  274. /package/dist/{input-validation-zEO81MWN.mjs → input-validation-CTqtyiY9.mjs} +0 -0
  275. /package/dist/{lib-Eu1wXxuh.mjs → lib-B6xvCJjc.mjs} +0 -0
  276. /package/dist/{local-VJaJ3BZ1.mjs → local-D8bhHUMK.mjs} +0 -0
  277. /package/dist/{metadata-DGdCpUxn.mjs → metadata-jh2EIan8.mjs} +0 -0
  278. /package/dist/{theme-BklJDrb2.mjs → theme-CFHr0Dh9.mjs} +0 -0
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import{D as e,E as t,T as n,i as r,n as i}from"./auth-BqDOIrKX.mjs";import{n as a,r as ee,t as o}from"./body-parser-CBpeIUns.mjs";import{t as s}from"./output-CUxZRM5A.mjs";import{n as c,t as l}from"./progress-Cent9Lsg.mjs";import{n as u}from"./input-validation-CTqtyiY9.mjs";import{t as d}from"./cli-types-CMNMD1V7.mjs";function te(e){return e.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:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).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 f={command:`list`,describe:`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.`,builder:d(te),handler:async e=>{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){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.auditLogs.list(t)),{successLabel:`Loaded`})}},p={command:`audit-logs`,describe:`Review a chronological record of actions performed by or on behalf of your user`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.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 h={command:`list`,describe:`Accesses your billing history object.`,builder:d(m),handler:async e=>{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){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.billing.history.list(t)),{successLabel:`Loaded`})}},g={command:`history`,describe:`View billing history and payment profile for your user (deprecated — prefer account-level billing)`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Accesses your billing profile object.`,builder:_,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.billing.profile.get()),{successLabel:`Loaded`})}},y={command:`profile`,describe:`View billing history and payment profile for your user (deprecated — prefer account-level billing)`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.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 S={command:`edit`,describe:`Edit part of your user details.`,builder:x,handler:async e=>{if(e.dryRun){c({command:`cf user edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`json`,body:e.body===void 0?o({country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),telephone:u(e.telephone,`telephone`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.edit({...n})),{successLabel:`Updated`});return}let n=o({country:u(e.country,`country`,`text`),first_name:u(e[`first-name`],`first-name`,`text`),last_name:u(e[`last-name`],`last-name`,`text`),telephone:u(e.telephone,`telephone`,`text`),zipcode:u(e.zipcode,`zipcode`,`text`)});s(await l(`Updating`,async()=>t.user.edit({...n})),{successLabel:`Updated`})}};function C(e){return e.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`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).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:`create`,describe:`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.`,builder:C,handler:async e=>{if(e.dryRun){c({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?o({configuration:{target:u(e[`configuration-target`],`configuration-target`,`text`),value:u(e[`configuration-value`],`configuration-value`,`text`)},mode:u(e.mode,`mode`,`text`)}):a(e.body)});return}let n=await i(e);if(e.body){let t=a(e.body);s(await l(`Creating`,async()=>n.user.firewall.accessRules.create({...t})),{successLabel:`Created`});return}e.mode===void 0&&(e.mode=await t(`mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let r=o({configuration:{target:u(e[`configuration-target`],`configuration-target`,`text`),value:u(e[`configuration-value`],`configuration-value`,`text`)},mode:u(e.mode,`mode`,`text`)});s(await l(`Creating`,async()=>n.user.firewall.accessRules.create({...r})),{successLabel:`Created`})}};function T(e){return e.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 E={command:`delete <rule-id>`,describe:`Deletes an IP Access rule at the user level. Note: Deleting a user-level rule will affect all zones owned by the user.`,builder:T,handler:async e=>{if(e.dryRun){c({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 i(e);if(!await n({force:!!e.force})){process.stderr.write(`Aborted.
3
+ `);return}s(await l(`Deleting`,async()=>t.user.firewall.accessRules.delete({rule_id:e[`rule-id`]})),{successLabel:`Deleted`})}};function D(e){return e.positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).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 O={command:`edit <rule-id>`,describe:"Updates an IP Access rule defined at the user level. You can only update the rule action (`mode` parameter) and notes.",builder:D,handler:async e=>{if(e.dryRun){c({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?o({mode:u(e.mode,`mode`,`text`),notes:u(e.notes,`notes`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.firewall.accessRules.edit({...n,rule_id:e[`rule-id`]})),{successLabel:`Updated`});return}let n=o({mode:u(e.mode,`mode`,`text`),notes:u(e.notes,`notes`,`text`)});s(await l(`Updating`,async()=>t.user.firewall.accessRules.edit({...n,rule_id:e[`rule-id`]})),{successLabel:`Updated`})}};function k(e){return e.option(`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.
4
+ 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:`Fetches IP Access rules of the user. You can filter the results using several optional parameters.`,builder:d(k),handler:async e=>{let t={mode:e.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){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.firewall.accessRules.list(t)),{successLabel:`Loaded`})}},j={command:`access-rules`,describe:`Firewall operations`,builder:e=>e.command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`firewall`,describe:`Operations for firewall`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get`,describe:`Retrieves detailed information about the currently authenticated user, including email, name, and account memberships.`,builder:N,handler:async e=>{if(e.dryRun){c({command:`cf user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user`,pathParams:{},bodyKind:`none`});return}let t=await i(e);s(await l(`Loading`,async()=>t.user.get()),{successLabel:`Loaded`})}};function F(e){return e.option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create a configured monitor.`,builder:F,handler:async e=>{if(e.dryRun){c({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?o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Creating`,async()=>t.user.loadBalancers.monitors.create({...n})),{successLabel:`Created`});return}let n=o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});s(await l(`Creating`,async()=>t.user.loadBalancers.monitors.create({...n})),{successLabel:`Created`})}};function L(e){return e.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 R={command:`delete <monitor-id>`,describe:`Delete a configured monitor.`,builder:L,handler:async e=>{if(e.dryRun){c({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 i(e);if(!await n({force:!!e.force})){process.stderr.write(`Aborted.
5
+ `);return}s(await l(`Deleting`,async()=>t.user.loadBalancers.monitors.delete({monitor_id:e[`monitor-id`]})),{successLabel:`Deleted`})}};function z(e){return e.positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`edit <monitor-id>`,describe:`Apply changes to an existing monitor, overwriting the supplied properties.`,builder:z,handler:async e=>{if(e.dryRun){c({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?o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.loadBalancers.monitors.edit({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`});return}let n=o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});s(await l(`Updating`,async()=>t.user.loadBalancers.monitors.edit({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`})}};function V(e){return e.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 H={command:`get <monitor-id>`,describe:`List a single configured monitor for a user.`,builder:V,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.monitors.get({monitor_id:e[`monitor-id`]})),{successLabel:`Loaded`})}};function U(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List configured monitors for a user.`,builder:U,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.monitors.list()),{successLabel:`Loaded`})}};function G(e){return e.positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).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:`create <monitor-id>`,describe:`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.`,builder:G,handler:async e=>{if(e.dryRun){c({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?o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Creating`,async()=>t.user.loadBalancers.monitors.preview.create({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Created`});return}let n=o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});s(await l(`Creating`,async()=>t.user.loadBalancers.monitors.preview.create({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Created`})}},q={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.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 Y={command:`list`,describe:`Get the list of resources that reference the provided monitor.`,builder:J,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.monitors.references.list({monitor_id:e[`monitor-id`]})),{successLabel:`Loaded`})}},X={command:`references`,describe:`Load Balancers operations`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.positional(`monitor-id`,{type:`string`,description:`Monitor ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`]}).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 Q={command:`update <monitor-id>`,describe:`Modify a configured monitor.`,builder:Z,handler:async e=>{if(e.dryRun){c({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?o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.loadBalancers.monitors.update({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`});return}let n=o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});s(await l(`Updating`,async()=>t.user.loadBalancers.monitors.update({body:n,monitor_id:e[`monitor-id`]})),{successLabel:`Updated`})}},ne={command:`monitors`,describe:`Load Balancers operations`,builder:e=>e.command(I).command(R).command(B).command(H).command(W).command(Q).command(q).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.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(`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.`,default:0}).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`],default:`random`}).option(`load-shedding-session-percent`,{type:`number`,description:`The percent of existing sessions to shed from the pool, according to the session policy.`,default:0}).option(`load-shedding-session-policy`,{type:`string`,description:`Only the hash policy is supported for existing sessions (to avoid exponential decay).`,choices:[`hash`],default:`hash`}).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).`,default:!1}).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).`,default:!1}).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`],default:`random`}).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 ie={command:`create`,describe:`Create a new pool.`,builder:re,handler:async t=>{if(t.dryRun){c({command:`cf user load-balancers pools create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools`,pathParams:{},bodyKind:`json`,body:t.body===void 0?o({check_regions:t[`check-regions`],description:u(t.description,`description`,`text`),enabled:t.enabled,latitude:t.latitude,load_shedding:{default_percent:t[`load-shedding-default-percent`],default_policy:u(t[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:t[`load-shedding-session-percent`],session_policy:u(t[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:t.longitude,minimum_origins:t[`minimum-origins`],monitor:u(t.monitor,`monitor`,`text`),monitor_group:u(t[`monitor-group`],`monitor-group`,`text`),name:u(t.name,`name`,`text`),networks:t.networks,notification_email:u(t[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:t[`notification-filter-origin-disable`],healthy:t[`notification-filter-origin-healthy`]},pool:{disable:t[`notification-filter-pool-disable`],healthy:t[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(t[`origin-steering-policy`],`origin-steering-policy`,`text`)}}):a(t.body)});return}let n=await i(t);if(t.body){let e=a(t.body);s(await l(`Creating`,async()=>n.user.loadBalancers.pools.create({...e})),{successLabel:`Created`});return}t.name===void 0&&(t.name=await e(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`));let r=o({check_regions:t[`check-regions`],description:u(t.description,`description`,`text`),enabled:t.enabled,latitude:t.latitude,load_shedding:{default_percent:t[`load-shedding-default-percent`],default_policy:u(t[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:t[`load-shedding-session-percent`],session_policy:u(t[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:t.longitude,minimum_origins:t[`minimum-origins`],monitor:u(t.monitor,`monitor`,`text`),monitor_group:u(t[`monitor-group`],`monitor-group`,`text`),name:u(t.name,`name`,`text`),networks:t.networks,notification_email:u(t[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:t[`notification-filter-origin-disable`],healthy:t[`notification-filter-origin-healthy`]},pool:{disable:t[`notification-filter-pool-disable`],healthy:t[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(t[`origin-steering-policy`],`origin-steering-policy`,`text`)}});s(await l(`Creating`,async()=>n.user.loadBalancers.pools.create({...r})),{successLabel:`Created`})}};function ae(e){return e.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 oe={command:`delete <pool-id>`,describe:`Delete a configured pool.`,builder:ae,handler:async e=>{if(e.dryRun){c({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 i(e);if(!await n({force:!!e.force})){process.stderr.write(`Aborted.
6
+ `);return}s(await l(`Deleting`,async()=>t.user.loadBalancers.pools.delete({pool_id:e[`pool-id`]})),{successLabel:`Deleted`})}};function se(e){return e.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(`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`]}).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`]}).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`]}).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 ce={command:`pool <pool-id>`,describe:`Apply changes to an existing pool, overwriting the supplied properties.`,builder:se,handler:async e=>{if(e.dryRun){c({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?o({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),notification_email:u(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:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)}}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.loadBalancers.pools.edit.pools.pool({...n,pool_id:e[`pool-id`]})),{successLabel:`Updated`});return}let n=o({check_regions:e[`check-regions`],description:u(e.description,`description`,`text`),enabled:e.enabled,latitude:e.latitude,load_shedding:{default_percent:e[`load-shedding-default-percent`],default_policy:u(e[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:e[`load-shedding-session-percent`],session_policy:u(e[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:e.longitude,minimum_origins:e[`minimum-origins`],monitor:u(e.monitor,`monitor`,`text`),monitor_group:u(e[`monitor-group`],`monitor-group`,`text`),name:u(e.name,`name`,`text`),notification_email:u(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:u(e[`origin-steering-policy`],`origin-steering-policy`,`text`)}});s(await l(`Updating`,async()=>t.user.loadBalancers.pools.edit.pools.pool({...n,pool_id:e[`pool-id`]})),{successLabel:`Updated`})}};function le(e){return e.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 ue={command:`pools`,describe:"Apply 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`.",builder:le,handler:async e=>{if(e.dryRun){c({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?o({notification_email:u(e[`notification-email`],`notification-email`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>r(t,`PATCH`,`/user/load_balancers/pools`,{body:n})),{successLabel:`Updated`});return}let n={};e[`notification-email`]!==void 0&&ee(n,[`notification_email`],u(e[`notification-email`],`notification-email`,`text`)),s(await l(`Updating`,async()=>r(t,`PATCH`,`/user/load_balancers/pools`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated`})}},de={command:`pools`,describe:`Load Balancers operations`,builder:e=>e.command(ce).command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`edit`,describe:`Operations for load-balancers.pools.edit`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.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 me={command:`get <pool-id>`,describe:`Fetch a single configured pool.`,builder:pe,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.pools.get({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})}};function he(e){return e.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 ge={command:`get <pool-id>`,describe:`Fetch the latest pool health status for a single pool.`,builder:he,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.pools.health.get({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})}},_e={command:`health`,describe:`Load Balancers operations`,builder:e=>e.command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ve(e){return e.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 ye={command:`list`,describe:`List configured pools.`,builder:ve,handler:async e=>{let t={monitor:e.monitor};if(e.dryRun){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.loadBalancers.pools.list(t)),{successLabel:`Loaded`})}};function be(e){return e.positional(`pool-id`,{type:`string`,description:`Pool ID`,demandOption:!0}).option(`allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.`,default:!1}).option(`consecutive-down`,{type:`number`,description:`To be marked unhealthy the monitored origin must fail this healthcheck N consecutive times.`}).option(`consecutive-up`,{type:`number`,description:`To be marked healthy the monitored origin must pass this healthcheck N consecutive times.`}).option(`description`,{type:`string`,description:`Object description.`,default:``}).option(`expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`expected-codes`,{type:`string`,description:`The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`follow-redirects`,{type:`boolean`,description:`Follow redirects if returned by the origin. This parameter is only valid for HTTP and HTTPS monitors.`,default:!1}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.`,default:60}).option(`method`,{type:`string`,description:`The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS based checks and 'connection_established' for TCP based health checks.`}).option(`path`,{type:`string`,description:`The endpoint path you want to conduct a health check against. This parameter is only valid for HTTP and HTTPS monitors.`}).option(`port`,{type:`number`,description:`The port number to connect to for the health check. Required for TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).`}).option(`probe-zone`,{type:`string`,description:`Assign this monitor to emulate the specified zone while probing. This parameter is only valid for HTTP and HTTPS monitors.`,default:``}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.`,choices:[`http`,`https`,`tcp`,`udp_icmp`,`icmp_ping`,`smtp`],default:`http`}).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:`create <pool-id>`,describe:`Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.`,builder:be,handler:async e=>{if(e.dryRun){c({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?o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Creating`,async()=>t.user.loadBalancers.pools.preview.create({body:n,pool_id:e[`pool-id`]})),{successLabel:`Created`});return}let n=o({allow_insecure:e[`allow-insecure`],consecutive_down:e[`consecutive-down`],consecutive_up:e[`consecutive-up`],description:u(e.description,`description`,`text`),expected_body:u(e[`expected-body`],`expected-body`,`text`),expected_codes:u(e[`expected-codes`],`expected-codes`,`text`),follow_redirects:e[`follow-redirects`],interval:e.interval,method:u(e.method,`method`,`text`),path:u(e.path,`path`,`text`),port:e.port,probe_zone:u(e[`probe-zone`],`probe-zone`,`text`),retries:e.retries,timeout:e.timeout,type:u(e.type,`type`,`text`)});s(await l(`Creating`,async()=>t.user.loadBalancers.pools.preview.create({body:n,pool_id:e[`pool-id`]})),{successLabel:`Created`})}},Se={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.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 we={command:`list`,describe:`Get the list of resources that reference the provided pool.`,builder:Ce,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.pools.references.list({pool_id:e[`pool-id`]})),{successLabel:`Loaded`})}},Te={command:`references`,describe:`Load Balancers operations`,builder:e=>e.command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(e){return e.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(`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`]}).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`]}).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`]}).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:`update <pool-id>`,describe:`Modify a configured pool.`,builder:Ee,handler:async t=>{if(t.dryRun){c({command:`cf user load-balancers pools update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/load_balancers/pools/${t[`pool-id`]==null?`<pool-id>`:encodeURIComponent(String(t[`pool-id`]))}`,pathParams:{"pool-id":String(t[`pool-id`]??``)},bodyKind:`json`,body:t.body===void 0?o({check_regions:t[`check-regions`],description:u(t.description,`description`,`text`),enabled:t.enabled,latitude:t.latitude,load_shedding:{default_percent:t[`load-shedding-default-percent`],default_policy:u(t[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:t[`load-shedding-session-percent`],session_policy:u(t[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:t.longitude,minimum_origins:t[`minimum-origins`],monitor:u(t.monitor,`monitor`,`text`),monitor_group:u(t[`monitor-group`],`monitor-group`,`text`),name:u(t.name,`name`,`text`),networks:t.networks,notification_email:u(t[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:t[`notification-filter-origin-disable`],healthy:t[`notification-filter-origin-healthy`]},pool:{disable:t[`notification-filter-pool-disable`],healthy:t[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(t[`origin-steering-policy`],`origin-steering-policy`,`text`)}}):a(t.body)});return}let n=await i(t);if(t.body){let e=a(t.body);s(await l(`Updating`,async()=>n.user.loadBalancers.pools.update({...e,pool_id:t[`pool-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await e(`name`,`A short name (tag) for the pool. Only alphanumeric characters, hyphens, and underscores are allowed.`));let r=o({check_regions:t[`check-regions`],description:u(t.description,`description`,`text`),enabled:t.enabled,latitude:t.latitude,load_shedding:{default_percent:t[`load-shedding-default-percent`],default_policy:u(t[`load-shedding-default-policy`],`load-shedding-default-policy`,`text`),session_percent:t[`load-shedding-session-percent`],session_policy:u(t[`load-shedding-session-policy`],`load-shedding-session-policy`,`text`)},longitude:t.longitude,minimum_origins:t[`minimum-origins`],monitor:u(t.monitor,`monitor`,`text`),monitor_group:u(t[`monitor-group`],`monitor-group`,`text`),name:u(t.name,`name`,`text`),networks:t.networks,notification_email:u(t[`notification-email`],`notification-email`,`text`),notification_filter:{origin:{disable:t[`notification-filter-origin-disable`],healthy:t[`notification-filter-origin-healthy`]},pool:{disable:t[`notification-filter-pool-disable`],healthy:t[`notification-filter-pool-healthy`]}},origin_steering:{policy:u(t[`origin-steering-policy`],`origin-steering-policy`,`text`)}});s(await l(`Updating`,async()=>n.user.loadBalancers.pools.update({...r,pool_id:t[`pool-id`]})),{successLabel:`Updated`})}},Oe={command:`pools`,describe:`Load Balancers operations`,builder:e=>e.command(ie).command(oe).command(me).command(ye).command(De).command(fe).command(_e).command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.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 Ae={command:`get <preview-id>`,describe:`Get the result of a previous preview operation using the provided preview_id.`,builder:ke,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.loadBalancers.preview.get({preview_id:e[`preview-id`]})),{successLabel:`Loaded`})}},je={command:`preview`,describe:`Load Balancers operations`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Me={command:`load-balancers`,describe:`Operations for load-balancers`,builder:e=>e.command(ne).command(Oe).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ne(e){return e.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 Pe={command:`list`,describe:`List origin health changes.`,builder:Ne,handler:async e=>{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){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.loadBalancingAnalytics.events.list(t)),{successLabel:`Loaded`})}},Fe={command:`events`,describe:`Load Balancing Analytics operations`,builder:e=>e.command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ie={command:`load-balancing-analytics`,describe:`Operations for load-balancing-analytics`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.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 Re={command:`delete <identifier>`,describe:`Deletes a user's subscription.`,builder:Le,handler:async e=>{if(e.dryRun){c({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 i(e);if(!await n({force:!!e.force})){process.stderr.write(`Aborted.
7
+ `);return}s(await l(`Deleting`,async()=>t.user.subscriptions.delete({identifier:e.identifier})),{successLabel:`Deleted`})}};function ze(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get`,describe:`Lists all of a user's subscriptions.`,builder:ze,handler:async e=>{if(e.dryRun){c({command:`cf user subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/subscriptions`,pathParams:{},bodyKind:`none`});return}let t=await i(e);s(await l(`Loading`,async()=>t.user.subscriptions.get()),{successLabel:`Loaded`})}};function Ve(e){return e.positional(`identifier`,{type:`string`,description:`Subscription identifier tag.`,demandOption:!0}).option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).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 He={command:`update <identifier>`,describe:`Updates a user's subscriptions.`,builder:Ve,handler:async e=>{if(e.dryRun){c({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?o({app:{install_id:u(e[`app-install-id`],`app-install-id`,`text`)},frequency:u(e.frequency,`frequency`,`text`),rate_plan:{currency:u(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:u(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:u(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}}):a(e.body)});return}let t=await i(e);if(e.body){let n=a(e.body);s(await l(`Updating`,async()=>t.user.subscriptions.update({body:n,identifier:e.identifier})),{successLabel:`Updated`});return}let n=o({app:{install_id:u(e[`app-install-id`],`app-install-id`,`text`)},frequency:u(e.frequency,`frequency`,`text`),rate_plan:{currency:u(e[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:e[`rate-plan-externally-managed`],id:u(e[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:e[`rate-plan-is-contract`],public_name:u(e[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:u(e[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:e[`rate-plan-sets`]}});s(await l(`Updating`,async()=>t.user.subscriptions.update({body:n,identifier:e.identifier})),{successLabel:`Updated`})}},Ue={command:`subscriptions`,describe:`View and manage zone-level plan subscriptions owned by your user`,builder:e=>e.command(Re).command(Be).command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function We(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`list`,describe:`Retrieves list of tenants the authenticated user / method has access to.`,builder:We,handler:async e=>{if(e.dryRun){c({command:`cf user tenants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tenants`,pathParams:{},bodyKind:`none`});return}let t=await i(e);s(await l(`Loading`,async()=>t.user.tenants.list()),{successLabel:`Loaded`})}},Ke={command:`tenants`,describe:`Operations for tenants`,builder:e=>e.command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.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(`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 Je={command:`create`,describe:`Create a new access token.`,builder:qe,handler:async t=>{if(t.dryRun){c({command:`cf user tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},bodyKind:`json`,body:t.body===void 0?o({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:u(t[`expires-on`],`expires-on`,`text`),name:u(t.name,`name`,`text`),not_before:u(t[`not-before`],`not-before`,`text`)}):a(t.body)});return}let n=await i(t);if(t.body){let e=a(t.body);s(await l(`Creating`,async()=>n.user.tokens.create({...e})),{successLabel:`Created`});return}t.name===void 0&&(t.name=await e(`name`,`Token name.`));let r=o({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:u(t[`expires-on`],`expires-on`,`text`),name:u(t.name,`name`,`text`),not_before:u(t[`not-before`],`not-before`,`text`)});s(await l(`Creating`,async()=>n.user.tokens.create({...r})),{successLabel:`Created`})}};function Ye(e){return e.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 Xe={command:`delete <token-id>`,describe:`Destroy a token.`,builder:Ye,handler:async e=>{if(e.dryRun){c({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 i(e);if(!await n({force:!!e.force})){process.stderr.write(`Aborted.
8
+ `);return}s(await l(`Deleting`,async()=>t.user.tokens.delete({token_id:e[`token-id`]})),{successLabel:`Deleted`})}};function Ze(e){return e.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 Qe={command:`get <token-id>`,describe:`Get information about a specific token.`,builder:Ze,handler:async e=>{if(e.dryRun){c({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 i(e);s(await l(`Loading`,async()=>t.user.tokens.get({token_id:e[`token-id`]})),{successLabel:`Loaded`})}};function $e(e){return e.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 et={command:`list`,describe:`List all access tokens you created. Results include active, disabled, and recently-expired tokens when include_expired is set to true.`,builder:d($e),handler:async e=>{let t={page:e.page,per_page:e[`per-page`],direction:e.direction,include_expired:e[`include-expired`]};if(e.dryRun){c({command:`cf user tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens`,pathParams:{},query:t,bodyKind:`none`});return}let n=await i(e);s(await l(`Loading`,async()=>n.user.tokens.list(t)),{successLabel:`Loaded`})}};function tt(e){return e.option(`name`,{type:`string`,description:`Filter by the name of the permission group.
9
+ The value must be URL-encoded.`}).option(`scope`,{type:`string`,description:`Filter by the scope of the permission group.
10
+ The value must be URL-encoded.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`Find all available permission groups for API Tokens.`,builder:tt,handler:async e=>{let t={name:e.name,scope:e.scope};if(e.dryRun){c({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 n=await i(e);s(await l(`Loading`,async()=>n.user.tokens.permissionGroups.list(t)),{successLabel:`Loaded`})}},nt={command:`permission-groups`,describe:`Create and manage personal API tokens scoped to your user for programmatic API access`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rt(e){return e.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(`status`,{type:`string`,description:`Status of the token.`,choices:[`active`,`disabled`,`expired`]}).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 it={command:`update <token-id>`,describe:`Update an existing token.`,builder:rt,handler:async t=>{if(t.dryRun){c({command:`cf user tokens update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/user/tokens/${t[`token-id`]==null?`<token-id>`:encodeURIComponent(String(t[`token-id`]))}`,pathParams:{"token-id":String(t[`token-id`]??``)},bodyKind:`json`,body:t.body===void 0?o({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:u(t[`expires-on`],`expires-on`,`text`),name:u(t.name,`name`,`text`),not_before:u(t[`not-before`],`not-before`,`text`),status:u(t.status,`status`,`text`)}):a(t.body)});return}let n=await i(t);if(t.body){let e=a(t.body);s(await l(`Updating`,async()=>n.user.tokens.update({body:e,token_id:t[`token-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await e(`name`,`Token name.`));let r=o({condition:{request_ip:{in:t[`condition-request-ip-in`],not_in:t[`condition-request-ip-not-in`]}},expires_on:u(t[`expires-on`],`expires-on`,`text`),name:u(t.name,`name`,`text`),not_before:u(t[`not-before`],`not-before`,`text`),status:u(t.status,`status`,`text`)});s(await l(`Updating`,async()=>n.user.tokens.update({body:r,token_id:t[`token-id`]})),{successLabel:`Updated`})}};function at(e){return e.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 ot={command:`update <token-id>`,describe:`Roll the token secret.`,builder:at,handler:async e=>{if(e.dryRun){c({command:`cf user tokens value update`,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 i(e);s(await l(`Updating`,async()=>t.user.tokens.value.update({token_id:e[`token-id`]})),{successLabel:`Updated`})}},st={command:`value`,describe:`Create and manage personal API tokens scoped to your user for programmatic API access`,builder:e=>e.command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ct(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`verify`,describe:`Test whether a token works.`,builder:ct,handler:async e=>{if(e.dryRun){c({command:`cf user tokens verify`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/tokens/verify`,pathParams:{},bodyKind:`none`});return}let t=await i(e);s(await l(`Loading`,async()=>t.user.tokens.verify()),{successLabel:`Loaded`})}},ut={command:`tokens`,describe:`Create and manage personal API tokens scoped to your user for programmatic API access`,builder:e=>e.command(Je).command(Xe).command(Qe).command(et).command(it).command(lt).command(nt).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},dt={command:`user`,describe:`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,builder:e=>e.command(S).command(P).command(p).command(b).command(M).command(Me).command(Ie).command(Ue).command(Ke).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{dt as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{C as e,D as t,E as n,T as r,_ as i,i as a,n as o}from"./auth-BqDOIrKX.mjs";import{n as s,t as c}from"./body-parser-CBpeIUns.mjs";import{t as l}from"./output-CUxZRM5A.mjs";import{n as u,t as d}from"./progress-Cent9Lsg.mjs";import{n as f,t as p}from"./input-validation-CTqtyiY9.mjs";import{t as m}from"./local-D8bhHUMK.mjs";function h(e){return e.option(`config-dimensions`,{type:`number`,description:`Specifies the number of dimensions for the index`}).option(`config-metric`,{type:`string`,description:`Specifies the type of metric to use calculating distance.`,choices:[`cosine`,`euclidean`,`dot-product`]}).option(`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`]}).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(`config-dimensions`,[`config-preset`]).implies(`config-dimensions`,[`config-metric`]).conflicts(`config-metric`,[`config-preset`]).implies(`config-metric`,[`config-dimensions`]).conflicts(`config-preset`,[`config-dimensions`,`config-metric`])}const g={command:`create`,describe:`Creates and returns a new Vectorize Index.`,builder:h,handler:async n=>{if(n.dryRun){u({command:`cf vectorize create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes`,pathParams:{},bodyKind:`json`,body:n.body===void 0?c({config:{dimensions:n[`config-dimensions`],metric:f(n[`config-metric`],`config-metric`,`text`),preset:f(n[`config-preset`],`config-preset`,`text`)},description:f(n.description,`description`,`text`),name:f(n.name,`name`,`text`)}):s(n.body)});return}let r=await o(n),a=n.local?m:await i(r);if(n.accountId=a,n.body){let e=s(n.body);l(await d(`Creating`,async()=>r.vectorize.create({body:e,account_id:a})),{successLabel:`Created`});return}n.name===void 0&&(n.name=await t(`name`,`The name field`));let p=c({config:{dimensions:n[`config-dimensions`],metric:f(n[`config-metric`],`config-metric`,`text`),preset:f(n[`config-preset`],`config-preset`,`text`)},description:f(n.description,`description`,`text`),name:f(n.name,`name`,`text`)});l(await d(`Creating`,async()=>r.vectorize.create({body:p,account_id:a})),{successLabel:`Created`})}};function _(e){return e.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 v={command:`delete-by-ids <index-name>`,describe:`Delete a set of vectors from an index by their vector identifiers.`,builder:_,handler:async t=>{if(t.dryRun){u({command:`cf vectorize delete-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/delete_by_ids`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`json`,body:t.body===void 0?c({ids:t.ids}):s(t.body)});return}let n=await o(t),r=t.local?m:await i(n);if(t.accountId=r,t.body){let e=s(t.body);l(await d(`Creating`,async()=>n.vectorize.deleteByIds({body:e,account_id:r,index_name:t[`index-name`]})),{successLabel:`Created`});return}let a=c({ids:t.ids});l(await d(`Creating`,async()=>n.vectorize.deleteByIds({body:a,account_id:r,index_name:t[`index-name`]})),{successLabel:`Created`})}};function y(e){return e.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 b={command:`delete <index-name>`,describe:`Deletes the specified Vectorize Index.`,builder:y,handler:async t=>{if(t.dryRun){u({command:`cf vectorize delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`none`});return}let n=await o(t),a=t.local?m:await i(n);if(t.accountId=a,!await r({force:!!t.force})){process.stderr.write(`Aborted.
3
+ `);return}l(await d(`Deleting`,async()=>n.vectorize.delete({account_id:a,index_name:t[`index-name`]})),{successLabel:`Deleted`})}};function x(e){return e.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 S={command:`get-by-ids <index-name>`,describe:`Get a set of vectors from an index by their vector identifiers.`,builder:x,handler:async t=>{if(t.dryRun){u({command:`cf vectorize get-by-ids`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/get_by_ids`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`json`,body:t.body===void 0?c({ids:t.ids}):s(t.body)});return}let n=await o(t),r=t.local?m:await i(n);if(t.accountId=r,t.body){let e=s(t.body);l(await d(`Creating`,async()=>n.vectorize.getByIds({body:e,account_id:r,index_name:t[`index-name`]})),{successLabel:`Created`});return}let a=c({ids:t.ids});l(await d(`Creating`,async()=>n.vectorize.getByIds({body:a,account_id:r,index_name:t[`index-name`]})),{successLabel:`Created`})}};function C(e){return e.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 w={command:`get <index-name>`,describe:`Returns the specified Vectorize Index.`,builder:C,handler:async t=>{if(t.dryRun){u({command:`cf vectorize get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.vectorize.get({account_id:r,index_name:t[`index-name`]})),{successLabel:`Loaded`})}};function T(e){return e.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 E={command:`info <index-name>`,describe:`Get information about a vectorize index.`,builder:T,handler:async t=>{if(t.dryRun){u({command:`cf vectorize info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/info`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.vectorize.info({account_id:r,index_name:t[`index-name`]})),{successLabel:`Loaded`})}};function D(e){return e.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 O={command:`insert <index-name>`,describe:`Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion.`,builder:D,handler:async t=>{let n={"unparsable-behavior":t[`unparsable-behavior`]};if(t.dryRun){u({command:`cf vectorize insert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/insert`,pathParams:{"index-name":String(t[`index-name`]??``)},query:n,bodyKind:`octet-stream`,body:t.body});return}let r=await o(t),s=t.local?m:await i(r);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>a(r,`POST`,`/accounts/${s}/vectorize/v2/indexes/${encodeURIComponent(String(t[`index-name`]))}/insert`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),i=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>a(r,`POST`,`/accounts/${s}/vectorize/v2/indexes/${encodeURIComponent(String(t[`index-name`]))}/insert${i?`?`+i:``}`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function k(e){return e.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 A={command:`list-vectors <index-name>`,describe:`Returns a paginated list of vector identifiers from the specified index.`,builder:k,handler:async t=>{let n={count:t.count,cursor:t.cursor};if(t.dryRun){u({command:`cf vectorize list-vectors`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/list`,pathParams:{"index-name":String(t[`index-name`]??``)},query:n,bodyKind:`none`});return}let r=await o(t),a=t.local?m:await i(r);t.accountId=a,l(await d(`Loading`,async()=>r.vectorize.listVectors({account_id:a,index_name:t[`index-name`],...n})),{successLabel:`Loaded`})}};function j(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`Returns a list of Vectorize Indexes`,builder:j,handler:async t=>{if(t.dryRun){u({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 o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.vectorize.list({account_id:r})),{successLabel:`Loaded`})}};function N(e){return e.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`]}).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 P={command:`create <index-name>`,describe:`Enable metadata filtering based on metadata property. Limited to 10 properties.`,builder:N,handler:async r=>{if(r.dryRun){u({command:`cf vectorize metadata-index create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${r[`index-name`]==null?`<index-name>`:encodeURIComponent(String(r[`index-name`]))}/metadata_index/create`,pathParams:{"index-name":String(r[`index-name`]??``)},bodyKind:`json`,body:r.body===void 0?c({indexType:f(r[`index-type`],`index-type`,`text`),propertyName:f(r[`property-name`],`property-name`,`text`)}):s(r.body)});return}let a=await o(r),p=r.local?m:await i(a);if(r.accountId=p,r.body){let e=s(r.body);l(await d(`Creating`,async()=>a.vectorize.metadataIndex.create({...e,account_id:p,index_name:r[`index-name`]})),{successLabel:`Created`});return}r[`index-type`]===void 0&&(r[`index-type`]=await n(`index-type`,`Specifies the type of metadata property to index.`,[`string`,`number`,`boolean`])),r[`property-name`]===void 0&&(r[`property-name`]=await t(`property-name`,`Specifies the metadata property to index.`));let h=c({indexType:f(r[`index-type`],`index-type`,`text`),propertyName:f(r[`property-name`],`property-name`,`text`)});l(await d(`Creating`,async()=>a.vectorize.metadataIndex.create({...h,account_id:p,index_name:r[`index-name`]})),{successLabel:`Created`})}};function F(e){return e.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 I={command:`delete <index-name>`,describe:`Allow Vectorize to delete the specified metadata index.`,builder:F,handler:async n=>{if(n.dryRun){u({command:`cf vectorize metadata-index delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${n[`index-name`]==null?`<index-name>`:encodeURIComponent(String(n[`index-name`]))}/metadata_index/delete`,pathParams:{"index-name":String(n[`index-name`]??``)},bodyKind:`json`,body:n.body===void 0?c({propertyName:f(n[`property-name`],`property-name`,`text`)}):s(n.body)});return}let a=await o(n),p=n.local?m:await i(a);if(n.accountId=p,!await r({force:!!n.force,message:`This operation deletes a metadata index destructively.`})){process.stderr.write(`Aborted.
4
+ `);return}if(n.body){let e=s(n.body);l(await d(`Deleting`,async()=>a.vectorize.metadataIndex.delete({...e,account_id:p,index_name:n[`index-name`]})),{successLabel:`Deleted`});return}n[`property-name`]===void 0&&(n[`property-name`]=await t(`property-name`,`Specifies the metadata property for which the index must be deleted.`));let h=c({propertyName:f(n[`property-name`],`property-name`,`text`)});l(await d(`Deleting`,async()=>a.vectorize.metadataIndex.delete({...h,account_id:p,index_name:n[`index-name`]})),{successLabel:`Deleted`})}};function L(e){return e.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 R={command:`list`,describe:`List Metadata Indexes for the specified Vectorize Index.`,builder:L,handler:async t=>{if(t.dryRun){u({command:`cf vectorize metadata-index list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/metadata_index/list`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`none`});return}let n=await o(t),r=t.local?m:await i(n);t.accountId=r,l(await d(`Loading`,async()=>n.vectorize.metadataIndex.list({account_id:r,index_name:t[`index-name`]})),{successLabel:`Loaded`})}},z={command:`metadata-index`,describe:`Metadata indexes for filtered vector search`,builder:e=>e.command(P).command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.positional(`index-name`,{type:`string`,description:`Index name`,demandOption:!0}).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`}).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 V={command:`query <index-name>`,describe:`Finds vectors closest to a given vector in an index.`,builder:B,handler:async t=>{if(t.dryRun){u({command:`cf vectorize query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/query`,pathParams:{"index-name":String(t[`index-name`]??``)},bodyKind:`json`,body:t.body===void 0?c({returnMetadata:f(t[`return-metadata`],`return-metadata`,`text`),returnValues:t[`return-values`],topK:t[`top-k`],vector:t.vector}):s(t.body)});return}let n=await o(t),r=t.local?m:await i(n);if(t.accountId=r,t.body){let e=s(t.body);l(await d(`Loading`,async()=>n.vectorize.query({...e,account_id:r,index_name:t[`index-name`]})),{successLabel:`Loaded`});return}if(t.vector===void 0)throw Error(`--vector is required (or pass --body with this field set).`);let a=c({returnMetadata:f(t[`return-metadata`],`return-metadata`,`text`),returnValues:t[`return-values`],topK:t[`top-k`],vector:t.vector});l(await d(`Loading`,async()=>n.vectorize.query({...a,account_id:r,index_name:t[`index-name`]})),{successLabel:`Loaded`})}};function H(e){return e.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 U={command:`upsert <index-name>`,describe:`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.`,builder:H,handler:async t=>{let n={"unparsable-behavior":t[`unparsable-behavior`]};if(t.dryRun){u({command:`cf vectorize upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/vectorize/v2/indexes/${t[`index-name`]==null?`<index-name>`:encodeURIComponent(String(t[`index-name`]))}/upsert`,pathParams:{"index-name":String(t[`index-name`]??``)},query:n,bodyKind:`octet-stream`,body:t.body});return}let r=await o(t),s=t.local?m:await i(r);if(t.accountId=s,t.file){let e=p(t.file);l(await d(`Creating`,async()=>a(r,`POST`,`/accounts/${s}/vectorize/v2/indexes/${encodeURIComponent(String(t[`index-name`]))}/upsert`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(t.body){let e=f(t.body,`body`,`binary`),i=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();l(await d(`Creating`,async()=>a(r,`POST`,`/accounts/${s}/vectorize/v2/indexes/${encodeURIComponent(String(t[`index-name`]))}/upsert${i?`?`+i:``}`,{body:e,headers:{"Content-Type":`application/x-ndjson`}})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},W={command:`vectorize`,describe:`Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers`,builder:e=>e.command(g).command(b).command(v).command(w).command(S).command(E).command(O).command(M).command(A).command(V).command(U).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{W as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./shared-DEzmTsEC.mjs";function n(t){return e(t).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}const r={command:`upload`,describe:`Upload a new Worker Version without deploying it`,builder:n,handler:async e=>{await t(e,{command:`Version upload`})}},i={command:`versions`,describe:`Manage Worker Versions`,builder:e=>e.command(r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{i as default};
2
+ import{n as e,t}from"./shared-0bwWVDLo.mjs";function n(t){return e(t).option(`preview-alias`,{type:`string`,description:`Preview alias for this Worker Version`,requiresArg:!0})}const r={command:`upload`,describe:`Upload a new Worker Version without deploying it`,builder:n,handler:async e=>{await t(e,{command:`Version upload`})}},i={command:`versions`,describe:`Manage Worker Versions`,builder:e=>e.command(r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{i as default};
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import{C as e,D as t,E as n,S as r,T as i,_ as a,n as o}from"./auth-BqDOIrKX.mjs";import{n as s,t as c}from"./body-parser-CBpeIUns.mjs";import{t as l}from"./output-CUxZRM5A.mjs";import{n as u,t as d}from"./progress-Cent9Lsg.mjs";import{n as f}from"./input-validation-CTqtyiY9.mjs";import{t as p}from"./local-D8bhHUMK.mjs";function ee(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`Lists waiting rooms for account.`,builder:ee,handler:async t=>{let n={page:t.page,per_page:t[`per-page`]};if(t.dryRun){u({command:`cf waiting-rooms account-waiting-rooms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e()??`<account-id>`}/waiting_rooms`,pathParams:{},query:n,bodyKind:`none`});return}let r=await o(t),i=t.local?p:await a(r);t.accountId=i,l(await d(`Loading`,async()=>r.waitingRooms.accountWaitingRooms.list({account_id:i,...n})),{successLabel:`Loaded`})}},h={command:`account-waiting-rooms`,describe:`Account-scoped waiting room listing`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`],default:`auto`}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`],default:`auto`}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`.",default:``}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls.",default:``}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`),default:`en-US`}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`,default:``}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request.",default:!1}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }',default:!1}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`,default:`/`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable.",default:!1}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`],default:`fifo`}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`,default:200}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`,default:5}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room.",default:!1}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`],default:`log`}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`],default:`invisible`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Creates a new waiting room.`,builder:g,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Creating`,async()=>n.waitingRooms.create({body:t,zone_id:i})),{successLabel:`Created`});return}if(e.host===void 0&&(e.host=await t(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let a=c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Creating`,async()=>n.waitingRooms.create({body:a,zone_id:i})),{successLabel:`Created`})}};function v(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room 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 y={command:`delete <waiting-room-id>`,describe:`Deletes a waiting room.`,builder:v,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await i({force:!!e.force})){process.stderr.write(`Aborted.
3
+ `);return}l(await d(`Deleting`,async()=>t.waitingRooms.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Deleted`})}};function b(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`]}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`]}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`."}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`)}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request."}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }'}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable."}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`]}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room."}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit <waiting-room-id>`,describe:`Patches a configured waiting room.`,builder:b,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>n.waitingRooms.edit({body:t,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.host===void 0&&(e.host=await t(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let a=c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Updating`,async()=>n.waitingRooms.edit({body:a,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`})}};function S(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`,default:``}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary.",default:!1}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration.",default:!1}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).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:`create <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Creates an event for a waiting room. An event takes place during a specified period of time, temporarily changing the behavior of a waiting room. While the event is active, some of the properties in the event's configuration may either override or inherit from the waiting room's configuration. Note that events cannot overlap with each other, so only one event can be active at a time.`,builder:S,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Creating`,async()=>n.waitingRooms.events.create({body:t,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await t(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await t(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let a=c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Creating`,async()=>n.waitingRooms.events.create({body:a,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`})}};function w(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room 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 T={command:`delete <event-id>`,describe:`Deletes an event for a waiting room.`,builder:w,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await i({force:!!e.force})){process.stderr.write(`Aborted.
4
+ `);return}l(await d(`Deleting`,async()=>t.waitingRooms.events.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Deleted`})}};function E(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <event-id>`,describe:`Previews an event's configuration as if it was active. Inherited fields from the waiting room will be displayed with their current values.`,builder:E,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events details get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/details`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.events.details.get({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Loaded`})}},O={command:`details`,describe:`Scheduled events that temporarily override waiting room settings for sales, launches, etc.`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary."}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration."}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`edit <event-id>`,describe:`Patches a configured event for a waiting room.`,builder:k,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>n.waitingRooms.events.edit({body:t,zone_id:i,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await t(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await t(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let a=c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Updating`,async()=>n.waitingRooms.events.edit({body:a,zone_id:i,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`})}};function j(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <event-id>`,describe:`Fetches a single configured event for a waiting room.`,builder:j,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.events.get({zone_id:n,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Loaded`})}};function N(e){return e.option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`Lists events for a waiting room.`,builder:N,handler:async e=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){u({command:`cf waiting-rooms events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,l(await d(`Loading`,async()=>n.waitingRooms.events.list({zone_id:i,waiting_room_id:e[`waiting-room-id`],...t})),{successLabel:`Loaded`})}};function F(e){return e.positional(`event-id`,{type:`string`,description:`Event ID`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`custom-page-html`,{type:`string`,description:"If set, the event will override the waiting room's `custom_page_html` property while it is active. If null, the event will inherit it."}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the event.`}).option(`disable-session-renewal`,{type:`boolean`,description:"If set, the event will override the waiting room's `disable_session_renewal` property while it is active. If null, the event will inherit it."}).option(`event-end-time`,{type:`string`,description:`An ISO 8601 timestamp that marks the end of the event.`}).option(`event-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`."}).option(`name`,{type:`string`,description:`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:"If set, the event will override the waiting room's `new_users_per_minute` property while it is active. If null, the event will inherit it. This can only be set if the event's `total_active_users` property is also set."}).option(`prequeue-start-time`,{type:`string`,description:"An ISO 8601 timestamp that marks when to begin queueing all users before the event starts. The prequeue must start at least five minutes before `event_start_time`."}).option(`queueing-method`,{type:`string`,description:"If set, the event will override the waiting room's `queueing_method` property while it is active. If null, the event will inherit it."}).option(`session-duration`,{type:`number`,description:"If set, the event will override the waiting room's `session_duration` property while it is active. If null, the event will inherit it."}).option(`shuffle-at-event-start`,{type:`boolean`,description:"If enabled, users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. This is useful for situations when many users will join the event prequeue at the same time and you want to shuffle them to ensure fairness. Naturally, it makes the most sense to enable this feature when the `queueing_method` during the event respects ordering such as **fifo**, or else the shuffling may be unnecessary."}).option(`suspended`,{type:`boolean`,description:"Suspends or allows an event. If set to `true`, the event is ignored and traffic will be handled based on the waiting room configuration."}).option(`total-active-users`,{type:`number`,description:"If set, the event will override the waiting room's `total_active_users` property while it is active. If null, the event will inherit it. This can only be set if the event's `new_users_per_minute` property is also set."}).option(`turnstile-action`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_action` property while it is active. If null, the event will inherit it.",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"If set, the event will override the waiting room's `turnstile_mode` property while it is active. If null, the event will inherit it.",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`update <event-id>`,describe:`Updates a configured event for a waiting room.`,builder:F,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms events update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>n.waitingRooms.events.update({body:t,zone_id:i,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`});return}e[`event-end-time`]===void 0&&(e[`event-end-time`]=await t(`event-end-time`,`An ISO 8601 timestamp that marks the end of the event.`)),e[`event-start-time`]===void 0&&(e[`event-start-time`]=await t(`event-start-time`,"An ISO 8601 timestamp that marks the start of the event. At this time, queued users will be processed with the event's configuration. The start time must be at least one minute before `event_end_time`.")),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the event. Only alphanumeric characters, hyphens and underscores are allowed.`));let a=c({custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],event_end_time:f(e[`event-end-time`],`event-end-time`,`text`),event_start_time:f(e[`event-start-time`],`event-start-time`,`text`),name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],prequeue_start_time:f(e[`prequeue-start-time`],`prequeue-start-time`,`text`),queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),session_duration:e[`session-duration`],shuffle_at_event_start:e[`shuffle-at-event-start`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Updating`,async()=>n.waitingRooms.events.update({body:a,zone_id:i,waiting_room_id:e[`waiting-room-id`],event_id:e[`event-id`]})),{successLabel:`Updated`})}},L={command:`events`,describe:`Scheduled events that temporarily override waiting room settings for sales, launches, etc.`,builder:e=>e.command(C).command(T).command(A).command(M).command(P).command(I).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <waiting-room-id>`,describe:`Fetches a single configured waiting room.`,builder:te,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})}};function z(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`Lists waiting rooms for zone.`,builder:z,handler:async e=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){u({command:`cf waiting-rooms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,l(await d(`Loading`,async()=>n.waitingRooms.list({zone_id:i,...t})),{successLabel:`Loaded`})}};function V(e){return e.option(`custom-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls.",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 H={command:`preview`,describe:'Creates a waiting room page preview. Upload a custom waiting room page for preview. You will receive a preview URL in the form `http://waitingrooms.dev/preview/<uuid>`. You can use the following query parameters to change the state of the preview: 1. `force_queue`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website (also known as queueAll). 2. `queue_is_full`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment. 3. `queueing_method`: The queueing method currently used by the waiting room. - **fifo** indicates a FIFO queue. - **random** indicates a Random queue. - **passthrough** indicates a Passthrough queue. Keep in mind that the waiting room page will only be displayed if `force_queue=true` or `event=prequeueing` — for other cases the request will pass through to the origin. For our preview, this will be a fake origin website returning \\"Welcome\\". - **reject** indicates a Reject queue. 4. `event`: Used to preview a waiting room event. - **none** indicates no event is occurring. - **prequeueing** indicates that an event is prequeueing (between `prequeue_start_time` and `event_start_time`). - **started** indicates that an event has started (between `event_start_time` and `event_end_time`). 5. `shuffle_at_event_start`: Boolean indicating if the event will shuffle users in the prequeue when it starts. This can only be set to **true** if an event is active (`event` is not **none**). For example, you can make a request to `http://waitingrooms.dev/preview/<uuid>?force_queue=false&queue_is_full=false&queueing_method=random&event=started&shuffle_at_event_start=true` 6. `waitTime`: Non-zero, positive integer indicating the estimated wait time in minutes. The default value is 10 minutes. For example, you can make a request to `http://waitingrooms.dev/preview/<uuid>?waitTime=50` to configure the estimated wait time as 50 minutes.',builder:V,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms page preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({custom_html:f(e[`custom-html`],`custom-html`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Loading`,async()=>n.waitingRooms.page.preview({...t,zone_id:i})),{successLabel:`Loaded`});return}e[`custom-html`]===void 0&&(e[`custom-html`]=await t(`custom-html`,"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge: 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**. 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use: 3. {{`waitTime`}} Number of minutes of estimated wait for a user. 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`). 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`). 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue. To view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."));let a=c({custom_html:f(e[`custom-html`],`custom-html`,`text`)});l(await d(`Loading`,async()=>n.waitingRooms.page.preview({...a,zone_id:i})),{successLabel:`Loaded`})}},U={command:`page`,describe:`Custom HTML waiting page templates and preview rendering`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`action`,{type:`string`,description:`The action to take when the expression matches.`,choices:[`bypass_waiting_room`]}).option(`description`,{type:`string`,description:`The description of the rule.`,default:``}).option(`enabled`,{type:`boolean`,description:`When set to true, the rule is enabled.`,default:!0}).option(`expression`,{type:`string`,description:`Criteria defining when there is a match for the current rule.`}).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 <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Creates a rule for a waiting room.`,builder:W,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`)}):s(e.body)});return}let i=await o(e),a=await r({zone:e.zone},i,{quiet:e.quiet});if(e.zoneId=a,e.body){let t=s(e.body);l(await d(`Creating`,async()=>i.waitingRooms.rules.create({body:t,zone_id:a,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`});return}e.action===void 0&&(e.action=await n(`action`,`The action to take when the expression matches.`,[`bypass_waiting_room`])),e.expression===void 0&&(e.expression=await t(`expression`,`Criteria defining when there is a match for the current rule.`));let p=c({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`)});l(await d(`Creating`,async()=>i.waitingRooms.rules.create({body:p,zone_id:a,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Created`})}};function K(e){return e.positional(`rule-id`,{type:`string`,description:`The ID of the rule.`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room 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 q={command:`delete <rule-id>`,describe:`Deletes a rule for a waiting room.`,builder:K,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await i({force:!!e.force})){process.stderr.write(`Aborted.
5
+ `);return}l(await d(`Deleting`,async()=>t.waitingRooms.rules.delete({zone_id:n,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Deleted`})}};function J(e){return e.positional(`rule-id`,{type:`string`,description:`The ID of the rule.`,demandOption:!0}).option(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`action`,{type:`string`,description:`The action to take when the expression matches.`,choices:[`bypass_waiting_room`]}).option(`description`,{type:`string`,description:`The description of the rule.`}).option(`enabled`,{type:`boolean`,description:`When set to true, the rule is enabled.`}).option(`expression`,{type:`string`,description:`Criteria defining when there is a match for the current rule.`}).option(`position-index`,{type:`number`,description:`Places the rule in the exact position specified by the integer number <POSITION_NUMBER>. Position numbers start with 1. Existing rules in the ruleset from the specified position number onward are shifted one position (no rule is overwritten).`}).option(`position-before`,{type:`string`,description:`Places the rule before rule <RULE_ID>. Use this argument with an empty rule ID value ("") to set the rule as the first rule in the ruleset.`}).option(`position-after`,{type:`string`,description:`Places the rule after rule <RULE_ID>. Use this argument with an empty rule ID value ("") to set the rule as the last rule in the ruleset.`}).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(`position-index`,[`position-before`,`position-after`]).conflicts(`position-before`,[`position-index`,`position-after`]).conflicts(`position-after`,[`position-index`,`position-before`])}const Y={command:`edit <rule-id>`,describe:`Patches a rule for a waiting room.`,builder:J,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``),"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),position:{index:e[`position-index`],before:f(e[`position-before`],`position-before`,`text`),after:f(e[`position-after`],`position-after`,`text`)}}):s(e.body)});return}let i=await o(e),a=await r({zone:e.zone},i,{quiet:e.quiet});if(e.zoneId=a,e.body){let t=s(e.body);l(await d(`Updating`,async()=>i.waitingRooms.rules.edit({...t,zone_id:a,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Updated`});return}e.action===void 0&&(e.action=await n(`action`,`The action to take when the expression matches.`,[`bypass_waiting_room`])),e.expression===void 0&&(e.expression=await t(`expression`,`Criteria defining when there is a match for the current rule.`));let p=c({action:f(e.action,`action`,`text`),description:f(e.description,`description`,`text`),enabled:e.enabled,expression:f(e.expression,`expression`,`text`),position:{index:e[`position-index`],before:f(e[`position-before`],`position-before`,`text`),after:f(e[`position-after`],`position-after`,`text`)}});l(await d(`Updating`,async()=>i.waitingRooms.rules.edit({...p,zone_id:a,waiting_room_id:e[`waiting-room-id`],rule_id:e[`rule-id`]})),{successLabel:`Updated`})}};function X(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <waiting-room-id>`,describe:`Lists rules for a waiting room.`,builder:X,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.rules.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})}};function Q(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`update <waiting-room-id>`,describe:`Only available for the Waiting Room Advanced subscription. Replaces all rules for a waiting room.`,builder:Q,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/rules`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Updating`,async()=>t.waitingRooms.rules.update({body:r,zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},re={command:`rules`,describe:`Rules that bypass or modify waiting room behavior for specific request patterns`,builder:e=>e.command(G).command(q).command(Y).command(Z).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.option(`search-engine-crawler-bypass`,{type:`boolean`,description:`Whether to allow verified search engine crawlers to bypass all waiting rooms on this zone.
6
+ Verified search engine crawlers will not be tracked or counted by the waiting room system,
7
+ and will not appear in waiting room analytics.
8
+ `}).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 ae={command:`edit`,describe:`Partially updates zone-level Waiting Room settings using PATCH semantics.`,builder:ie,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]}):s(e.body)});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Updating`,async()=>t.waitingRooms.settings.edit({body:r,zone_id:n})),{successLabel:`Updated`});return}let i=c({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]});l(await d(`Updating`,async()=>t.waitingRooms.settings.edit({body:i,zone_id:n})),{successLabel:`Updated`})}};function oe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`get`,describe:`Gets the zone-level Waiting Room settings that apply as defaults to all waiting rooms on the zone.`,builder:oe,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.settings.get({zone_id:n})),{successLabel:`Loaded`})}};function se(e){return e.option(`search-engine-crawler-bypass`,{type:`boolean`,description:`Whether to allow verified search engine crawlers to bypass all waiting rooms on this zone.
9
+ Verified search engine crawlers will not be tracked or counted by the waiting room system,
10
+ and will not appear in waiting room analytics.
11
+ `}).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 ce={command:`update`,describe:`Fully updates zone-level Waiting Room settings, replacing the existing configuration.`,builder:se,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]}):s(e.body)});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=s(e.body);l(await d(`Updating`,async()=>t.waitingRooms.settings.update({body:r,zone_id:n})),{successLabel:`Updated`});return}let i=c({search_engine_crawler_bypass:e[`search-engine-crawler-bypass`]});l(await d(`Updating`,async()=>t.waitingRooms.settings.update({body:i,zone_id:n})),{successLabel:`Updated`})}},le={command:`settings`,describe:`Zone-level waiting room defaults and cookie configuration`,builder:e=>e.command(ae).command($).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <waiting-room-id>`,describe:"Fetches the status of a configured waiting room. Response fields include: 1. `status`: String indicating the status of the waiting room. The possible status are: - **not_queueing** indicates that the configured thresholds have not been met and all users are going through to the origin. - **queueing** indicates that the thresholds have been met and some users are held in the waiting room. - **event_prequeueing** indicates that an event is active and is currently prequeueing users before it starts. - **suspended** indicates that the room is suspended. 2. `event_id`: String of the current event's `id` if an event is active, otherwise an empty string. 3. `estimated_queued_users`: Integer of the estimated number of users currently waiting in the queue. 4. `estimated_total_active_users`: Integer of the estimated number of users currently active on the origin. 5. `max_estimated_time_minutes`: Integer of the maximum estimated time currently presented to the users.",builder:ue,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms statuses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}/status`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await o(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading`,async()=>t.waitingRooms.statuses.get({zone_id:n,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Loaded`})}},fe={command:`statuses`,describe:`Real-time queue status showing active users, queued users, and estimated wait times`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.positional(`waiting-room-id`,{type:`string`,description:`Waiting room ID`,demandOption:!0}).option(`cookie-attributes-samesite`,{type:`string`,description:"Configures the SameSite attribute on the waiting room cookie. Value `auto` will be translated to `lax` or `none` depending if **Always Use HTTPS** is enabled. Note that when using value `none`, the secure attribute cannot be set to `never`.",choices:[`auto`,`lax`,`none`,`strict`]}).option(`cookie-attributes-secure`,{type:`string`,description:"Configures the Secure attribute on the waiting room cookie. Value `always` indicates that the Secure attribute will be set in the Set-Cookie header, `never` indicates that the Secure attribute will not be set, and `auto` will set the Secure attribute depending if **Always Use HTTPS** is enabled.",choices:[`auto`,`always`,`never`]}).option(`cookie-suffix`,{type:`string`,description:"Appends a '_' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(__cf_waitingroom). If `cookie_suffix` is \"abcd\", the cookie name will be `__cf_waitingroom_abcd`. This field is required if using `additional_routes`."}).option(`custom-page-html`,{type:`string`,description:"Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custom_page_html is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:\n1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to take when wait time is not available, for instance when queue_all is **true**.\n2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five minutes. Alternatively, you can use:\n3. {{`waitTime`}} Number of minutes of estimated wait for a user.\n4. {{`waitTimeHours`}} Number of hours of estimated wait for a user (`Math.floor(waitTime/60)`).\n5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value (`waitTime%60`).\n6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the queue.\n\nTo view the full list of variables, look at the `cfWaitingRoom` object described under the `json_response_enabled` property in other Waiting Room API calls."}).option(`default-template-language`,{type:`string`,description:"The language of the default page template. If no default_template_language is provided, then `en-US` (English) will be used.",choices:`en-US.es-ES.de-DE.fr-FR.it-IT.ja-JP.ko-KR.pt-BR.zh-CN.zh-TW.nl-NL.pl-PL.id-ID.tr-TR.ar-EG.ru-RU.fa-IR.bg-BG.hr-HR.cs-CZ.da-DK.fi-FI.lt-LT.ms-MY.nb-NO.ro-RO.el-GR.he-IL.hi-IN.hu-HU.sr-BA.sk-SK.sl-SI.sv-SE.tl-PH.th-TH.uk-UA.vi-VN`.split(`.`)}).option(`description`,{type:`string`,description:`A note that you can use to add more details about the waiting room.`}).option(`disable-session-renewal`,{type:`boolean`,description:"Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If `true`, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. If `false`, a user's session cookie will be automatically renewed on every request."}).option(`enabled-origin-commands`,{type:`string`,array:!0,description:`A list of enabled origin commands.`}).option(`host`,{type:`string`,description:`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`}).option(`json-response-enabled`,{type:`boolean`,description:'Only available for the Waiting Room Advanced subscription. If `true`, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object with information on the user\'s status in the waiting room as opposed to the configured static HTML page. This JSON response object has one property `cfWaitingRoom` which is an object containing the following fields:\n1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room (always **true**).\n2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are accurate. If **false**, they are not available.\n3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating the current estimated time in minutes the user will wait in the waiting room. When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.\n4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile).\n5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website before `waitTime50Percentile` and half are expected to be let in after it.\n6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and `waitTimeKnown` is **true**. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile).\n7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display **unavailable**.\n8. `queueIsFull`: Boolean indicating if the waiting room\'s queue is currently full and not accepting new users at the moment.\n9. `queueAll`: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website.\n10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the user\'s last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt after `refreshIntervalSeconds` past this time. If the user makes a request too soon, it will be ignored and `lastUpdated` will not change.\n11. `refreshIntervalSeconds`: Integer indicating the number of seconds after `lastUpdated` until the user is able to make another attempt to leave the waiting room and be let into the origin website. When the `queueingMethod` is `reject`, there is no specified refresh time —\\_it will always be **zero**.\n12. `queueingMethod`: The queueing method currently used by the waiting room. It is either **fifo**, **random**, **passthrough**, or **reject**.\n13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue.\n14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue where users gain access randomly.\n15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist when `queueAll` is **true** or `isEventPrequeueing` is **true** because in all other cases requests will go directly to the origin.\n16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.\n17. `isEventActive`: Boolean indicating if an event is currently occurring. Events are able to change a waiting room\'s behavior during a specified period of time. For additional information, look at the event properties `prequeue_start_time`, `event_start_time`, and `event_end_time` in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists.\n18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean indicating if an event is currently prequeueing users before it starts.\n19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**. Integer indicating the number of minutes until the event starts.\n20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart` formatted in English for users. If `isEventPrequeueing` is **false**, `timeUntilEventStartFormatted` will display **unavailable**.\n21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer indicating the number of minutes until the event ends.\n22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd` formatted in English for users. If `isEventActive` is **false**, `timeUntilEventEndFormatted` will display **unavailable**.\n23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts.\n24. `turnstile`: Empty when turnstile isn\'t enabled. String displaying an html tag to display the Turnstile widget. Please add the `{{{turnstile}}}` tag to the `custom_html` template to ensure the Turnstile widget appears.\n25. `infiniteQueue`: Boolean indicating whether the response is for a user in the infinite queue.\n\nAn example cURL to a waiting room could be:\n\n curl -X GET "https://example.com/waitingroom" \\\n -H "Accept: application/json"\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **fifo** and no event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 0,\n "waitTime50Percentile": 0,\n "waitTime75Percentile": 0,\n "waitTimeFormatted": "10 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "fifo",\n "isFIFOQueue": true,\n "isRandomQueue": false,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": false,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 0,\n "timeUntilEventEndFormatted": "unavailable",\n "shuffleAtEventStart": false\n }\n }\n\nIf `json_response_enabled` is **true** and the request hits the waiting room, an example JSON response when `queueingMethod` is **random** and an event is active could be:\n\n {\n "cfWaitingRoom": {\n "inWaitingRoom": true,\n "waitTimeKnown": true,\n "waitTime": 10,\n "waitTime25Percentile": 5,\n "waitTime50Percentile": 10,\n "waitTime75Percentile": 15,\n "waitTimeFormatted": "5 minutes to 15 minutes",\n "queueIsFull": false,\n "queueAll": false,\n "lastUpdated": "2020-08-03T23:46:00.000Z",\n "refreshIntervalSeconds": 20,\n "queueingMethod": "random",\n "isFIFOQueue": false,\n "isRandomQueue": true,\n "isPassthroughQueue": false,\n "isRejectQueue": false,\n "isEventActive": true,\n "isEventPrequeueing": false,\n "timeUntilEventStart": 0,\n "timeUntilEventStartFormatted": "unavailable",\n "timeUntilEventEnd": 15,\n "timeUntilEventEndFormatted": "15 minutes",\n "shuffleAtEventStart": true\n }\n }'}).option(`name`,{type:`string`,description:`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`new-users-per-minute`,{type:`number`,description:`Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.`}).option(`path`,{type:`string`,description:`Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.`}).option(`queue-all`,{type:`boolean`,description:"If queue_all is `true`, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable."}).option(`queueing-method`,{type:`string`,description:"Sets the queueing method used by the waiting room. Changing this parameter from the **default** queueing method is only available for the Waiting Room Advanced subscription. Regardless of the queueing method, if `queue_all` is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are:\n1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in the order they arrived.\n2. `random`: Random queue where customers gain access randomly, regardless of arrival time.\n3. `passthrough`: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (with `suspended`) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa.\n4. `reject`: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room uses `reject`, and its events override this with `fifo`, `random`, or `passthrough`. When this queueing method is enabled and neither `queueAll` is enabled nor an event is prequeueing, the waiting room page **will not refresh automatically**.",choices:[`fifo`,`random`,`passthrough`,`reject`]}).option(`queueing-status-code`,{type:`number`,description:`HTTP status code returned to a user while in the queue.`}).option(`session-duration`,{type:`number`,description:`Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.`}).option(`suspended`,{type:`boolean`,description:"Suspends or allows traffic going to the waiting room. If set to `true`, the traffic will not go to the waiting room."}).option(`total-active-users`,{type:`number`,description:`Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.`}).option(`turnstile-action`,{type:`string`,description:"Which action to take when a bot is detected using Turnstile. `log` will\nhave no impact on queueing behavior, simply keeping track of how many\nbots are detected in Waiting Room Analytics. `infinite_queue` will send\nbots to a false queueing state, where they will never reach your\norigin. `infinite_queue` requires Advanced Waiting Room.\n",choices:[`log`,`infinite_queue`]}).option(`turnstile-mode`,{type:`string`,description:"Which Turnstile widget type to use for detecting bot traffic. See\n[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)\nfor the definitions of these widget types. Set to `off` to disable the\nTurnstile integration entirely. Setting this to anything other than\n`off` or `invisible` requires Advanced Waiting Room.\n",choices:[`off`,`invisible`,`visible_non_interactive`,`visible_managed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const me={command:`update <waiting-room-id>`,describe:`Updates a configured waiting room.`,builder:pe,handler:async e=>{if(e.dryRun){u({command:`cf waiting-rooms update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/waiting_rooms/${e[`waiting-room-id`]==null?`<waiting-room-id>`:encodeURIComponent(String(e[`waiting-room-id`]))}`,pathParams:{"waiting-room-id":String(e[`waiting-room-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)}):s(e.body)});return}let n=await o(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=s(e.body);l(await d(`Updating`,async()=>n.waitingRooms.update({body:t,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`});return}if(e.host===void 0&&(e.host=await t(`host`,`The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.`)),e.name===void 0&&(e.name=await t(`name`,`A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.`)),e[`new-users-per-minute`]===void 0)throw Error(`--new-users-per-minute is required (or pass --body with this field set).`);if(e[`total-active-users`]===void 0)throw Error(`--total-active-users is required (or pass --body with this field set).`);let a=c({cookie_attributes:{samesite:f(e[`cookie-attributes-samesite`],`cookie-attributes-samesite`,`text`),secure:f(e[`cookie-attributes-secure`],`cookie-attributes-secure`,`text`)},cookie_suffix:f(e[`cookie-suffix`],`cookie-suffix`,`text`),custom_page_html:f(e[`custom-page-html`],`custom-page-html`,`text`),default_template_language:f(e[`default-template-language`],`default-template-language`,`text`),description:f(e.description,`description`,`text`),disable_session_renewal:e[`disable-session-renewal`],enabled_origin_commands:e[`enabled-origin-commands`],host:f(e.host,`host`,`text`),json_response_enabled:e[`json-response-enabled`],name:f(e.name,`name`,`text`),new_users_per_minute:e[`new-users-per-minute`],path:f(e.path,`path`,`text`),queue_all:e[`queue-all`],queueing_method:f(e[`queueing-method`],`queueing-method`,`text`),queueing_status_code:e[`queueing-status-code`],session_duration:e[`session-duration`],suspended:e.suspended,total_active_users:e[`total-active-users`],turnstile_action:f(e[`turnstile-action`],`turnstile-action`,`text`),turnstile_mode:f(e[`turnstile-mode`],`turnstile-mode`,`text`)});l(await d(`Updating`,async()=>n.waitingRooms.update({body:a,zone_id:i,waiting_room_id:e[`waiting-room-id`]})),{successLabel:`Updated`})}},he={command:`waiting-rooms`,describe:`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,builder:e=>e.command(_).command(y).command(x).command(R).command(B).command(me).command(h).command(L).command(U).command(re).command(le).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{he as default};