cf 0.10.0 → 0.11.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 (342) hide show
  1. package/README.md +15 -5
  2. package/dist/_meta/agent-context.json +12 -4
  3. package/dist/_meta/commands.json +2249 -262
  4. package/dist/_meta/hand-written-commands.json +784 -0
  5. package/dist/_meta/schemas.json +1882 -155
  6. package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-sDBTV0qZ.mjs} +2 -2
  7. package/dist/{access-lhLJo1v2.mjs → access-DcNzuCue.mjs} +1 -1
  8. package/dist/account-BX90zXn5.mjs +2 -0
  9. package/dist/{account-tags-B88TotoH.mjs → account-tags-Bz3JG5hI.mjs} +4 -4
  10. package/dist/{accounts-BSIAT_iP.mjs → accounts-DCuW3xyZ.mjs} +12 -12
  11. package/dist/{acm-VULm1djv.mjs → acm-zjfShZLS.mjs} +1 -1
  12. package/dist/{addressing-BHPBIkRY.mjs → addressing-DORQ64Ux.mjs} +11 -11
  13. package/dist/{agent-context-KBy48G1b.mjs → agent-context-BgPR_aQr.mjs} +1 -1
  14. package/dist/agent-memory-C0hAUMeC.mjs +6 -0
  15. package/dist/ai-BpEBGMT2.mjs +5 -0
  16. package/dist/ai-audit-DnU3vn3E.mjs +2 -0
  17. package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
  18. package/dist/ai-search-DKbN9Tyd.mjs +7 -0
  19. package/dist/ai-security-C_I5lo58.mjs +4 -0
  20. package/dist/{alerting-Bl8OqViR.mjs → alerting-4T8gmZs-.mjs} +1 -1
  21. package/dist/analytics-Bxh4TCP7.mjs +3 -0
  22. package/dist/analytics_engine-fV56bjVN.mjs +2 -0
  23. package/dist/{api-security-4FVrD4n8.mjs → api-security-COk_i184.mjs} +20 -20
  24. package/dist/argo-DIRfvxvv.mjs +2 -0
  25. package/dist/{artifacts-CVDGnr2V.mjs → artifacts-BBfXNfUg.mjs} +1 -1
  26. package/dist/audit-logs-BlOrlAWe.mjs +2 -0
  27. package/dist/{auth-MQEamPN9.mjs → auth-D3X9HYhD.mjs} +3 -3
  28. package/dist/auth-DPhNN3Ly.mjs +5 -0
  29. package/dist/billing-B9e4PnvN.mjs +3 -0
  30. package/dist/body-parser-BshbixEq.mjs +2 -0
  31. package/dist/bot-management-D2JVeS-V.mjs +5 -0
  32. package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
  33. package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
  34. package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
  35. package/dist/browser-run-CHGOCTdG.mjs +4 -0
  36. package/dist/build-D0FhOj40.mjs +8 -0
  37. package/dist/{cache-VyWK1SjY.mjs → cache-C6V7PbQM.mjs} +1 -1
  38. package/dist/{calls-BxoRYxs4.mjs → calls-Bye8Tyy-.mjs} +1 -1
  39. package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
  40. package/dist/cf-Ds4JFovl.mjs +18 -0
  41. package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
  42. package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
  43. package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
  44. package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
  45. package/dist/cloud-connector-CL1jPQud.mjs +2 -0
  46. package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
  47. package/dist/command-C9VP3xaA.mjs +2 -0
  48. package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
  49. package/dist/config.d.mts +1460 -1348
  50. package/dist/config.mjs +1 -1
  51. package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
  52. package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
  53. package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
  54. package/dist/{connectors-BqxYMMtQ.mjs → connectors-BQwyBJ4_.mjs} +1 -1
  55. package/dist/{containers-CKW081JA.mjs → containers-BrQtGiNp.mjs} +12 -8
  56. package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-DNzhXYkY.mjs} +1 -1
  57. package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
  58. package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
  59. package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
  60. package/dist/custom-csrs-bhClr2SU.mjs +3 -0
  61. package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-C0eiGvG9.mjs} +1 -1
  62. package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
  63. package/dist/custom-pages-DTINMR30.mjs +3 -0
  64. package/dist/d1-sKdExJYF.mjs +20 -0
  65. package/dist/data-security-mV3a6UfW.mjs +7 -0
  66. package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
  67. package/dist/delegate.mjs +1 -1
  68. package/dist/{deploy-CZ7bgNDu.mjs → deploy-BL59O1O1.mjs} +1 -1
  69. package/dist/deploy-input-Dz6q-__n.mjs +2 -0
  70. package/dist/{dev-V10MG-Bg.mjs → dev-BDaavgH1.mjs} +2 -2
  71. package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-CJV6qWUA.mjs} +1 -1
  72. package/dist/{directory-BlH6N6Qy.mjs → directory-B5zCMusW.mjs} +1 -1
  73. package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
  74. package/dist/dist-BHi7UhXO.mjs +72 -0
  75. package/dist/dist-BWpErtDM.mjs +384 -0
  76. package/dist/{dls-BF5iN78p.mjs → dls-t0hnIe_P.mjs} +1 -1
  77. package/dist/{dns-CeCTNqRk.mjs → dns-C8FC2hbh.mjs} +13 -13
  78. package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
  79. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
  80. package/dist/dry-run-DL2V6yFm.mjs +2 -0
  81. package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
  82. package/dist/email-auth-BmYrl0pO.mjs +2 -0
  83. package/dist/email-routing-CF3_Z957.mjs +6 -0
  84. package/dist/email-security-F7OYcMkZ.mjs +18 -0
  85. package/dist/email-sending-EyU3WvGQ.mjs +7 -0
  86. package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
  87. package/dist/{firewall-CBPGJ43p.mjs → firewall-8YWWy4iB.mjs} +9 -9
  88. package/dist/flagship-C4x0l-8J.mjs +4 -0
  89. package/dist/{fraud-BIhS8pLf.mjs → fraud-HR_SdUx3.mjs} +1 -1
  90. package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
  91. package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-4qOvjrTN.mjs} +1 -1
  92. package/dist/{hostnames-Bx0mykMR.mjs → hostnames-DehdYOMz.mjs} +1 -1
  93. package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
  94. package/dist/iam-DR72hmii.mjs +6 -0
  95. package/dist/images-CeKc5JPh.mjs +8 -0
  96. package/dist/index.mjs +1 -1
  97. package/dist/{intel-B-9Z_sJs.mjs → intel-DtFix9WL.mjs} +1 -1
  98. package/dist/{interactive-DtsCYfrK.mjs → interactive-C7M55Wxx.mjs} +1 -1
  99. package/dist/ips-CtWCjXAN.mjs +2 -0
  100. package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
  101. package/dist/keys-BmhG6Kn1.mjs +2 -0
  102. package/dist/{kv-BFDUCnft.mjs → kv-BuVPAuZP.mjs} +1 -1
  103. package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
  104. package/dist/load-balancers-CylN-l7n.mjs +6 -0
  105. package/dist/{local-D-aVNu6A.mjs → local-Be3lg_9E.mjs} +1 -1
  106. package/dist/{local-runtime-Dh3keC5v.mjs → local-runtime-Ce7k598H.mjs} +1 -1
  107. package/dist/logexplorer-CvRPoKbj.mjs +17 -0
  108. package/dist/logo-matches-Heuft3yF.mjs +2 -0
  109. package/dist/logos-DRYjGBDq.mjs +3 -0
  110. package/dist/{logpush-BK34mMQs.mjs → logpush-Dve9jOMp.mjs} +1 -1
  111. package/dist/{logs-CLAqX9h2.mjs → logs-SC86FE89.mjs} +1 -1
  112. package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
  113. package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
  114. package/dist/magic-transit-BK_3asH2.mjs +111 -0
  115. package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
  116. package/dist/matches-Iss9Fo4R.mjs +2 -0
  117. package/dist/mcp-8wxXT6JU.mjs +4 -0
  118. package/dist/mesh-Bf9UAS4J.mjs +4 -0
  119. package/dist/{moq-qmuVPAO0.mjs → moq-ZKMFOeVz.mjs} +1 -1
  120. package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
  121. package/dist/{network-D74cSy3t.mjs → network-B1lBARU9.mjs} +1 -1
  122. package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
  123. package/dist/oauth-DuEONNgC.mjs +14 -0
  124. package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
  125. package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
  126. package/dist/observability-Jya7-zkl.mjs +4 -0
  127. package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
  128. package/dist/{organization-NX7yCZrq.mjs → organization-CYxYV4e0.mjs} +6 -6
  129. package/dist/organizations-SacGUW44.mjs +2 -0
  130. package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
  131. package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
  132. package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
  133. package/dist/{output-DrpYYfnB.mjs → output-Ccqw2WOb.mjs} +1 -1
  134. package/dist/page-rules-BqEyFR2c.mjs +27 -0
  135. package/dist/pages-CQ7ZVWk1.mjs +14 -0
  136. package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
  137. package/dist/pipelines-6De2Pe2C.mjs +6 -0
  138. package/dist/precursor-iwK-1P_d.mjs +4 -0
  139. package/dist/progress-BqQcF5QH.mjs +2 -0
  140. package/dist/project-settings-C_1-JI6Y.mjs +3 -0
  141. package/dist/prompt-B0sWIs9c.mjs +3 -0
  142. package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
  143. package/dist/queries-c7zvnfEQ.mjs +3 -0
  144. package/dist/queues-BU6y16qS.mjs +6 -0
  145. package/dist/r2-Jo3QMahK.mjs +24 -0
  146. package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
  147. package/dist/radar-DIYAMEof.mjs +2 -0
  148. package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-DewOcznT.mjs} +1 -1
  149. package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
  150. package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-cnZEVNDn.mjs} +1 -1
  151. package/dist/registrar-BsWr_aPM.mjs +23 -0
  152. package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-BlcpUyIH.mjs} +4 -4
  153. package/dist/{registry-Bck_zFkz.mjs → registry-jifR3_Y6.mjs} +1 -1
  154. package/dist/reporting--1AyTV7k.mjs +2 -0
  155. package/dist/request-tracers-C_VX7X6-.mjs +2 -0
  156. package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
  157. package/dist/resource-tagging-C33U6T74.mjs +2 -0
  158. package/dist/rules-BfjzALMi.mjs +4 -0
  159. package/dist/rulesets-3i_1Vwt-.mjs +5 -0
  160. package/dist/rum-CjmIckiR.mjs +4 -0
  161. package/dist/{schema-B34Q9tLF.mjs → schema-1mwmslUV.mjs} +1 -1
  162. package/dist/schema-flags-llLJuFFw.mjs +5 -0
  163. package/dist/{scim-CcSyfKCH.mjs → scim-pApmzA5B.mjs} +1 -1
  164. package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-DBC9WJau.mjs} +1 -1
  165. package/dist/security-center-Djm06dq-.mjs +2 -0
  166. package/dist/{security-txt-DqnFpjMI.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
  167. package/dist/{share-BuwYUzOL.mjs → share-Dj-MNXrw.mjs} +4 -4
  168. package/dist/shared-BJvq4DkR.mjs +290 -0
  169. package/dist/smart-shield--8EpJjrF.mjs +4 -0
  170. package/dist/snippets-Dyz0PH60.mjs +4 -0
  171. package/dist/{spawn-O1RS01vr.mjs → spawn-C5Z7oWdp.mjs} +108 -112
  172. package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-rAHWz8rH.mjs} +1 -1
  173. package/dist/{speed-cw31yFva.mjs → speed-BKepWBXj.mjs} +1 -1
  174. package/dist/src-gJma71Ec.mjs +108 -0
  175. package/dist/{ssl-CsEhRVTO.mjs → ssl-KdFiY3ev.mjs} +1 -1
  176. package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
  177. package/dist/{state-Bb5Cbc_L.mjs → state-Cu3cItUg.mjs} +1 -1
  178. package/dist/{stream-DFOao6Gu.mjs → stream-CKJ6Tb0M.mjs} +13 -13
  179. package/dist/submit-BxbKKhBn.mjs +2 -0
  180. package/dist/tags-DA8dq9fx.mjs +2 -0
  181. package/dist/tenant-DLXw48hS.mjs +2 -0
  182. package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
  183. package/dist/{tools-BHfBOZOU.mjs → tools-x8bj9E6b.mjs} +1 -1
  184. package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CNQA5Flp.mjs} +1 -1
  185. package/dist/tunnels-CC10EOsU.mjs +2 -0
  186. package/dist/turnstile-CH58hnf4.mjs +23 -0
  187. package/dist/{ui-DE8CNn6c.mjs → ui-CmnnBm_O.mjs} +1 -1
  188. package/dist/url-info-BpCgdUtL.mjs +2 -0
  189. package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BzuynEy1.mjs} +1 -1
  190. package/dist/url-scanner-APIZbhB7.mjs +2 -0
  191. package/dist/user-2-NGebfI.mjs +12 -0
  192. package/dist/values-S_bNv819.mjs +2 -0
  193. package/dist/{vectorize-CVKu7lEt.mjs → vectorize-Bv7feLBC.mjs} +1 -1
  194. package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
  195. package/dist/{web-assets-C2s9kzWf.mjs → web-assets-C1UmOyzD.mjs} +1 -1
  196. package/dist/web3-GnUocVYH.mjs +4 -0
  197. package/dist/workers-J1-PLwdl.mjs +28 -0
  198. package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-DCHmWOMS.mjs} +1 -1
  199. package/dist/{workflows-B-kGHxFu.mjs → workflows-CArfEI2c.mjs} +1 -1
  200. package/dist/zaraz-mg2YlR3_.mjs +2 -0
  201. package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DVdUPtj1.mjs} +67 -66
  202. package/dist/zone-DMAfrDJX.mjs +2 -0
  203. package/dist/zones-CNwxUi7I.mjs +21 -0
  204. package/package.json +10 -7
  205. package/dist/account-CYRm3yoN.mjs +0 -2
  206. package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
  207. package/dist/ai-audit-BWZGvbca.mjs +0 -2
  208. package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
  209. package/dist/ai-search-BmdskMjR.mjs +0 -7
  210. package/dist/ai-security-CsmfcaUx.mjs +0 -4
  211. package/dist/ai-viHB1tgI.mjs +0 -5
  212. package/dist/analytics-vOxw8Hy0.mjs +0 -3
  213. package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
  214. package/dist/argo-CQfCgazW.mjs +0 -2
  215. package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
  216. package/dist/auth-D0xZxAEa.mjs +0 -5
  217. package/dist/billing-aJgapeRm.mjs +0 -3
  218. package/dist/body-parser-C-c9gfH1.mjs +0 -2
  219. package/dist/bot-management-Y2q5d-pi.mjs +0 -5
  220. package/dist/botnet-feed-DANJqfmE.mjs +0 -3
  221. package/dist/brand-protection-CjpZWBjp.mjs +0 -3
  222. package/dist/browser-run-BFn9h2Tz.mjs +0 -4
  223. package/dist/build-DcflwvqN.mjs +0 -2
  224. package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
  225. package/dist/cf-C7DU4819.mjs +0 -18
  226. package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
  227. package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
  228. package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
  229. package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
  230. package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
  231. package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
  232. package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
  233. package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
  234. package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
  235. package/dist/custom-pages-M7jA2Hit.mjs +0 -3
  236. package/dist/d1-BFvMd6-S.mjs +0 -20
  237. package/dist/data-security-Bji4Or_j.mjs +0 -7
  238. package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
  239. package/dist/deploy-input-CrvuoDGJ.mjs +0 -242
  240. package/dist/dist-CgrMkXFx.mjs +0 -72
  241. package/dist/durable-objects-D8FQORrL.mjs +0 -2
  242. package/dist/email-auth-DJK0Eb30.mjs +0 -2
  243. package/dist/email-routing-NpmiKIrl.mjs +0 -6
  244. package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
  245. package/dist/email-sending-dn-353Nx.mjs +0 -7
  246. package/dist/fieldExtractors-ahysj57J.mjs +0 -3
  247. package/dist/flagship-BusjRNIb.mjs +0 -4
  248. package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
  249. package/dist/iam-Cj63Kjc6.mjs +0 -6
  250. package/dist/images-CBWXCDhy.mjs +0 -8
  251. package/dist/ips-qs9eGJnI.mjs +0 -2
  252. package/dist/keys-D7N0j4-x.mjs +0 -2
  253. package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
  254. package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
  255. package/dist/logo-matches-CJcthPHf.mjs +0 -2
  256. package/dist/logos-BS65zN8q.mjs +0 -3
  257. package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
  258. package/dist/magic-transit-BtsFePMx.mjs +0 -111
  259. package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
  260. package/dist/matches-InA1hwII.mjs +0 -2
  261. package/dist/mcp-mJ7bekNJ.mjs +0 -4
  262. package/dist/mesh-BK4S1Ezy.mjs +0 -4
  263. package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
  264. package/dist/oauth-B0ETkNcX.mjs +0 -15
  265. package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
  266. package/dist/observability-BWE0Gg3V.mjs +0 -4
  267. package/dist/organizations-DLhiRt8g.mjs +0 -2
  268. package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
  269. package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
  270. package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
  271. package/dist/page-rules-BSz1gO-_.mjs +0 -18
  272. package/dist/pages-DVDogxPs.mjs +0 -14
  273. package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
  274. package/dist/pipelines-BszRk4sM.mjs +0 -6
  275. package/dist/precursor-BPNjQr76.mjs +0 -4
  276. package/dist/progress-CsHIt3Tp.mjs +0 -2
  277. package/dist/prompt-DdegNPpg.mjs +0 -3
  278. package/dist/queries-JL1H1Biz.mjs +0 -3
  279. package/dist/queues-DpkYdRUE.mjs +0 -6
  280. package/dist/r2-CKozthw_.mjs +0 -24
  281. package/dist/radar-C-92vggG.mjs +0 -2
  282. package/dist/raw-fetch-CteyTOM2.mjs +0 -2
  283. package/dist/registrar-DKKN0M29.mjs +0 -21
  284. package/dist/reporting-fg_GKXe1.mjs +0 -2
  285. package/dist/request-tracers-CkMya96z.mjs +0 -2
  286. package/dist/resource-tagging-z48JGHCq.mjs +0 -2
  287. package/dist/rules-BTmNjDN-.mjs +0 -4
  288. package/dist/rulesets-CsoSM-17.mjs +0 -5
  289. package/dist/rum-DB4iO2q5.mjs +0 -4
  290. package/dist/schema-flags-iGoOriJt.mjs +0 -5
  291. package/dist/security-center-DFKeHq5c.mjs +0 -2
  292. package/dist/session-D6KHthHf.mjs +0 -2
  293. package/dist/shared-VppSAQf4.mjs +0 -2
  294. package/dist/smart-shield-D6X8L7p8.mjs +0 -4
  295. package/dist/snippets-DIpc9pb_.mjs +0 -4
  296. package/dist/src-D_HETJNy.mjs +0 -108
  297. package/dist/submit--xTzyNPy.mjs +0 -2
  298. package/dist/tags-efICDkah.mjs +0 -2
  299. package/dist/tenant-CerHuToJ.mjs +0 -2
  300. package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
  301. package/dist/triggers-BEsiiKAf.mjs +0 -2
  302. package/dist/tunnels-D0J8lJoI.mjs +0 -2
  303. package/dist/turnstile-CFmtY5bn.mjs +0 -23
  304. package/dist/url-info-DBCeRWwb.mjs +0 -2
  305. package/dist/url-scanner-CNyvg65L.mjs +0 -2
  306. package/dist/user-bifVEQq5.mjs +0 -12
  307. package/dist/values-OxkdP1tV.mjs +0 -2
  308. package/dist/versions-BVL-Ludh.mjs +0 -2
  309. package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
  310. package/dist/web3-y_cY91V_.mjs +0 -4
  311. package/dist/workers-jDcq14GH.mjs +0 -24
  312. package/dist/zaraz-27zwjLvv.mjs +0 -2
  313. package/dist/zone-BJix2KQ9.mjs +0 -2
  314. package/dist/zones-Bkj5i92c.mjs +0 -21
  315. /package/dist/{alerts-CRmjqOZi.mjs → alerts-15-IW4jE.mjs} +0 -0
  316. /package/dist/{autorag-BD7cu5NU.mjs → autorag-CFwRkEKw.mjs} +0 -0
  317. /package/dist/{brands-BhALBkX2.mjs → brands-BgT1vu9B.mjs} +0 -0
  318. /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
  319. /package/dist/{clear-BgF8No7D.mjs → clear-BlCK85Me.mjs} +0 -0
  320. /package/dist/{cli-types-BsTty22w.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
  321. /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-BbpcII3_.mjs} +0 -0
  322. /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-DuCiimXl.mjs} +0 -0
  323. /package/dist/{domain-info-C50W5GhA.mjs → domain-info-C7LBxPBt.mjs} +0 -0
  324. /package/dist/{health-BFNZqiAm.mjs → health-DZFfafkX.mjs} +0 -0
  325. /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
  326. /package/dist/{internal-BTeSewwB.mjs → internal-BKHC2D1Y.mjs} +0 -0
  327. /package/dist/{live-Dkiyu30_.mjs → live-DwCvDmaH.mjs} +0 -0
  328. /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
  329. /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
  330. /package/dist/{ready-TKOkKeRg.mjs → ready-D9H2zHHI.mjs} +0 -0
  331. /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
  332. /package/dist/{refute-BVz9nMyd.mjs → refute-2W8NLCN4.mjs} +0 -0
  333. /package/dist/{resolve-CeBbH6Pq.mjs → resolve-B8CyM1mi.mjs} +0 -0
  334. /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
  335. /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-CWhta3x7.mjs} +0 -0
  336. /package/dist/{search-DGNc37HK.mjs → search-DZmBQJL9.mjs} +0 -0
  337. /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-CQrmWgz5.mjs} +0 -0
  338. /package/dist/{submission-info-FjUolE6A.mjs → submission-info-C98A0bqq.mjs} +0 -0
  339. /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
  340. /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-BZoaFoDE.mjs} +0 -0
  341. /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
  342. /package/dist/{verify-DS1PWAJe.mjs → verify-4e4L9IRk.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";import{n as s}from"./input-validation-Bav2M9F-.mjs";import{n as c}from"./prompt-DdegNPpg.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.
2
+ import{h as e}from"./oauth-DuEONNgC.mjs";import{r as t}from"./auth-D3X9HYhD.mjs";import{t as n}from"./output-Ccqw2WOb.mjs";import{t as r}from"./dry-run-DL2V6yFm.mjs";import{t as i}from"./progress-BqQcF5QH.mjs";import{n as a,t as o}from"./body-parser-BshbixEq.mjs";import{n as s}from"./input-validation-QDIYu7Vb.mjs";import{n as c}from"./prompt-B0sWIs9c.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
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:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:l,handler:async c=>{if(c.dryRun){r({command:`cf rate-limits create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Creating`,async()=>l.rateLimits.create({...e,zone_id:u})),{successLabel:`Created`});return}if(c.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(c.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let d=o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold});n(await i(`Creating`,async()=>l.rateLimits.create({...d,zone_id:u})),{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})}const f={command:`delete <rate-limit-id>`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf rate-limits delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits/${a[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(a[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(a[`rate-limit-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await c({force:!!a.force})){process.stderr.write(`Aborted.
4
4
  `);return}n(await i(`Deleting`,async()=>o.rateLimits.delete({zone_id:s,rate_limit_id:a[`rate-limit-id`]})),{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
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:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:p,handler:async c=>{if(c.dryRun){r({command:`cf rate-limits edit`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/rate_limits/${c[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(c[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(c[`rate-limit-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.rateLimits.edit({...e,zone_id:u,rate_limit_id:c[`rate-limit-id`]})),{successLabel:`Updated`});return}if(c.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(c.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let d=o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold});n(await i(`Updating`,async()=>l.rateLimits.edit({...d,zone_id:u,rate_limit_id:c[`rate-limit-id`]})),{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:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf rate-limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits/${a[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(a[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(a[`rate-limit-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.rateLimits.get({zone_id:s,rate_limit_id:a[`rate-limit-id`]})),{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:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:_,handler:async a=>{let o={page:a.page,per_page:a[`per-page`]};if(a.dryRun){r({command:`cf rate-limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.rateLimits.list({zone_id:c,...o})),{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};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./sdk-ZctLa5jW.mjs";import{B as t}from"./dist-BWpErtDM.mjs";import{r as n}from"./local-Be3lg_9E.mjs";import{p as r}from"./oauth-DuEONNgC.mjs";import{i,s as a,t as o}from"./auth-D3X9HYhD.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...a()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await i()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";import{n as s,t as c}from"./body-parser-C-c9gfH1.mjs";import{n as l}from"./input-validation-Bav2M9F-.mjs";import{a as u,i as d,n as f}from"./prompt-DdegNPpg.mjs";import{t as p}from"./cli-types-BsTty22w.mjs";function m(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:m,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.daily.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},ee={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:te,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},_={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(g).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={command:`get <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:v,handler:async s=>{let c={start_date:s[`start-date`],end_date:s[`end-date`]};if(s.dryRun){a({command:`cf realtimekit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.usage.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},b={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create`,describe:`Create new app for your account`,builder:S,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}d.name===void 0&&(d.name=await u(`name`,`The name field`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.apps.create({...m,account_id:p})),{successLabel:`Created`})}};function w(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 T={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.apps.get({account_id:l,app_id:s[`app-id`]})),{successLabel:`Loaded`})}};function E(e){return e.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(`search`,{type:`string`,description:`Search string that matches apps by name.`}).option(`sort-order`,{type:`string`,description:`Sort order for apps by creation time.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Fetch all apps for your account`,builder:p(E),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],search:s.search,sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.apps.list({account_id:u,...c})),{successLabel:`Loaded`})}},O={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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 A={command:`get <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:k,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.get({account_id:u,app_id:s[`app-id`],livestream_id:s[`livestream-id`],...c})),{successLabel:`Loaded`})}};function j(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,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 M={command:`list`,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:p(j),handler:async s=>{let c={exclude_meetings:s[`exclude-meetings`],per_page:s[`per-page`],page_no:s[`page-no`],status:s.status,start_time:s[`start-time`],end_time:s[`end-time`],sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function N(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 P={command:`get <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:N,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/sessions/${s[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(s[`livestream-session-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-session-id":String(s[`livestream-session-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.get({account_id:l,app_id:s[`app-id`],"livestream-session-id":s[`livestream-session-id`]})),{successLabel:`Loaded`})}};function F(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 I={command:`list-active <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:F,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.listActive({account_id:l,app_id:s[`app-id`],livestream_id:s[`livestream-id`]})),{successLabel:`Loaded`})}},L={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(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(`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 z={command:`start <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:R,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit livestreams start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/livestreams`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let p=c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}});i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})}};function B(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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`stop <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:B,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation stops the active livestream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
2
+ import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u,i as d,n as f}from"./prompt-B0sWIs9c.mjs";import{t as p}from"./cli-types-DAYeL_Mj.mjs";function m(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:m,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.daily.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},ee={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:te,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},_={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(g).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={command:`get <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:v,handler:async s=>{let c={start_date:s[`start-date`],end_date:s[`end-date`]};if(s.dryRun){a({command:`cf realtimekit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.usage.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},b={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create`,describe:`Create new app for your account`,builder:S,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}d.name===void 0&&(d.name=await u(`name`,`The name field`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.apps.create({...m,account_id:p})),{successLabel:`Created`})}};function w(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 T={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.apps.get({account_id:l,app_id:s[`app-id`]})),{successLabel:`Loaded`})}};function E(e){return e.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(`search`,{type:`string`,description:`Search string that matches apps by name.`}).option(`sort-order`,{type:`string`,description:`Sort order for apps by creation time.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Fetch all apps for your account`,builder:p(E),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],search:s.search,sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.apps.list({account_id:u,...c})),{successLabel:`Loaded`})}},O={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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 A={command:`get <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:k,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.get({account_id:u,app_id:s[`app-id`],livestream_id:s[`livestream-id`],...c})),{successLabel:`Loaded`})}};function j(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,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 M={command:`list`,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:p(j),handler:async s=>{let c={exclude_meetings:s[`exclude-meetings`],per_page:s[`per-page`],page_no:s[`page-no`],status:s.status,start_time:s[`start-time`],end_time:s[`end-time`],sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function N(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 P={command:`get <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:N,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/sessions/${s[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(s[`livestream-session-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-session-id":String(s[`livestream-session-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.get({account_id:l,app_id:s[`app-id`],"livestream-session-id":s[`livestream-session-id`]})),{successLabel:`Loaded`})}};function F(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 I={command:`list-active <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:F,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.listActive({account_id:l,app_id:s[`app-id`],livestream_id:s[`livestream-id`]})),{successLabel:`Loaded`})}},L={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(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(`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 z={command:`start <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:R,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit livestreams start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/livestreams`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let p=c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}});i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})}};function B(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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`stop <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:B,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation stops the active livestream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
3
3
  `);return}i(await o(`Deleting`,async()=>c.realtimekit.livestreams.stop({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Deleted`})}},H={command:`livestreams`,describe:`Independent and meeting-based livestreams and their sessions`,builder:e=>e.command(A).command(M).command(z).command(V).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(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 W={command:`get <meeting-id>`,describe:`Returns details of an ongoing active session for the given meeting ID.`,builder:U,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings active get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-session`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.active.get({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Loaded`})}};function G(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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const K={command:`kick-all <meeting-id>`,describe:`Kicks all participants from an active session for the given meeting ID.`,builder:G,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings active kick-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-session/kick-all`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation disconnects every active participant immediately.`})){process.stderr.write(`Aborted.
4
4
  `);return}i(await o(`Deleting`,async()=>c.realtimekit.meetings.active.kickAll({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Deleted`})}};function q(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(`custom-participant-ids`,{type:`string`,array:!0,description:`The custom_participant_ids field`}).option(`participant-ids`,{type:`string`,array:!0,description:`The participant_ids field`}).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. At least one of `participant_ids` or `custom_participant_ids` must contain a value."})}const J={command:`kick <meeting-id>`,describe:`Kicks one or more participants from an active session using user ID or custom participant ID.`,builder:q,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active kick`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/kick`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.kick({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.kick({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};function Y(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(`allow-unmute`,{type:`boolean`,description:`if false, participants won't be able to unmute themselves after they are muted`,default:!1}).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 X={command:`mute-all <meeting-id>`,describe:`Mutes all participants of an active session for the given meeting ID.`,builder:Y,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active mute-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/mute-all`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({allow_unmute:l[`allow-unmute`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.muteAll({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({allow_unmute:l[`allow-unmute`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.muteAll({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};function Z(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(`custom-participant-ids`,{type:`string`,array:!0,description:`The custom_participant_ids field`}).option(`participant-ids`,{type:`string`,array:!0,description:`The participant_ids field`}).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 participants in an active session. At least one of `participant_ids` or `custom_participant_ids` must contain a value."})}const Q={command:`mute <meeting-id>`,describe:`Mutes one or more participants from an active session using user ID or custom participant ID.`,builder:Z,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active mute`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/mute`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.mute({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.mute({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};function ne(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(`anonymous`,{type:`boolean`,description:`if voters on a poll are anonymous`}).option(`hide-votes`,{type:`boolean`,description:`if votes on an option are visible before a person votes`}).option(`options`,{type:`string`,array:!0,description:`Different options for the question`}).option(`question`,{type:`string`,description:`Question of the poll`}).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 re={command:`create <meeting-id>`,describe:`Creates a new poll in an active session for the given meeting ID.`,builder:ne,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings active polls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/active-session/poll`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({anonymous:d.anonymous,hide_votes:d[`hide-votes`],options:d.options,question:l(d.question,`question`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.meetings.active.polls.create({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}if(d.options===void 0)throw Error(`--options is required (or pass --body with this field set).`);d.question===void 0&&(d.question=await u(`question`,`Question of the poll`));let m=c({anonymous:d.anonymous,hide_votes:d[`hide-votes`],options:d.options,question:l(d.question,`question`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.meetings.active.polls.create({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})}},ie={command:`polls`,describe:`Polls for active meeting sessions`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`active`,describe:`Live meeting state and participant controls`,builder:e=>e.command(W).command(J).command(K).command(Q).command(X).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`,default:!1}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space.`,default:!1}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`,default:!1}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`,default:60}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`,default:!1}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const se={command:`create <app-id>`,describe:`Create a meeting for the given App ID.`,builder:oe,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings`,pathParams:{"app-id":String(u[`app-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.meetings.create({...e,account_id:f,app_id:u[`app-id`]})),{successLabel:`Created`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Creating`,async()=>d.realtimekit.meetings.create({...p,account_id:f,app_id:u[`app-id`]})),{successLabel:`Created`})}};function ce(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(`name`,{type:`string`,description:`Name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <meeting-id>`,describe:`Returns a meeting details in an App for the given meeting ID.`,builder:ce,handler:async s=>{let c={name:s.name};if(s.dryRun){a({command:`cf realtimekit meetings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.get({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function ue(e){return e.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(`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(`status`,{type:`string`,description:`Filter meetings by status.`,choices:[`ACTIVE`,`INACTIVE`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`Returns all meetings for the given App ID.`,builder:p(ue),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],start_time:s[`start-time`],end_time:s[`end-time`],search:s.search,status:s.status};if(s.dryRun){a({command:`cf realtimekit meetings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function fe(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(`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 pe={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:fe,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit meetings livestream get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/livestream`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.livestream.get({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function me(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 he={command:`list-active <meeting-id>`,describe:`Returns details of all active livestreams for the given meeting ID.`,builder:me,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings livestream list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.livestream.listActive({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Loaded`})}},ge={command:`livestream`,describe:`Livestream operations associated with RealtimeKit meetings`,builder:e=>e.command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(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(`custom-participant-id`,{type:`string`,description:`A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. `}).option(`name`,{type:`string`,description:`(Optional) Name of the participant. `}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant. `}).option(`preset-name`,{type:`string`,description:`Name of the preset to apply to this participant.`,default:`group_call_host`}).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 ve={command:`create <meeting-id>`,describe:`Adds a participant to the given meeting ID.`,builder:_e,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings participants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/participants`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.meetings.participants.create({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}d[`custom-participant-id`]===void 0&&(d[`custom-participant-id`]=await u(`custom-participant-id`,`A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. `)),d[`preset-name`]===void 0&&(d[`preset-name`]=await u(`preset-name`,`Name of the preset to apply to this participant.`));let m=c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.meetings.participants.create({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})}};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:`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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const be={command:`delete <participant-id>`,describe:`Deletes a participant for the given meeting and participant ID.`,builder:ye,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation removes the participant from the meeting and revokes their authentication token.`})){process.stderr.write(`Aborted.
5
5
  `);return}i(await o(`Deleting`,async()=>c.realtimekit.meetings.participants.delete({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Deleted`})}};function xe(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 Se={command:`get <participant-id>`,describe:`Returns a participant details for the given meeting and participant ID.`,builder:xe,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.participants.get({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Loaded`})}};function Ce(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,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 we={command:`list`,describe:`Returns all participants detail for the given meeting ID.`,builder:Ce,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit meetings participants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.participants.list({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function Te(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(`custom-participant-id`,{type:`string`,description:`Unique participant ID accepted by the replace participant API.`}).option(`name`,{type:`string`,description:`(Optional) Name of the participant.`}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant.`}).option(`preset-name`,{type:`string`,description:`Name of the preset to apply to this participant.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ee={command:`replace <participant-id>`,describe:`Replaces a participant's details for the given meeting and participant ID.`,builder:Te,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings participants replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/participants/${d[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(d[`participant-id`]))}`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``),"participant-id":String(d[`participant-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.realtimekit.meetings.participants.replace({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`});return}d[`custom-participant-id`]===void 0&&(d[`custom-participant-id`]=await u(`custom-participant-id`,`Unique participant ID accepted by the replace participant API.`)),d[`preset-name`]===void 0&&(d[`preset-name`]=await u(`preset-name`,`Name of the preset to apply to this participant.`));let m=c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>f.realtimekit.meetings.participants.replace({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`})}};function De(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 Oe={command:`refresh <participant-id>`,describe:`Regenerates participant's authentication token for the given meeting and participant ID.`,builder:De,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants tokens refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}/token`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Creating`,async()=>c.realtimekit.meetings.participants.tokens.refresh({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Created`})}},ke={command:`tokens`,describe:`Access tokens for RealtimeKit meeting participants`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(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(`name`,{type:`string`,description:`(Optional) Name of the participant.`}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant.`}).option(`preset-name`,{type:`string`,description:`(Optional) Name of the preset to apply to this participant.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const je={command:`update <participant-id>`,describe:`Updates a participant's details for the given meeting and participant ID.`,builder:Ae,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings participants update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/participants/${u[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(u[`participant-id`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``),"participant-id":String(u[`participant-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),picture:l(u.picture,`picture`,`text`),preset_name:l(u[`preset-name`],`preset-name`,`text`)}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.participants.update({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`],participant_id:u[`participant-id`]})),{successLabel:`Updated`});return}let p=c({name:l(u.name,`name`,`text`),picture:l(u.picture,`picture`,`text`),preset_name:l(u[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>d.realtimekit.meetings.participants.update({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`],participant_id:u[`participant-id`]})),{successLabel:`Updated`})}},Me={command:`participants`,describe:`Participants in RealtimeKit meetings`,builder:e=>e.command(ve).command(be).command(Se).command(we).command(Ee).command(je).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};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:`The app identifier tag.`,demandOption:!0}).option(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space.`}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const Pe={command:`replace <meeting-id>`,describe:`Replaces all the details for the given meeting ID.`,builder:Ne,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.replace({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Updating`,async()=>d.realtimekit.meetings.replace({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`})}};function Fe(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(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space.`}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`}).option(`status`,{type:`string`,description:"Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting.",choices:[`ACTIVE`,`INACTIVE`]}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const Ie={command:`update <meeting-id>`,describe:`Updates a meeting in an App for the given meeting ID.`,builder:Fe,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],status:l(u.status,`status`,`text`),summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.update({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],status:l(u.status,`status`,`text`),summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Updating`,async()=>d.realtimekit.meetings.update({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`})}},Le={command:`meetings`,describe:`Meetings, participants, access tokens, and meeting livestreams`,builder:e=>e.command(se).command(le).command(de).command(Pe).command(Ie).command(ae).command(ge).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`config-livestream-viewer-qualities`,{type:`string`,array:!0,description:`Livestream viewer quality levels.`}).option(`config-max-screenshare-count`,{type:`number`,description:`Maximum number of screen shares that can be active at a given time`}).option(`config-max-video-streams-desktop`,{type:`number`,description:`Maximum number of video streams visible on desktop devices`}).option(`config-max-video-streams-mobile`,{type:`number`,description:`Maximum number of streams visible on mobile devices`}).option(`config-media-audio-enable-high-bitrate`,{type:`boolean`,description:`Enable High Quality Audio for your meetings`}).option(`config-media-audio-enable-stereo`,{type:`boolean`,description:`Enable Stereo for your meetings`}).option(`config-media-screenshare-frame-rate`,{type:`number`,description:`Frame rate of screen share`}).option(`config-media-screenshare-quality`,{type:`string`,description:`Quality of screen share `,choices:[`hd`,`vga`,`qvga`,`fhd`,`uhd`]}).option(`config-media-video-frame-rate`,{type:`number`,description:`Frame rate of participants' video`}).option(`config-media-video-quality`,{type:`string`,description:`Video quality of participants`,choices:[`hd`,`vga`,`qvga`,`fhd`,`uhd`]}).option(`config-media-video-simulcast`,{type:`boolean`,description:`Enable simulcast for participant videos.`,default:!1}).option(`config-view-type`,{type:`string`,description:`Type of the meeting`,choices:[`GROUP_CALL`,`WEBINAR`,`AUDIO_ROOM`,`LIVESTREAM`]}).option(`name`,{type:`string`,description:`Name of the preset`}).option(`permissions-accept-stage-requests`,{type:`boolean`,description:`The permissions.accept_stage_requests field`}).option(`permissions-accept-waiting-requests`,{type:`boolean`,description:`Whether this participant can accept waiting requests`}).option(`permissions-can-accept-production-requests`,{type:`boolean`,description:`The permissions.can_accept_production_requests field`}).option(`permissions-can-change-participant-permissions`,{type:`boolean`,description:`The permissions.can_change_participant_permissions field`}).option(`permissions-can-edit-display-name`,{type:`boolean`,description:`The permissions.can_edit_display_name field`}).option(`permissions-can-livestream`,{type:`boolean`,description:`The permissions.can_livestream field`}).option(`permissions-can-record`,{type:`boolean`,description:`The permissions.can_record field`}).option(`permissions-can-spotlight`,{type:`boolean`,description:`The permissions.can_spotlight field`}).option(`permissions-chat-private-can-receive`,{type:`boolean`,description:`The permissions.chat.private.can_receive field`}).option(`permissions-chat-private-can-send`,{type:`boolean`,description:`The permissions.chat.private.can_send field`}).option(`permissions-chat-private-files`,{type:`boolean`,description:`The permissions.chat.private.files field`}).option(`permissions-chat-private-text`,{type:`boolean`,description:`The permissions.chat.private.text field`}).option(`permissions-chat-public-can-send`,{type:`boolean`,description:`Can send messages in general`}).option(`permissions-chat-public-files`,{type:`boolean`,description:`Can send file messages`}).option(`permissions-chat-public-text`,{type:`boolean`,description:`Can send text messages`}).option(`permissions-connected-meetings-can-alter-connected-meetings`,{type:`boolean`,description:`The permissions.connected_meetings.can_alter_connected_meetings field`}).option(`permissions-connected-meetings-can-switch-connected-meetings`,{type:`boolean`,description:`The permissions.connected_meetings.can_switch_connected_meetings field`}).option(`permissions-connected-meetings-can-switch-to-parent-meeting`,{type:`boolean`,description:`The permissions.connected_meetings.can_switch_to_parent_meeting field`}).option(`permissions-disable-participant-audio`,{type:`boolean`,description:`The permissions.disable_participant_audio field`}).option(`permissions-disable-participant-screensharing`,{type:`boolean`,description:`The permissions.disable_participant_screensharing field`}).option(`permissions-disable-participant-video`,{type:`boolean`,description:`The permissions.disable_participant_video field`}).option(`permissions-hidden-participant`,{type:`boolean`,description:`Whether this participant is visible to others or not`}).option(`permissions-is-recorder`,{type:`boolean`,description:`The permissions.is_recorder field`}).option(`permissions-kick-participant`,{type:`boolean`,description:`The permissions.kick_participant field`}).option(`permissions-media-audio-can-produce`,{type:`string`,description:`Can produce audio`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-media-screenshare-can-produce`,{type:`string`,description:`Can produce screen share video`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-media-video-can-produce`,{type:`string`,description:`Can produce video`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-pin-participant`,{type:`boolean`,description:`The permissions.pin_participant field`}).option(`permissions-plugins-can-close`,{type:`boolean`,description:`Can close plugins that are already open`}).option(`permissions-plugins-can-edit-config`,{type:`boolean`,description:`Can edit plugin config`}).option(`permissions-plugins-can-start`,{type:`boolean`,description:`Can start plugins`}).option(`permissions-polls-can-create`,{type:`boolean`,description:`Can create polls`}).option(`permissions-polls-can-view`,{type:`boolean`,description:`Can view polls`}).option(`permissions-polls-can-vote`,{type:`boolean`,description:`Can vote on polls`}).option(`permissions-recorder-type`,{type:`string`,description:`Type of the recording peer`,choices:[`RECORDER`,`LIVESTREAMER`,`NONE`]}).option(`permissions-show-participant-list`,{type:`boolean`,description:`The permissions.show_participant_list field`}).option(`permissions-stage-access`,{type:`string`,description:`The permissions.stage_access field`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-stage-enabled`,{type:`boolean`,description:`The permissions.stage_enabled field`}).option(`permissions-transcription-enabled`,{type:`boolean`,description:`The permissions.transcription_enabled field`}).option(`permissions-waiting-room-type`,{type:`string`,description:`Waiting room type`,choices:[`SKIP`,`ON_PRIVILEGED_USER_ENTRY`,`SKIP_ON_ACCEPT`]}).option(`ui-design-tokens-border-radius`,{type:`string`,description:`The ui.design_tokens.border_radius field`,choices:[`sharp`,`rounded`,`extra-rounded`,`circular`]}).option(`ui-design-tokens-border-width`,{type:`string`,description:`The ui.design_tokens.border_width field`,choices:[`none`,`thin`,`fat`]}).option(`ui-design-tokens-colors-danger`,{type:`string`,description:`The ui.design_tokens.colors.danger field`}).option(`ui-design-tokens-colors-success`,{type:`string`,description:`The ui.design_tokens.colors.success field`}).option(`ui-design-tokens-colors-text`,{type:`string`,description:`The ui.design_tokens.colors.text field`}).option(`ui-design-tokens-colors-text-on-brand`,{type:`string`,description:`The ui.design_tokens.colors.text_on_brand field`}).option(`ui-design-tokens-colors-video-bg`,{type:`string`,description:`The ui.design_tokens.colors.video_bg field`}).option(`ui-design-tokens-colors-warning`,{type:`string`,description:`The ui.design_tokens.colors.warning field`}).option(`ui-design-tokens-font-family`,{type:`string`,description:`The ui.design_tokens.font_family field`}).option(`ui-design-tokens-google-font`,{type:`string`,description:`The ui.design_tokens.google_font field`}).option(`ui-design-tokens-logo`,{type:`string`,description:`The ui.design_tokens.logo field`}).option(`ui-design-tokens-spacing-base`,{type:`number`,description:`The ui.design_tokens.spacing_base field`}).option(`ui-design-tokens-theme`,{type:`string`,description:`The ui.design_tokens.theme field`,choices:[`darkest`,`dark`,`light`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create <app-id>`,describe:`Creates a preset belonging to the current App`,builder:Re,handler:async f=>{if(f.dryRun){a({command:`cf realtimekit presets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${f[`app-id`]==null?`<app-id>`:encodeURIComponent(String(f[`app-id`]))}/presets`,pathParams:{"app-id":String(f[`app-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({config:{livestream_viewer_qualities:f[`config-livestream-viewer-qualities`],max_screenshare_count:f[`config-max-screenshare-count`],max_video_streams:{desktop:f[`config-max-video-streams-desktop`],mobile:f[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:f[`config-media-audio-enable-high-bitrate`],enable_stereo:f[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:f[`config-media-screenshare-frame-rate`],quality:l(f[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:f[`config-media-video-frame-rate`],quality:l(f[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:f[`config-media-video-simulcast`]}},view_type:l(f[`config-view-type`],`config-view-type`,`text`)},name:l(f.name,`name`,`text`),permissions:{accept_stage_requests:f[`permissions-accept-stage-requests`],accept_waiting_requests:f[`permissions-accept-waiting-requests`],can_accept_production_requests:f[`permissions-can-accept-production-requests`],can_change_participant_permissions:f[`permissions-can-change-participant-permissions`],can_edit_display_name:f[`permissions-can-edit-display-name`],can_livestream:f[`permissions-can-livestream`],can_record:f[`permissions-can-record`],can_spotlight:f[`permissions-can-spotlight`],chat:{private:{can_receive:f[`permissions-chat-private-can-receive`],can_send:f[`permissions-chat-private-can-send`],files:f[`permissions-chat-private-files`],text:f[`permissions-chat-private-text`]},public:{can_send:f[`permissions-chat-public-can-send`],files:f[`permissions-chat-public-files`],text:f[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:f[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:f[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:f[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:f[`permissions-disable-participant-audio`],disable_participant_screensharing:f[`permissions-disable-participant-screensharing`],disable_participant_video:f[`permissions-disable-participant-video`],hidden_participant:f[`permissions-hidden-participant`],is_recorder:f[`permissions-is-recorder`],kick_participant:f[`permissions-kick-participant`],media:{audio:{can_produce:l(f[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:l(f[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:l(f[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:f[`permissions-pin-participant`],plugins:{can_close:f[`permissions-plugins-can-close`],can_edit_config:f[`permissions-plugins-can-edit-config`],can_start:f[`permissions-plugins-can-start`]},polls:{can_create:f[`permissions-polls-can-create`],can_view:f[`permissions-polls-can-view`],can_vote:f[`permissions-polls-can-vote`]},recorder_type:l(f[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:f[`permissions-show-participant-list`],stage_access:l(f[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:f[`permissions-stage-enabled`],transcription_enabled:f[`permissions-transcription-enabled`],waiting_room_type:l(f[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:l(f[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:l(f[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:l(f[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:l(f[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:l(f[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:l(f[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:l(f[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:l(f[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:l(f[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:l(f[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:l(f[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:f[`ui-design-tokens-spacing-base`],theme:l(f[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.realtimekit.presets.create({body:e,account_id:m,app_id:f[`app-id`]})),{successLabel:`Created`});return}if(f[`config-max-screenshare-count`]===void 0)throw Error(`--config-max-screenshare-count is required (or pass --body with this field set).`);if(f[`config-max-video-streams-desktop`]===void 0)throw Error(`--config-max-video-streams-desktop is required (or pass --body with this field set).`);if(f[`config-max-video-streams-mobile`]===void 0)throw Error(`--config-max-video-streams-mobile is required (or pass --body with this field set).`);if(f[`config-media-screenshare-frame-rate`]===void 0)throw Error(`--config-media-screenshare-frame-rate is required (or pass --body with this field set).`);if(f[`config-media-screenshare-quality`]===void 0&&(f[`config-media-screenshare-quality`]=await d(`config-media-screenshare-quality`,`Quality of screen share `,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),f[`config-media-video-frame-rate`]===void 0)throw Error(`--config-media-video-frame-rate is required (or pass --body with this field set).`);if(f[`config-media-video-quality`]===void 0&&(f[`config-media-video-quality`]=await d(`config-media-video-quality`,`Video quality of participants`,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),f[`config-view-type`]===void 0&&(f[`config-view-type`]=await d(`config-view-type`,`Type of the meeting`,[`GROUP_CALL`,`WEBINAR`,`AUDIO_ROOM`,`LIVESTREAM`])),f.name===void 0&&(f.name=await u(`name`,`Name of the preset`)),f[`permissions-accept-waiting-requests`]===void 0)throw Error(`--permissions-accept-waiting-requests is required (or pass --body with this field set).`);if(f[`permissions-can-accept-production-requests`]===void 0)throw Error(`--permissions-can-accept-production-requests is required (or pass --body with this field set).`);if(f[`permissions-can-change-participant-permissions`]===void 0)throw Error(`--permissions-can-change-participant-permissions is required (or pass --body with this field set).`);if(f[`permissions-can-edit-display-name`]===void 0)throw Error(`--permissions-can-edit-display-name is required (or pass --body with this field set).`);if(f[`permissions-can-livestream`]===void 0)throw Error(`--permissions-can-livestream is required (or pass --body with this field set).`);if(f[`permissions-can-record`]===void 0)throw Error(`--permissions-can-record is required (or pass --body with this field set).`);if(f[`permissions-can-spotlight`]===void 0)throw Error(`--permissions-can-spotlight is required (or pass --body with this field set).`);if(f[`permissions-chat-private-can-receive`]===void 0)throw Error(`--permissions-chat-private-can-receive is required (or pass --body with this field set).`);if(f[`permissions-chat-private-can-send`]===void 0)throw Error(`--permissions-chat-private-can-send is required (or pass --body with this field set).`);if(f[`permissions-chat-private-files`]===void 0)throw Error(`--permissions-chat-private-files is required (or pass --body with this field set).`);if(f[`permissions-chat-private-text`]===void 0)throw Error(`--permissions-chat-private-text is required (or pass --body with this field set).`);if(f[`permissions-chat-public-can-send`]===void 0)throw Error(`--permissions-chat-public-can-send is required (or pass --body with this field set).`);if(f[`permissions-chat-public-files`]===void 0)throw Error(`--permissions-chat-public-files is required (or pass --body with this field set).`);if(f[`permissions-chat-public-text`]===void 0)throw Error(`--permissions-chat-public-text is required (or pass --body with this field set).`);if(f[`permissions-connected-meetings-can-alter-connected-meetings`]===void 0)throw Error(`--permissions-connected-meetings-can-alter-connected-meetings is required (or pass --body with this field set).`);if(f[`permissions-connected-meetings-can-switch-connected-meetings`]===void 0)throw Error(`--permissions-connected-meetings-can-switch-connected-meetings is required (or pass --body with this field set).`);if(f[`permissions-connected-meetings-can-switch-to-parent-meeting`]===void 0)throw Error(`--permissions-connected-meetings-can-switch-to-parent-meeting is required (or pass --body with this field set).`);if(f[`permissions-disable-participant-audio`]===void 0)throw Error(`--permissions-disable-participant-audio is required (or pass --body with this field set).`);if(f[`permissions-disable-participant-screensharing`]===void 0)throw Error(`--permissions-disable-participant-screensharing is required (or pass --body with this field set).`);if(f[`permissions-disable-participant-video`]===void 0)throw Error(`--permissions-disable-participant-video is required (or pass --body with this field set).`);if(f[`permissions-hidden-participant`]===void 0)throw Error(`--permissions-hidden-participant is required (or pass --body with this field set).`);if(f[`permissions-kick-participant`]===void 0)throw Error(`--permissions-kick-participant is required (or pass --body with this field set).`);if(f[`permissions-media-audio-can-produce`]===void 0&&(f[`permissions-media-audio-can-produce`]=await d(`permissions-media-audio-can-produce`,`Can produce audio`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-media-screenshare-can-produce`]===void 0&&(f[`permissions-media-screenshare-can-produce`]=await d(`permissions-media-screenshare-can-produce`,`Can produce screen share video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-media-video-can-produce`]===void 0&&(f[`permissions-media-video-can-produce`]=await d(`permissions-media-video-can-produce`,`Can produce video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-pin-participant`]===void 0)throw Error(`--permissions-pin-participant is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-close`]===void 0)throw Error(`--permissions-plugins-can-close is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-edit-config`]===void 0)throw Error(`--permissions-plugins-can-edit-config is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-start`]===void 0)throw Error(`--permissions-plugins-can-start is required (or pass --body with this field set).`);if(f[`permissions-polls-can-create`]===void 0)throw Error(`--permissions-polls-can-create is required (or pass --body with this field set).`);if(f[`permissions-polls-can-view`]===void 0)throw Error(`--permissions-polls-can-view is required (or pass --body with this field set).`);if(f[`permissions-polls-can-vote`]===void 0)throw Error(`--permissions-polls-can-vote is required (or pass --body with this field set).`);if(f[`permissions-recorder-type`]===void 0&&(f[`permissions-recorder-type`]=await d(`permissions-recorder-type`,`Type of the recording peer`,[`RECORDER`,`LIVESTREAMER`,`NONE`])),f[`permissions-show-participant-list`]===void 0)throw Error(`--permissions-show-participant-list is required (or pass --body with this field set).`);if(f[`permissions-waiting-room-type`]===void 0&&(f[`permissions-waiting-room-type`]=await d(`permissions-waiting-room-type`,`Waiting room type`,[`SKIP`,`ON_PRIVILEGED_USER_ENTRY`,`SKIP_ON_ACCEPT`])),f[`ui-design-tokens-border-radius`]===void 0&&(f[`ui-design-tokens-border-radius`]=await d(`ui-design-tokens-border-radius`,`The ui.design_tokens.border_radius field`,[`sharp`,`rounded`,`extra-rounded`,`circular`])),f[`ui-design-tokens-border-width`]===void 0&&(f[`ui-design-tokens-border-width`]=await d(`ui-design-tokens-border-width`,`The ui.design_tokens.border_width field`,[`none`,`thin`,`fat`])),f[`ui-design-tokens-colors-danger`]===void 0&&(f[`ui-design-tokens-colors-danger`]=await u(`ui-design-tokens-colors-danger`,`The ui.design_tokens.colors.danger field`)),f[`ui-design-tokens-colors-success`]===void 0&&(f[`ui-design-tokens-colors-success`]=await u(`ui-design-tokens-colors-success`,`The ui.design_tokens.colors.success field`)),f[`ui-design-tokens-colors-text`]===void 0&&(f[`ui-design-tokens-colors-text`]=await u(`ui-design-tokens-colors-text`,`The ui.design_tokens.colors.text field`)),f[`ui-design-tokens-colors-text-on-brand`]===void 0&&(f[`ui-design-tokens-colors-text-on-brand`]=await u(`ui-design-tokens-colors-text-on-brand`,`The ui.design_tokens.colors.text_on_brand field`)),f[`ui-design-tokens-colors-video-bg`]===void 0&&(f[`ui-design-tokens-colors-video-bg`]=await u(`ui-design-tokens-colors-video-bg`,`The ui.design_tokens.colors.video_bg field`)),f[`ui-design-tokens-colors-warning`]===void 0&&(f[`ui-design-tokens-colors-warning`]=await u(`ui-design-tokens-colors-warning`,`The ui.design_tokens.colors.warning field`)),f[`ui-design-tokens-spacing-base`]===void 0)throw Error(`--ui-design-tokens-spacing-base is required (or pass --body with this field set).`);f[`ui-design-tokens-theme`]===void 0&&(f[`ui-design-tokens-theme`]=await d(`ui-design-tokens-theme`,`The ui.design_tokens.theme field`,[`darkest`,`dark`,`light`]));let h=c({config:{livestream_viewer_qualities:f[`config-livestream-viewer-qualities`],max_screenshare_count:f[`config-max-screenshare-count`],max_video_streams:{desktop:f[`config-max-video-streams-desktop`],mobile:f[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:f[`config-media-audio-enable-high-bitrate`],enable_stereo:f[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:f[`config-media-screenshare-frame-rate`],quality:l(f[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:f[`config-media-video-frame-rate`],quality:l(f[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:f[`config-media-video-simulcast`]}},view_type:l(f[`config-view-type`],`config-view-type`,`text`)},name:l(f.name,`name`,`text`),permissions:{accept_stage_requests:f[`permissions-accept-stage-requests`],accept_waiting_requests:f[`permissions-accept-waiting-requests`],can_accept_production_requests:f[`permissions-can-accept-production-requests`],can_change_participant_permissions:f[`permissions-can-change-participant-permissions`],can_edit_display_name:f[`permissions-can-edit-display-name`],can_livestream:f[`permissions-can-livestream`],can_record:f[`permissions-can-record`],can_spotlight:f[`permissions-can-spotlight`],chat:{private:{can_receive:f[`permissions-chat-private-can-receive`],can_send:f[`permissions-chat-private-can-send`],files:f[`permissions-chat-private-files`],text:f[`permissions-chat-private-text`]},public:{can_send:f[`permissions-chat-public-can-send`],files:f[`permissions-chat-public-files`],text:f[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:f[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:f[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:f[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:f[`permissions-disable-participant-audio`],disable_participant_screensharing:f[`permissions-disable-participant-screensharing`],disable_participant_video:f[`permissions-disable-participant-video`],hidden_participant:f[`permissions-hidden-participant`],is_recorder:f[`permissions-is-recorder`],kick_participant:f[`permissions-kick-participant`],media:{audio:{can_produce:l(f[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:l(f[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:l(f[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:f[`permissions-pin-participant`],plugins:{can_close:f[`permissions-plugins-can-close`],can_edit_config:f[`permissions-plugins-can-edit-config`],can_start:f[`permissions-plugins-can-start`]},polls:{can_create:f[`permissions-polls-can-create`],can_view:f[`permissions-polls-can-view`],can_vote:f[`permissions-polls-can-vote`]},recorder_type:l(f[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:f[`permissions-show-participant-list`],stage_access:l(f[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:f[`permissions-stage-enabled`],transcription_enabled:f[`permissions-transcription-enabled`],waiting_room_type:l(f[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:l(f[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:l(f[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:l(f[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:l(f[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:l(f[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:l(f[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:l(f[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:l(f[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:l(f[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:l(f[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:l(f[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:f[`ui-design-tokens-spacing-base`],theme:l(f[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}});i(await o(`Creating`,async()=>p.realtimekit.presets.create({body:h,account_id:m,app_id:f[`app-id`]})),{successLabel:`Created`})}};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}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ve={command:`delete <preset-id>`,describe:`Deletes a preset using the provided preset ID`,builder:Be,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit presets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/presets/${s[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(s[`preset-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"preset-id":String(s[`preset-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation permanently deletes the preset.`})){process.stderr.write(`Aborted.
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ import{a as e}from"./theme-CrIBazAF.mjs";import{n as t,t as n}from"./local-Be3lg_9E.mjs";import{f as r,g as i}from"./oauth-DuEONNgC.mjs";import{a,o,r as s}from"./auth-D3X9HYhD.mjs";import{t as c}from"./output-Ccqw2WOb.mjs";import{t as l}from"./dry-run-DL2V6yFm.mjs";import{t as u}from"./progress-BqQcF5QH.mjs";import{i as d,n as f,t as p}from"./body-parser-BshbixEq.mjs";import{n as m}from"./input-validation-QDIYu7Vb.mjs";import{a as h,i as g,n as ee,o as _,r as v}from"./prompt-B0sWIs9c.mjs";import{t as y}from"./cli-types-DAYeL_Mj.mjs";import{_ as b,a as x,c as S,d as C,g as w,h as T,i as E,m as D,o as O,p as k,r as A,s as j,t as te,u as ne}from"./schema-flags-llLJuFFw.mjs";import{isDeepStrictEqual as re}from"node:util";import{domainToASCII as ie}from"node:url";function ae(e){return e.positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <extension>`,describe:"Returns metadata and JSON Schema documents describing the expected input structure for registration operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.",builder:ae,handler:async e=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})}};function se(e){return e.option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
3
+ Pass this value to fetch the next page of results. Omit (or
4
+ 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 `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:"Returns metadata and JSON Schema documents describing the expected input structure for registration operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name 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. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.",builder:y(se),handler:async e=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})}},le={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(oe).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function M(e,t,n){let r=_(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,domains:[n]})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${_(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const N=`registrar-extension-schema`;function ue(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function de(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:D(e)}}let a=T(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function P(e,t,n,r,i){let a=t?[t]:ue(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=w(N,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:D(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await de(e,n,o,a);if(c.ok)return b(N,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const fe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),pe={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function F(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function me(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function I(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function L(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function he(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=L(n,e),i=I(t),a=F(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&C(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function ge(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:F(pe,n)??me(n)).join(` · `)}function R(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&fe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...R(a,t,e));continue}let o=L(t,e);r.push([ge(e,o),he(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function z(e,t,n){if(Object.hasOwn(e,n))return I(e[n]);let r=_e(t,n);return r===void 0?`API default`:`${I(r)} (default)`}function B(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(B)]}function V(e,t){return e===void 0?[]:[...B(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>V(e,t))]}function _e(e,t){let n=V(e,t),r=n[0];return n.length>0&&n.every(e=>re(e,r))?r:void 0}function H(t){let n=t.map(([e,t])=>[_(e),_(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function ve(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,z(t.body,t.schema,`auto_renew`)],[`Privacy mode`,z(t.body,t.schema,`privacy_mode`)]],r=R(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...H(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...H(r)]:[],`│`].join(`
5
+ `)}const U=[`domain_name`],W=`Fully qualified domain name to register, e.g. example.travel`,G=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function ye(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function be(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function xe(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function Se(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:_(n);return{path:ye(e.path),flag:`--${e.name}`,question:j(e),description:r,choices:xe(e)?.map(t=>{let n=String(t);return{value:t,label:_(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function K(e,t,n,r,i){let a=x(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Se),validationErrors:i}),!0)}function q(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ce(e,t){let n=q(e.registration_cost),r=q(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function we(e,t){let n=Ce(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&A(e.if)&&C(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(A)?a.filter(e=>Oe(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Te(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=Te(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function Ee(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Te(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function De(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:Ee(t)})))}function Oe(e,t,n,r){let i=C(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>C(e,{...n,[t]:r}).length===0)}function ke(e,t){let n=Object.hasOwn(e,`years`),r=Y(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Z),a=Y(t,`years`,e,!0,n?[]:De(i).flatMap(({schema:e,candidate:t})=>t.found&&C(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Z),s=o,c,l;if(n)l=e.years;else{let n=De(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=C(e,t.value);return n===void 0?!0:(c??=n,!1)});if(A(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&C(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?C(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>C(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let Ae;function $(e){let t=m(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function je(e){return Ae=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function Me(t){Ae?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=_(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+k,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await P(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${O(S(c.schema,{exclude:[U]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${_(c.reason)}.`)}`)}async function Ne(e,t,n){for(;;){let r=E(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=j(e);if(e.type===`boolean`&&e.schema.const===!0){let r=_(e.schema.description??n);if(!await v(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await g(e.name,r,e.choices,e.choiceLabels):t[e.name]=await h(e.name,r,{validate:t=>ne(e,t)})}}}function Pe(e){let t=f(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Fe(e){let t;if(e.startsWith(`@`))t=m(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}const Ie={command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:je,handler:async e=>{if(e.help){await Me(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=te([],e,{reserved:G}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);o=Pe(e.body)}let d=e.contacts===void 0?void 0:Fe(e.contacts),f=$(e[`domain-name`]),p=o?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${_(f)}' does not match --body domain_name '${_(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:W}],validationErrors:["`/domain_name` is required"]});return}m=await h(`domain-name`,W)}let g=_(m);o&&(o.domain_name=m);let v=e.dryRun?await i()??`<account-id>`:await r(),y,b=async()=>(y||=await s(e),y);e.dryRun||await M(await b(),v,m);let x=await P(m,e.extension,v,b);if(!x.ok)throw Error(`Could not load the registration schema for ${g}: ${_(x.reason)}.`);let w=_(x.extension),T=x.schema,E=S(x.schema,{exclude:[U]});if(!o){if(d!==void 0&&be(`contacts`,E,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Ne(E,t,n))return;let r=te(E,t,{reserved:G,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
6
+ `)}\n\nRun \`cf registrar registrations create ${g} --help\` for .${w}'s registration fields.`);o={domain_name:m,...r.body}}let D;try{D=ke(o,T)}catch(e){let t=C(T,o);if(K(m,x.extension,E,o,t))return;throw e}let O=C(T,o);if(K(m,x.extension,E,o,O))return;if(O.length>0)throw Error(`${O.join(`
7
+ `)}\n\nRun \`cf registrar registrations create ${g} --help\` for this extension's registration fields.`);if(e.dryRun){l({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${v}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:o});return}let k=await M(await b(),v,m),A=we(k,D);if(e.force||process.stderr.write(`${ve({domain:m,accountId:v,years:D,quotedCost:A,pricing:k,body:o,schema:T,descriptors:E})}\n`),!await ee({force:e.force,message:`Registering ${g} for ${D} ${D===1?`year`:`years`} costs ${A}, charges the account's default payment method, and cannot be refunded.`}))return;if(o.years!==D)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let j=await M(await b(),v,m);if(j.currency!==k.currency||j.registration_cost!==k.registration_cost||j.renewal_cost!==k.renewal_cost)throw Error(`Availability or pricing changed while awaiting confirmation, so cf will not submit this registration. Re-run the command to review the current quote.`);let ne=await b();e.accountId=v,c(await u(`Registering`,async()=>a(ne,`POST`,`/accounts/${v}/registrar/registrations`,{body:o,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Registered ${g}`})}};function Le(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.
8
+ - Minimum: 1 domain.
9
+ - Maximum: 20 domains per request.
10
+ - The response returns domains on unsupported extensions with \`registrable: false\` and a \`reason\` field.
11
+ - The response may omit malformed domain names (e.g., names missing an extension).
12
+ `}).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 Re={command:`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:Le,handler:async e=>{if(e.dryRun){l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({domains:e.domains}):f(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=f(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:a})),{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);let o=p({domains:e.domains});c(await u(`Creating`,async()=>t.registrar.registrations.check({...o,account_id:a})),{successLabel:`Created`})}};function ze(e){return e.positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name 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 Be={command:`get-registration-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:ze,handler:async e=>{if(e.dryRun){l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})}};function Ve(e){return e.positional(`domain-name`,{type:`string`,description:"Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name 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 He={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:Ve,handler:async e=>{if(e.dryRun){l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})}};function Ue(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 We={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:Ue,handler:async e=>{if(e.dryRun){l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.get({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})}};function Ge(e){return e.option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
13
+ Pass this value to fetch the next page of results. Omit (or
14
+ 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 (`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 Ke={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:y(Ge),handler:async e=>{let t={cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar registrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/registrations`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.registrations.list({account_id:o,...t})),{successLabel:`Loaded`})}};function qe(e){return e.option(`query`,{type:`string`,description:`The search term to find domain suggestions. Accepts keywords, phrases, or full domain names.
15
+ - Phrases: "coffee shop" returns coffeeshop.com, mycoffeeshop.net, etc.
16
+ - 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,
17
+ returns results across all supported extensions. Extensions not in the supported
18
+ 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 Je={command:`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:qe,handler:async e=>{let t={q:e.query,extensions:e.extensions,limit:e.limit};if(e.dryRun){l({command:`cf registrar registrations search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-search`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.registrations.search({account_id:o,...t})),{successLabel:`Loaded`})}};function Ye(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.
19
+ Setting this field to \`true\` authorizes Cloudflare to charge the
20
+ account's default payment method up to 30 days before domain expiry
21
+ to renew the domain automatically. Renewal pricing may change over
22
+ time based on registry pricing.
23
+ `}).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 Xe={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:Ye,handler:async e=>{let t={};if(e.prefer!==void 0&&(t.Prefer=String(e.prefer)),e.dryRun){l({command:`cf registrar registrations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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:e.body===void 0?p({auto_renew:e[`auto-renew`]}):f(e.body)});return}let o=await s(e),m=e.local?n:await r();if(e.accountId=m,e.body){let n=f(e.body);c(await u(`Updating`,async()=>a(o,`PATCH`,`/accounts/${m}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:n,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Updated`});return}let h={};e[`auto-renew`]!==void 0&&d(h,[`auto_renew`],e[`auto-renew`]),c(await u(`Updating`,async()=>a(o,`PATCH`,`/accounts/${m}/registrar/registrations/${encodeURIComponent(String(e[`domain-name`]))}`,{body:Object.keys(h).length>0?h:void 0,headers:Object.keys(t).length>0?t:void 0})),{successLabel:`Updated`})}},Ze={command:`registrations`,describe:`Operations for registrations`,builder:e=>e.command(Re).command(Ie).command(We).command(Be).command(He).command(Ke).command(Je).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Qe={command:`registrar`,describe:`registrar`,builder:e=>e.command(le).command(Ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Qe as default};