cf 0.2.0 → 0.3.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 (262) hide show
  1. package/dist/_meta/agent-context.json +63 -62
  2. package/dist/_meta/commands.json +12365 -9690
  3. package/dist/_meta/schemas.json +19206 -15404
  4. package/dist/abuse-reports-dMIfUJ8v.mjs +8 -0
  5. package/dist/accounts-Kx1epdA1.mjs +22 -0
  6. package/dist/acm-Utu252kC.mjs +3 -0
  7. package/dist/addressing-CBq7Z7Vq.mjs +12 -0
  8. package/dist/{agent-context-D26woB9J.mjs → agent-context-BGTU299M.mjs} +1 -1
  9. package/dist/ai-DOOKLPkG.mjs +2 -0
  10. package/dist/ai-gateway-Cj1T3avF.mjs +8 -0
  11. package/dist/ai-search-CQF_Sn7d.mjs +7 -0
  12. package/dist/ai_gateway-C3fH22C0.mjs +4 -0
  13. package/dist/alerting-CqmEIaKn.mjs +6 -0
  14. package/dist/analytics-Dv-X8x7D.mjs +20 -0
  15. package/dist/analytics_engine-DdXVR8z2.mjs +2 -0
  16. package/dist/api-gateway-CNv0IHTU.mjs +33 -0
  17. package/dist/argo-CX_A4kcn.mjs +2 -0
  18. package/dist/audit-logs-BfBf3oo-.mjs +2 -0
  19. package/dist/auth-SyWhMmPu.mjs +6 -0
  20. package/dist/auth-ffdf9yR0.mjs +135 -0
  21. package/dist/autorag-BuGhGTeZ.mjs +2 -0
  22. package/dist/billing-PoG81XaQ.mjs +2 -0
  23. package/dist/body-parser-DKa8Ipg1.mjs +2 -0
  24. package/dist/bot-management-CFvtVx62.mjs +5 -0
  25. package/dist/botnet-feed-B-M4Yu0W.mjs +3 -0
  26. package/dist/brand-protection-D05Eg-_6.mjs +3 -0
  27. package/dist/browser-rendering-xu8F_Rrv.mjs +4 -0
  28. package/dist/{build-5jmmOZhm.mjs → build-DYkGW4dh.mjs} +1 -1
  29. package/dist/cache-DsoW6Xwv.mjs +5 -0
  30. package/dist/calls-CZbO7TyR.mjs +4 -0
  31. package/dist/certificate-authorities-D2yr7_3t.mjs +2 -0
  32. package/dist/cli-types-CRIDdDw3.mjs +2 -0
  33. package/dist/client-certificates-MJcDsTId.mjs +3 -0
  34. package/dist/cloud-connector-DWOrN2eM.mjs +2 -0
  35. package/dist/cloudforce-one-2Bhz8YdW.mjs +21 -0
  36. package/dist/{completions-BKrxcfhN.mjs → completions-BwRpZQVn.mjs} +1 -1
  37. package/dist/connectivity-BX8C7tvK.mjs +3 -0
  38. package/dist/content-scanning-r6uzMO1r.mjs +4 -0
  39. package/dist/context-DGlHRGWM.mjs +2 -0
  40. package/dist/custom-certificates-aAiEguR7.mjs +5 -0
  41. package/dist/custom-hostnames-AG5yBHIi.mjs +5 -0
  42. package/dist/custom-nameservers-D1DtlRue.mjs +3 -0
  43. package/dist/custom-pages-DQCi2plU.mjs +4 -0
  44. package/dist/d1-DbnYhw45.mjs +4 -0
  45. package/dist/data-security-D_EtYBfo.mjs +6 -0
  46. package/dist/dcv-delegation-CHspSzTI.mjs +2 -0
  47. package/dist/{deploy-DbkiIzUr.mjs → deploy-CQial3kN.mjs} +1 -1
  48. package/dist/{dev-C6iSuQZm.mjs → dev-B38LfCTl.mjs} +1 -1
  49. package/dist/diagnostics-BJQGjVJn.mjs +3 -0
  50. package/dist/dispatch-namespaces-DmHvoBOg.mjs +7 -0
  51. package/dist/{dist-CnSubA1Z.mjs → dist-AIcZFk0U.mjs} +7 -7
  52. package/dist/dns-VMhQSr5n.mjs +29 -0
  53. package/dist/dns-firewall-B4DVXFBQ.mjs +57 -0
  54. package/dist/durable-objects-CTboySEo.mjs +2 -0
  55. package/dist/email-routing-tIR2SFu-.mjs +10 -0
  56. package/dist/email-security-Ca1id3rZ.mjs +8 -0
  57. package/dist/email-sending-DwWKc5jC.mjs +3 -0
  58. package/dist/filters-A4dg_a68.mjs +4 -0
  59. package/dist/firewall-DWPQgYd9.mjs +11 -0
  60. package/dist/fraud-BMkSsJGU.mjs +20 -0
  61. package/dist/google-tag-gateway-BGD49nRC.mjs +2 -0
  62. package/dist/healthchecks-CtIfrFql.mjs +4 -0
  63. package/dist/hostnames-BiomxukN.mjs +3 -0
  64. package/dist/hyperdrive-Da104VaQ.mjs +18 -0
  65. package/dist/iam-BIGKo0WW.mjs +6 -0
  66. package/dist/images-BO8FbDAa.mjs +5 -0
  67. package/dist/index.mjs +1 -1
  68. package/dist/intel-CY6_79v8.mjs +3 -0
  69. package/dist/{ips-B8fwxKZD.mjs → ips-K4bzaGqd.mjs} +1 -1
  70. package/dist/keyless-certificates-CZC-L8gM.mjs +3 -0
  71. package/dist/kv-8o27w_pY.mjs +5 -0
  72. package/dist/leaked-credential-checks-qLzRyu85.mjs +3 -0
  73. package/dist/load-balancers-DtG8nj25.mjs +6 -0
  74. package/dist/logpush-4L0njy1d.mjs +4 -0
  75. package/dist/logs-B_Yp95hv.mjs +3 -0
  76. package/dist/magic-cloud-networking-CSOM3EM-.mjs +5 -0
  77. package/dist/magic-network-monitoring-BnwvM4-I.mjs +4 -0
  78. package/dist/magic-transit-CXDyvhxq.mjs +90 -0
  79. package/dist/managed-transforms-D15yVbZx.mjs +3 -0
  80. package/dist/mtls-certificates-D8k0AXWK.mjs +3 -0
  81. package/dist/network-interconnects-rrr7red3.mjs +36 -0
  82. package/dist/observability-DWvpqnQJ.mjs +4 -0
  83. package/dist/organizations-T77D50Sq.mjs +41 -0
  84. package/dist/origin-ca-certificates-DXIvD8H5.mjs +3 -0
  85. package/dist/origin-post-quantum-encryption-C8oOczyV.mjs +2 -0
  86. package/dist/origin-tls-client-auth-CaVW1Ztp.mjs +4 -0
  87. package/dist/output-BJFNwj7b.mjs +2 -0
  88. package/dist/page-rules-CjZPTMQX.mjs +18 -0
  89. package/dist/page-shield-D5RRNJCY.mjs +37 -0
  90. package/dist/pages-CWJtJnL0.mjs +11 -0
  91. package/dist/pipelines-B0L_7j9e.mjs +6 -0
  92. package/dist/{progress-CjcQ6ato.mjs → progress-CrCGTq7N.mjs} +1 -1
  93. package/dist/queues-CN6DPhRR.mjs +6 -0
  94. package/dist/r2-DQIcyRtA.mjs +21 -0
  95. package/dist/r2-data-catalog-Bbo93TJx.mjs +14 -0
  96. package/dist/radar-Bxb0WX8V.mjs +2 -0
  97. package/dist/rate-limits-DcrQV6Ar.mjs +5 -0
  98. package/dist/raw-fetch-Dlccg0Tr.mjs +2 -0
  99. package/dist/realtime-kit-CaquuVOE.mjs +18 -0
  100. package/dist/registrar-Ko-xZemf.mjs +46 -0
  101. package/dist/request-tracers-DOW_reTJ.mjs +2 -0
  102. package/dist/{resolve-BuJRWSk0.mjs → resolve-4-OSeHlK.mjs} +1 -1
  103. package/dist/resource-sharing-D7TX0JV0.mjs +5 -0
  104. package/dist/resource-tagging-C3qtLzCz.mjs +16 -0
  105. package/dist/rules-BXRADHL5.mjs +4 -0
  106. package/dist/rulesets-CBgpeSvJ.mjs +8 -0
  107. package/dist/rum-BjPptTUP.mjs +4 -0
  108. package/dist/{schema-CHBfkARI.mjs → schema-D16TgWBg.mjs} +1 -1
  109. package/dist/schema-validation-Dgv_opM3.mjs +24 -0
  110. package/dist/scim-DdSEr4kZ.mjs +3 -0
  111. package/dist/secrets-store-7BfyvJLb.mjs +25 -0
  112. package/dist/security-center-DAy6AKtT.mjs +2 -0
  113. package/dist/security-txt-xAMb7K6Y.mjs +3 -0
  114. package/dist/session-COHHdS7A.mjs +5 -0
  115. package/dist/{shared-DEzmTsEC.mjs → shared-AGtpXwwL.mjs} +1 -1
  116. package/dist/smart-shield-TeWZFnH2.mjs +3 -0
  117. package/dist/snippets-CCSsCXVs.mjs +4 -0
  118. package/dist/{spawn-13QQ0IwO.mjs → spawn-DcppKGI5.mjs} +1 -1
  119. package/dist/spectrum-CTTZID8u.mjs +63 -0
  120. package/dist/speed-CuzTE0AL.mjs +4 -0
  121. package/dist/{src-B9cKsgsg.mjs → src-BW6vfAwE.mjs} +10 -10
  122. package/dist/ssl-BWA2LdwC.mjs +15 -0
  123. package/dist/stream-GFsIZ-pP.mjs +14 -0
  124. package/dist/tenants-Bd7NGQ_m.mjs +2 -0
  125. package/dist/token-validation-DAgtFOvs.mjs +10 -0
  126. package/dist/{tools-B7QiNu-d.mjs → tools-DXQmfFuE.mjs} +1 -1
  127. package/dist/turnstile-cfdaO4ca.mjs +23 -0
  128. package/dist/{ui-BXjU1dX1.mjs → ui-D4KtlMh9.mjs} +1 -1
  129. package/dist/url-normalization-B5RN4nLD.mjs +3 -0
  130. package/dist/url-scanner-BrZ1L9OC.mjs +2 -0
  131. package/dist/user-CAo-yCJA.mjs +10 -0
  132. package/dist/vectorize-C7_oQlaI.mjs +4 -0
  133. package/dist/{versions-DzyrlUAi.mjs → versions-CUwWJWmy.mjs} +1 -1
  134. package/dist/waiting-rooms-Dln5ICg5.mjs +11 -0
  135. package/dist/web3-HQJRm38W.mjs +4 -0
  136. package/dist/workers-Dg7ddG2Q.mjs +18 -0
  137. package/dist/workers-builds-AVfx8IyL.mjs +7 -0
  138. package/dist/workflows-VquuSh2J.mjs +4 -0
  139. package/dist/zaraz-xYSWIV4P.mjs +2 -0
  140. package/dist/zero-trust-CP96wnSh.mjs +118 -0
  141. package/dist/zones-BSgmZ9WC.mjs +21 -0
  142. package/package.json +4 -3
  143. package/dist/abuse-reports-KtfZhi6j.mjs +0 -8
  144. package/dist/accounts-BopMfODC.mjs +0 -21
  145. package/dist/acm-BT4vlnEJ.mjs +0 -3
  146. package/dist/addressing-B3uFxHst.mjs +0 -13
  147. package/dist/ai-DWHqwMap.mjs +0 -2
  148. package/dist/ai-gateway-CbKEO-3o.mjs +0 -8
  149. package/dist/ai-search-VnOQ5n--.mjs +0 -7
  150. package/dist/alerting-BmmgIlIO.mjs +0 -6
  151. package/dist/analytics-isY03taL.mjs +0 -20
  152. package/dist/api-gateway-DXurEbA-.mjs +0 -33
  153. package/dist/argo-B02BL_hp.mjs +0 -2
  154. package/dist/audit-logs-DcgR9xUc.mjs +0 -2
  155. package/dist/auth-CQcAgnOy.mjs +0 -135
  156. package/dist/auth-DenWm_X0.mjs +0 -6
  157. package/dist/autorag-CmrwnGVj.mjs +0 -2
  158. package/dist/billing-CaW1ZAB1.mjs +0 -2
  159. package/dist/body-parser-Br-BoYk-.mjs +0 -2
  160. package/dist/bot-management-CeBsFx68.mjs +0 -5
  161. package/dist/botnet-feed-B396vQeQ.mjs +0 -3
  162. package/dist/brand-protection-D4V1v5Kl.mjs +0 -3
  163. package/dist/browser-rendering-GF7rNtKI.mjs +0 -4
  164. package/dist/builds-C_ySULja.mjs +0 -2
  165. package/dist/cache-DmXizSMi.mjs +0 -5
  166. package/dist/calls-x4KQpTB4.mjs +0 -4
  167. package/dist/certificate-authorities-hC0SG-Ga.mjs +0 -2
  168. package/dist/client-certificates-BGVsDyeJ.mjs +0 -3
  169. package/dist/cloud-connector-BClQpEzI.mjs +0 -2
  170. package/dist/cloudforce-one-BfhFrO6M.mjs +0 -21
  171. package/dist/connectivity-G0NP6LtW.mjs +0 -3
  172. package/dist/content-scanning-DEtPJ7aF.mjs +0 -4
  173. package/dist/context-CC0Rhkhy.mjs +0 -2
  174. package/dist/custom-certificates-rJXFpUWu.mjs +0 -5
  175. package/dist/custom-hostnames-Be5mgLeF.mjs +0 -5
  176. package/dist/custom-nameservers-CoFdy6hD.mjs +0 -3
  177. package/dist/custom-pages-D-oErw57.mjs +0 -4
  178. package/dist/d1-C95ckPKI.mjs +0 -3
  179. package/dist/dcv-delegation-CWSkbGuc.mjs +0 -2
  180. package/dist/diagnostics-DEEhPnXj.mjs +0 -3
  181. package/dist/dispatch-namespaces-BzXeV7PH.mjs +0 -7
  182. package/dist/dns-firewall-BQXD_NxG.mjs +0 -57
  183. package/dist/dns-qW-3TZOT.mjs +0 -29
  184. package/dist/durable-objects-CgWFYEJJ.mjs +0 -2
  185. package/dist/email-routing-tdNJaCpJ.mjs +0 -10
  186. package/dist/email-security-DTVHNr2h.mjs +0 -60
  187. package/dist/email-sending-DsFTvE31.mjs +0 -3
  188. package/dist/filters-DO1Is_tI.mjs +0 -4
  189. package/dist/firewall-DbUhVTCg.mjs +0 -11
  190. package/dist/fraud-Bzr4njYb.mjs +0 -8
  191. package/dist/google-tag-gateway-BQxkA90M.mjs +0 -2
  192. package/dist/healthchecks-BBAs-lS_.mjs +0 -4
  193. package/dist/hostnames-Dz9PEUKS.mjs +0 -3
  194. package/dist/hyperdrive-B1iUJddG.mjs +0 -18
  195. package/dist/iam-CJM8gHpG.mjs +0 -6
  196. package/dist/images-DEoBmtFS.mjs +0 -5
  197. package/dist/intel-BM6xkZ0C.mjs +0 -3
  198. package/dist/keyless-certificates-DffYnd4b.mjs +0 -3
  199. package/dist/kv-BTceLtWZ.mjs +0 -5
  200. package/dist/leaked-credential-checks-CALfvoCo.mjs +0 -3
  201. package/dist/load-balancers-C1Ho1gCF.mjs +0 -6
  202. package/dist/logpush-CSYhgevA.mjs +0 -4
  203. package/dist/logs-DlIwmMpt.mjs +0 -3
  204. package/dist/magic-cloud-networking-Czu0pZ0a.mjs +0 -5
  205. package/dist/magic-network-monitoring-d7GJE5Yt.mjs +0 -4
  206. package/dist/magic-transit-qQmA-981.mjs +0 -89
  207. package/dist/managed-transforms-Dd6AnbWE.mjs +0 -3
  208. package/dist/mtls-certificates-C0rlCRGs.mjs +0 -3
  209. package/dist/network-interconnects-CxG2deY0.mjs +0 -36
  210. package/dist/organizations-DyEAiGiR.mjs +0 -41
  211. package/dist/origin-ca-certificates-S8RcoMF6.mjs +0 -3
  212. package/dist/origin-post-quantum-encryption-B8ZcpLu5.mjs +0 -2
  213. package/dist/origin-tls-client-auth-BlxMmQrE.mjs +0 -5
  214. package/dist/output-D7_yAFVR.mjs +0 -2
  215. package/dist/page-rules-DP-w6TAm.mjs +0 -18
  216. package/dist/page-shield-Bf7kFp8c.mjs +0 -37
  217. package/dist/pages-D0Y_XRqW.mjs +0 -10
  218. package/dist/pipelines-C-SPESAk.mjs +0 -6
  219. package/dist/queues-wv6CZsi8.mjs +0 -6
  220. package/dist/r2-DuXjp9n5.mjs +0 -21
  221. package/dist/r2-data-catalog-DQCMrmNO.mjs +0 -14
  222. package/dist/radar-BW_ZHP8X.mjs +0 -2
  223. package/dist/rate-limits-DLTkIvwr.mjs +0 -5
  224. package/dist/raw-fetch-hRv-6P3D.mjs +0 -2
  225. package/dist/realtime-kit-Ch7Vg3vj.mjs +0 -6
  226. package/dist/registrar-DIIv6fWd.mjs +0 -46
  227. package/dist/request-tracers-DMej0Drs.mjs +0 -2
  228. package/dist/resource-sharing-CYJ7cMWq.mjs +0 -5
  229. package/dist/resource-tagging-Dnz65MgH.mjs +0 -16
  230. package/dist/rules-DLJpOYbC.mjs +0 -4
  231. package/dist/rulesets-D9nqEJT5.mjs +0 -8
  232. package/dist/rum-DBVmdPkp.mjs +0 -4
  233. package/dist/schema-validation-MCd3xdtX.mjs +0 -4
  234. package/dist/scim-DZA3VXog.mjs +0 -3
  235. package/dist/scm-CilfPOue.mjs +0 -2
  236. package/dist/secrets-store-BrvcZSOM.mjs +0 -21
  237. package/dist/security-center-BU6f3Cm1.mjs +0 -2
  238. package/dist/security-txt-BPIbP3dG.mjs +0 -3
  239. package/dist/session-H7IV2BrM.mjs +0 -2
  240. package/dist/smart-shield-e8XFBkiF.mjs +0 -3
  241. package/dist/snippets-B4M3MMb8.mjs +0 -4
  242. package/dist/spectrum-B0adfSRI.mjs +0 -59
  243. package/dist/speed-BVcUtkAz.mjs +0 -4
  244. package/dist/ssl-BAa91gsc.mjs +0 -15
  245. package/dist/stream-D53sxKb3.mjs +0 -14
  246. package/dist/tenants-bH5pt3dJ.mjs +0 -2
  247. package/dist/token-validation-M61Vx_Tw.mjs +0 -4
  248. package/dist/turnstile-wAU0Gc2Z.mjs +0 -23
  249. package/dist/url-normalization-DZrWDgB5.mjs +0 -3
  250. package/dist/url-scanner-Zo49edNp.mjs +0 -2
  251. package/dist/user-DbXlVReB.mjs +0 -10
  252. package/dist/vectorize-CUnTM0DT.mjs +0 -4
  253. package/dist/vuln-scanner-Br_2lQp1.mjs +0 -2
  254. package/dist/waiting-rooms-BZW0X69-.mjs +0 -11
  255. package/dist/web3-DueyOQtx.mjs +0 -4
  256. package/dist/workers-builds-BM_aoeUR.mjs +0 -7
  257. package/dist/workers-nV_vBCfV.mjs +0 -16
  258. package/dist/workflows-CQITmo-s.mjs +0 -4
  259. package/dist/zaraz-DIbpF5Op.mjs +0 -2
  260. package/dist/zero-trust-CKp8j512.mjs +0 -119
  261. package/dist/zones-BZ5tZDbH.mjs +0 -28
  262. /package/dist/{metadata-DGdCpUxn.mjs → metadata-5VwHPW6C.mjs} +0 -0
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import{C as e,b as t,t as n}from"./auth-CQcAgnOy.mjs";import{n as r,t as i}from"./body-parser-Br-BoYk-.mjs";import{t as a}from"./output-D7_yAFVR.mjs";import{n as o,t as s}from"./progress-CjcQ6ato.mjs";import{n as c}from"./input-validation-zEO81MWN.mjs";function l(e){return e.option(`match-request-methods`,{type:`string`,array:!0,description:"The HTTP methods to match. You can specify a subset (for example, `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when creating a rate limit."}).option(`match-request-schemes`,{type:`string`,array:!0,description:"The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is optional."}).option(`match-request-url`,{type:`string`,description:"The URL pattern to match, composed of a host and a path such as `example.org/path*`. Normalization is applied before the pattern is matched. `*` wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to `*` to match all traffic to your zone."}).option(`match-response-origin-traffic`,{type:`boolean`,description:`When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional.
3
- Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.`}).option(`period`,{type:`number`,description:`The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.`}).option(`threshold`,{type:`number`,description:"The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period."}).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 u={command:`create`,describe:`Creates a new rate limit for a zone. Refer to the object definition for a list of required attributes.`,builder:l,handler:async e=>{if(e.dryRun){o({command:`cf rate-limits create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{"match-request-methods":e[`match-request-methods`],"match-request-schemes":e[`match-request-schemes`],"match-request-url":e[`match-request-url`],"match-response-origin-traffic":e[`match-response-origin-traffic`],period:e.period,threshold:e.threshold,body:e.body}});return}let l=await n(e);if(e.zoneId=await t({zone:e.zone},l,{quiet:e.quiet}),e.body){let t=i(e.body);a(await s(`Creating`,async()=>l.post(`/zones/${e.zoneId}/rate_limits`,{body:t})),{successLabel:`Created`});return}if(e.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(e.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let u={};e[`match-request-methods`]!==void 0&&r(u,[`match`,`request`,`methods`],e[`match-request-methods`]),e[`match-request-schemes`]!==void 0&&r(u,[`match`,`request`,`schemes`],e[`match-request-schemes`]),e[`match-request-url`]!==void 0&&r(u,[`match`,`request`,`url`],c(e[`match-request-url`],`match-request-url`,`text`)),e[`match-response-origin-traffic`]!==void 0&&r(u,[`match`,`response`,`origin_traffic`],e[`match-response-origin-traffic`]),e.period!==void 0&&r(u,[`period`],e.period),e.threshold!==void 0&&r(u,[`threshold`],e.threshold),a(await s(`Creating`,async()=>l.post(`/zones/${e.zoneId}/rate_limits`,{body:Object.keys(u).length>0?u:void 0})),{successLabel:`Created`})}};function d(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`delete <rate-limit-id>`,describe:`Deletes an existing rate limit.`,builder:d,handler:async r=>{if(r.dryRun){o({command:`cf rate-limits delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${r.zone??r.zoneId??`<zone>`}/rate_limits/${r[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(r[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(r[`rate-limit-id`]??``),"zone-id":String(r.zone??r[`zone-id`]??``)},bodyKind:`json`,body:{body:r.body}});return}let c=await n(r),l=await t({zone:r.zone},c,{quiet:r.quiet});if(r.zoneId=l,!await e({force:!!r.force})){process.stderr.write(`Aborted.
4
- `);return}if(r.body){let e=i(r.body);a(await s(`Deleting`,async()=>c.delete(`/zones/${r.zoneId}/rate_limits/${encodeURIComponent(String(r[`rate-limit-id`]))}`,{body:e})),{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>c.rateLimits.delete(r[`rate-limit-id`],l)),{successLabel:`Deleted`})}};function p(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,demandOption:!0}).option(`match-request-methods`,{type:`string`,array:!0,description:"The HTTP methods to match. You can specify a subset (for example, `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when creating a rate limit."}).option(`match-request-schemes`,{type:`string`,array:!0,description:"The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is optional."}).option(`match-request-url`,{type:`string`,description:"The URL pattern to match, composed of a host and a path such as `example.org/path*`. Normalization is applied before the pattern is matched. `*` wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to `*` to match all traffic to your zone."}).option(`match-response-origin-traffic`,{type:`boolean`,description:`When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional.
5
- Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.`}).option(`period`,{type:`number`,description:`The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.`}).option(`threshold`,{type:`number`,description:"The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`edit <rate-limit-id>`,describe:`Updates an existing rate limit.`,builder:p,handler:async e=>{if(e.dryRun){o({command:`cf rate-limits edit`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/rate_limits/${e[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(e[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(e[`rate-limit-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{"match-request-methods":e[`match-request-methods`],"match-request-schemes":e[`match-request-schemes`],"match-request-url":e[`match-request-url`],"match-response-origin-traffic":e[`match-response-origin-traffic`],period:e.period,threshold:e.threshold,body:e.body}});return}let l=await n(e);if(e.zoneId=await t({zone:e.zone},l,{quiet:e.quiet}),e.body){let t=i(e.body);a(await s(`Updating`,async()=>l.put(`/zones/${e.zoneId}/rate_limits/${encodeURIComponent(String(e[`rate-limit-id`]))}`,{body:t})),{successLabel:`Updated`});return}if(e.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(e.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let u={};e[`match-request-methods`]!==void 0&&r(u,[`match`,`request`,`methods`],e[`match-request-methods`]),e[`match-request-schemes`]!==void 0&&r(u,[`match`,`request`,`schemes`],e[`match-request-schemes`]),e[`match-request-url`]!==void 0&&r(u,[`match`,`request`,`url`],c(e[`match-request-url`],`match-request-url`,`text`)),e[`match-response-origin-traffic`]!==void 0&&r(u,[`match`,`response`,`origin_traffic`],e[`match-response-origin-traffic`]),e.period!==void 0&&r(u,[`period`],e.period),e.threshold!==void 0&&r(u,[`threshold`],e.threshold),a(await s(`Updating`,async()=>l.put(`/zones/${e.zoneId}/rate_limits/${encodeURIComponent(String(e[`rate-limit-id`]))}`,{body:Object.keys(u).length>0?u:void 0})),{successLabel:`Updated`})}};function h(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <rate-limit-id>`,describe:`Fetches the details of a rate limit.`,builder:h,handler:async e=>{if(e.dryRun){o({command:`cf rate-limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/rate_limits/${e[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(e[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(e[`rate-limit-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await n(e),i=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,a(await s(`Loading`,async()=>r.rateLimits.get(e[`rate-limit-id`],i)),{successLabel:`Loaded`})}};function _(e){return e.option(`page`,{type:`number`,description:`Defines the page number of paginated results.`}).option(`per-page`,{type:`number`,description:"Defines the maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`Fetches the rate limits for a zone.`,builder:_,handler:async e=>{let r={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf rate-limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:r,bodyKind:`none`});return}let i=await n(e),c=await t({zone:e.zone},i,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>i.rateLimits.list(c,r)),{successLabel:`Loaded`})}},y={command:`rate-limits`,describe:`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,builder:e=>e.command(u).command(f).command(m).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as e}from"./session-H7IV2BrM.mjs";import{m as t}from"./dist-DNBSHor6.mjs";import{g as n,n as r,r as i}from"./auth-CQcAgnOy.mjs";import{n as a}from"./local-VJaJ3BZ1.mjs";async function o(o,s={}){let{method:c=`GET`,localEndpoint:l}=s,u=`${t({compliance_region:n()})}${o}`,d={...i()};s.headers&&Object.assign(d,s.headers);let f=globalThis.fetch;l===void 0?d.Authorization=`Bearer ${await r()}`:f=a({endpoint:l});let p,m=s.body;m!=null&&(m instanceof FormData?p=m:Buffer.isBuffer(m)||m instanceof Uint8Array||m instanceof ArrayBuffer?(p=m,d[`Content-Type`]??=s.contentType??`application/octet-stream`):typeof m==`string`?(p=m,s.contentType&&(d[`Content-Type`]??=s.contentType)):(p=JSON.stringify(m),d[`Content-Type`]??=s.contentType??`application/json`));let h=await f(u,{method:c,headers:d,...p===void 0?{}:{body:p}});if(!h.ok){let t=h.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await h.json():await h.text()}catch{n=null}throw new e(`API request failed with status ${h.status}`,h.status,n,{method:c,url:u})}let g=await h.arrayBuffer();return Buffer.from(g)}function s(e){process.stdout.write(e)}export{s as n,o as t};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{C as e,T as t,h as n,t as r,w as i,x as a}from"./auth-CQcAgnOy.mjs";import{n as o,t as s}from"./body-parser-Br-BoYk-.mjs";import{t as c}from"./output-D7_yAFVR.mjs";import{n as l,t as u}from"./progress-CjcQ6ato.mjs";import{n as d}from"./input-validation-zEO81MWN.mjs";import{t as f}from"./local-VJaJ3BZ1.mjs";function p(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a new poll`})}const m={command:`create-poll <meeting-id>`,describe:`Creates a new poll in an active session for the given meeting ID.`,builder:p,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit active-session create-poll`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session/poll`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/active-session/poll`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.activeSession.createPoll(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}};function ee(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get-active-session <meeting-id>`,describe:`Returns details of an ongoing active session for the given meeting ID.`,builder:ee,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit active-session get-active-session`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.activeSession.getActiveSession(e[`meeting-id`],i,e[`app-id`])),{successLabel:`Loaded`})}};function h(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`kick-all-participants <meeting-id>`,describe:`Kicks all participants from an active session for the given meeting ID.`,builder:h,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit active-session kick-all-participants`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session/kick-all`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Creating`,async()=>t.realtimeKit.activeSession.kickAllParticipants(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}};function _(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for kicking participants from an active session. Only one of `participant_id` or `custom_participant_id` is required."})}const v={command:`kick-participants <meeting-id>`,describe:`Kicks one or more participants from an active session using user ID or custom participant ID.`,builder:_,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit active-session kick-participants`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session/kick`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/active-session/kick`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.activeSession.kickParticipants(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}},y={command:`active-session`,describe:`Currently active meeting sessions with live participant counts and controls`,builder:e=>e.command(m).command(te).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-date`,{type:`string`,description:`start date in YYYY-MM-DD format`}).option(`end-date`,{type:`string`,description:`end date in YYYY-MM-DD format`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get-org-analytics <app-id>`,describe:`Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.`,builder:b,handler:async e=>{let t={start_date:e[`start-date`],end_date:e[`end-date`]};if(e.dryRun){l({command:`cf realtime-kit analytics get-org-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.analytics.getOrgAnalytics(o,e[`app-id`],t)),{successLabel:`Loaded`})}},S={command:`analytics`,describe:`Usage analytics — meeting minutes, participant counts, and bandwidth consumption`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Fetch all apps for your account`,builder:C,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.apps.get(i)),{successLabel:`Loaded`})}};function T(e){return e.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 E={command:`post`,describe:`Create new app for your account`,builder:T,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit apps post`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/apps`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.apps.post(i)),{successLabel:`Created`})}},D={command:`apps`,describe:`Realtime Kit applications that group meetings, sessions, and configuration together`,builder:e=>e.command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for muting all participants in an active session.`})}const k={command:`create <meeting-id>`,describe:`Mutes all participants of an active session for the given meeting ID.`,builder:O,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit kit meetings active-session mute-all create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session/mute-all`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/active-session/mute-all`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.kit.meetings.activeSession.muteAll.create(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}},A={command:`mute-all`,describe:`Kit operations`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for kicking participants from an active session. Only one of `participant_id` or `custom_participant_id` is required."})}const M={command:`create <meeting-id>`,describe:`Mutes one or more participants from an active session using user ID or custom participant ID.`,builder:j,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit kit meetings active-session mute create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-session/mute`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/active-session/mute`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.kit.meetings.activeSession.mute.create(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}},N={command:`mute`,describe:`Kit operations`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`active-session`,describe:`Operations for kit.meetings.active-session`,builder:e=>e.command(N).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <meeting-id>`,describe:"Returns livestream session details for the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:F,handler:async e=>{let t={page_no:e[`page-no`],per_page:e[`per-page`]};if(e.dryRun){l({command:`cf realtime-kit kit meetings livestream get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/livestream`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.kit.meetings.livestream.get(e[`meeting-id`],o,e[`app-id`],t)),{successLabel:`Loaded`})}},L={command:`livestream`,describe:`Kit operations`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`meetings`,describe:`Operations for kit.meetings`,builder:e=>e.command(P).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.positional(`session-id`,{type:`string`,description:`Session ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <session-id>`,describe:"Returns livestream session details for the given session ID. Retreive the session ID using the `Fetch all sessions of an App` API.",builder:z,handler:async e=>{let t={per_page:e[`per-page`],page_no:e[`page-no`]};if(e.dryRun){l({command:`cf realtime-kit kit sessions livestream sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/livestream-sessions`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.kit.sessions.livestream.sessions.get(o,e[`app-id`],e[`session-id`],t)),{successLabel:`Loaded`})}},V={command:`sessions`,describe:`Kit operations`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`livestream`,describe:`Operations for kit.sessions.livestream`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`sessions`,describe:`Operations for kit.sessions`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`kit`,describe:`Operations for kit`,builder:e=>e.command(R).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get-active-livestreams-for-livestream-id <livestream-id>`,describe:"Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:G,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit livestreams get-active-livestreams-for-livestream-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/livestreams/${e[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(e[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(e[`app-id`]??``),"livestream-id":String(e[`livestream-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.livestreams.getActiveLivestreamsForLivestreamId(i,e[`app-id`],e[`livestream-id`])),{successLabel:`Loaded`})}};function q(e){return e.positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`exclude-meetings`,{type:`boolean`,description:`Exclude the RealtimeKit meetings that are livestreamed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`status`,{type:`string`,description:`Specifies the status of the operation.`,choices:[`LIVE`,`IDLE`,`ERRORED`,`INVOKED`]}).option(`start-time`,{type:`string`,description:`Specify the start time range in ISO format to access the live stream.`}).option(`end-time`,{type:`string`,description:`Specify the end time range in ISO format to access the live stream.`}).option(`sort-order`,{type:`string`,description:`Specifies the sorting order for the results.`,choices:[`ASC`,`DSC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get-all-livestreams <app-id>`,describe:"Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter.",builder:q,handler:async e=>{let t={exclude_meetings:e[`exclude-meetings`],per_page:e[`per-page`],page_no:e[`page-no`],status:e.status,start_time:e[`start-time`],end_time:e[`end-time`],sort_order:e[`sort-order`]};if(e.dryRun){l({command:`cf realtime-kit livestreams get-all-livestreams`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/livestreams`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.livestreams.getAllLivestreams(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function Y(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`string`,description:`Specify the start time range in ISO format to access the livestream analytics.`}).option(`end-time`,{type:`string`,description:`Specify the end time range in ISO format to access the livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get-livestream-analytics-complete <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:Y,handler:async e=>{let t={start_time:e[`start-time`],end_time:e[`end-time`]};if(e.dryRun){l({command:`cf realtime-kit livestreams get-livestream-analytics-complete`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.livestreams.getLivestreamAnalyticsComplete(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function Z(e){return e.positional(`livestream-session-id`,{type:`string`,description:`Livestream-session-id`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get-livestream-session-details-for-session-id <livestream-session-id>`,describe:"Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API.",builder:Z,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit livestreams get-livestream-session-details-for-session-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/livestreams/sessions/${e[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(e[`livestream-session-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"livestream-session-id":String(e[`livestream-session-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.livestreams.getLivestreamSessionDetailsForSessionId(i,e[`app-id`],e[`livestream-session-id`])),{successLabel:`Loaded`})}};function ne(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get-livestream-session-for-livestream-id <livestream-id>`,describe:"Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:ne,handler:async e=>{let t={page_no:e[`page-no`],per_page:e[`per-page`]};if(e.dryRun){l({command:`cf realtime-kit livestreams get-livestream-session-for-livestream-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/livestreams/${e[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(e[`livestream-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"livestream-id":String(e[`livestream-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.livestreams.getLivestreamSessionForLivestreamId(o,e[`app-id`],e[`livestream-id`],t)),{successLabel:`Loaded`})}};function ie(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get-meeting-active-livestreams <meeting-id>`,describe:`Returns details of all active livestreams for the given meeting ID.`,builder:ie,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit livestreams get-meeting-active-livestreams`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/active-livestream`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.livestreams.getMeetingActiveLivestreams(e[`meeting-id`],i,e[`app-id`])),{successLabel:`Loaded`})}};function oe(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-date`,{type:`string`,description:`start date in YYYY-MM-DD format`}).option(`end-date`,{type:`string`,description:`end date in YYYY-MM-DD format`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get-org-analytics <app-id>`,describe:`Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.`,builder:oe,handler:async e=>{let t={start_date:e[`start-date`],end_date:e[`end-date`]};if(e.dryRun){l({command:`cf realtime-kit livestreams get-org-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.livestreams.getOrgAnalytics(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function ce(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`video-config-height`,{type:`number`,description:`Height of the livestreaming video in pixels`}).option(`video-config-width`,{type:`number`,description:`Width of the livestreaming video in pixels`}).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 le={command:`start-livestreaming-a-meeting <meeting-id>`,describe:"Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:ce,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit livestreams start-livestreaming-a-meeting`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/livestreams`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{name:e.name,"video-config-height":e[`video-config-height`],"video-config-width":e[`video-config-width`],body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=s(e.body);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/livestreams`,{body:n})),{successLabel:`Created`});return}let p={};e.name!==void 0&&o(p,[`name`],d(e.name,`name`,`text`)),e[`video-config-height`]!==void 0&&o(p,[`video_config`,`height`],e[`video-config-height`]),e[`video-config-width`]!==void 0&&o(p,[`video_config`,`width`],e[`video-config-width`]),c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/livestreams`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Created`})}};function ue(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App 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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const de={command:`stop-livestreaming-a-meeting <meeting-id>`,describe:"Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:ue,handler:async t=>{if(t.dryRun){l({command:`cf realtime-kit livestreams stop-livestreaming-a-meeting`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/meetings/${t[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(t[`meeting-id`]))}/active-livestream/stop`,pathParams:{"meeting-id":String(t[`meeting-id`]??``),"app-id":String(t[`app-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force,message:`This operation halts an active live-stream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
3
- `);return}if(t.body){let e=d(t.body,`body`,`binary`);c(await u(`Deleting`,async()=>i.post(`/accounts/${o}/realtime/kit/${encodeURIComponent(String(t[`app-id`]))}/meetings/${encodeURIComponent(String(t[`meeting-id`]))}/active-livestream/stop`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Deleted`});return}c(await u(`Deleting`,async()=>i.realtimeKit.livestreams.stopLivestreamingAMeeting(t[`meeting-id`],o,t[`app-id`])),{successLabel:`Deleted`})}},fe={command:`livestreams`,describe:`Live streaming from meetings to external platforms with stream key management`,builder:e=>e.command(K).command(J).command(X).command(Q).command(re).command(ae).command(se).command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,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 me={command:`add-participant <meeting-id>`,describe:`Adds a participant to the given meeting ID.`,builder:pe,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings add-participant`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/participants`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/participants`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.meetings.addParticipant(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Created`})}};function he(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`})}const ge={command:`create <app-id>`,describe:`Create a meeting for the given App ID.`,builder:he,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.meetings.create(i,e[`app-id`])),{successLabel:`Created`})}};function _e(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,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 ve={command:`delete-meeting-participant <participant-id>`,describe:`Deletes a participant for the given meeting and participant ID.`,builder:_e,handler:async t=>{if(t.dryRun){l({command:`cf realtime-kit meetings delete-meeting-participant`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/meetings/${t[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(t[`meeting-id`]))}/participants/${t[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(t[`participant-id`]))}`,pathParams:{"meeting-id":String(t[`meeting-id`]??``),"participant-id":String(t[`participant-id`]??``),"app-id":String(t[`app-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
4
- `);return}c(await u(`Deleting`,async()=>i.realtimeKit.meetings.deleteMeetingParticipant(t[`meeting-id`],t[`participant-id`],o,t[`app-id`])),{successLabel:`Deleted`})}};function ye(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,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 be={command:`edit-participant <participant-id>`,describe:`Updates a participant's details for the given meeting and participant ID.`,builder:ye,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings edit-participant`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/participants/${e[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(e[`participant-id`]))}`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"participant-id":String(e[`participant-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Updating`,async()=>t.patch(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}/participants/${encodeURIComponent(String(e[`participant-id`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.realtimeKit.meetings.editParticipant(e[`meeting-id`],e[`participant-id`],i,e[`app-id`])),{successLabel:`Updated`})}};function xe(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`name`,{type:`string`,description:`Name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-meeting-by-id <meeting-id>`,describe:`Returns a meeting details in an App for the given meeting ID.`,builder:xe,handler:async e=>{let t={name:e.name};if(e.dryRun){l({command:`cf realtime-kit meetings get-meeting-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.meetings.getMeetingById(e[`meeting-id`],o,e[`app-id`],t)),{successLabel:`Loaded`})}};function Ce(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get-meeting-participant <participant-id>`,describe:`Returns a participant details for the given meeting and participant ID.`,builder:Ce,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings get-meeting-participant`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/participants/${e[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(e[`participant-id`]))}`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"participant-id":String(e[`participant-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.meetings.getMeetingParticipant(e[`meeting-id`],e[`participant-id`],i,e[`app-id`])),{successLabel:`Loaded`})}};function Te(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`get-meeting-participants <meeting-id>`,describe:`Returns all participants detail for the given meeting ID.`,builder:Te,handler:async e=>{let t={page_no:e[`page-no`],per_page:e[`per-page`]};if(e.dryRun){l({command:`cf realtime-kit meetings get-meeting-participants`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/participants`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.meetings.getMeetingParticipants(o,e[`app-id`],e[`meeting-id`],t)),{successLabel:`Loaded`})}};function De(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`start-time`,{type:`string`,description:`The start time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`end-time`,{type:`string`,description:`The end time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`search`,{type:`string`,description:`The search query string. You can search using the meeting ID or title.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <app-id>`,describe:`Returns all meetings for the given App ID.`,builder:De,handler:async e=>{let t={page_no:e[`page-no`],per_page:e[`per-page`],start_time:e[`start-time`],end_time:e[`end-time`],search:e.search};if(e.dryRun){l({command:`cf realtime-kit meetings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.meetings.get(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function ke(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`refresh-participant-token <participant-id>`,describe:`Regenerates participant's authentication token for the given meeting and participant ID.`,builder:ke,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings refresh-participant-token`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}/participants/${e[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(e[`participant-id`]))}/token`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``),"participant-id":String(e[`participant-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Creating`,async()=>t.realtimeKit.meetings.refreshParticipantToken(i,e[`app-id`],e[`meeting-id`],e[`participant-id`])),{successLabel:`Created`})}};function je(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`})}const Me={command:`replace-meeting-by-id <meeting-id>`,describe:`Replaces all the details for the given meeting ID.`,builder:je,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings replace-meeting-by-id`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Updating`,async()=>t.put(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.realtimeKit.meetings.replaceMeetingById(e[`meeting-id`],i,e[`app-id`])),{successLabel:`Updated`})}};function Ne(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`})}const Pe={command:`update-meeting-by-id <meeting-id>`,describe:`Updates a meeting in an App for the given meeting ID.`,builder:Ne,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit meetings update-meeting-by-id`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/meetings/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}`,pathParams:{"meeting-id":String(e[`meeting-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Updating`,async()=>t.patch(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/meetings/${encodeURIComponent(String(e[`meeting-id`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.realtimeKit.meetings.updateMeetingById(e[`meeting-id`],i,e[`app-id`])),{successLabel:`Updated`})}},Fe={command:`meetings`,describe:`Video meetings with participant management, access tokens, and recording controls`,builder:e=>e.command(me).command(ge).command(ve).command(be).command(Oe).command(Se).command(we).command(Ee).command(Ae).command(Me).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,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 Le={command:`create <app-id>`,describe:`Creates a preset belonging to the current App`,builder:Ie,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit presets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/presets`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/presets`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.presets.create(i,e[`app-id`])),{successLabel:`Created`})}};function Re(e){return e.positional(`preset-id`,{type:`string`,description:`ID of the preset to fetch`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app 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 ze={command:`delete <preset-id>`,describe:`Deletes a preset using the provided preset ID`,builder:Re,handler:async t=>{if(t.dryRun){l({command:`cf realtime-kit presets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/presets/${t[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(t[`preset-id`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"preset-id":String(t[`preset-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
5
- `);return}c(await u(`Deleting`,async()=>i.realtimeKit.presets.delete(o,t[`app-id`],t[`preset-id`])),{successLabel:`Deleted`})}};function Be(e){return e.positional(`preset-id`,{type:`string`,description:`ID of the preset to fetch`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ve={command:`get-preset-by-id <preset-id>`,describe:`Fetches details of a preset using the provided preset ID`,builder:Be,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit presets get-preset-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/presets/${e[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(e[`preset-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"preset-id":String(e[`preset-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.presets.getPresetById(i,e[`app-id`],e[`preset-id`])),{successLabel:`Loaded`})}};function He(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get <app-id>`,describe:`Fetches all the presets belonging to an App.`,builder:He,handler:async e=>{let t={per_page:e[`per-page`],page_no:e[`page-no`]};if(e.dryRun){l({command:`cf realtime-kit presets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/presets`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.presets.get(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function We(e){return e.positional(`preset-id`,{type:`string`,description:`ID of the preset to fetch`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,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 Ge={command:`update <preset-id>`,describe:`Update a preset by the provided preset ID`,builder:We,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit presets update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/presets/${e[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(e[`preset-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"preset-id":String(e[`preset-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Updating`,async()=>t.patch(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/presets/${encodeURIComponent(String(e[`preset-id`]))}`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.realtimeKit.presets.update(i,e[`app-id`],e[`preset-id`])),{successLabel:`Updated`})}},Ke={command:`presets`,describe:`Reusable meeting configuration presets for resolution, layout, and recording defaults`,builder:e=>e.command(Le).command(ze).command(Ue).command(Ve).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`get-active-recordings <meeting-id>`,describe:`Returns the active recording details for the given meeting ID.`,builder:qe,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit recordings get-active-recordings`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings/active-recording/${e[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(e[`meeting-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"meeting-id":String(e[`meeting-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.recordings.getActiveRecordings(i,e[`app-id`],e[`meeting-id`])),{successLabel:`Loaded`})}};function Ye(e){return e.positional(`recording-id`,{type:`string`,description:`ID of the recording`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`get-one-recording <recording-id>`,describe:`Returns details of a recording for the given recording ID.`,builder:Ye,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit recordings get-one-recording`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings/${e[`recording-id`]==null?`<recording-id>`:encodeURIComponent(String(e[`recording-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"recording-id":String(e[`recording-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.recordings.getOneRecording(i,e[`app-id`],e[`recording-id`])),{successLabel:`Loaded`})}};function Ze(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of a meeting. Optional. Will limit results to only this meeting if passed.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`expired`,{type:`boolean`,description:`If passed, only shows expired/non-expired recordings on RealtimeKit's bucket`}).option(`search`,{type:`string`,description:`The search query string. You can search using the meeting ID or title.`}).option(`sort-by`,{type:`string`,description:`Sort by`,choices:[`invokedTime`]}).option(`sort-order`,{type:`string`,description:`Sort order`,choices:[`ASC`,`DESC`]}).option(`start-time`,{type:`string`,description:`The start time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`end-time`,{type:`string`,description:`The end time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`status`,{type:`string`,description:`Filter by one or more recording status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`get-recordings <app-id>`,describe:"Returns all recordings for an App. If the `meeting_id` parameter is passed, returns all recordings for the given meeting ID.",builder:Ze,handler:async e=>{let t={meeting_id:e[`meeting-id`],page_no:e[`page-no`],per_page:e[`per-page`],expired:e.expired,search:e.search,sort_by:e[`sort-by`],sort_order:e[`sort-order`],start_time:e[`start-time`],end_time:e[`end-time`],status:e.status};if(e.dryRun){l({command:`cf realtime-kit recordings get-recordings`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.recordings.getRecordings(o,e[`app-id`],t)),{successLabel:`Loaded`})}};function $e(e){return e.positional(`recording-id`,{type:`string`,description:`ID of the recording`,demandOption:!0}).option(`app-id`,{type:`string`,description:`A Cloudflare-generated unique identifier for an item.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`stop`,`pause`,`resume`]}).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 et={command:`pause-resume-stop-recording <recording-id>`,describe:`Pause/Resume/Stop a given recording ID.`,builder:$e,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit recordings pause-resume-stop-recording`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings/${e[`recording-id`]==null?`<recording-id>`:encodeURIComponent(String(e[`recording-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"recording-id":String(e[`recording-id`]??``)},bodyKind:`json`,body:{action:e.action,body:e.body}});return}let t=await r(e),p=e.local?f:await n(t);if(e.accountId=p,e.body){let n=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/recordings/${encodeURIComponent(String(e[`recording-id`]))}`,{body:n})),{successLabel:`Updated`});return}e.action===void 0&&(e.action=await i(`action`,`The action field`,[`stop`,`pause`,`resume`]));let m={};e.action!==void 0&&o(m,[`action`],d(e.action,`action`,`text`)),c(await u(`Updating`,async()=>t.put(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/recordings/${encodeURIComponent(String(e[`recording-id`]))}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}};function tt(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,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 nt={command:`start-recordings <app-id>`,describe:`Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used.`,builder:tt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit recordings start-recordings`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/recordings`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.recordings.startRecordings(i,e[`app-id`])),{successLabel:`Created`})}};function rt(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`For now only "default" layer key is supported.`})}const it={command:`start-track-recording <app-id>`,describe:`Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the [Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview).`,builder:rt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit recordings start-track-recording`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/recordings/track`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=d(e.body,`body`,`binary`);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/recordings/track`,{body:n,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Created`});return}c(await u(`Creating`,async()=>t.realtimeKit.recordings.startTrackRecording(i,e[`app-id`])),{successLabel:`Created`})}},at={command:`recordings`,describe:`Meeting recordings — list, download, and manage recorded video and audio files`,builder:e=>e.command(Je).command(Xe).command(Qe).command(et).command(nt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ot(e){return e.positional(`session-id`,{type:`string`,description:`Session ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`generate-summary-of-transcripts <session-id>`,describe:`Trigger Summary generation of Transcripts for the session ID.`,builder:ot,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit sessions generate-summary-of-transcripts`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/summary`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Creating`,async()=>t.realtimeKit.sessions.generateSummaryOfTranscripts(i,e[`app-id`],e[`session-id`])),{successLabel:`Created`})}};function ct(e){return e.positional(`peer-id`,{type:`string`,description:`ID of the peer`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`filters`,{type:`string`,description:`Comma separated list of filters to apply. Note that there must be no spaces between the filters.`,choices:[`device_info`,`ip_information`,`precall_network_information`,`events`,`quality_stats`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`get-participant-data-from-peer-id <peer-id>`,describe:`Returns details of the given peer ID along with call statistics for the given session ID.`,builder:ct,handler:async e=>{let t={filters:e.filters};if(e.dryRun){l({command:`cf realtime-kit sessions get-participant-data-from-peer-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/peer-report/${e[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(e[`peer-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"peer-id":String(e[`peer-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.sessions.getParticipantDataFromPeerId(o,e[`app-id`],e[`peer-id`],t)),{successLabel:`Loaded`})}};function ut(e){return e.positional(`session-id`,{type:`string`,description:`ID of the session`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get-session-chat <session-id>`,describe:`Returns a URL to download all chat messages of the session ID in CSV format.`,builder:ut,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit sessions get-session-chat`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/chat`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.sessions.getSessionChat(i,e[`app-id`],e[`session-id`])),{successLabel:`Loaded`})}};function ft(e){return e.positional(`session-id`,{type:`string`,description:`ID of the session`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`include-breakout-rooms`,{type:`boolean`,description:`List all breakout rooms`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pt={command:`get-session-details <session-id>`,describe:`Returns data of the given session ID including recording details.`,builder:ft,handler:async e=>{let t={include_breakout_rooms:e[`include-breakout-rooms`]};if(e.dryRun){l({command:`cf realtime-kit sessions get-session-details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.sessions.getSessionDetails(o,e[`app-id`],e[`session-id`],t)),{successLabel:`Loaded`})}};function mt(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`session-id`,{type:`string`,description:`ID of the session`,demandOption:!0}).option(`filters`,{type:`string`,description:`Comma separated list of filters to apply. Note that there must be no spaces between the filters.`,choices:[`device_info`,`ip_information`,`precall_network_information`,`events`,`quality_stats`]}).option(`include-peer-events`,{type:`boolean`,description:`if true, response includes all the peer events of participant.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`get-session-participant-details <participant-id>`,describe:`Returns details of the given participant ID along with call statistics for the given session ID.`,builder:mt,handler:async e=>{let t={filters:e.filters,include_peer_events:e[`include-peer-events`]};if(e.dryRun){l({command:`cf realtime-kit sessions get-session-participant-details`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/participants/${e[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(e[`participant-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"participant-id":String(e[`participant-id`]??``),"session-id":String(e[`session-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.sessions.getSessionParticipantDetails(o,e[`app-id`],e[`participant-id`],e[`session-id`],t)),{successLabel:`Loaded`})}};function gt(e){return e.positional(`session-id`,{type:`string`,description:`ID of the session`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`search`,{type:`string`,description:`The search query string. You can search using the meeting ID or title.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`sort-order`,{type:`string`,description:`Sort order`,choices:[`ASC`,`DESC`]}).option(`sort-by`,{type:`string`,description:`Sort by`,choices:[`joinedAt`,`duration`]}).option(`include-peer-events`,{type:`boolean`,description:`if true, response includes all the peer events of participants.`}).option(`view`,{type:`string`,description:"In breakout room sessions, the view parameter can be set to `raw` for session specific duration for participants or `consolidated` to accumulate breakout room durations.",choices:[`raw`,`consolidated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _t={command:`get-session-participants <session-id>`,describe:`Returns a list of participants for the given session ID.`,builder:gt,handler:async e=>{let t={search:e.search,page_no:e[`page-no`],per_page:e[`per-page`],sort_order:e[`sort-order`],sort_by:e[`sort-by`],include_peer_events:e[`include-peer-events`],view:e.view};if(e.dryRun){l({command:`cf realtime-kit sessions get-session-participants`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/participants`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.sessions.getSessionParticipants(o,e[`app-id`],e[`session-id`],t)),{successLabel:`Loaded`})}};function vt(e){return e.positional(`session-id`,{type:`string`,description:`Session ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yt={command:`get-session-summary <session-id>`,describe:`Returns a Summary URL to download the Summary of Transcripts for the session ID as plain text.`,builder:vt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit sessions get-session-summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/summary`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.sessions.getSessionSummary(i,e[`app-id`],e[`session-id`])),{successLabel:`Loaded`})}};function bt(e){return e.positional(`session-id`,{type:`string`,description:`ID of the session`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xt={command:`get-session-transcripts <session-id>`,describe:`Returns a URL to download the transcript for the session ID in CSV format.`,builder:bt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit sessions get-session-transcripts`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions/${e[`session-id`]==null?`<session-id>`:encodeURIComponent(String(e[`session-id`]))}/transcript`,pathParams:{"app-id":String(e[`app-id`]??``),"session-id":String(e[`session-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.sessions.getSessionTranscripts(i,e[`app-id`],e[`session-id`])),{successLabel:`Loaded`})}};function St(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`sort-by`,{type:`string`,description:`Sort by`,choices:[`minutesConsumed`,`createdAt`]}).option(`sort-order`,{type:`string`,description:`Sort order`,choices:[`ASC`,`DESC`]}).option(`start-time`,{type:`string`,description:`The start time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`end-time`,{type:`string`,description:`The end time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`participants`,{type:`string`,description:`Participants`}).option(`status`,{type:`string`,description:`Status`,choices:[`LIVE`,`ENDED`]}).option(`search`,{type:`string`,description:`Search string that matches sessions based on meeting title, meeting ID, and session ID`}).option(`associated-id`,{type:`string`,description:`ID of the meeting that sessions should be associated with`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ct={command:`get-sessions <app-id>`,describe:`Returns details of all sessions of an App.`,builder:St,handler:async e=>{let t={page_no:e[`page-no`],per_page:e[`per-page`],sort_by:e[`sort-by`],sort_order:e[`sort-order`],start_time:e[`start-time`],end_time:e[`end-time`],participants:e.participants,status:e.status,search:e.search,associated_id:e[`associated-id`]};if(e.dryRun){l({command:`cf realtime-kit sessions get-sessions`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/sessions`,pathParams:{"app-id":String(e[`app-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.realtimeKit.sessions.getSessions(o,e[`app-id`],t)),{successLabel:`Loaded`})}},wt={command:`sessions`,describe:`Active and historical meeting sessions with participant details and duration tracking`,builder:e=>e.command(st).command(lt).command(dt).command(pt).command(ht).command(_t).command(yt).command(xt).command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tt(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Set whether or not the webhook should be active when created`,default:!0}).option(`events`,{type:`string`,array:!0,description:`Events that this webhook will get triggered by`}).option(`name`,{type:`string`,description:`Name of the webhook`}).option(`url`,{type:`string`,description:`URL this webhook will send events to`}).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 Et={command:`create-webhook <app-id>`,describe:`Adds a new webhook to an App.`,builder:Tt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit webhooks create-webhook`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/webhooks`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:{enabled:e.enabled,events:e.events,name:e.name,url:e.url,body:e.body}});return}let i=await r(e),p=e.local?f:await n(i);if(e.accountId=p,e.body){let t=s(e.body);c(await u(`Creating`,async()=>i.post(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks`,{body:t})),{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await t(`name`,`Name of the webhook`)),e.url===void 0&&(e.url=await t(`url`,`URL this webhook will send events to`));let m={};e.enabled!==void 0&&o(m,[`enabled`],e.enabled),e.events!==void 0&&o(m,[`events`],e.events),e.name!==void 0&&o(m,[`name`],d(e.name,`name`,`text`)),e.url!==void 0&&o(m,[`url`],d(e.url,`url`,`text`)),c(await u(`Creating`,async()=>i.post(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function $(e){return e.positional(`webhook-id`,{type:`string`,description:`ID of the webhook`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app 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 Dt={command:`delete-webhook <webhook-id>`,describe:`Removes a webhook for the given webhook ID.`,builder:$,handler:async t=>{if(t.dryRun){l({command:`cf realtime-kit webhooks delete-webhook`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${t[`app-id`]==null?`<app-id>`:encodeURIComponent(String(t[`app-id`]))}/webhooks/${t[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(t[`webhook-id`]))}`,pathParams:{"app-id":String(t[`app-id`]??``),"webhook-id":String(t[`webhook-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
6
- `);return}c(await u(`Deleting`,async()=>i.realtimeKit.webhooks.deleteWebhook(o,t[`app-id`],t[`webhook-id`])),{successLabel:`Deleted`})}};function Ot(e){return e.positional(`webhook-id`,{type:`string`,description:`ID of the webhook`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`events`,{type:`string`,array:!0,description:`Events that the webhook will get triggered by`}).option(`name`,{type:`string`,description:`Name of the webhook`}).option(`url`,{type:`string`,description:`URL the webhook will send events to`}).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 kt={command:`edit-webhook <webhook-id>`,describe:`Edits the webhook details for the given webhook ID.`,builder:Ot,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit webhooks edit-webhook`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:{enabled:e.enabled,events:e.events,name:e.name,url:e.url,body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=s(e.body);c(await u(`Updating`,async()=>t.patch(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks/${encodeURIComponent(String(e[`webhook-id`]))}`,{body:n})),{successLabel:`Updated`});return}let p={};e.enabled!==void 0&&o(p,[`enabled`],e.enabled),e.events!==void 0&&o(p,[`events`],e.events),e.name!==void 0&&o(p,[`name`],d(e.name,`name`,`text`)),e.url!==void 0&&o(p,[`url`],d(e.url,`url`,`text`)),c(await u(`Updating`,async()=>t.patch(`/accounts/${i}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks/${encodeURIComponent(String(e[`webhook-id`]))}`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Updated`})}};function At(e){return e.positional(`webhook-id`,{type:`string`,description:`ID of the webhook`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jt={command:`get-webhook-by-id <webhook-id>`,describe:`Returns webhook details for the given webhook ID.`,builder:At,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit webhooks get-webhook-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.webhooks.getWebhookById(i,e[`app-id`],e[`webhook-id`])),{successLabel:`Loaded`})}};function Mt(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nt={command:`get-webhooks <app-id>`,describe:`Returns details of all webhooks for an App.`,builder:Mt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit webhooks get-webhooks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/webhooks`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.realtimeKit.webhooks.getWebhooks(i,e[`app-id`])),{successLabel:`Loaded`})}};function Pt(e){return e.positional(`webhook-id`,{type:`string`,description:`ID of the webhook`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Set whether or not the webhook should be active when created`}).option(`events`,{type:`string`,array:!0,description:`Events that this webhook will get triggered by`}).option(`name`,{type:`string`,description:`Name of the webhook`}).option(`url`,{type:`string`,description:`URL this webhook will send events to`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ft={command:`replace-webhook <webhook-id>`,describe:`Replace all details for the given webhook ID.`,builder:Pt,handler:async e=>{if(e.dryRun){l({command:`cf realtime-kit webhooks replace-webhook`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/realtime/kit/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/webhooks/${e[`webhook-id`]==null?`<webhook-id>`:encodeURIComponent(String(e[`webhook-id`]))}`,pathParams:{"app-id":String(e[`app-id`]??``),"webhook-id":String(e[`webhook-id`]??``)},bodyKind:`json`,body:{enabled:e.enabled,events:e.events,name:e.name,url:e.url,body:e.body}});return}let i=await r(e),p=e.local?f:await n(i);if(e.accountId=p,e.body){let t=s(e.body);c(await u(`Updating`,async()=>i.put(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks/${encodeURIComponent(String(e[`webhook-id`]))}`,{body:t})),{successLabel:`Updated`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await t(`name`,`Name of the webhook`)),e.url===void 0&&(e.url=await t(`url`,`URL this webhook will send events to`));let m={};e.enabled!==void 0&&o(m,[`enabled`],e.enabled),e.events!==void 0&&o(m,[`events`],e.events),e.name!==void 0&&o(m,[`name`],d(e.name,`name`,`text`)),e.url!==void 0&&o(m,[`url`],d(e.url,`url`,`text`)),c(await u(`Updating`,async()=>i.put(`/accounts/${p}/realtime/kit/${encodeURIComponent(String(e[`app-id`]))}/webhooks/${encodeURIComponent(String(e[`webhook-id`]))}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}},It={command:`webhooks`,describe:`Webhook endpoints for real-time event notifications (meeting started, participant joined, etc.)`,builder:e=>e.command(Et).command(Dt).command(kt).command(jt).command(Nt).command(Ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lt={command:`realtime-kit`,describe:`Real-time video and audio — meetings, livestreams, recordings, and session management via Cloudflare Calls`,builder:e=>e.command(y).command(S).command(D).command(W).command(fe).command(Fe).command(Ke).command(at).command(wt).command(It).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Lt as default};
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env node
2
- import{T as e,h as t,t as n,x as r}from"./auth-CQcAgnOy.mjs";import{n as i,t as a}from"./body-parser-Br-BoYk-.mjs";import{t as o}from"./output-D7_yAFVR.mjs";import{n as s,t as c}from"./progress-CjcQ6ato.mjs";import{n as l}from"./input-validation-zEO81MWN.mjs";import{t as u}from"./local-VJaJ3BZ1.mjs";function d(e){return e.option(`domains`,{type:`string`,array:!0,description:`List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension.
3
- - Minimum: 1 domain
4
- - Maximum: 20 domains per request
5
- - Domains on unsupported extensions are returned with \`registrable: false\` and a \`reason\` field
6
- - Malformed domain names (e.g., missing extension) may be omitted from the response
7
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const f={command:`domain-check`,describe:"Performs real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.",builder:d,handler:async e=>{if(e.dryRun){s({command:`cf registrar domain-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:{domains:e.domains,body:e.body}});return}let l=await n(e),d=e.local?u:await t(l);if(e.accountId=d,e.body){let t=a(e.body);o(await c(`Creating`,async()=>l.post(`/accounts/${d}/registrar/domain-check`,{body:t})),{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);let f={};e.domains!==void 0&&i(f,[`domains`],e.domains),o(await c(`Creating`,async()=>l.post(`/accounts/${d}/registrar/domain-check`,{body:Object.keys(f).length>0?f:void 0})),{successLabel:`Created`})}};function p(e){return e.option(`q`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
8
- - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
9
- - Domain names: "example.com" returns example.com and variations across extensions`,demandOption:!0}).option(`extensions`,{type:`string`,description:`Limits results to specific domain extensions from the supported set. If not specified,
10
- returns results across all supported extensions. Extensions not in the supported
11
- set are silently ignored.`}).option(`limit`,{type:`number`,description:`Maximum number of domain suggestions to return. Defaults to 20 if not specified.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`domain-search`,describe:'Searches for domain name suggestions based on a keyword, phrase, or partial domain name. Returns a list of potentially available domains with pricing information. **Important:** Results are non-authoritative and based on cached data. Always use the `/domain-check` endpoint to verify real-time availability before attempting registration. Suggestions are scoped to extensions supported for programmatic registration via this API (`POST /registrations`). Domains on unsupported extensions will not appear in results, even if they are available at the registry level. ### Use cases - Brand name discovery (e.g., "acme corp" → acmecorp.com, acmecorp.dev) - Keyword-based suggestions (e.g., "coffee shop" → coffeeshop.com, mycoffeeshop.net) - Alternative extension discovery (e.g., "example.com" → example.com, example.app, example.xyz) ### Workflow 1. Call this endpoint with a keyword or domain name. 2. Present suggestions to the user. 3. Call `/domain-check` with the user\'s chosen domains to confirm real-time availability and pricing. 4. Proceed to `POST /registrations` only for supported non-premium domains where the Check response returns `registrable: true`. **Note:** Searching with just a domain extension (e.g., "com" or ".app") is not supported. Provide a keyword or domain name.',builder:p,handler:async e=>{let i={q:e.q,extensions:e.extensions,limit:e.limit};if(e.dryRun){s({command:`cf registrar domain-search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/domain-search`,pathParams:{},query:i,bodyKind:`none`});return}let a=await n(e),l=e.local?u:await t(a);e.accountId=l,o(await c(`Loading`,async()=>a.registrar.domainSearch(l,i)),{successLabel:`Loaded`})}};function h(e){return e.option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
12
- waiting for the operation to complete (RFC 7240).
13
-
14
- The header may be combined with other preferences using standard
15
- comma-separated syntax.`}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal. Defaults to \`false\` if omitted.
16
- Setting this field to \`true\` is an explicit opt-in authorizing
17
- Cloudflare to charge the account's default payment method up to 30
18
- days before domain expiry to renew the domain automatically.
19
- Renewal pricing may change over time based on registry pricing.
20
- `,default:!1}).option(`contacts-registrant-email`,{type:`string`,description:`Email address for the registrant. Used for domain-related
21
- communications from the registry, including ownership verification
22
- and renewal notices.
23
- `}).option(`contacts-registrant-fax`,{type:`string`,description:`Fax number in E.164 format (e.g., \`+1.5555555555\`). Optional.
24
- Most registrations do not require a fax number.
25
- `}).option(`contacts-registrant-phone`,{type:`string`,description:"Phone number in E.164 format: `+{country_code}.{number}` with no\nspaces or dashes. Examples: `+1.5555555555` (US), `+44.2071234567`\n(UK), `+81.312345678` (Japan).\n"}).option(`contacts-registrant-postal-info-name`,{type:`string`,description:`Full legal name of the registrant (individual or authorized representative).`}).option(`contacts-registrant-postal-info-organization`,{type:`string`,description:`Organization or company name. Optional for individual registrants.`}).option(`domain-name`,{type:`string`,description:`Fully qualified domain name (FQDN) including the extension
26
- (e.g., \`example.com\`, \`mybrand.app\`). The domain name uniquely
27
- identifies a registration — the same domain cannot be registered
28
- twice, making it a natural idempotency key for registration requests.
29
- `}).option(`privacy-mode`,{type:`string`,description:"WHOIS privacy mode for the registration. Defaults to `redaction`.\n- `off`: Do not request WHOIS privacy.\n- `redaction`: Request WHOIS redaction where supported by the extension.\n Some extensions do not support privacy/redaction.\n",choices:[`redaction`],default:`redaction`}).option(`years`,{type:`number`,description:`Number of years to register (1–10). If omitted, defaults to the
30
- minimum registration period required by the registry for this
31
- extension. For most extensions this is 1 year, but some extensions
32
- require longer minimum terms (e.g., \`.ai\` requires a minimum of
33
- 2 years).
34
-
35
- The registry for each extension may also enforce its own maximum
36
- registration term. If the requested value exceeds the registry's
37
- maximum, the registration will be rejected. When in doubt, use the
38
- default by omitting this field.
39
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`contacts-registrant-email`,`contacts-registrant-fax`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`,`contacts-registrant-postal-info-organization`].some(t=>e[t]!==void 0)){let t=[`contacts-registrant-email`,`contacts-registrant-phone`,`contacts-registrant-postal-info-name`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --contacts-* flag is set`)}return!0})}const g={command:`create`,describe:"Starts a domain registration workflow. This is a billable operation — successful registration charges the account's default payment method. All successful domain registrations are non-refundable — once the workflow completes with `state: succeeded`, the charge cannot be reversed. ### Prerequisites - The account must have a billing profile with a valid default payment method. Set this up at `https://dash.cloudflare.com/{account_id}/billing/payment-info`. - The account must not already be at the maximum supported domain limit. A single account may own up to 100 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. ### Supported extensions In this API, \"extension\" means the full registrable suffix after the domain label. For example, in `example.co.uk`, the extension is `co.uk`. Programmatic registration is currently supported for: `com`, `org`, `net`, `app`, `dev`, `cc`, `xyz`, `info`, `cloud`, `studio`, `live`, `link`, `pro`, `tech`, `fyi`, `shop`, `online`, `tools`, `run`, `games`, `build`, `systems`, `world`, `news`, `site`, `network`, `chat`, `space`, `family`, `page`, `life`, `group`, `email`, `solutions`, `day`, `blog`, `ing`, `icu`, `academy`, `today` Cloudflare Registrar supports 400+ extensions in the dashboard. Extensions not listed above can still be registered at `https://dash.cloudflare.com/{account_id}/domains/registrations`. ### Express mode The only required field is `domain_name`. If `contacts` is omitted, the system uses the account's default address book entry as the registrant. If no default exists and no contact is provided, the request fails. Set up a default address book entry and accept the required agreement at `https://dash.cloudflare.com/{account_id}/domains/registrations`. ### Defaults - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies — for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. ### Premium domains Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. ### Response behavior By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`.",builder:h,handler:async d=>{let f={};if(d.prefer!==void 0&&(f.Prefer=String(d.prefer)),d.dryRun){s({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:{"auto-renew":d[`auto-renew`],"contacts-registrant-email":d[`contacts-registrant-email`],"contacts-registrant-fax":d[`contacts-registrant-fax`],"contacts-registrant-phone":d[`contacts-registrant-phone`],"contacts-registrant-postal-info-name":d[`contacts-registrant-postal-info-name`],"contacts-registrant-postal-info-organization":d[`contacts-registrant-postal-info-organization`],"domain-name":d[`domain-name`],"privacy-mode":d[`privacy-mode`],years:d.years,body:d.body}});return}let p=await n(d),m=d.local?u:await t(p);if(d.accountId=m,d.body){let e=a(d.body);o(await c(`Creating`,async()=>p.post(`/accounts/${m}/registrar/registrations`,{body:e,headers:Object.keys(f).length>0?f:void 0})),{successLabel:`Created`});return}d[`domain-name`]===void 0&&(d[`domain-name`]=await e(`domain-name`,"Fully qualified domain name (FQDN) including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration — the same domain cannot be registered twice, making it a natural idempotency key for registration requests. "));let h={};d[`auto-renew`]!==void 0&&i(h,[`auto_renew`],d[`auto-renew`]),d[`contacts-registrant-email`]!==void 0&&i(h,[`contacts`,`registrant`,`email`],l(d[`contacts-registrant-email`],`contacts-registrant-email`,`text`)),d[`contacts-registrant-fax`]!==void 0&&i(h,[`contacts`,`registrant`,`fax`],l(d[`contacts-registrant-fax`],`contacts-registrant-fax`,`text`)),d[`contacts-registrant-phone`]!==void 0&&i(h,[`contacts`,`registrant`,`phone`],l(d[`contacts-registrant-phone`],`contacts-registrant-phone`,`text`)),d[`contacts-registrant-postal-info-name`]!==void 0&&i(h,[`contacts`,`registrant`,`postal_info`,`name`],l(d[`contacts-registrant-postal-info-name`],`contacts-registrant-postal-info-name`,`text`)),d[`contacts-registrant-postal-info-organization`]!==void 0&&i(h,[`contacts`,`registrant`,`postal_info`,`organization`],l(d[`contacts-registrant-postal-info-organization`],`contacts-registrant-postal-info-organization`,`text`)),d[`domain-name`]!==void 0&&i(h,[`domain_name`],l(d[`domain-name`],`domain-name`,`text`)),d[`privacy-mode`]!==void 0&&i(h,[`privacy_mode`],l(d[`privacy-mode`],`privacy-mode`,`text`)),d.years!==void 0&&i(h,[`years`],d.years),o(await c(`Creating`,async()=>p.post(`/accounts/${m}/registrar/registrations`,{body:Object.keys(h).length>0?h:void 0,headers:Object.keys(f).length>0?f:void 0})),{successLabel:`Created`})}};function _(e){return e.positional(`domain-name`,{type:`string`,description:"Fully qualified domain name (FQDN) including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration — the same domain cannot be registered twice, making it a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get-status <domain-name>`,describe:"Returns the current status of a domain registration workflow. Use this endpoint to poll for completion when the POST response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. **Terminal states:** `succeeded` and `failed` are terminal and always have `completed: true`. **Non-terminal states:** - `action_required` has `completed: false` and will not resolve on its own. The workflow is paused pending user intervention. - `blocked` has `completed: false` and indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay. Use increasing backoff between polls. When `state: blocked`, use a longer polling interval and do not poll indefinitely. A naive polling loop that only checks `completed` can run indefinitely when `state: action_required`. Break explicitly on `action_required`: ```js let status; do { await new Promise(r => setTimeout(r, 2000)); status = await cloudflare.request({ method: 'GET', path: reg.result.links.self, }); } while ( !status.result.completed && status.result.state !== 'action_required' ); if (status.result.state === 'action_required') { // Surface context.action and context.confirmation_sent_to to the user. // Do not re-submit the registration request. } ```",builder:_,handler:async e=>{if(e.dryRun){s({command:`cf registrar registrations get-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/registration-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?u:await t(i);e.accountId=a,o(await c(`Loading`,async()=>i.registrar.registrations.getStatus(a,e[`domain-name`])),{successLabel:`Loaded`})}};function y(e){return e.positional(`domain-name`,{type:`string`,description:"Fully qualified domain name (FQDN) including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration — the same domain cannot be registered twice, making it a natural idempotency key for registration requests.",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get-update-status <domain-name>`,describe:"Returns the current status of a domain update workflow. Use this endpoint to poll for completion when the PATCH response returned `202 Accepted`. The URL is provided in the `links.self` field of the workflow status response. Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention. Use increasing backoff between polls. When the workflow remains blocked on a third party, use a longer polling interval and do not poll indefinitely.",builder:y,handler:async e=>{if(e.dryRun){s({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}/update-status`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?u:await t(i);e.accountId=a,o(await c(`Loading`,async()=>i.registrar.registrations.getUpdateStatus(a,e[`domain-name`])),{successLabel:`Loaded`})}};function x(e){return e.positional(`domain-name`,{type:`string`,description:`Domain name to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <domain-name>`,describe:"Returns the current state of a domain registration. This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.",builder:x,handler:async e=>{if(e.dryRun){s({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`none`});return}let i=await n(e),a=e.local?u:await t(i);e.accountId=a,o(await c(`Loading`,async()=>i.registrar.registrations.get(a,e[`domain-name`])),{successLabel:`Loaded`})}};function C(e){return e.option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
40
- Pass this value to fetch the next page of results. Omit (or
41
- pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to registration date\n(`registry_created_at`) when omitted.",choices:[`registry_created_at`,`registry_expires_at`,`name`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:"Returns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages.",builder:C,handler:async e=>{let i={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){s({command:`cf registrar registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations`,pathParams:{},query:i,bodyKind:`none`});return}let a=await n(e),l=e.local?u:await t(a);e.accountId=l,o(await c(`Loading`,async()=>a.registrar.registrations.list(l,i)),{successLabel:`Loaded`})}};function T(e){return e.positional(`domain-name`,{type:`string`,description:`Domain name to update.`,demandOption:!0}).option(`prefer`,{type:`string`,description:"Set to `respond-async` to receive an immediate `202 Accepted` without\nwaiting for the operation to complete (RFC 7240)."}).option(`auto-renew`,{type:`boolean`,description:`Enable or disable automatic renewal.
42
- Setting this field to \`true\` authorizes Cloudflare to charge the
43
- account's default payment method up to 30 days before domain expiry
44
- to renew the domain automatically. Renewal pricing may change over
45
- time based on registry pricing.
46
- `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request to update an existing domain registration. This endpoint currently supports updating `auto_renew` only. "})}const E={command:`update <domain-name>`,describe:"Updates an existing domain registration. By default, the server holds the connection for a bounded, server-defined amount of time while the update completes. Most updates finish within this window and return `200 OK` with a completed workflow status. If the update is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`. This endpoint currently supports updating `auto_renew` only.",builder:T,handler:async e=>{let l={};if(e.prefer!==void 0&&(l.Prefer=String(e.prefer)),e.dryRun){s({command:`cf registrar registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/registrar/registrations/${e[`domain-name`]==null?`<domain-name>`:encodeURIComponent(String(e[`domain-name`]))}`,pathParams:{"domain-name":String(e[`domain-name`]??``)},bodyKind:`json`,body:{"auto-renew":e[`auto-renew`],body:e.body}});return}let d=await n(e),f=e.local?u:await t(d);if(e.accountId=f,e.body){let t=a(e.body);o(await c(`Updating`,async()=>d.patch(`/accounts/${f}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0})),{successLabel:`Updated`});return}let p={};e[`auto-renew`]!==void 0&&i(p,[`auto_renew`],e[`auto-renew`]),o(await c(`Updating`,async()=>d.patch(`/accounts/${f}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:Object.keys(p).length>0?p:void 0,headers:Object.keys(l).length>0?l:void 0})),{successLabel:`Updated`})}},D={command:`registrations`,describe:`Domain registrations — purchase, view, update, and inspect registration status`,builder:e=>e.command(g).command(S).command(v).command(b).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`registrar`,describe:`Domain registration and transfer management through Cloudflare Registrar`,builder:e=>e.command(f).command(m).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{T as e,h as t,t as n,x as r}from"./auth-CQcAgnOy.mjs";import{n as i,t as a}from"./body-parser-Br-BoYk-.mjs";import{t as o}from"./output-D7_yAFVR.mjs";import{n as s,t as c}from"./progress-CjcQ6ato.mjs";import{n as l}from"./input-validation-zEO81MWN.mjs";import{t as u}from"./local-VJaJ3BZ1.mjs";function d(e){return e.option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).option(`body-plain-text`,{type:`string`,description:`Request body as plain text`}).option(`context-bot-score`,{type:`number`,description:`Bot score used for evaluating tracing request processing`}).option(`context-geoloc-city`,{type:`string`,description:`The context.geoloc.city field`}).option(`context-geoloc-continent`,{type:`string`,description:`The context.geoloc.continent field`}).option(`context-geoloc-is-eu-country`,{type:`boolean`,description:`The context.geoloc.is_eu_country field`}).option(`context-geoloc-iso-code`,{type:`string`,description:`The context.geoloc.iso_code field`}).option(`context-geoloc-latitude`,{type:`number`,description:`The context.geoloc.latitude field`}).option(`context-geoloc-longitude`,{type:`number`,description:`The context.geoloc.longitude field`}).option(`context-geoloc-postal-code`,{type:`string`,description:`The context.geoloc.postal_code field`}).option(`context-geoloc-region-code`,{type:`string`,description:`The context.geoloc.region_code field`}).option(`context-geoloc-subdivision-2-iso-code`,{type:`string`,description:`The context.geoloc.subdivision_2_iso_code field`}).option(`context-geoloc-timezone`,{type:`string`,description:`The context.geoloc.timezone field`}).option(`context-skip-challenge`,{type:`boolean`,description:`Whether to skip any challenges for tracing request (e.g.: captcha)`}).option(`context-threat-score`,{type:`number`,description:`Threat score used for evaluating tracing request processing`}).option(`method`,{type:`string`,description:`HTTP Method of tracing request`}).option(`protocol`,{type:`string`,description:`HTTP Protocol of tracing request`}).option(`skip-response`,{type:`boolean`,description:`Skip sending the request to the Origin server after all rules evaluation`}).option(`url`,{type:`string`,description:`URL to which perform tracing request`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Traces a simulated HTTP request through Cloudflare's edge to analyze how rules, settings, and configurations would process the request. Useful for debugging firewall rules, page rules, and other request transformations without sending actual traffic. Supports custom headers, cookies, body content, and geolocation context.`,builder:d,handler:async d=>{if(d.dryRun){s({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${r()??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:{"body-base64":d[`body-base64`],"body-plain-text":d[`body-plain-text`],"context-bot-score":d[`context-bot-score`],"context-geoloc-city":d[`context-geoloc-city`],"context-geoloc-continent":d[`context-geoloc-continent`],"context-geoloc-is-eu-country":d[`context-geoloc-is-eu-country`],"context-geoloc-iso-code":d[`context-geoloc-iso-code`],"context-geoloc-latitude":d[`context-geoloc-latitude`],"context-geoloc-longitude":d[`context-geoloc-longitude`],"context-geoloc-postal-code":d[`context-geoloc-postal-code`],"context-geoloc-region-code":d[`context-geoloc-region-code`],"context-geoloc-subdivision-2-iso-code":d[`context-geoloc-subdivision-2-iso-code`],"context-geoloc-timezone":d[`context-geoloc-timezone`],"context-skip-challenge":d[`context-skip-challenge`],"context-threat-score":d[`context-threat-score`],method:d.method,protocol:d.protocol,"skip-response":d[`skip-response`],url:d.url,body:d.body}});return}let f=await n(d),p=d.local?u:await t(f);if(d.accountId=p,d.body){let e=a(d.body);o(await c(`Creating`,async()=>f.post(`/accounts/${p}/request-tracer/trace`,{body:e})),{successLabel:`Created`});return}d.method===void 0&&(d.method=await e(`method`,`HTTP Method of tracing request`)),d.url===void 0&&(d.url=await e(`url`,`URL to which perform tracing request`));let m={};d[`body-base64`]!==void 0&&i(m,[`body`,`base64`],l(d[`body-base64`],`body-base64`,`text`)),d[`body-plain-text`]!==void 0&&i(m,[`body`,`plain_text`],l(d[`body-plain-text`],`body-plain-text`,`text`)),d[`context-bot-score`]!==void 0&&i(m,[`context`,`bot_score`],d[`context-bot-score`]),d[`context-geoloc-city`]!==void 0&&i(m,[`context`,`geoloc`,`city`],l(d[`context-geoloc-city`],`context-geoloc-city`,`text`)),d[`context-geoloc-continent`]!==void 0&&i(m,[`context`,`geoloc`,`continent`],l(d[`context-geoloc-continent`],`context-geoloc-continent`,`text`)),d[`context-geoloc-is-eu-country`]!==void 0&&i(m,[`context`,`geoloc`,`is_eu_country`],d[`context-geoloc-is-eu-country`]),d[`context-geoloc-iso-code`]!==void 0&&i(m,[`context`,`geoloc`,`iso_code`],l(d[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`)),d[`context-geoloc-latitude`]!==void 0&&i(m,[`context`,`geoloc`,`latitude`],d[`context-geoloc-latitude`]),d[`context-geoloc-longitude`]!==void 0&&i(m,[`context`,`geoloc`,`longitude`],d[`context-geoloc-longitude`]),d[`context-geoloc-postal-code`]!==void 0&&i(m,[`context`,`geoloc`,`postal_code`],l(d[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`)),d[`context-geoloc-region-code`]!==void 0&&i(m,[`context`,`geoloc`,`region_code`],l(d[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`)),d[`context-geoloc-subdivision-2-iso-code`]!==void 0&&i(m,[`context`,`geoloc`,`subdivision_2_iso_code`],l(d[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`)),d[`context-geoloc-timezone`]!==void 0&&i(m,[`context`,`geoloc`,`timezone`],l(d[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)),d[`context-skip-challenge`]!==void 0&&i(m,[`context`,`skip_challenge`],d[`context-skip-challenge`]),d[`context-threat-score`]!==void 0&&i(m,[`context`,`threat_score`],d[`context-threat-score`]),d.method!==void 0&&i(m,[`method`],l(d.method,`method`,`text`)),d.protocol!==void 0&&i(m,[`protocol`],l(d.protocol,`protocol`,`text`)),d[`skip-response`]!==void 0&&i(m,[`skip_response`],d[`skip-response`]),d.url!==void 0&&i(m,[`url`],l(d.url,`url`,`text`)),o(await c(`Creating`,async()=>f.post(`/accounts/${p}/request-tracer/trace`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}},p={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import{C as e,T as t,h as n,t as r,w as i,x as a}from"./auth-CQcAgnOy.mjs";import{n as o,t as s}from"./body-parser-Br-BoYk-.mjs";import{t as c}from"./output-D7_yAFVR.mjs";import{n as l,t as u}from"./progress-CjcQ6ato.mjs";import{n as d}from"./input-validation-zEO81MWN.mjs";import{t as f}from"./local-VJaJ3BZ1.mjs";function p(e){return e.option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`,builder:p,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:{name:e.name,body:e.body}});return}let i=await r(e),p=e.local?f:await n(i);if(e.accountId=p,e.body){let t=s(e.body);c(await u(`Creating`,async()=>i.post(`/accounts/${p}/shares`,{body:t})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await t(`name`,`The name of the share.`));let m={};e.name!==void 0&&o(m,[`name`],d(e.name,`name`,`text`)),c(await u(`Creating`,async()=>i.post(`/accounts/${p}/shares`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function h(e){return e.positional(`share-id`,{type:`string`,description:`Share 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 g={command:`delete <share-id>`,describe:`Deletion is not immediate, an updated share object with a new status will be returned.`,builder:h,handler:async t=>{if(t.dryRun){l({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${t[`share-id`]==null?`<share-id>`:encodeURIComponent(String(t[`share-id`]))}`,pathParams:{"share-id":String(t[`share-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
3
- `);return}c(await u(`Deleting`,async()=>i.resourceSharing.delete(o,t[`share-id`])),{successLabel:`Deleted`})}};function _(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <share-id>`,describe:`Fetches share by ID.`,builder:_,handler:async e=>{let t={include_resources:e[`include-resources`],include_recipient_counts:e[`include-recipient-counts`]};if(e.dryRun){l({command:`cf resource-sharing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}`,pathParams:{"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.resourceSharing.get(o,e[`share-id`],t)),{successLabel:`Loaded`})}};function y(e){return e.option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Lists all account shares.`,builder:y,handler:async e=>{let t={status:e.status,kind:e.kind,target_type:e[`target-type`],resource_types:e[`resource-types`],order:e.order,direction:e.direction,page:e.page,per_page:e[`per-page`],include_resources:e[`include-resources`],include_recipient_counts:e[`include-recipient-counts`]};if(e.dryRun){l({command:`cf resource-sharing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares`,pathParams:{},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.resourceSharing.list(o,t)),{successLabel:`Loaded`})}};function x(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Account or organization ID must be provided.`})}const S={command:`create <share-id>`,describe:`Adds a recipient to a resource share, granting them access to the shared resources.`,builder:x,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:{"organization-id":e[`organization-id`],body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=s(e.body);c(await u(`Creating`,async()=>t.post(`/accounts/${i}/shares/${encodeURIComponent(String(e[`share-id`]))}/recipients`,{body:n})),{successLabel:`Created`});return}let p={};e[`organization-id`]!==void 0&&o(p,[`organization_id`],d(e[`organization-id`],`organization-id`,`text`)),c(await u(`Creating`,async()=>t.post(`/accounts/${i}/shares/${encodeURIComponent(String(e[`share-id`]))}/recipients`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Created`})}};function C(e){return e.positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share 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 w={command:`delete <recipient-id>`,describe:`Deletion is not immediate, an updated share recipient object with a new status will be returned.`,builder:C,handler:async t=>{if(t.dryRun){l({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${t[`share-id`]==null?`<share-id>`:encodeURIComponent(String(t[`share-id`]))}/recipients/${t[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(t[`recipient-id`]))}`,pathParams:{"share-id":String(t[`share-id`]??``),"recipient-id":String(t[`recipient-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
4
- `);return}c(await u(`Deleting`,async()=>i.resourceSharing.recipients.delete(o,t[`share-id`],t[`recipient-id`])),{successLabel:`Deleted`})}};function T(e){return e.positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <recipient-id>`,describe:`Get share recipient by ID.`,builder:T,handler:async e=>{let t={include_resources:e[`include-resources`]};if(e.dryRun){l({command:`cf resource-sharing recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients/${e[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(e[`recipient-id`]))}`,pathParams:{"share-id":String(e[`share-id`]??``),"recipient-id":String(e[`recipient-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.resourceSharing.recipients.get(o,e[`share-id`],e[`recipient-id`],t)),{successLabel:`Loaded`})}};function D(e){return e.option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List share recipients by share ID.`,builder:D,handler:async e=>{let t={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){l({command:`cf resource-sharing recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.resourceSharing.recipients.list(o,e[`share-id`],t)),{successLabel:`Loaded`})}};function k(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,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 A={command:`update <share-id>`,describe:`Changes a share's recipients to match the given list. Returns an error if the share targets an organization.`,builder:k,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${i}/shares/${encodeURIComponent(String(e[`share-id`]))}/recipients`,{body:n})),{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.`)}},j={command:`recipients`,describe:`Organizations and accounts that have been granted access to shared resources`,builder:e=>e.command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create <share-id>`,describe:`Adds a resource to an existing share, making it available to share recipients.`,builder:M,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/resources`,pathParams:{"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:{"resource-account-id":e[`resource-account-id`],"resource-id":e[`resource-id`],"resource-type":e[`resource-type`],body:e.body}});return}let p=await r(e),m=e.local?f:await n(p);if(e.accountId=m,e.body){let t=s(e.body);c(await u(`Creating`,async()=>p.post(`/accounts/${m}/shares/${encodeURIComponent(String(e[`share-id`]))}/resources`,{body:t})),{successLabel:`Created`});return}e[`resource-account-id`]===void 0&&(e[`resource-account-id`]=await t(`resource-account-id`,`Account identifier.`)),e[`resource-id`]===void 0&&(e[`resource-id`]=await t(`resource-id`,`Share Resource identifier.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await i(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`]));let h={};e[`resource-account-id`]!==void 0&&o(h,[`resource_account_id`],d(e[`resource-account-id`],`resource-account-id`,`text`)),e[`resource-id`]!==void 0&&o(h,[`resource_id`],d(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&o(h,[`resource_type`],d(e[`resource-type`],`resource-type`,`text`)),c(await u(`Creating`,async()=>p.post(`/accounts/${m}/shares/${encodeURIComponent(String(e[`share-id`]))}/resources`,{body:Object.keys(h).length>0?h:void 0})),{successLabel:`Created`})}};function P(e){return e.positional(`resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share 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 F={command:`delete <resource-id>`,describe:`Deletion is not immediate, an updated share resource object with a new status will be returned.`,builder:P,handler:async t=>{if(t.dryRun){l({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${t[`share-id`]==null?`<share-id>`:encodeURIComponent(String(t[`share-id`]))}/resources/${t[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(t[`resource-id`]))}`,pathParams:{"share-id":String(t[`share-id`]??``),"resource-id":String(t[`resource-id`]??``)},bodyKind:`none`});return}let i=await r(t),o=t.local?f:await n(i);if(t.accountId=o,!await e({force:!!t.force})){process.stderr.write(`Aborted.
5
- `);return}c(await u(`Deleting`,async()=>i.resourceSharing.resources.delete(o,t[`share-id`],t[`resource-id`])),{successLabel:`Deleted`})}};function I(e){return e.positional(`resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <resource-id>`,describe:`Get share resource by ID.`,builder:I,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/resources/${e[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(e[`resource-id`]))}`,pathParams:{"share-id":String(e[`share-id`]??``),"resource-id":String(e[`resource-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?f:await n(t);e.accountId=i,c(await u(`Loading`,async()=>t.resourceSharing.resources.get(i,e[`share-id`],e[`resource-id`])),{successLabel:`Loaded`})}};function R(e){return e.option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`]}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Number of objects to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List share resources by share ID.`,builder:R,handler:async e=>{let t={status:e.status,resource_type:e[`resource-type`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){l({command:`cf resource-sharing resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/resources`,pathParams:{"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),o=e.local?f:await n(i);e.accountId=o,c(await u(`Loading`,async()=>i.resourceSharing.resources.list(o,e[`share-id`],t)),{successLabel:`Loaded`})}};function B(e){return e.positional(`resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,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 V={command:`update <resource-id>`,describe:`Update is not immediate, an updated share resource object with a new status will be returned.`,builder:B,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/resources/${e[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(e[`resource-id`]))}`,pathParams:{"share-id":String(e[`share-id`]??``),"resource-id":String(e[`resource-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),i=e.local?f:await n(t);if(e.accountId=i,e.body){let n=s(e.body);c(await u(`Updating`,async()=>t.put(`/accounts/${i}/shares/${encodeURIComponent(String(e[`share-id`]))}/resources/${encodeURIComponent(String(e[`resource-id`]))}`,{body:n})),{successLabel:`Updated`});return}c(await u(`Updating`,async()=>t.resourceSharing.resources.update(i,e[`share-id`],e[`resource-id`])),{successLabel:`Updated`})}},H={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).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:`update <share-id>`,describe:`Updating is not immediate, an updated share object with a new status will be returned.`,builder:U,handler:async e=>{if(e.dryRun){l({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${a()??`<account-id>`}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}`,pathParams:{"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:{name:e.name,body:e.body}});return}let i=await r(e),p=e.local?f:await n(i);if(e.accountId=p,e.body){let t=s(e.body);c(await u(`Updating`,async()=>i.put(`/accounts/${p}/shares/${encodeURIComponent(String(e[`share-id`]))}`,{body:t})),{successLabel:`Updated`});return}e.name===void 0&&(e.name=await t(`name`,`The name of the share.`));let m={};e.name!==void 0&&o(m,[`name`],d(e.name,`name`,`text`)),c(await u(`Updating`,async()=>i.put(`/accounts/${p}/shares/${encodeURIComponent(String(e[`share-id`]))}`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Updated`})}},G={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(m).command(g).command(v).command(b).command(W).command(j).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- import{C as e,T as t,b as n,h as r,t as i,w as a,x as o}from"./auth-CQcAgnOy.mjs";import{n as s,t as c}from"./body-parser-Br-BoYk-.mjs";import{t as l}from"./output-D7_yAFVR.mjs";import{n as u,t as d}from"./progress-CjcQ6ato.mjs";import{n as f}from"./input-validation-zEO81MWN.mjs";import{t as p}from"./local-VJaJ3BZ1.mjs";function m(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
3
- verify the current resource ETag matches before applying the write. Returns
4
- 412 Precondition Failed if the resource has been modified since the ETag was
5
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:[`worker_version`]}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const h={command:`delete`,describe:`Removes all tags from a specific account-level resource.`,builder:m,handler:async n=>{let m={};if(n[`if-match`]!==void 0&&(m[`If-Match`]=String(n[`if-match`])),n.dryRun){u({command:`cf resource-tagging account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags`,pathParams:{},bodyKind:`json`,body:{"resource-id":n[`resource-id`],"resource-type":n[`resource-type`],"worker-id":n[`worker-id`],body:n.body}});return}let h=await i(n),g=n.local?p:await r(h);if(n.accountId=g,!await e({force:!!n.force})){process.stderr.write(`Aborted.
6
- `);return}if(n.body){let e=c(n.body);l(await d(`Deleting`,async()=>h.delete(`/accounts/${g}/tags`,{body:e,headers:Object.keys(m).length>0?m:void 0})),{successLabel:`Deleted`});return}n[`resource-id`]===void 0&&(n[`resource-id`]=await t(`resource-id`,`Identifies the unique resource.`)),n[`resource-type`]===void 0&&(n[`resource-type`]=await a(`resource-type`,`Enum for worker_version resource type.`,[`worker_version`]));let _={};n[`resource-id`]!==void 0&&s(_,[`resource_id`],f(n[`resource-id`],`resource-id`,`text`)),n[`resource-type`]!==void 0&&s(_,[`resource_type`],f(n[`resource-type`],`resource-type`,`text`)),n[`worker-id`]!==void 0&&s(_,[`worker_id`],f(n[`worker-id`],`worker-id`,`text`)),l(await d(`Deleting`,async()=>h.delete(`/accounts/${g}/tags`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(m).length>0?m:void 0})),{successLabel:`Deleted`})}};function g(e){return e.option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:[`access_application`,`access_group`,`account`,`ai_gateway`,`alerting_policy`,`alerting_webhook`,`cloudflared_tunnel`,`d1_database`,`durable_object_namespace`,`gateway_list`,`gateway_rule`,`image`,`kv_namespace`,`queue`,`r2_bucket`,`resource_share`,`stream_live_input`,`stream_video`,`worker`,`worker_version`],demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Retrieves tags for a specific account-level resource.`,builder:g,handler:async e=>{let t={resource_id:e[`resource-id`],resource_type:e[`resource-type`],worker_id:e[`worker-id`]};if(e.dryRun){u({command:`cf resource-tagging account-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags`,pathParams:{},query:t,bodyKind:`none`});return}let n=await i(e),a=e.local?p:await r(n);e.accountId=a,l(await d(`Loading`,async()=>n.resourceTagging.accountTags.get(a,t)),{successLabel:`Loaded`})}};function v(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
7
- verify the current resource ETag matches before applying the write. Returns
8
- 412 Precondition Failed if the resource has been modified since the ETag was
9
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:[`worker_version`]}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const y={command:`update`,describe:`Creates or updates tags for a specific account-level resource.`,builder:v,handler:async e=>{let n={};if(e[`if-match`]!==void 0&&(n[`If-Match`]=String(e[`if-match`])),e.dryRun){u({command:`cf resource-tagging account-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags`,pathParams:{},bodyKind:`json`,body:{"resource-id":e[`resource-id`],"resource-type":e[`resource-type`],"worker-id":e[`worker-id`],body:e.body}});return}let m=await i(e),h=e.local?p:await r(m);if(e.accountId=h,e.body){let t=c(e.body);l(await d(`Updating`,async()=>m.put(`/accounts/${h}/tags`,{body:t,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await t(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await a(`resource-type`,`Enum for worker_version resource type.`,[`worker_version`]));let g={};e[`resource-id`]!==void 0&&s(g,[`resource_id`],f(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&s(g,[`resource_type`],f(e[`resource-type`],`resource-type`,`text`)),e[`worker-id`]!==void 0&&s(g,[`worker_id`],f(e[`worker-id`],`worker-id`,`text`)),l(await d(`Updating`,async()=>m.put(`/accounts/${h}/tags`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated`})}},b={command:`account-tags`,describe:`Tags applied to the account for organizational grouping and policy targeting`,builder:e=>e.command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`Lists all distinct tag keys used across resources in an account.`,builder:x,handler:async e=>{let t={cursor:e.cursor};if(e.dryRun){u({command:`cf resource-tagging keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags/keys`,pathParams:{},query:t,bodyKind:`none`});return}let n=await i(e),a=e.local?p:await r(n);e.accountId=a,l(await d(`Loading`,async()=>n.resourceTagging.keys.list(a,t)),{successLabel:`Loaded`})}},C={command:`keys`,describe:`Tag key definitions that establish the vocabulary for tagging resources`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.option(`type`,{type:`string`,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`tag`,{type:`string`,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`Lists all tagged resources for an account.`,builder:w,handler:async e=>{let t={type:e.type,tag:e.tag,cursor:e.cursor};if(e.dryRun){u({command:`cf resource-tagging list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags/resources`,pathParams:{},query:t,bodyKind:`none`});return}let n=await i(e),a=e.local?p:await r(n);e.accountId=a,l(await d(`Loading`,async()=>n.resourceTagging.list(a,t)),{successLabel:`Loaded`})}};function E(e){return e.option(`tag-key`,{type:`string`,description:`The tag key to retrieve values for.`,demandOption:!0}).option(`type`,{type:`string`,description:`Filter by resource type.`,choices:`access_application.access_application_policy.access_group.account.ai_gateway.alerting_policy.alerting_webhook.api_gateway_operation.cloudflared_tunnel.custom_certificate.custom_hostname.d1_database.dns_record.durable_object_namespace.gateway_list.gateway_rule.image.kv_namespace.managed_client_certificate.queue.r2_bucket.resource_share.stream_live_input.stream_video.worker.worker_version.zone`.split(`.`)}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Lists all distinct values for a given tag key, optionally filtered by resource type.`,builder:E,handler:async e=>{let t={type:e.type,cursor:e.cursor};if(e.dryRun){u({command:`cf resource-tagging values list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${o()??`<account-id>`}/tags/values/${e[`tag-key`]==null?`<tag-key>`:encodeURIComponent(String(e[`tag-key`]))}`,pathParams:{"tag-key":String(e[`tag-key`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),a=e.local?p:await r(n);e.accountId=a,l(await d(`Loading`,async()=>n.resourceTagging.values.list(a,e[`tag-key`],t)),{successLabel:`Loaded`})}},O={command:`values`,describe:`Allowed values for tag keys — constrain tagging to a defined set of options`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
10
- verify the current resource ETag matches before applying the write. Returns
11
- 412 Precondition Failed if the resource has been modified since the ETag was
12
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for base zone-level resource types (those with no extra required fields).`,choices:[`api_gateway_operation`,`custom_certificate`,`custom_hostname`,`dns_record`,`managed_client_certificate`,`zone`]}).option(`access-application-id`,{type:`string`,description:`Access application ID is required only for access_application_policy resources`}).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:`Request body schema for deleting tags from zone-level resources.`})}const A={command:`delete`,describe:`Removes all tags from a specific zone-level resource.`,builder:k,handler:async r=>{let o={};if(r[`if-match`]!==void 0&&(o[`If-Match`]=String(r[`if-match`])),r.dryRun){u({command:`cf resource-tagging zone-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${r.zone??r.zoneId??`<zone>`}/tags`,pathParams:{"zone-id":String(r.zone??r[`zone-id`]??``)},bodyKind:`json`,body:{"resource-id":r[`resource-id`],"resource-type":r[`resource-type`],"access-application-id":r[`access-application-id`],body:r.body}});return}let p=await i(r);if(r.zoneId=await n({zone:r.zone},p,{quiet:r.quiet}),!await e({force:!!r.force})){process.stderr.write(`Aborted.
13
- `);return}if(r.body){let e=c(r.body);l(await d(`Deleting`,async()=>p.delete(`/zones/${r.zoneId}/tags`,{body:e,headers:Object.keys(o).length>0?o:void 0})),{successLabel:`Deleted`});return}r[`resource-id`]===void 0&&(r[`resource-id`]=await t(`resource-id`,`Identifies the unique resource.`)),r[`resource-type`]===void 0&&(r[`resource-type`]=await a(`resource-type`,`Enum for base zone-level resource types (those with no extra required fields).`,[`api_gateway_operation`,`custom_certificate`,`custom_hostname`,`dns_record`,`managed_client_certificate`,`zone`]));let m={};r[`resource-id`]!==void 0&&s(m,[`resource_id`],f(r[`resource-id`],`resource-id`,`text`)),r[`resource-type`]!==void 0&&s(m,[`resource_type`],f(r[`resource-type`],`resource-type`,`text`)),r[`access-application-id`]!==void 0&&s(m,[`access_application_id`],f(r[`access-application-id`],`access-application-id`,`text`)),l(await d(`Deleting`,async()=>p.delete(`/zones/${r.zoneId}/tags`,{body:Object.keys(m).length>0?m:void 0,headers:Object.keys(o).length>0?o:void 0})),{successLabel:`Deleted`})}};function j(e){return e.option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:[`access_application_policy`,`api_gateway_operation`,`custom_certificate`,`custom_hostname`,`dns_record`,`managed_client_certificate`,`zone`],demandOption:!0}).option(`access-application-id`,{type:`string`,description:`Access application ID identifier. Required for access_application_policy resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get`,describe:`Retrieves tags for a specific zone-level resource.`,builder:j,handler:async e=>{let t={resource_id:e[`resource-id`],resource_type:e[`resource-type`],access_application_id:e[`access-application-id`]};if(e.dryRun){u({command:`cf resource-tagging zone-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/tags`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await i(e),a=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a,l(await d(`Loading`,async()=>r.resourceTagging.zoneTags.get(a,t)),{successLabel:`Loaded`})}};function N(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
14
- verify the current resource ETag matches before applying the write. Returns
15
- 412 Precondition Failed if the resource has been modified since the ETag was
16
- obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for base zone-level resource types (those with no extra required fields).`,choices:[`api_gateway_operation`,`custom_certificate`,`custom_hostname`,`dns_record`,`managed_client_certificate`,`zone`]}).option(`access-application-id`,{type:`string`,description:`Access application ID is required only for access_application_policy resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on zone-level resources.`})}const P={command:`update`,describe:`Creates or updates tags for a specific zone-level resource. Replaces all existing tags for the resource.`,builder:N,handler:async e=>{let r={};if(e[`if-match`]!==void 0&&(r[`If-Match`]=String(e[`if-match`])),e.dryRun){u({command:`cf resource-tagging zone-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/tags`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:{"resource-id":e[`resource-id`],"resource-type":e[`resource-type`],"access-application-id":e[`access-application-id`],body:e.body}});return}let o=await i(e);if(e.zoneId=await n({zone:e.zone},o,{quiet:e.quiet}),e.body){let t=c(e.body);l(await d(`Updating`,async()=>o.put(`/zones/${e.zoneId}/tags`,{body:t,headers:Object.keys(r).length>0?r:void 0})),{successLabel:`Updated`});return}e[`resource-id`]===void 0&&(e[`resource-id`]=await t(`resource-id`,`Identifies the unique resource.`)),e[`resource-type`]===void 0&&(e[`resource-type`]=await a(`resource-type`,`Enum for base zone-level resource types (those with no extra required fields).`,[`api_gateway_operation`,`custom_certificate`,`custom_hostname`,`dns_record`,`managed_client_certificate`,`zone`]));let p={};e[`resource-id`]!==void 0&&s(p,[`resource_id`],f(e[`resource-id`],`resource-id`,`text`)),e[`resource-type`]!==void 0&&s(p,[`resource_type`],f(e[`resource-type`],`resource-type`,`text`)),e[`access-application-id`]!==void 0&&s(p,[`access_application_id`],f(e[`access-application-id`],`access-application-id`,`text`)),l(await d(`Updating`,async()=>o.put(`/zones/${e.zoneId}/tags`,{body:Object.keys(p).length>0?p:void 0,headers:Object.keys(r).length>0?r:void 0})),{successLabel:`Updated`})}},F={command:`zone-tags`,describe:`Tags applied to individual zones for categorization and bulk management`,builder:e=>e.command(A).command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`resource-tagging`,describe:`Tag accounts and zones with key-value metadata for organization, filtering, and policy targeting`,builder:e=>e.command(T).command(b).command(C).command(O).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{C as e,T as t,h as n,t as r,x as i}from"./auth-CQcAgnOy.mjs";import{n as a,t as o}from"./body-parser-Br-BoYk-.mjs";import{t as s}from"./output-D7_yAFVR.mjs";import{n as c,t as l}from"./progress-CjcQ6ato.mjs";import{n as u}from"./input-validation-zEO81MWN.mjs";import{t as d}from"./local-VJaJ3BZ1.mjs";function f(e){return e.positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get <operation-id>`,describe:"Gets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.",builder:f,handler:async e=>{if(e.dryRun){c({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/bulk_operations/${e[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(e[`operation-id`]))}`,pathParams:{"operation-id":String(e[`operation-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.rules.lists.bulkOperations.get(e[`operation-id`],a)),{successLabel:`Loaded`})}},m={command:`bulk-operations`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).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`,describe:`Creates a new list of the specified kind.`,builder:h,handler:async e=>{if(e.dryRun){c({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:{description:e.description,name:e.name,body:e.body}});return}let f=await r(e),p=e.local?d:await n(f);if(e.accountId=p,e.body){let t=o(e.body);s(await l(`Creating`,async()=>f.post(`/accounts/${p}/rules/lists`,{body:t})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await t(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m={};e.description!==void 0&&a(m,[`description`],u(e.description,`description`,`text`)),e.name!==void 0&&a(m,[`name`],u(e.name,`name`,`text`)),s(await l(`Creating`,async()=>f.post(`/accounts/${p}/rules/lists`,{body:Object.keys(m).length>0?m:void 0})),{successLabel:`Created`})}};function _(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`delete <list-id>`,describe:`Deletes a specific list and all its items.`,builder:_,handler:async t=>{if(t.dryRun){c({command:`cf rules lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${t[`list-id`]==null?`<list-id>`:encodeURIComponent(String(t[`list-id`]))}`,pathParams:{"list-id":String(t[`list-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let a=await r(t),u=t.local?d:await n(a);if(t.accountId=u,!await e({force:!!t.force})){process.stderr.write(`Aborted.
3
- `);return}if(t.body){let e=o(t.body);s(await l(`Deleting`,async()=>a.delete(`/accounts/${u}/rules/lists/${encodeURIComponent(String(t[`list-id`]))}`,{body:e})),{successLabel:`Deleted`});return}s(await l(`Deleting`,async()=>a.rules.lists.delete(t[`list-id`],u)),{successLabel:`Deleted`})}};function y(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <list-id>`,describe:`Fetches the details of a list.`,builder:y,handler:async e=>{if(e.dryRun){c({command:`cf rules lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.rules.lists.get(e[`list-id`],a)),{successLabel:`Loaded`})}};function x(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,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 S={command:`create <list-id>`,describe:"Appends new items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.",builder:x,handler:async e=>{if(e.dryRun){c({command:`cf rules lists items create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}/items`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),a=e.local?d:await n(t);if(e.accountId=a,e.body){let n=o(e.body);s(await l(`Creating`,async()=>t.post(`/accounts/${a}/rules/lists/${encodeURIComponent(String(e[`list-id`]))}/items`,{body:n})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function C(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`delete <list-id>`,describe:"Removes one or more items from a list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.",builder:C,handler:async t=>{if(t.dryRun){c({command:`cf rules lists items delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${t[`list-id`]==null?`<list-id>`:encodeURIComponent(String(t[`list-id`]))}/items`,pathParams:{"list-id":String(t[`list-id`]??``)},bodyKind:`json`,body:{body:t.body}});return}let a=await r(t),u=t.local?d:await n(a);if(t.accountId=u,!await e({force:!!t.force})){process.stderr.write(`Aborted.
4
- `);return}if(t.body){let e=o(t.body);s(await l(`Deleting`,async()=>a.delete(`/accounts/${u}/rules/lists/${encodeURIComponent(String(t[`list-id`]))}/items`,{body:e})),{successLabel:`Deleted`});return}s(await l(`Deleting`,async()=>a.rules.lists.items.delete(t[`list-id`],u)),{successLabel:`Deleted`})}};function T(e){return e.positional(`item-id`,{type:`string`,description:`Defines the unique ID of the item in the List.`,demandOption:!0}).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <item-id>`,describe:`Fetches a list item in the list.`,builder:T,handler:async e=>{if(e.dryRun){c({command:`cf rules lists items get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}/items/${e[`item-id`]==null?`<item-id>`:encodeURIComponent(String(e[`item-id`]))}`,pathParams:{"item-id":String(e[`item-id`]??``),"list-id":String(e[`list-id`]??``)},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.rules.lists.items.get(e[`item-id`],e[`list-id`],a)),{successLabel:`Loaded`})}};function D(e){return e.option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"The pagination cursor. An opaque string token indicating the position from which to continue when requesting the next/previous set of records. Cursor values are provided under `result_info.cursors` in the response. You should make no assumptions about a cursor's content or length."}).option(`per-page`,{type:`number`,description:`Amount of results to include in each paginated response. A non-negative 32 bit integer.`}).option(`search`,{type:`string`,description:`A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Fetches all the items in the list.`,builder:D,handler:async e=>{let t={cursor:e.cursor,per_page:e[`per-page`],search:e.search};if(e.dryRun){c({command:`cf rules lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}/items`,pathParams:{"list-id":String(e[`list-id`]??``)},query:t,bodyKind:`none`});return}let a=await r(e),o=e.local?d:await n(a);e.accountId=o,s(await l(`Loading`,async()=>a.rules.lists.items.list(e[`list-id`],o,t)),{successLabel:`Loaded`})}};function k(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,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 A={command:`update <list-id>`,describe:"Removes all existing items from the list and adds the provided items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.",builder:k,handler:async e=>{if(e.dryRun){c({command:`cf rules lists items update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}/items`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:{body:e.body}});return}let t=await r(e),a=e.local?d:await n(t);if(e.accountId=a,e.body){let n=o(e.body);s(await l(`Updating`,async()=>t.put(`/accounts/${a}/rules/lists/${encodeURIComponent(String(e[`list-id`]))}/items`,{body:n})),{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.`)}},j={command:`items`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`Fetches all lists in the account.`,builder:M,handler:async e=>{if(e.dryRun){c({command:`cf rules lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`none`});return}let t=await r(e),a=e.local?d:await n(t);e.accountId=a,s(await l(`Loading`,async()=>t.rules.lists.list(a)),{successLabel:`Loaded`})}};function P(e){return e.positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <list-id>`,describe:`Updates the description of a list.`,builder:P,handler:async e=>{if(e.dryRun){c({command:`cf rules lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${i()??`<account-id>`}/rules/lists/${e[`list-id`]==null?`<list-id>`:encodeURIComponent(String(e[`list-id`]))}`,pathParams:{"list-id":String(e[`list-id`]??``)},bodyKind:`json`,body:{description:e.description,body:e.body}});return}let t=await r(e),f=e.local?d:await n(t);if(e.accountId=f,e.body){let n=o(e.body);s(await l(`Updating`,async()=>t.put(`/accounts/${f}/rules/lists/${encodeURIComponent(String(e[`list-id`]))}`,{body:n})),{successLabel:`Updated`});return}let p={};e.description!==void 0&&a(p,[`description`],u(e.description,`description`,`text`)),s(await l(`Updating`,async()=>t.put(`/accounts/${f}/rules/lists/${encodeURIComponent(String(e[`list-id`]))}`,{body:Object.keys(p).length>0?p:void 0})),{successLabel:`Updated`})}},I={command:`lists`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(g).command(v).command(b).command(N).command(F).command(m).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`rules`,describe:`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};