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
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./auth-D3X9HYhD.mjs";import{t}from"./output-Ccqw2WOb.mjs";import{t as n}from"./dry-run-DL2V6yFm.mjs";import{t as r}from"./progress-BqQcF5QH.mjs";import{n as i,t as a}from"./body-parser-BshbixEq.mjs";import{t as o}from"./cli-types-DAYeL_Mj.mjs";import{n as s,t as c}from"./raw-fetch-Cc-MjHeL.mjs";function l(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`summary <dimension>`,describe:`Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`,builder:o(l),handler:async i=>{let a={date:i.date,domainCategory:i[`domain-category`],name:i.name,format:i.format};if(i.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},te={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`crawl-purpose`,{type:`string`,description:`Filters results by bot crawl purpose.`}).option(`user-agent`,{type:`string`,description:`Filters results by user agent.`}).option(`industry`,{type:`string`,description:`Filters results by industry.`}).option(`vertical`,{type:`string`,description:`Filters results by vertical.`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`response-status`,{type:`string`,description:`Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted.`}).option(`response-status-category`,{type:`string`,description:`Filters results by HTTP response status code category.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE`,`MIN0_MAX`,`PERCENTAGE_CHANGE`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of HTTP requests from AI bots, grouped by the specified dimension over time.`,builder:o(u),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,crawlPurpose:i[`crawl-purpose`],userAgent:i[`user-agent`],industry:i.industry,vertical:i.vertical,contentType:i[`content-type`],responseStatus:i[`response-status`],responseStatusCategory:i[`response-status-category`],limitPerGroup:i[`limit-per-group`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar ai bots timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.bots.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function f(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`crawl-purpose`,{type:`string`,description:`Filters results by bot crawl purpose.`}).option(`user-agent`,{type:`string`,description:`Filters results by user agent.`}).option(`industry`,{type:`string`,description:`Filters results by industry.`}).option(`vertical`,{type:`string`,description:`Filters results by vertical.`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`response-status`,{type:`string`,description:`Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted.`}).option(`response-status-category`,{type:`string`,description:`Filters results by HTTP response status code category.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`timeseries`,describe:`Retrieves AI bots HTTP request volume over time.`,builder:o(f),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,crawlPurpose:i[`crawl-purpose`],userAgent:i[`user-agent`],industry:i.industry,vertical:i.vertical,contentType:i[`content-type`],responseStatus:i[`response-status`],responseStatusCategory:i[`response-status-category`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar ai bots timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.bots.timeseries(a)),{successLabel:`Loaded`})}},m={command:`bots`,describe:`Operations for ai.bots`,builder:e=>e.command(p).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`summary-v2 <dimension>`,describe:`Retrieves an aggregated summary of the number of inferences run on Workers AI, grouped by the specified dimension.`,builder:o(h),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar ai inference summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/inference/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.inference.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function _(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN0_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of the number of inferences run on Workers AI, grouped by the specified dimension over time.`,builder:o(_),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,limitPerGroup:i[`limit-per-group`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar ai inference timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/inference/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.inference.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},y={command:`inference`,describe:`Operations for ai.inference`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`summary`,describe:`Retrieves the overall median HTML-to-markdown reduction ratio for AI agent requests over the given date range.`,builder:o(b),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar ai markdown-for-agents summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/markdown_for_agents/summary`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.markdownForAgents.summary(a)),{successLabel:`Loaded`})}};function S(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`timeseries`,describe:`Retrieves the median HTML-to-markdown reduction ratio over time for AI agent requests.`,builder:o(S),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar ai markdown-for-agents timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/markdown_for_agents/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.markdownForAgents.timeseries(a)),{successLabel:`Loaded`})}},w={command:`markdown-for-agents`,describe:`Operations for ai.markdown-for-agents`,builder:e=>e.command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`crawl-purpose`,{type:`string`,description:`Filters results by bot crawl purpose.`}).option(`user-agent`,{type:`string`,description:`Filters results by user agent.`}).option(`vertical`,{type:`string`,description:`Filters results by vertical.`}).option(`industry`,{type:`string`,description:`Filters results by industry.`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`response-status`,{type:`string`,description:`Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted.`}).option(`response-status-category`,{type:`string`,description:`Filters results by HTTP response status code category.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of AI bots HTTP requests grouped by the specified dimension.`,builder:o(T),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,crawlPurpose:i[`crawl-purpose`],userAgent:i[`user-agent`],vertical:i.vertical,industry:i.industry,contentType:i[`content-type`],responseStatus:i[`response-status`],responseStatusCategory:i[`response-status-category`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar ai timeseries-groups summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ai.timeseriesGroups.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},D={command:`timeseries-groups`,describe:`Operations for ai.timeseries-groups`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`ai`,describe:`AI inference trends and model usage statistics across the Cloudflare network`,builder:e=>e.command(m).command(y).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.positional(`id`,{type:`string`,description:`Annotation ID.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <id>`,describe:`Retrieves a single annotation by ID.`,builder:o(k),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar annotations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations/${i.id==null?`<id>`:encodeURIComponent(String(i.id))}`,pathParams:{id:String(i.id??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.annotations.get({id:i.id,...a})),{successLabel:`Loaded`})}};function j(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`data-source`,{type:`string`,description:`Filters results by data source.`,choices:[`ALL`,`AI_BOTS`,`AI_GATEWAY`,`BGP`,`BOTS`,`CONNECTION_ANOMALY`,`CT`,`DNS`,`DNS_MAGNITUDE`,`DNS_AS112`,`DOS`,`EMAIL_ROUTING`,`EMAIL_SECURITY`,`FW`,`FW_PG`,`HTTP`,`HTTP_CONTROL`,`HTTP_CRAWLER_REFERER`,`HTTP_ORIGINS`,`IQI`,`LEAKED_CREDENTIALS`,`NET`,`ROBOTS_TXT`,`SPEED`,`WORKERS_AI`]}).option(`event-type`,{type:`string`,description:`Filters results by event type. EVENT is a legacy alias for GENERAL.`,choices:[`EVENT`,`GENERAL`,`OUTAGE`,`PARTIAL_PROJECTION`,`PIPELINE`,`TRAFFIC_ANOMALY`]}).option(`outage-type`,{type:`string`,description:`Filters results by outage type.`,choices:[`NATIONWIDE`,`REGIONAL`,`NETWORK`,`PLATFORM`]}).option(`outage-cause`,{type:`string`,description:`Filters results by outage cause.`,choices:[`BLOCKING`,`CABLE_CUT`,`CYBERATTACK`,`DNS`,`FIRE`,`GOVERNMENT_DIRECTED`,`MAINTENANCE`,`MECHANICAL`,`MILITARY_ACTION`,`MISCONFIGURATION`,`NATURAL_DISASTER`,`NETWORK_PROBLEM`,`POWER_OUTAGE`,`SOFTWARE`,`TECHNICAL_PROBLEM`,`UNKNOWN`,`WEATHER`]}).option(`tags`,{type:`string`,description:`Filters results by annotation tag. Matches annotations carrying at least one of the given tags.`}).option(`query`,{type:`string`,description:`Filters results by a free-text match on the annotation description, id, or linked entities (location, ASN, origin).`}).option(`asn`,{type:`number`,description:`Filters results by Autonomous System. Specify a single Autonomous System Number (ASN) as integer.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`geo-id`,{type:`string`,description:`Filters results by geolocation. Refer to [GeoNames](https://download.geonames.org/export/dump/readme.txt).`}).option(`origin`,{type:`string`,description:`Filters results by origin.`}).option(`tld`,{type:`string`,description:`Filters results by top-level domain.`}).option(`ca`,{type:`string`,description:`Filters results by certificate authority.`}).option(`log`,{type:`string`,description:`Filters results by certificate log.`}).option(`bot`,{type:`string`,description:`Filters results by bot.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`Retrieves the latest annotations.`,builder:o(j),handler:async i=>{let a={limit:i.limit,offset:i.offset,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],dataSource:i[`data-source`],eventType:i[`event-type`],outageType:i[`outage-type`],outageCause:i[`outage-cause`],tags:i.tags,query:i.query,asn:i.asn,location:i.location,geoId:i[`geo-id`],origin:i.origin,tld:i.tld,ca:i.ca,log:i.log,bot:i.bot,format:i.format};if(i.dryRun){n({command:`cf radar annotations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.annotations.list(a)),{successLabel:`Loaded`})}};function N(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`data-source`,{type:`string`,description:`Filters results by data source.`,choices:[`ALL`,`AI_BOTS`,`AI_GATEWAY`,`BGP`,`BOTS`,`CONNECTION_ANOMALY`,`CT`,`DNS`,`DNS_MAGNITUDE`,`DNS_AS112`,`DOS`,`EMAIL_ROUTING`,`EMAIL_SECURITY`,`FW`,`FW_PG`,`HTTP`,`HTTP_CONTROL`,`HTTP_CRAWLER_REFERER`,`HTTP_ORIGINS`,`IQI`,`LEAKED_CREDENTIALS`,`NET`,`ROBOTS_TXT`,`SPEED`,`WORKERS_AI`]}).option(`outage-type`,{type:`string`,description:`Filters results by outage type.`,choices:[`NATIONWIDE`,`REGIONAL`,`NETWORK`,`PLATFORM`]}).option(`outage-cause`,{type:`string`,description:`Filters results by outage cause.`,choices:[`BLOCKING`,`CABLE_CUT`,`CYBERATTACK`,`DNS`,`FIRE`,`GOVERNMENT_DIRECTED`,`MAINTENANCE`,`MECHANICAL`,`MILITARY_ACTION`,`MISCONFIGURATION`,`NATURAL_DISASTER`,`NETWORK_PROBLEM`,`POWER_OUTAGE`,`SOFTWARE`,`TECHNICAL_PROBLEM`,`UNKNOWN`,`WEATHER`]}).option(`tags`,{type:`string`,description:`Filters results by annotation tag. Matches annotations carrying at least one of the given tags.`}).option(`query`,{type:`string`,description:`Filters results by a free-text match on the annotation description, id, or linked entities (location, ASN, origin).`}).option(`asn`,{type:`number`,description:`Filters results by Autonomous System. Specify a single Autonomous System Number (ASN) as integer.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`geo-id`,{type:`string`,description:`Filters results by geolocation. Refer to [GeoNames](https://download.geonames.org/export/dump/readme.txt).`}).option(`origin`,{type:`string`,description:`Filters results by origin.`}).option(`tld`,{type:`string`,description:`Filters results by top-level domain.`}).option(`ca`,{type:`string`,description:`Filters results by certificate authority.`}).option(`log`,{type:`string`,description:`Filters results by certificate log.`}).option(`bot`,{type:`string`,description:`Filters results by bot.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get`,describe:`Retrieves the latest Internet outages and anomalies.`,builder:o(N),handler:async i=>{let a={limit:i.limit,offset:i.offset,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],dataSource:i[`data-source`],outageType:i[`outage-type`],outageCause:i[`outage-cause`],tags:i.tags,query:i.query,asn:i.asn,location:i.location,geoId:i[`geo-id`],origin:i.origin,tld:i.tld,ca:i.ca,log:i.log,bot:i.bot,format:i.format};if(i.dryRun){n({command:`cf radar annotations outages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations/outages`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.annotations.outages.get(a)),{successLabel:`Loaded`})}};function F(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`locations`,describe:`Retrieves the number of outages by location.`,builder:o(F),handler:async i=>{let a={limit:i.limit,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar annotations outages locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations/outages/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.annotations.outages.locations(a)),{successLabel:`Loaded`})}},L={command:`outages`,describe:`Operations for annotations.outages`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`annotations`,describe:`Radar annotations marking significant Internet events (outages, cable cuts, etc.)`,builder:e=>e.command(A).command(M).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of AS112 queries by the specified dimension.`,builder:o(z),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,queryType:i[`query-type`],protocol:i.protocol,responseCode:i[`response-code`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar as112 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function V(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of AS112 queries grouped by dimension over time.`,builder:o(V),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,queryType:i[`query-type`],protocol:i.protocol,responseCode:i[`response-code`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar as112 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function U(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`timeseries`,describe:`Retrieves the AS112 DNS queries over time.`,builder:o(U),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,queryType:i[`query-type`],protocol:i.protocol,responseCode:i[`response-code`],format:i.format};if(i.dryRun){n({command:`cf radar as112 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.timeseries(a)),{successLabel:`Loaded`})}};function G(e){return e.positional(`dnssec`,{type:`string`,description:`DNSSEC (DNS Security Extensions) status.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`dnssec <dnssec>`,describe:`Retrieves the top locations of DNS queries to AS112 with DNSSEC (DNS Security Extensions) support.`,builder:o(G),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar as112 top dnssec`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/dnssec/${i.dnssec==null?`<dnssec>`:encodeURIComponent(String(i.dnssec))}`,pathParams:{dnssec:String(i.dnssec??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.top.dnssec({dnssec:i.dnssec,...a})),{successLabel:`Loaded`})}};function q(e){return e.positional(`edns`,{type:`string`,description:`EDNS (Extension Mechanisms for DNS) status.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`edns <edns>`,describe:`Retrieves the top locations of DNS queries to AS112 with EDNS (Extension Mechanisms for DNS) support.`,builder:o(q),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar as112 top edns`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/edns/${i.edns==null?`<edns>`:encodeURIComponent(String(i.edns))}`,pathParams:{edns:String(i.edns??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.top.edns({edns:i.edns,...a})),{successLabel:`Loaded`})}};function Y(e){return e.positional(`ip-version`,{type:`string`,description:`IP version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`ip-version <ip-version>`,describe:`Retrieves the top locations of DNS queries to AS112 for an IP version.`,builder:o(Y),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar as112 top ip-version`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/ip_version/${i[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(i[`ip-version`]))}`,pathParams:{"ip-version":String(i[`ip-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.top.ipVersion({ip_version:i[`ip-version`],...a})),{successLabel:`Loaded`})}};function Z(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`locations`,describe:`Retrieves the top locations by AS112 DNS queries.`,builder:o(Z),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar as112 top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.as112.top.locations(a)),{successLabel:`Loaded`})}},ne={command:`top`,describe:`Operations for as112.top`,builder:e=>e.command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},re={command:`as112`,describe:`AS112 DNS sinkhole statistics — reverse DNS query volumes for private address space`,builder:e=>e.command(B).command(W).command(H).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`direction`,{type:`string`,description:"Specifies whether the `location` filter applies to the source or target location.",choices:[`ORIGIN`,`TARGET`]}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of layer 3 attacks by the specified dimension.`,builder:o(ie),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,direction:i.direction,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function oe(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN0_MAX`]}).option(`direction`,{type:`string`,description:"Specifies whether the `location` filter applies to the source or target location.",choices:[`ORIGIN`,`TARGET`]}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of layer 3 attacks grouped by dimension over time.`,builder:o(oe),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,normalization:i.normalization,direction:i.direction,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function ce(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE_CHANGE`,`MIN0_MAX`]}).option(`metric`,{type:`string`,description:`Measurement units, eg. bytes.`,choices:[`BYTES`,`BYTES_OLD`]}).option(`direction`,{type:`string`,description:"Specifies whether the `location` filter applies to the source or target location.",choices:[`ORIGIN`,`TARGET`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`timeseries`,describe:`Retrieves layer 3 attacks over time.`,builder:o(ce),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,normalization:i.normalization,metric:i.metric,direction:i.direction,format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.timeseries(a)),{successLabel:`Loaded`})}};function ue(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`limit-direction`,{type:`string`,description:"Specifies whether the `limitPerLocation` applies to the source or target location.",choices:[`ORIGIN`,`TARGET`]}).option(`limit-per-location`,{type:`number`,description:"Limits the number of attacks per origin/target (refer to `limitDirection` parameter) location."}).option(`magnitude`,{type:`string`,description:`Orders results based on attack magnitude, defined by total mitigated bytes or total mitigated attacks.`,choices:[`MITIGATED_BYTES`,`MITIGATED_ATTACKS`]}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`attacks`,describe:`Retrieves the top layer 3 attacks from origin to target location. Values are a percentage out of the total layer 3 attacks (with billing country). You can optionally limit the number of attacks by origin/target location (useful if all the top attacks are from or to the same location).`,builder:o(ue),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,limitDirection:i[`limit-direction`],limitPerLocation:i[`limit-per-location`],magnitude:i.magnitude,normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 top attacks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/top/attacks`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.top.attacks(a)),{successLabel:`Loaded`})}};function fe(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`origin`,describe:`Retrieves the origin locations of layer 3 attacks.`,builder:o(fe),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 top locations origin`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/top/locations/origin`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.top.locations.origin(a)),{successLabel:`Loaded`})}};function me(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`protocol`,{type:`string`,description:`Filters the results by layer 3/4 protocol.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`target`,describe:`Retrieves the target locations of layer 3 attacks.`,builder:o(me),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],protocol:i.protocol,format:i.format};if(i.dryRun){n({command:`cf radar attacks layer3 top locations target`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/top/locations/target`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer3.top.locations.target(a)),{successLabel:`Loaded`})}},ge={command:`locations`,describe:`Operations for attacks.layer3.top.locations`,builder:e=>e.command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`top`,describe:`Operations for attacks.layer3.top`,builder:e=>e.command(de).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`layer3`,describe:`Operations for attacks.layer3`,builder:e=>e.command(ae).command(le).command(se).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ye(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`http-method`,{type:`string`,description:`Filters results by HTTP method.`}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of layer 7 attacks by the specified dimension.`,builder:o(ye),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,ipVersion:i[`ip-version`],httpVersion:i[`http-version`],httpMethod:i[`http-method`],mitigationProduct:i[`mitigation-product`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function xe(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`http-method`,{type:`string`,description:`Filters results by HTTP method.`}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN0_MAX`]}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of layer 7 attacks grouped by dimension over time.`,builder:o(xe),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,ipVersion:i[`ip-version`],httpVersion:i[`http-version`],httpMethod:i[`http-method`],mitigationProduct:i[`mitigation-product`],normalization:i.normalization,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Ce(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE_CHANGE`,`MIN0_MAX`]}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`http-method`,{type:`string`,description:`Filters results by HTTP method.`}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`timeseries`,describe:`Retrieves layer 7 attacks over time.`,builder:o(Ce),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,normalization:i.normalization,ipVersion:i[`ip-version`],httpVersion:i[`http-version`],httpMethod:i[`http-method`],mitigationProduct:i[`mitigation-product`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.timeseries(a)),{successLabel:`Loaded`})}};function Te(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`http-method`,{type:`string`,description:`Filters results by HTTP method.`}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`origin`,describe:`Retrieves the top origin autonomous systems of layer 7 attacks. Values are percentages of the total layer 7 attacks, with the origin autonomous systems determined by the client IP address.`,builder:o(Te),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,ipVersion:i[`ip-version`],httpVersion:i[`http-version`],httpMethod:i[`http-method`],mitigationProduct:i[`mitigation-product`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 top ases origin`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/top/ases/origin`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.top.ases.origin(a)),{successLabel:`Loaded`})}},De={command:`ases`,describe:`Operations for attacks.layer7.top.ases`,builder:e=>e.command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`limit-direction`,{type:`string`,description:"Specifies whether the `limitPerLocation` applies to the source or target location.",choices:[`ORIGIN`,`TARGET`]}).option(`limit-per-location`,{type:`number`,description:"Limits the number of attacks per origin/target (refer to `limitDirection` parameter) location."}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`attacks`,describe:`Retrieves the top attacks from origin to target location. Values are percentages of the total layer 7 attacks (with billing country). The attack magnitude can be defined by the number of mitigated requests or by the number of zones affected. You can optionally limit the number of attacks by origin/target location (useful if all the top attacks are from or to the same location).`,builder:o(Oe),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,mitigationProduct:i[`mitigation-product`],limitDirection:i[`limit-direction`],limitPerLocation:i[`limit-per-location`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 top attacks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/top/attacks`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.top.attacks(a)),{successLabel:`Loaded`})}};function Ae(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`http-method`,{type:`string`,description:`Filters results by HTTP method.`}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`origin`,describe:`Retrieves the top origin locations of layer 7 attacks. Values are percentages of the total layer 7 attacks, with the origin location determined by the client IP address.`,builder:o(Ae),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,continent:i.continent,ipVersion:i[`ip-version`],httpVersion:i[`http-version`],httpMethod:i[`http-method`],mitigationProduct:i[`mitigation-product`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 top locations origin`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/top/locations/origin`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.top.locations.origin(a)),{successLabel:`Loaded`})}};function Me(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`mitigation-product`,{type:`string`,description:`Filters the results by layer 7 mitigation product.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`target`,describe:`Retrieves the top target locations of and by layer 7 attacks. Values are a percentage out of the total layer 7 attacks. The target location is determined by the attacked zone's billing country, when available.`,builder:o(Me),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],continent:i.continent,mitigationProduct:i[`mitigation-product`],format:i.format};if(i.dryRun){n({command:`cf radar attacks layer7 top locations target`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/top/locations/target`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.attacks.layer7.top.locations.target(a)),{successLabel:`Loaded`})}},Pe={command:`locations`,describe:`Operations for attacks.layer7.top.locations`,builder:e=>e.command(je).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fe={command:`top`,describe:`Operations for attacks.layer7.top`,builder:e=>e.command(ke).command(De).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ie={command:`layer7`,describe:`Operations for attacks.layer7`,builder:e=>e.command(be).command(we).command(Se).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`attacks`,describe:`DDoS and application-layer attack trends, vectors, and target analysis`,builder:e=>e.command(ve).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.option(`page`,{type:`number`,description:`Current page number, starting from 1.`}).option(`per-page`,{type:`number`,description:`Number of entries per page.`}).option(`event-id`,{type:`number`,description:`The unique identifier of a event.`}).option(`hijacker-asn`,{type:`number`,description:`The potential hijacker AS of a BGP hijack event.`}).option(`victim-asn`,{type:`number`,description:`The potential victim AS of a BGP hijack event.`}).option(`involved-asn`,{type:`number`,description:`The potential hijacker or victim AS of a BGP hijack event.`}).option(`involved-country`,{type:`string`,description:`The country code of the potential hijacker or victim AS of a BGP hijack event.`}).option(`prefix`,{type:`string`,description:`Prefix`}).option(`min-confidence`,{type:`number`,description:`Filters events by minimum confidence score (1-4 low, 5-7 mid, 8+ high).`}).option(`max-confidence`,{type:`number`,description:`Filters events by maximum confidence score (1-4 low, 5-7 mid, 8+ high).`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`sort-by`,{type:`string`,description:`Sorts results by the specified field.`,choices:[`ID`,`TIME`,`CONFIDENCE`]}).option(`sort-order`,{type:`string`,description:`Sort order.`,choices:[`ASC`,`DESC`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`list`,describe:`Retrieves the BGP hijack events.`,builder:o(Re),handler:async i=>{let a={page:i.page,per_page:i[`per-page`],eventId:i[`event-id`],hijackerAsn:i[`hijacker-asn`],victimAsn:i[`victim-asn`],involvedAsn:i[`involved-asn`],involvedCountry:i[`involved-country`],prefix:i.prefix,minConfidence:i[`min-confidence`],maxConfidence:i[`max-confidence`],dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],sortBy:i[`sort-by`],sortOrder:i[`sort-order`],format:i.format};if(i.dryRun){n({command:`cf radar bgp hijacks events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/hijacks/events`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.hijacks.events.list(a)),{successLabel:`Loaded`})}},Be={command:`events`,describe:`Operations for bgp.hijacks.events`,builder:e=>e.command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`hijacks`,describe:`Operations for bgp.hijacks`,builder:e=>e.command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`include-delay`,{type:`boolean`,description:`Includes data delay meta information.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`timeseries`,describe:`Retrieves time series data for the announced IP space count, represented as the number of IPv4 /24s and IPv6 /48s, for a given ASN.`,builder:o(He),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,ipVersion:i[`ip-version`],includeDelay:i[`include-delay`],format:i.format};if(i.dryRun){n({command:`cf radar bgp ips timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/ips/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.ips.timeseries(a)),{successLabel:`Loaded`})}};function We(e){return e.option(`date`,{type:`string`,description:`Filters results by the specified datetime (ISO 8601).`}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`metric`,{type:`string`,description:`Ranking metric: IPv4 /24 count or IPv6 /48 count.`,choices:[`v4_24s`,`v6_48s`]}).option(`country`,{type:`string`,description:`Optional ISO 3166-1 alpha-2 country filter. Omit for global top-N.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`ases`,describe:"Returns the top-N autonomous systems by announced IP space at the nearest 8-hour RIB boundary at or before the requested date. The snapped boundary is returned as `anchor_ts`.",builder:o(We),handler:async i=>{let a={date:i.date,limit:i.limit,metric:i.metric,country:i.country,format:i.format};if(i.dryRun){n({command:`cf radar bgp ips top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/ips/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.ips.top.ases(a)),{successLabel:`Loaded`})}},Ke={command:`top`,describe:`Operations for bgp.ips.top`,builder:e=>e.command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qe={command:`ips`,describe:`Operations for bgp.ips`,builder:e=>e.command(Ue).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Je(e){return e.option(`page`,{type:`number`,description:`Current page number, starting from 1.`}).option(`per-page`,{type:`number`,description:`Number of entries per page.`}).option(`event-id`,{type:`number`,description:`The unique identifier of a event.`}).option(`leak-asn`,{type:`number`,description:`The leaking AS of a route leak event.`}).option(`involved-asn`,{type:`number`,description:`ASN that is causing or affected by a route leak event.`}).option(`involved-country`,{type:`string`,description:`Country code of a involved ASN in a route leak event.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`sort-by`,{type:`string`,description:`Sorts results by the specified field.`,choices:[`ID`,`LEAKS`,`PEERS`,`PREFIXES`,`ORIGINS`,`TIME`]}).option(`sort-order`,{type:`string`,description:`Sort order.`,choices:[`ASC`,`DESC`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`list`,describe:`Retrieves the BGP route leak events.`,builder:o(Je),handler:async i=>{let a={page:i.page,per_page:i[`per-page`],eventId:i[`event-id`],leakAsn:i[`leak-asn`],involvedAsn:i[`involved-asn`],involvedCountry:i[`involved-country`],dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],sortBy:i[`sort-by`],sortOrder:i[`sort-order`],format:i.format};if(i.dryRun){n({command:`cf radar bgp leaks events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/leaks/events`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.leaks.events.list(a)),{successLabel:`Loaded`})}},Xe={command:`events`,describe:`Operations for bgp.leaks.events`,builder:e=>e.command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ze={command:`leaks`,describe:`Operations for bgp.leaks`,builder:e=>e.command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qe(e){return e.option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`sort-by`,{type:`string`,description:`Sorts results by the specified field.`,choices:[`cone`,`pfxs`,`ipv4`,`ipv6`,`rpki_valid`,`rpki_invalid`,`rpki_unknown`]}).option(`sort-order`,{type:`string`,description:`Sort order.`,choices:[`ASC`,`DESC`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`ases`,describe:`Retrieves all ASes in the current global routing tables with routing statistics.`,builder:o(Qe),handler:async i=>{let a={location:i.location,limit:i.limit,sortBy:i[`sort-by`],sortOrder:i[`sort-order`],format:i.format};if(i.dryRun){n({command:`cf radar bgp routes ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.ases(a)),{successLabel:`Loaded`})}};function et(e){return e.option(`origin`,{type:`number`,description:`Lookup MOASes originated by the given ASN.`}).option(`prefix`,{type:`string`,description:`Prefix`}).option(`invalid-only`,{type:`boolean`,description:`Lookup only RPKI invalid MOASes.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tt={command:`moas`,describe:`Retrieves all Multi-Origin AS (MOAS) prefixes in the global routing tables.`,builder:o(et),handler:async i=>{let a={origin:i.origin,prefix:i.prefix,invalid_only:i[`invalid-only`],format:i.format};if(i.dryRun){n({command:`cf radar bgp routes moas`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/moas`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.moas(a)),{successLabel:`Loaded`})}};function nt(e){return e.option(`asn`,{type:`string`,description:`Single Autonomous System Number (ASN) as integer.`,demandOption:!0}).option(`ip-version`,{type:`string`,description:`Address family of the observed paths. Defaults to IPv4.`,choices:[`IPv4`,`IPv6`]}).option(`collector`,{type:`string`,description:`Scope to a single RouteViews collector (e.g. "route-views3"). Omit to merge across all active collectors (identical path segments are deduplicated, observation counts summed, and every contributing collector listed).`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`list`,describe:`Retrieves the paths an AS uses to reach the tier-1 clique, derived from RouteViews RIB snapshots. Each entry is an ordered AS-path segment (from the queried AS toward a tier-1) with the number of observed paths and peers, and the collectors that observed it. By default segments are merged across all active collectors; pass "collector" to scope to one. The response also includes an "asnInfo" map (keyed by ASN) with the name and country for every ASN in the returned segments plus the queried ASN (best-effort; null when unavailable).`,builder:o(nt),handler:async i=>{let a={ipVersion:i[`ip-version`],collector:i.collector,format:i.format};if(i.dryRun){n({command:`cf radar bgp routes paths list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/paths/${i.asn==null?`<asn>`:encodeURIComponent(String(i.asn))}`,pathParams:{asn:String(i.asn??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.paths.list({asn:i.asn,...a})),{successLabel:`Loaded`})}},it={command:`paths`,describe:`Operations for bgp.routes.paths`,builder:e=>e.command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.option(`prefix`,{type:`string`,description:`Prefix`}).option(`origin`,{type:`number`,description:`Lookup prefixes originated by the given ASN.`}).option(`rpki-status`,{type:`string`,description:`Return only results with matching rpki status: valid, invalid or unknown.`,choices:[`VALID`,`INVALID`,`UNKNOWN`]}).option(`longest-prefix-match`,{type:`boolean`,description:`Return only results with the longest prefix match for the given prefix. For example, specify a /32 prefix to lookup the origin ASN for an IPv4 address.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`pfx2as`,describe:`Retrieves the prefix-to-ASN mapping from global routing tables.`,builder:o(at),handler:async i=>{let a={prefix:i.prefix,origin:i.origin,rpkiStatus:i[`rpki-status`],longestPrefixMatch:i[`longest-prefix-match`],format:i.format};if(i.dryRun){n({command:`cf radar bgp routes pfx2as`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/pfx2as`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.pfx2As(a)),{successLabel:`Loaded`})}};function st(e){return e.option(`prefix`,{type:`string`,description:`Prefix`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`realtime`,describe:`Retrieves real-time BGP routes for a prefix, using public real-time data collectors (RouteViews and RIPE RIS).`,builder:o(st),handler:async i=>{let a={prefix:i.prefix,format:i.format};if(i.dryRun){n({command:`cf radar bgp routes realtime`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/realtime`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.realtime(a)),{successLabel:`Loaded`})}};function lt(e){return e.option(`asn`,{type:`number`,description:`Filters results by Autonomous System. Specify a single Autonomous System Number (ASN) as integer.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ut={command:`stats`,describe:`Retrieves the BGP routing table stats.`,builder:o(lt),handler:async i=>{let a={asn:i.asn,location:i.location,format:i.format};if(i.dryRun){n({command:`cf radar bgp routes stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/stats`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.stats(a)),{successLabel:`Loaded`})}};function dt(e){return e.positional(`asn`,{type:`string`,description:`Single Autonomous System Number (ASN) as integer.`,demandOption:!0}).option(`ip-version`,{type:`string`,description:`Address family of the observed paths. Defaults to IPv4.`,choices:[`IPv4`,`IPv6`]}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`limit`,{type:`number`,description:`Number of upstream ASNs to return as separate series, ranked by the first bucket. Remaining upstreams are grouped into an "OTHER" series. Defaults to 5.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`timeseries <asn>`,describe:`Retrieves the share of an AS’s observed paths carried by each direct upstream over time, derived from RouteViews RIB snapshots across all collectors (the combined product). Each upstream ASN is returned as its own series of shares (0–1); the least-significant upstreams beyond the requested limit are grouped into an "OTHER" series. Series share a common set of timestamps.`,builder:o(dt),handler:async i=>{let a={ipVersion:i[`ip-version`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limit:i.limit,format:i.format};if(i.dryRun){n({command:`cf radar bgp routes upstreams timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/upstreams/${i.asn==null?`<asn>`:encodeURIComponent(String(i.asn))}/timeseries`,pathParams:{asn:String(i.asn??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.routes.upstreams.timeseries({asn:i.asn,...a})),{successLabel:`Loaded`})}},pt={command:`upstreams`,describe:`Operations for bgp.routes.upstreams`,builder:e=>e.command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},mt={command:`routes`,describe:`Operations for bgp.routes`,builder:e=>e.command($e).command(tt).command(ot).command(ct).command(ut).command(it).command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ht(e){return e.option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`asn`,{type:`number`,description:`Filter changes involving this ASN (as customer or provider).`}).option(`include-asn-info`,{type:`boolean`,description:`Include ASN metadata (name, country) in response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`changes`,describe:`Retrieves ASPA (Autonomous System Provider Authorization) changes over time. Returns daily aggregated changes including additions, removals, and modifications of ASPA objects.`,builder:o(ht),handler:async i=>{let a={dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,includeAsnInfo:i[`include-asn-info`],format:i.format};if(i.dryRun){n({command:`cf radar bgp rpki aspa changes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/changes`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.rpki.aspa.changes(a)),{successLabel:`Loaded`})}};function _t(e){return e.option(`customer-asn`,{type:`number`,description:`Filter by customer ASN (the ASN publishing the ASPA object).`}).option(`provider-asn`,{type:`number`,description:`Filter by provider ASN (an authorized upstream provider in ASPA objects).`}).option(`date`,{type:`string`,description:`Filters results by the specified datetime (ISO 8601).`}).option(`include-asn-info`,{type:`boolean`,description:`Include ASN metadata (name, country) in response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`snapshot`,describe:`Retrieves current or historical ASPA (Autonomous System Provider Authorization) objects. ASPA objects define which ASNs are authorized upstream providers for a customer ASN.`,builder:o(_t),handler:async i=>{let a={customerAsn:i[`customer-asn`],providerAsn:i[`provider-asn`],date:i.date,includeAsnInfo:i[`include-asn-info`],format:i.format};if(i.dryRun){n({command:`cf radar bgp rpki aspa snapshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/snapshot`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.rpki.aspa.snapshot(a)),{successLabel:`Loaded`})}};function yt(e){return e.option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`rir`,{type:`string`,description:`Filter by Regional Internet Registry (RIR). Multiple RIRs generate multiple series.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bt={command:`timeseries`,describe:`Retrieves ASPA (Autonomous System Provider Authorization) object count over time. Supports filtering by RIR or location (country code) to generate multiple named series. If no RIR or location filter is specified, returns total count.`,builder:o(yt),handler:async i=>{let a={dateStart:i[`date-start`],dateEnd:i[`date-end`],name:i.name,rir:i.rir,location:i.location,format:i.format};if(i.dryRun){n({command:`cf radar bgp rpki aspa timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.rpki.aspa.timeseries(a)),{successLabel:`Loaded`})}},xt={command:`aspa`,describe:`Operations for bgp.rpki.aspa`,builder:e=>e.command(gt).command(vt).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return e.option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`metric`,{type:`string`,description:`Which RPKI ROA validation metric to return. validPfxsRatio = ratio of RPKI-valid prefixes (IPv4+IPv6 combined). validPfxsV4Ratio / validPfxsV6Ratio = same, split by IP version. validIpsRatio = ratio of RPKI-valid address space (IPv4 /24s + IPv6 /48s). validIpsV4Ratio / validIpsV6Ratio = same, split by IP version.`,choices:[`validPfxsRatio`,`validPfxsV4Ratio`,`validPfxsV6Ratio`,`validIpsRatio`,`validIpsV4Ratio`,`validIpsV6Ratio`]}).option(`asn`,{type:`string`,description:`Filters results by Autonomous System Number. Specify one or more ASNs. Multiple values generate one series per ASN.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ct={command:`timeseries`,describe:`Retrieves RPKI ROA (Route Origin Authorization) validation ratios over time. Returns the selected metric as a time series. Supports filtering by ASN or location (country code) — multiple values of the same filter type produce one series per value. If no ASN or location is specified, returns the global aggregate.`,builder:o(St),handler:async i=>{let a={dateStart:i[`date-start`],dateEnd:i[`date-end`],metric:i.metric,asn:i.asn,location:i.location,name:i.name,format:i.format};if(i.dryRun){n({command:`cf radar bgp rpki roas timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/roas/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.rpki.roas.timeseries(a)),{successLabel:`Loaded`})}},wt={command:`roas`,describe:`Operations for bgp.rpki.roas`,builder:e=>e.command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tt={command:`rpki`,describe:`Operations for bgp.rpki`,builder:e=>e.command(xt).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Et(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`prefix`,{type:`string`,description:`Filters results by BGP network prefix.`}).option(`update-type`,{type:`string`,description:`Filters results by BGP update type.`}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dt={command:`timeseries`,describe:`Retrieves BGP updates over time. When requesting updates for an autonomous system, only BGP updates of type announcement are returned.`,builder:o(Et),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],prefix:i.prefix,updateType:i[`update-type`],asn:i.asn,format:i.format};if(i.dryRun){n({command:`cf radar bgp timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.timeseries(a)),{successLabel:`Loaded`})}};function Ot(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`prefix`,{type:`string`,description:`Filters results by BGP network prefix.`}).option(`update-type`,{type:`string`,description:`Filters results by BGP update type.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kt={command:`get`,describe:`Retrieves the top autonomous systems by BGP updates (announcements only).`,builder:o(Ot),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,prefix:i.prefix,updateType:i[`update-type`],format:i.format};if(i.dryRun){n({command:`cf radar bgp top ases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.top.ases.get(a)),{successLabel:`Loaded`})}};function At(e){return e.option(`country`,{type:`string`,description:`Alpha-2 country code.`}).option(`limit`,{type:`number`,description:`Maximum number of ASes to return.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jt={command:`prefixes`,describe:`Retrieves the full list of autonomous systems on the global routing table ordered by announced prefixes count. The data comes from public BGP MRT data archives and updates every 2 hours.`,builder:o(At),handler:async i=>{let a={country:i.country,limit:i.limit,format:i.format};if(i.dryRun){n({command:`cf radar bgp top ases prefixes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/ases/prefixes`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.top.ases.prefixes(a)),{successLabel:`Loaded`})}},Mt={command:`ases`,describe:`Operations for bgp.top.ases`,builder:e=>e.command(kt).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nt(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`update-type`,{type:`string`,description:`Filters results by BGP update type.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pt={command:`prefixes`,describe:`Retrieves the top network prefixes by BGP updates.`,builder:o(Nt),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,updateType:i[`update-type`],format:i.format};if(i.dryRun){n({command:`cf radar bgp top prefixes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/prefixes`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bgp.top.prefixes(a)),{successLabel:`Loaded`})}},Ft={command:`top`,describe:`Operations for bgp.top`,builder:e=>e.command(Pt).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},It={command:`bgp`,describe:`BGP routing data — prefix announcements, AS-level stats, route leaks, and hijack events`,builder:e=>e.command(Dt).command(Ve).command(qe).command(Ze).command(mt).command(Tt).command(Ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lt(e){return e.positional(`bot-slug`,{type:`string`,description:`Bot slug.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`get <bot-slug>`,describe:`Retrieves the requested bot information.`,builder:o(Lt),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar bots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/${i[`bot-slug`]==null?`<bot-slug>`:encodeURIComponent(String(i[`bot-slug`]))}`,pathParams:{"bot-slug":String(i[`bot-slug`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.get({bot_slug:i[`bot-slug`],...a})),{successLabel:`Loaded`})}};function zt(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`bot-category`,{type:`string`,description:`Filters results by bot category.`,choices:[`SEARCH_ENGINE_CRAWLER`,`SEARCH_ENGINE_OPTIMIZATION`,`MONITORING_AND_ANALYTICS`,`ADVERTISING_AND_MARKETING`,`SOCIAL_MEDIA_MARKETING`,`PAGE_PREVIEW`,`ACADEMIC_RESEARCH`,`SECURITY`,`ACCESSIBILITY`,`WEBHOOKS`,`FEED_FETCHER`,`AI_CRAWLER`,`AGGREGATOR`,`AI_ASSISTANT`,`AI_SEARCH`,`ARCHIVER`]}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`kind`,{type:`string`,description:`Filters results by bot kind. Deprecated: the Verified Bot / Signed Agent distinction is being removed.`,choices:[`AGENT`,`BOT`]}).option(`bot-verification-status`,{type:`string`,description:`Filters results by bot verification status.`,choices:[`VERIFIED`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bt={command:`list`,describe:`Retrieves a list of bots.`,builder:o(zt),handler:async i=>{let a={limit:i.limit,offset:i.offset,botCategory:i[`bot-category`],botOperator:i[`bot-operator`],kind:i.kind,botVerificationStatus:i[`bot-verification-status`],format:i.format};if(i.dryRun){n({command:`cf radar bots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.list(a)),{successLabel:`Loaded`})}};function Vt(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`bot`,{type:`string`,description:`Filters results by bot name.`}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`bot-category`,{type:`string`,description:`Filters results by bot category.`}).option(`bot-kind`,{type:`string`,description:`Filters results by bot kind. Deprecated: the Verified Bot / Signed Agent distinction is being removed.`}).option(`bot-verification-status`,{type:`string`,description:`Filters results by bot verification status (Verified vs. Unverified).`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ht={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of bots HTTP requests grouped by the specified dimension.`,builder:o(Vt),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,limitPerGroup:i[`limit-per-group`],bot:i.bot,botOperator:i[`bot-operator`],botCategory:i[`bot-category`],botKind:i[`bot-kind`],botVerificationStatus:i[`bot-verification-status`],format:i.format};if(i.dryRun){n({command:`cf radar bots summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Ut(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`bot`,{type:`string`,description:`Filters results by bot name.`}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`bot-category`,{type:`string`,description:`Filters results by bot category.`}).option(`bot-kind`,{type:`string`,description:`Filters results by bot kind. Deprecated: the Verified Bot / Signed Agent distinction is being removed.`}).option(`bot-verification-status`,{type:`string`,description:`Filters results by bot verification status (Verified vs. Unverified).`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wt={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of HTTP requests from bots, grouped by the specified dimension over time.`,builder:o(Ut),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,limitPerGroup:i[`limit-per-group`],bot:i.bot,botOperator:i[`bot-operator`],botCategory:i[`bot-category`],botKind:i[`bot-kind`],botVerificationStatus:i[`bot-verification-status`],format:i.format};if(i.dryRun){n({command:`cf radar bots timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Gt(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`bot`,{type:`string`,description:`Filters results by bot name.`}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`bot-category`,{type:`string`,description:`Filters results by bot category.`}).option(`bot-kind`,{type:`string`,description:`Filters results by bot kind. Deprecated: the Verified Bot / Signed Agent distinction is being removed.`}).option(`bot-verification-status`,{type:`string`,description:`Filters results by bot verification status (Verified vs. Unverified).`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kt={command:`timeseries`,describe:`Retrieves bots HTTP request volume over time.`,builder:o(Gt),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,bot:i.bot,botOperator:i[`bot-operator`],botCategory:i[`bot-category`],botKind:i[`bot-kind`],botVerificationStatus:i[`bot-verification-status`],format:i.format};if(i.dryRun){n({command:`cf radar bots timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.timeseries(a)),{successLabel:`Loaded`})}};function qt(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`vertical`,{type:`string`,description:`Filters results by vertical.`}).option(`industry`,{type:`string`,description:`Filters results by industry.`}).option(`client-type`,{type:`string`,description:`Filters results by agent type.`}).option(`response-status`,{type:`string`,description:`Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted.`}).option(`response-status-category`,{type:`string`,description:`Filters results by HTTP response status code category.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jt={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the specified dimension.`,builder:o(qt),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],botOperator:i[`bot-operator`],vertical:i.vertical,industry:i.industry,clientType:i[`client-type`],responseStatus:i[`response-status`],responseStatusCategory:i[`response-status-category`],format:i.format};if(i.dryRun){n({command:`cf radar bots web-crawlers summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/crawlers/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.webCrawlers.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Yt(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE`,`MIN0_MAX`,`PERCENTAGE_CHANGE`]}).option(`bot-operator`,{type:`string`,description:`Filters results by bot operator.`}).option(`vertical`,{type:`string`,description:`Filters results by vertical.`}).option(`industry`,{type:`string`,description:`Filters results by industry.`}).option(`client-type`,{type:`string`,description:`Filters results by agent type.`}).option(`response-status`,{type:`string`,description:`Filters results by HTTP response status code (e.g. 200, 403, 404). Only [IANA-registered codes](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) are accepted.`}).option(`response-status-category`,{type:`string`,description:`Filters results by HTTP response status code category.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xt={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of HTTP requests from crawlers, grouped by the specified dimension over time.`,builder:o(Yt),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],normalization:i.normalization,botOperator:i[`bot-operator`],vertical:i.vertical,industry:i.industry,clientType:i[`client-type`],responseStatus:i[`response-status`],responseStatusCategory:i[`response-status-category`],format:i.format};if(i.dryRun){n({command:`cf radar bots web-crawlers timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/crawlers/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.bots.webCrawlers.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},Zt={command:`web-crawlers`,describe:`Operations for bots.web-crawlers`,builder:e=>e.command(Jt).command(Xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Qt={command:`bots`,describe:`Internet-wide bot traffic trends, categories, and distribution statistics`,builder:e=>e.command(Rt).command(Bt).command(Ht).command(Kt).command(Wt).command(Zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $t(e){return e.positional(`ca-slug`,{type:`string`,description:`Certificate authority SHA256 fingerprint.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const en={command:`get <ca-slug>`,describe:`Retrieves the requested CA information.`,builder:o($t),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar ct authorities get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/authorities/${i[`ca-slug`]==null?`<ca-slug>`:encodeURIComponent(String(i[`ca-slug`]))}`,pathParams:{"ca-slug":String(i[`ca-slug`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.authorities.get({ca_slug:i[`ca-slug`],...a})),{successLabel:`Loaded`})}};function tn(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nn={command:`list`,describe:`Retrieves a list of certificate authorities.`,builder:o(tn),handler:async i=>{let a={limit:i.limit,offset:i.offset,format:i.format};if(i.dryRun){n({command:`cf radar ct authorities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/authorities`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.authorities.list(a)),{successLabel:`Loaded`})}},rn={command:`authorities`,describe:`Operations for ct.authorities`,builder:e=>e.command(en).command(nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function an(e){return e.positional(`log-slug`,{type:`string`,description:`Certificate log slug.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const on={command:`get <log-slug>`,describe:`Retrieves the requested certificate log information.`,builder:o(an),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar ct logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/logs/${i[`log-slug`]==null?`<log-slug>`:encodeURIComponent(String(i[`log-slug`]))}`,pathParams:{"log-slug":String(i[`log-slug`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.logs.get({log_slug:i[`log-slug`],...a})),{successLabel:`Loaded`})}};function sn(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cn={command:`list`,describe:`Retrieves a list of certificate logs.`,builder:o(sn),handler:async i=>{let a={limit:i.limit,offset:i.offset,format:i.format};if(i.dryRun){n({command:`cf radar ct logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/logs`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.logs.list(a)),{successLabel:`Loaded`})}},ln={command:`logs`,describe:`Operations for ct.logs`,builder:e=>e.command(on).command(cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function un(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the certificate attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`ca`,{type:`string`,description:`Filters results by certificate authority.`}).option(`ca-owner`,{type:`string`,description:`Filters results by certificate authority owner.`}).option(`duration`,{type:`string`,description:`Filters results by certificate duration.`}).option(`entry-type`,{type:`string`,description:"Filters results by entry type (certificate vs. pre-certificate). Incompatible with the `tld` filter/dimension."}).option(`expiration-status`,{type:`string`,description:`Filters results by expiration status (expired vs. valid).`}).option(`has-ips`,{type:`string`,description:`Filters results based on whether the certificates are bound to specific IP addresses.`}).option(`has-wildcards`,{type:`string`,description:`Filters results based on whether the certificates contain wildcard domains.`}).option(`log`,{type:`string`,description:"Filters results by certificate log. Incompatible with the `tld` filter/dimension."}).option(`log-api`,{type:`string`,description:"Filters results by certificate log API (RFC6962 vs. static). Incompatible with the `tld` filter/dimension."}).option(`log-operator`,{type:`string`,description:"Filters results by certificate log operator. Incompatible with the `tld` filter/dimension."}).option(`public-key-algorithm`,{type:`string`,description:`Filters results by public key algorithm.`}).option(`signature-algorithm`,{type:`string`,description:`Filters results by signature algorithm.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `log`, `logApi`, `logOperator`, and `entryType` filters/dimensions."}).option(`validation-level`,{type:`string`,description:`Filters results by validation level.`}).option(`unique-entries`,{type:`string`,description:`Specifies whether to filter out duplicate certificates and pre-certificates. Set to true for unique entries only.`}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`RAW_VALUES`,`PERCENTAGE`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dn={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of certificates grouped by the specified dimension.`,builder:o(un),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],ca:i.ca,caOwner:i[`ca-owner`],duration:i.duration,entryType:i[`entry-type`],expirationStatus:i[`expiration-status`],hasIps:i[`has-ips`],hasWildcards:i[`has-wildcards`],log:i.log,logApi:i[`log-api`],logOperator:i[`log-operator`],publicKeyAlgorithm:i[`public-key-algorithm`],signatureAlgorithm:i[`signature-algorithm`],tld:i.tld,validationLevel:i[`validation-level`],uniqueEntries:i[`unique-entries`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar ct summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function fn(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the certificate attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`ca`,{type:`string`,description:`Filters results by certificate authority.`}).option(`ca-owner`,{type:`string`,description:`Filters results by certificate authority owner.`}).option(`duration`,{type:`string`,description:`Filters results by certificate duration.`}).option(`entry-type`,{type:`string`,description:"Filters results by entry type (certificate vs. pre-certificate). Incompatible with the `tld` filter/dimension."}).option(`expiration-status`,{type:`string`,description:`Filters results by expiration status (expired vs. valid).`}).option(`has-ips`,{type:`string`,description:`Filters results based on whether the certificates are bound to specific IP addresses.`}).option(`has-wildcards`,{type:`string`,description:`Filters results based on whether the certificates contain wildcard domains.`}).option(`log`,{type:`string`,description:"Filters results by certificate log. Incompatible with the `tld` filter/dimension."}).option(`log-api`,{type:`string`,description:"Filters results by certificate log API (RFC6962 vs. static). Incompatible with the `tld` filter/dimension."}).option(`log-operator`,{type:`string`,description:"Filters results by certificate log operator. Incompatible with the `tld` filter/dimension."}).option(`public-key-algorithm`,{type:`string`,description:`Filters results by public key algorithm.`}).option(`signature-algorithm`,{type:`string`,description:`Filters results by signature algorithm.`}).option(`validation-level`,{type:`string`,description:`Filters results by validation level.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `log`, `logApi`, `logOperator`, and `entryType` filters/dimensions."}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`RAW_VALUES`,`PERCENTAGE`]}).option(`unique-entries`,{type:`string`,description:`Specifies whether to filter out duplicate certificates and pre-certificates. Set to true for unique entries only.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pn={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of certificates grouped by the specified dimension over time.`,builder:o(fn),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],ca:i.ca,caOwner:i[`ca-owner`],duration:i.duration,entryType:i[`entry-type`],expirationStatus:i[`expiration-status`],hasIps:i[`has-ips`],hasWildcards:i[`has-wildcards`],log:i.log,logApi:i[`log-api`],logOperator:i[`log-operator`],publicKeyAlgorithm:i[`public-key-algorithm`],signatureAlgorithm:i[`signature-algorithm`],validationLevel:i[`validation-level`],tld:i.tld,normalization:i.normalization,uniqueEntries:i[`unique-entries`],format:i.format};if(i.dryRun){n({command:`cf radar ct timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function mn(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`ca`,{type:`string`,description:`Filters results by certificate authority.`}).option(`ca-owner`,{type:`string`,description:`Filters results by certificate authority owner.`}).option(`duration`,{type:`string`,description:`Filters results by certificate duration.`}).option(`entry-type`,{type:`string`,description:"Filters results by entry type (certificate vs. pre-certificate). Incompatible with the `tld` filter/dimension."}).option(`expiration-status`,{type:`string`,description:`Filters results by expiration status (expired vs. valid).`}).option(`has-ips`,{type:`string`,description:`Filters results based on whether the certificates are bound to specific IP addresses.`}).option(`has-wildcards`,{type:`string`,description:`Filters results based on whether the certificates contain wildcard domains.`}).option(`log`,{type:`string`,description:"Filters results by certificate log. Incompatible with the `tld` filter/dimension."}).option(`log-api`,{type:`string`,description:"Filters results by certificate log API (RFC6962 vs. static). Incompatible with the `tld` filter/dimension."}).option(`log-operator`,{type:`string`,description:"Filters results by certificate log operator. Incompatible with the `tld` filter/dimension."}).option(`public-key-algorithm`,{type:`string`,description:`Filters results by public key algorithm.`}).option(`signature-algorithm`,{type:`string`,description:`Filters results by signature algorithm.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `log`, `logApi`, `logOperator`, and `entryType` filters/dimensions."}).option(`validation-level`,{type:`string`,description:`Filters results by validation level.`}).option(`unique-entries`,{type:`string`,description:`Specifies whether to filter out duplicate certificates and pre-certificates. Set to true for unique entries only.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hn={command:`timeseries`,describe:`Retrieves certificate volume over time.`,builder:o(mn),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],ca:i.ca,caOwner:i[`ca-owner`],duration:i.duration,entryType:i[`entry-type`],expirationStatus:i[`expiration-status`],hasIps:i[`has-ips`],hasWildcards:i[`has-wildcards`],log:i.log,logApi:i[`log-api`],logOperator:i[`log-operator`],publicKeyAlgorithm:i[`public-key-algorithm`],signatureAlgorithm:i[`signature-algorithm`],tld:i.tld,validationLevel:i[`validation-level`],uniqueEntries:i[`unique-entries`],format:i.format};if(i.dryRun){n({command:`cf radar ct timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ct.timeseries(a)),{successLabel:`Loaded`})}},gn={command:`ct`,describe:`Certificate Transparency log monitoring and newly-issued certificate discovery`,builder:e=>e.command(dn).command(hn).command(pn).command(rn).command(ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _n(e){return e.option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dataset-id`,{type:`number`,description:`The datasetId 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 vn={command:`download`,describe:`Retrieves an URL to download a single dataset.`,builder:o(_n),handler:async o=>{let s={format:o.format};if(o.dryRun){n({command:`cf radar datasets download`,method:`POST`,url:`https://api.cloudflare.com/client/v4/radar/datasets/download`,pathParams:{},query:s,bodyKind:`json`,body:o.body===void 0?a({datasetId:o[`dataset-id`]}):i(o.body)});return}let c=await e(o);if(o.body){let e=i(o.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),t(await r(`Creating`,async()=>c.radar.datasets.download({...e,...s})),{successLabel:`Created`});return}if(o[`dataset-id`]===void 0)throw Error(`--dataset-id is required (or pass --body with this field set).`);let l=a({datasetId:o[`dataset-id`]});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),t(await r(`Creating`,async()=>c.radar.datasets.download({...l,...s})),{successLabel:`Created`})}};function yn(e){return e.positional(`alias`,{type:`string`,description:`Dataset alias or ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bn={command:`get <alias>`,describe:`Retrieves the CSV content of a given dataset by alias or ID. When getting the content by alias the latest dataset is returned, optionally filtered by the latest available at a given date.`,builder:yn,handler:async t=>{if(t.dryRun){n({command:`cf radar datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/datasets/${t.alias==null?`<alias>`:encodeURIComponent(String(t.alias))}`,pathParams:{alias:String(t.alias??``)},bodyKind:`none`});return}await e(t),s((await r(`Loading`,async()=>c(`/radar/datasets/${encodeURIComponent(String(t.alias))}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}))).toString(`utf-8`))}};function xn(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`dataset-type`,{type:`string`,description:`Filters results by dataset type.`,choices:[`RANKING_BUCKET`,`REPORT`]}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sn={command:`list`,describe:`Retrieves a list of datasets.`,builder:o(xn),handler:async i=>{let a={limit:i.limit,offset:i.offset,datasetType:i[`dataset-type`],date:i.date,format:i.format};if(i.dryRun){n({command:`cf radar datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/datasets`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.datasets.list(a)),{successLabel:`Loaded`})}},Cn={command:`datasets`,describe:`Downloadable Radar datasets for offline analysis and research`,builder:e=>e.command(vn).command(bn).command(Sn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wn(e){return e.positional(`dimension`,{type:`string`,description:"Specifies the attribute by which to group the results. Grouping by `TLD_DNS_MAGNITUDE` does not support sub-daily aggregation intervals; `15m` and `1h` are raised to `1d`.",demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`cache-hit`,{type:`string`,description:`Filters results based on cache status.`}).option(`nodata`,{type:`string`,description:`Specifies whether the response includes empty DNS responses (NODATA).`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`response-ttl`,{type:`string`,description:`Filters results by DNS response TTL.`}).option(`dnssec`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) support.`}).option(`dnssec-aware`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) client awareness.`}).option(`dnssec-e2e`,{type:`string`,description:`Filters results based on DNSSEC-validated answers by end-to-end security status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`matching-answer`,{type:`string`,description:`Filters results based on whether the queries have a matching answer.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `ipVersion`, `protocol`, `dnssecE2e`, `dnssecAware`, `responseTtl`, and `cacheHit` filters/dimensions; this restriction does not apply to country-code TLDs (2-letter, e.g. `uk`)."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tn={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of DNS queries by the specified dimension.`,builder:o(wn),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,cacheHit:i[`cache-hit`],nodata:i.nodata,protocol:i.protocol,queryType:i[`query-type`],responseCode:i[`response-code`],responseTtl:i[`response-ttl`],dnssec:i.dnssec,dnssecAware:i[`dnssec-aware`],dnssecE2e:i[`dnssec-e2e`],ipVersion:i[`ip-version`],limitPerGroup:i[`limit-per-group`],matchingAnswer:i[`matching-answer`],tld:i.tld,format:i.format};if(i.dryRun){n({command:`cf radar dns summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.dns.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function En(e){return e.positional(`dimension`,{type:`string`,description:"Specifies the attribute by which to group the results. Grouping by `TLD_DNS_MAGNITUDE` does not support sub-daily aggregation intervals; `15m` and `1h` are raised to `1d`.",demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`cache-hit`,{type:`string`,description:`Filters results based on cache status.`}).option(`nodata`,{type:`string`,description:`Specifies whether the response includes empty DNS responses (NODATA).`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`response-ttl`,{type:`string`,description:`Filters results by DNS response TTL.`}).option(`dnssec`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) support.`}).option(`dnssec-aware`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) client awareness.`}).option(`dnssec-e2e`,{type:`string`,description:`Filters results based on DNSSEC-validated answers by end-to-end security status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`matching-answer`,{type:`string`,description:`Filters results based on whether the queries have a matching answer.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `ipVersion`, `protocol`, `dnssecE2e`, `dnssecAware`, `responseTtl`, and `cacheHit` filters/dimensions; this restriction does not apply to country-code TLDs (2-letter, e.g. `uk`)."}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `RANK` is only meaningful with the `TLD_DNS_MAGNITUDE` dimension, where it ranks TLDs by DNS query magnitude at each timestamp; for other dimensions it has no effect.",choices:[`PERCENTAGE`,`MIN0_MAX`,`RANK`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dn={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of DNS queries grouped by dimension over time.`,builder:o(En),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,cacheHit:i[`cache-hit`],nodata:i.nodata,protocol:i.protocol,queryType:i[`query-type`],responseCode:i[`response-code`],responseTtl:i[`response-ttl`],dnssec:i.dnssec,dnssecAware:i[`dnssec-aware`],dnssecE2e:i[`dnssec-e2e`],ipVersion:i[`ip-version`],limitPerGroup:i[`limit-per-group`],matchingAnswer:i[`matching-answer`],tld:i.tld,normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar dns timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.dns.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function On(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`cache-hit`,{type:`string`,description:`Filters results based on cache status.`}).option(`nodata`,{type:`string`,description:`Specifies whether the response includes empty DNS responses (NODATA).`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`response-ttl`,{type:`string`,description:`Filters results by DNS response TTL.`}).option(`dnssec`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) support.`}).option(`dnssec-aware`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) client awareness.`}).option(`dnssec-e2e`,{type:`string`,description:`Filters results based on DNSSEC-validated answers by end-to-end security status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`matching-answer`,{type:`string`,description:`Filters results based on whether the queries have a matching answer.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `ipVersion`, `protocol`, `dnssecE2e`, `dnssecAware`, `responseTtl`, and `cacheHit` filters/dimensions; this restriction does not apply to country-code TLDs (2-letter, e.g. `uk`)."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kn={command:`timeseries`,describe:`Retrieves normalized query volume to the 1.1.1.1 DNS resolver over time.`,builder:o(On),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,cacheHit:i[`cache-hit`],nodata:i.nodata,protocol:i.protocol,queryType:i[`query-type`],responseCode:i[`response-code`],responseTtl:i[`response-ttl`],dnssec:i.dnssec,dnssecAware:i[`dnssec-aware`],dnssecE2e:i[`dnssec-e2e`],ipVersion:i[`ip-version`],matchingAnswer:i[`matching-answer`],tld:i.tld,format:i.format};if(i.dryRun){n({command:`cf radar dns timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.dns.timeseries(a)),{successLabel:`Loaded`})}};function An(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`domain`,{type:`string`,description:"Filters results by domain name. When set, no other DNS filter may be used — only date filtering (`dateRange`, or `dateStart`/`dateEnd`) is allowed — and the date range cannot exceed 31 days."}).option(`cache-hit`,{type:`string`,description:`Filters results based on cache status.`}).option(`nodata`,{type:`string`,description:`Specifies whether the response includes empty DNS responses (NODATA).`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`response-ttl`,{type:`string`,description:`Filters results by DNS response TTL.`}).option(`dnssec`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) support.`}).option(`dnssec-aware`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) client awareness.`}).option(`dnssec-e2e`,{type:`string`,description:`Filters results based on DNSSEC-validated answers by end-to-end security status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`matching-answer`,{type:`string`,description:`Filters results based on whether the queries have a matching answer.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jn={command:`ases`,describe:`Retrieves the top autonomous systems by DNS queries made to 1.1.1.1 DNS resolver.`,builder:o(An),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,domain:i.domain,cacheHit:i[`cache-hit`],nodata:i.nodata,protocol:i.protocol,queryType:i[`query-type`],responseCode:i[`response-code`],responseTtl:i[`response-ttl`],dnssec:i.dnssec,dnssecAware:i[`dnssec-aware`],dnssecE2e:i[`dnssec-e2e`],ipVersion:i[`ip-version`],matchingAnswer:i[`matching-answer`],format:i.format};if(i.dryRun){n({command:`cf radar dns top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.dns.top.ases(a)),{successLabel:`Loaded`})}};function Mn(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`domain`,{type:`string`,description:"Filters results by domain name. When set, no other DNS filter may be used — only date filtering (`dateRange`, or `dateStart`/`dateEnd`) is allowed — and the date range cannot exceed 31 days."}).option(`cache-hit`,{type:`string`,description:`Filters results based on cache status.`}).option(`nodata`,{type:`string`,description:`Specifies whether the response includes empty DNS responses (NODATA).`}).option(`protocol`,{type:`string`,description:`Filters results by DNS transport protocol.`}).option(`query-type`,{type:`string`,description:`Filters results by DNS query type.`}).option(`response-code`,{type:`string`,description:`Filters results by DNS response code.`}).option(`response-ttl`,{type:`string`,description:`Filters results by DNS response TTL.`}).option(`dnssec`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) support.`}).option(`dnssec-aware`,{type:`string`,description:`Filters results based on DNSSEC (DNS Security Extensions) client awareness.`}).option(`dnssec-e2e`,{type:`string`,description:`Filters results based on DNSSEC-validated answers by end-to-end security status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`matching-answer`,{type:`string`,description:`Filters results based on whether the queries have a matching answer.`}).option(`tld`,{type:`string`,description:"Filters results by top-level domain. Incompatible with the `ipVersion`, `protocol`, `dnssecE2e`, `dnssecAware`, `responseTtl`, and `cacheHit` filters/dimensions; this restriction does not apply to country-code TLDs (2-letter, e.g. `uk`)."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nn={command:`locations`,describe:`Retrieves the top locations by DNS queries made to 1.1.1.1 DNS resolver.`,builder:o(Mn),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,domain:i.domain,cacheHit:i[`cache-hit`],nodata:i.nodata,protocol:i.protocol,queryType:i[`query-type`],responseCode:i[`response-code`],responseTtl:i[`response-ttl`],dnssec:i.dnssec,dnssecAware:i[`dnssec-aware`],dnssecE2e:i[`dnssec-e2e`],ipVersion:i[`ip-version`],matchingAnswer:i[`matching-answer`],tld:i.tld,format:i.format};if(i.dryRun){n({command:`cf radar dns top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/top/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.dns.top.locations(a)),{successLabel:`Loaded`})}},Pn={command:`top`,describe:`Operations for dns.top`,builder:e=>e.command(jn).command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fn={command:`dns`,describe:`Global DNS query trends — top domains, resolver stats, and DNSSEC adoption`,builder:e=>e.command(Tn).command(kn).command(Dn).command(Pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function In(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`encrypted`,{type:`string`,description:`Filters results by encryption status (encrypted vs. not-encrypted).`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of email routing metrics by the specified dimension.`,builder:o(In),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,ipVersion:i[`ip-version`],encrypted:i.encrypted,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar email routing summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/routing/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.routing.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Rn(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`encrypted`,{type:`string`,description:`Filters results by encryption status (encrypted vs. not-encrypted).`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zn={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of email routing metrics grouped by dimension over time.`,builder:o(Rn),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,ipVersion:i[`ip-version`],encrypted:i.encrypted,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar email routing timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/routing/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.routing.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},Bn={command:`routing`,describe:`Operations for email.routing`,builder:e=>e.command(Ln).command(zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Vn(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Hn={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of email security metrics by the specified dimension.`,builder:o(Vn),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar email security summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Un(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wn={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of email security metrics grouped by dimension over time.`,builder:o(Un),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar email security timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Gn(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`tld-category`,{type:`string`,description:`Filters results by TLD category.`,choices:[`CLASSIC`,`COUNTRY`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kn={command:`get`,describe:`Retrieves the top TLDs by number of email messages.`,builder:o(Gn),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],tldCategory:i[`tld-category`],format:i.format};if(i.dryRun){n({command:`cf radar email security top tlds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.top.tlds.get(a)),{successLabel:`Loaded`})}};function qn(e){return e.positional(`malicious`,{type:`string`,description:`Malicious classification.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`tld-category`,{type:`string`,description:`Filters results by TLD category.`,choices:[`CLASSIC`,`COUNTRY`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Jn={command:`get <malicious>`,describe:`Retrieves the top TLDs by emails classified as malicious or not.`,builder:o(qn),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],tldCategory:i[`tld-category`],format:i.format};if(i.dryRun){n({command:`cf radar email security top tlds malicious get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/malicious/${i.malicious==null?`<malicious>`:encodeURIComponent(String(i.malicious))}`,pathParams:{malicious:String(i.malicious??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.top.tlds.malicious.get({malicious:i.malicious,...a})),{successLabel:`Loaded`})}},Yn={command:`malicious`,describe:`Operations for email.security.top.tlds.malicious`,builder:e=>e.command(Jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xn(e){return e.positional(`spam`,{type:`string`,description:`Spam classification.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`tld-category`,{type:`string`,description:`Filters results by TLD category.`,choices:[`CLASSIC`,`COUNTRY`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get <spam>`,describe:`Retrieves the top TLDs by emails classified as spam or not.`,builder:o(Xn),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],tldCategory:i[`tld-category`],format:i.format};if(i.dryRun){n({command:`cf radar email security top tlds spam get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/spam/${i.spam==null?`<spam>`:encodeURIComponent(String(i.spam))}`,pathParams:{spam:String(i.spam??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.top.tlds.spam.get({spam:i.spam,...a})),{successLabel:`Loaded`})}},Qn={command:`spam`,describe:`Operations for email.security.top.tlds.spam`,builder:e=>e.command(Zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $n(e){return e.positional(`spoof`,{type:`string`,description:`Spoof classification.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`arc`,{type:`string`,description:`Filters results by ARC (Authenticated Received Chain) validation.`}).option(`dkim`,{type:`string`,description:`Filters results by DKIM (DomainKeys Identified Mail) validation status.`}).option(`dmarc`,{type:`string`,description:`Filters results by DMARC (Domain-based Message Authentication, Reporting and Conformance) validation status.`}).option(`spf`,{type:`string`,description:`Filters results by SPF (Sender Policy Framework) validation status.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`tld-category`,{type:`string`,description:`Filters results by TLD category.`,choices:[`CLASSIC`,`COUNTRY`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const er={command:`get <spoof>`,describe:`Retrieves the top TLDs by emails classified as spoof or not.`,builder:o($n),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],arc:i.arc,dkim:i.dkim,dmarc:i.dmarc,spf:i.spf,tlsVersion:i[`tls-version`],tldCategory:i[`tld-category`],format:i.format};if(i.dryRun){n({command:`cf radar email security top tlds spoof get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/spoof/${i.spoof==null?`<spoof>`:encodeURIComponent(String(i.spoof))}`,pathParams:{spoof:String(i.spoof??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.email.security.top.tlds.spoof.get({spoof:i.spoof,...a})),{successLabel:`Loaded`})}},tr={command:`spoof`,describe:`Operations for email.security.top.tlds.spoof`,builder:e=>e.command(er).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},nr={command:`tlds`,describe:`Operations for email.security.top.tlds`,builder:e=>e.command(Kn).command(Yn).command(Qn).command(tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},rr={command:`top`,describe:`Operations for email.security.top`,builder:e=>e.command(nr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ir={command:`security`,describe:`Operations for email.security`,builder:e=>e.command(Hn).command(Wn).command(rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ar={command:`email`,describe:`Email security trends — DMARC/SPF/DKIM adoption, spam, and phishing statistics`,builder:e=>e.command(Bn).command(ir).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function or(e){return e.positional(`asn`,{type:`string`,description:`Retrieves all AS-SETs that the given AS is a member of.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const sr={command:`as-set <asn>`,describe:`Retrieves Internet Routing Registry AS-SETs that an AS is a member of.`,builder:o(or),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar entities asns as-set`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${i.asn==null?`<asn>`:encodeURIComponent(String(i.asn))}/as_set`,pathParams:{asn:String(i.asn??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.asSet({asn:i.asn,...a})),{successLabel:`Loaded`})}};function cr(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`metric`,{type:`string`,description:`Metric to rank ASNs by.`,choices:[`OFFENSE_COUNT`,`NUMBER_OF_OFFENDING_IPS`]}).option(`date`,{type:`string`,description:`The date to retrieve (YYYY-MM-DD format). If not specified, returns the most recent available data. Note: This is the date the report was generated. The report is generated from information collected from the previous day (e.g., the 2026-02-23 entry contains data from 2026-02-22).`}).option(`compare-date-range`,{type:`string`,description:`Relative date range for rank change comparison (e.g., "1d", "7d", "30d").`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`sort-order`,{type:`string`,description:`Sort order.`,choices:[`ASC`,`DESC`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lr={command:`botnet-threat-feed`,describe:`Retrieves a ranked list of Autonomous Systems based on their presence in the Cloudflare Botnet Threat Feed. Rankings can be sorted by offense count or number of bad IPs. Optionally compare to a previous date to see rank changes.`,builder:o(cr),handler:async i=>{let a={limit:i.limit,offset:i.offset,metric:i.metric,date:i.date,compareDateRange:i[`compare-date-range`],location:i.location,asn:i.asn,sortOrder:i[`sort-order`],format:i.format};if(i.dryRun){n({command:`cf radar entities asns botnet-threat-feed`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/botnet_threat_feed`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.botnetThreatFeed(a)),{successLabel:`Loaded`})}};function ur(e){return e.positional(`asn`,{type:`string`,description:`Single Autonomous System Number (ASN) as integer.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dr={command:`get <asn>`,describe:"Retrieves the requested autonomous system information. (A confidence level below `5` indicates a low level of confidence in the traffic data - normally this happens because Cloudflare has a small amount of traffic from/to this AS). Population estimates come from APNIC (refer to https://labs.apnic.net/?p=526).",builder:o(ur),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar entities asns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${i.asn==null?`<asn>`:encodeURIComponent(String(i.asn))}`,pathParams:{asn:String(i.asn??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.get({asn:i.asn,...a})),{successLabel:`Loaded`})}};function fr(e){return e.option(`ip`,{type:`string`,description:`IP address.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pr={command:`ip`,describe:`Retrieves the requested autonomous system information based on IP address. Population estimates come from APNIC (refer to https://labs.apnic.net/?p=526).`,builder:o(fr),handler:async i=>{let a={ip:i.ip,format:i.format};if(i.dryRun){n({command:`cf radar entities asns ip`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/ip`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.ip(a)),{successLabel:`Loaded`})}};function $(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`asn`,{type:`string`,description:`Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`order-by`,{type:`string`,description:`Specifies the metric to order the ASNs by.`,choices:[`ASN`,`POPULATION`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mr={command:`list`,describe:`Retrieves a list of autonomous systems.`,builder:o($),handler:async i=>{let a={limit:i.limit,offset:i.offset,asn:i.asn,location:i.location,orderBy:i[`order-by`],format:i.format};if(i.dryRun){n({command:`cf radar entities asns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.list(a)),{successLabel:`Loaded`})}};function hr(e){return e.positional(`asn`,{type:`string`,description:`Retrieves all ASNs with provider-customer or peering relationships with the given ASN.`,demandOption:!0}).option(`asn2`,{type:`number`,description:`Retrieves the AS relationship of ASN2 with respect to the given ASN.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gr={command:`rel <asn>`,describe:`Retrieves AS-level relationship for given networks.`,builder:o(hr),handler:async i=>{let a={asn2:i.asn2,format:i.format};if(i.dryRun){n({command:`cf radar entities asns rel`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${i.asn==null?`<asn>`:encodeURIComponent(String(i.asn))}/rel`,pathParams:{asn:String(i.asn??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.asns.rel({asn:i.asn,...a})),{successLabel:`Loaded`})}},_r={command:`asns`,describe:`Operations for entities.asns`,builder:e=>e.command(sr).command(lr).command(dr).command(pr).command(mr).command(gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vr(e){return e.option(`ip`,{type:`string`,description:`IP address.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yr={command:`get`,describe:`Retrieves IP address information.`,builder:o(vr),handler:async i=>{let a={ip:i.ip,format:i.format};if(i.dryRun){n({command:`cf radar entities get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/ip`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.get(a)),{successLabel:`Loaded`})}};function br(e){return e.positional(`location`,{type:`string`,description:`Location alpha-2 code.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xr={command:`get <location>`,describe:"Retrieves the requested location information. (A confidence level below `5` indicates a low level of confidence in the traffic data - normally this happens because Cloudflare has a small amount of traffic from/to this location).",builder:o(br),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar entities locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/locations/${i.location==null?`<location>`:encodeURIComponent(String(i.location))}`,pathParams:{location:String(i.location??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.locations.get({location:i.location,...a})),{successLabel:`Loaded`})}};function Sr(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`region`,{type:`string`,description:`Filters results by region.`}).option(`subregion`,{type:`string`,description:`Filters results by subregion.`}).option(`continent`,{type:`string`,description:`Filters results by continent code.`,choices:[`AF`,`AS`,`EU`,`NA`,`OC`,`SA`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cr={command:`list`,describe:`Retrieves a list of locations.`,builder:o(Sr),handler:async i=>{let a={limit:i.limit,offset:i.offset,location:i.location,region:i.region,subregion:i.subregion,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar entities locations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.entities.locations.list(a)),{successLabel:`Loaded`})}},wr={command:`locations`,describe:`Operations for entities.locations`,builder:e=>e.command(xr).command(Cr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tr={command:`entities`,describe:`Look up ASNs, IPs, domains, and locations with metadata and traffic summaries`,builder:e=>e.command(yr).command(_r).command(wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Er(e){return e.positional(`geo-id`,{type:`string`,description:`Geolocation ID. Refer to [GeoNames](https://download.geonames.org/export/dump/readme.txt)`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dr={command:`get <geo-id>`,describe:"Retrieves the requested Geolocation information. Geolocation names can be localized by sending an `Accept-Language` HTTP header with a BCP 47 language tag (e.g., `Accept-Language: pt-PT`). The full quality-value chain is supported (e.g., `pt-PT,pt;q=0.9,en;q=0.8`).",builder:o(Er),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar geolocations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/geolocations/${i[`geo-id`]==null?`<geo-id>`:encodeURIComponent(String(i[`geo-id`]))}`,pathParams:{"geo-id":String(i[`geo-id`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.geolocations.get({geo_id:i[`geo-id`],...a})),{successLabel:`Loaded`})}};function Or(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`geo-id`,{type:`string`,description:`Filters results by geolocation. Specify a comma-separated list of GeoNames IDs.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kr={command:`list`,describe:"Retrieves a list of geolocations. Geolocation names can be localized by sending an `Accept-Language` HTTP header with a BCP 47 language tag (e.g., `Accept-Language: pt-PT`). The full quality-value chain is supported (e.g., `pt-PT,pt;q=0.9,en;q=0.8`).",builder:o(Or),handler:async i=>{let a={limit:i.limit,offset:i.offset,geoId:i[`geo-id`],location:i.location,format:i.format};if(i.dryRun){n({command:`cf radar geolocations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/geolocations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.geolocations.list(a)),{successLabel:`Loaded`})}},Ar={command:`geolocations`,describe:`Geographic location metadata used for regional traffic analysis`,builder:e=>e.command(Dr).command(kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function jr(e){return e.positional(`bot-class`,{type:`string`,description:`Bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mr={command:`get <bot-class>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested bot class.`,builder:o(jr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases bot-class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/bot_class/${i[`bot-class`]==null?`<bot-class>`:encodeURIComponent(String(i[`bot-class`]))}`,pathParams:{"bot-class":String(i[`bot-class`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.botClass.get({bot_class:i[`bot-class`],...a})),{successLabel:`Loaded`})}},Nr={command:`bot-class`,describe:`Operations for http.ases.bot-class`,builder:e=>e.command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pr(e){return e.positional(`browser-family`,{type:`string`,description:`Browser family.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fr={command:`get <browser-family>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested browser family.`,builder:o(Pr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],format:i.format};if(i.dryRun){n({command:`cf radar http ases browser-family get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/browser_family/${i[`browser-family`]==null?`<browser-family>`:encodeURIComponent(String(i[`browser-family`]))}`,pathParams:{"browser-family":String(i[`browser-family`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.browserFamily.get({browser_family:i[`browser-family`],...a})),{successLabel:`Loaded`})}},Ir={command:`browser-family`,describe:`Operations for http.ases.browser-family`,builder:e=>e.command(Fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lr(e){return e.positional(`device-type`,{type:`string`,description:`Device type.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rr={command:`get <device-type>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested device type.`,builder:o(Lr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases device-type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/device_type/${i[`device-type`]==null?`<device-type>`:encodeURIComponent(String(i[`device-type`]))}`,pathParams:{"device-type":String(i[`device-type`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.deviceType.get({device_type:i[`device-type`],...a})),{successLabel:`Loaded`})}},zr={command:`device-type`,describe:`Operations for http.ases.device-type`,builder:e=>e.command(Rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Br(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vr={command:`get`,describe:`Retrieves the top autonomous systems by HTTP requests.`,builder:o(Br),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.get(a)),{successLabel:`Loaded`})}};function Hr(e){return e.positional(`http-version`,{type:`string`,description:`HTTP version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ur={command:`get <http-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP version.`,builder:o(Hr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases http-method get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/http_version/${i[`http-version`]==null?`<http-version>`:encodeURIComponent(String(i[`http-version`]))}`,pathParams:{"http-version":String(i[`http-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.httpMethod.get({http_version:i[`http-version`],...a})),{successLabel:`Loaded`})}},Wr={command:`http-method`,describe:`Operations for http.ases.http-method`,builder:e=>e.command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gr(e){return e.positional(`http-protocol`,{type:`string`,description:`HTTP protocol (HTTP vs. HTTPS).`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kr={command:`get <http-protocol>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP protocol.`,builder:o(Gr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases http-protocol get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/http_protocol/${i[`http-protocol`]==null?`<http-protocol>`:encodeURIComponent(String(i[`http-protocol`]))}`,pathParams:{"http-protocol":String(i[`http-protocol`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.httpProtocol.get({http_protocol:i[`http-protocol`],...a})),{successLabel:`Loaded`})}},qr={command:`http-protocol`,describe:`Operations for http.ases.http-protocol`,builder:e=>e.command(Kr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jr(e){return e.positional(`ip-version`,{type:`string`,description:`IP version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yr={command:`get <ip-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested IP version.`,builder:o(Jr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases ip-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/ip_version/${i[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(i[`ip-version`]))}`,pathParams:{"ip-version":String(i[`ip-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.ipVersion.get({ip_version:i[`ip-version`],...a})),{successLabel:`Loaded`})}},Xr={command:`ip-version`,describe:`Operations for http.ases.ip-version`,builder:e=>e.command(Yr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zr(e){return e.positional(`os`,{type:`string`,description:`Operating system.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`get <os>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested operating system.`,builder:o(Zr),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases os get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/os/${i.os==null?`<os>`:encodeURIComponent(String(i.os))}`,pathParams:{os:String(i.os??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.os.get({os:i.os,...a})),{successLabel:`Loaded`})}},$r={command:`os`,describe:`Operations for http.ases.os`,builder:e=>e.command(Qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ei(e){return e.positional(`tls-version`,{type:`string`,description:`TLS version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ti={command:`get <tls-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested TLS protocol version.`,builder:o(ei),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http ases tls-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/tls_version/${i[`tls-version`]==null?`<tls-version>`:encodeURIComponent(String(i[`tls-version`]))}`,pathParams:{"tls-version":String(i[`tls-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.ases.tlsVersion.get({tls_version:i[`tls-version`],...a})),{successLabel:`Loaded`})}},ni={command:`tls-version`,describe:`Operations for http.ases.tls-version`,builder:e=>e.command(ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ri={command:`ases`,describe:`Operations for http.ases`,builder:e=>e.command(Vr).command(Nr).command(Ir).command(zr).command(Wr).command(qr).command(Xr).command($r).command(ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ii(e){return e.positional(`bot-class`,{type:`string`,description:`Bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ai={command:`get <bot-class>`,describe:`Retrieves the top locations, by HTTP requests, of the requested bot class.`,builder:o(ii),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations bot-class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/bot_class/${i[`bot-class`]==null?`<bot-class>`:encodeURIComponent(String(i[`bot-class`]))}`,pathParams:{"bot-class":String(i[`bot-class`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.botClass.get({bot_class:i[`bot-class`],...a})),{successLabel:`Loaded`})}},oi={command:`bot-class`,describe:`Operations for http.locations.bot-class`,builder:e=>e.command(ai).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function si(e){return e.positional(`browser-family`,{type:`string`,description:`Browser family.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ci={command:`get <browser-family>`,describe:`Retrieves the top locations, by HTTP requests, of the requested browser family.`,builder:o(si),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],format:i.format};if(i.dryRun){n({command:`cf radar http locations browser-family get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/browser_family/${i[`browser-family`]==null?`<browser-family>`:encodeURIComponent(String(i[`browser-family`]))}`,pathParams:{"browser-family":String(i[`browser-family`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.browserFamily.get({browser_family:i[`browser-family`],...a})),{successLabel:`Loaded`})}},li={command:`browser-family`,describe:`Operations for http.locations.browser-family`,builder:e=>e.command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(e){return e.positional(`device-type`,{type:`string`,description:`Device type.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const di={command:`get <device-type>`,describe:`Retrieves the top locations, by HTTP requests, of the requested device type.`,builder:o(ui),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations device-type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/device_type/${i[`device-type`]==null?`<device-type>`:encodeURIComponent(String(i[`device-type`]))}`,pathParams:{"device-type":String(i[`device-type`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.deviceType.get({device_type:i[`device-type`],...a})),{successLabel:`Loaded`})}},fi={command:`device-type`,describe:`Operations for http.locations.device-type`,builder:e=>e.command(di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pi(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mi={command:`get`,describe:`Retrieves the top locations by HTTP requests.`,builder:o(pi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.get(a)),{successLabel:`Loaded`})}};function hi(e){return e.positional(`http-version`,{type:`string`,description:`HTTP version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gi={command:`get <http-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested HTTP version.`,builder:o(hi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations http-method get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/http_version/${i[`http-version`]==null?`<http-version>`:encodeURIComponent(String(i[`http-version`]))}`,pathParams:{"http-version":String(i[`http-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.httpMethod.get({http_version:i[`http-version`],...a})),{successLabel:`Loaded`})}},_i={command:`http-method`,describe:`Operations for http.locations.http-method`,builder:e=>e.command(gi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vi(e){return e.positional(`http-protocol`,{type:`string`,description:`HTTP protocol (HTTP vs. HTTPS).`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yi={command:`get <http-protocol>`,describe:`Retrieves the top locations, by HTTP requests, of the requested HTTP protocol.`,builder:o(vi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations http-protocol get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/http_protocol/${i[`http-protocol`]==null?`<http-protocol>`:encodeURIComponent(String(i[`http-protocol`]))}`,pathParams:{"http-protocol":String(i[`http-protocol`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.httpProtocol.get({http_protocol:i[`http-protocol`],...a})),{successLabel:`Loaded`})}},bi={command:`http-protocol`,describe:`Operations for http.locations.http-protocol`,builder:e=>e.command(yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xi(e){return e.positional(`ip-version`,{type:`string`,description:`IP version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Si={command:`get <ip-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested IP version.`,builder:o(xi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations ip-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/ip_version/${i[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(i[`ip-version`]))}`,pathParams:{"ip-version":String(i[`ip-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.ipVersion.get({ip_version:i[`ip-version`],...a})),{successLabel:`Loaded`})}},Ci={command:`ip-version`,describe:`Operations for http.locations.ip-version`,builder:e=>e.command(Si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wi(e){return e.positional(`os`,{type:`string`,description:`Operating system.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ti={command:`get <os>`,describe:`Retrieves the top locations, by HTTP requests, of the requested operating system.`,builder:o(wi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations os get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/os/${i.os==null?`<os>`:encodeURIComponent(String(i.os))}`,pathParams:{os:String(i.os??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.os.get({os:i.os,...a})),{successLabel:`Loaded`})}},Ei={command:`os`,describe:`Operations for http.locations.os`,builder:e=>e.command(Ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Di(e){return e.positional(`tls-version`,{type:`string`,description:`TLS version.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oi={command:`get <tls-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested TLS protocol version.`,builder:o(Di),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],botClass:i[`bot-class`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http locations tls-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/tls_version/${i[`tls-version`]==null?`<tls-version>`:encodeURIComponent(String(i[`tls-version`]))}`,pathParams:{"tls-version":String(i[`tls-version`]??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.locations.tlsVersion.get({tls_version:i[`tls-version`],...a})),{successLabel:`Loaded`})}},ki={command:`tls-version`,describe:`Operations for http.locations.tls-version`,builder:e=>e.command(Oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ai={command:`locations`,describe:`Operations for http.locations`,builder:e=>e.command(mi).command(oi).command(li).command(fi).command(_i).command(bi).command(Ci).command(Ei).command(ki).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ji(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the HTTP attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`api-traffic`,{type:`string`,description:"Filters results by API traffic classification. API traffic is identified by JSON or XML response content types on dynamic (non-cacheable) HTTP requests. Incompatible with the `browserFamily`, `deviceType`, `httpProtocol`, `httpVersion`, `ipVersion`, `os`, and `tlsVersion` filters/dimensions. When set, results can only be further filtered by location, continent, or Autonomous System."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mi={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of HTTP requests by the specified dimension.`,builder:o(ji),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],apiTraffic:i[`api-traffic`],botClass:i[`bot-class`],contentType:i[`content-type`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar http summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Ni(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the HTTP attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`api-traffic`,{type:`string`,description:"Filters results by API traffic classification. API traffic is identified by JSON or XML response content types on dynamic (non-cacheable) HTTP requests. Incompatible with the `browserFamily`, `deviceType`, `httpProtocol`, `httpVersion`, `ipVersion`, `os`, and `tlsVersion` filters/dimensions. When set, results can only be further filtered by location, continent, or Autonomous System."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN0_MAX`]}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pi={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of HTTP requests grouped by dimension.`,builder:o(Ni),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],apiTraffic:i[`api-traffic`],botClass:i[`bot-class`],contentType:i[`content-type`],limitPerGroup:i[`limit-per-group`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],normalization:i.normalization,ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],format:i.format};if(i.dryRun){n({command:`cf radar http timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Fi(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE_CHANGE`,`MIN0_MAX`]}).option(`api-traffic`,{type:`string`,description:"Filters results by API traffic classification. API traffic is identified by JSON or XML response content types on dynamic (non-cacheable) HTTP requests. Incompatible with the `browserFamily`, `deviceType`, `httpProtocol`, `httpVersion`, `ipVersion`, `os`, and `tlsVersion` filters/dimensions. When set, results can only be further filtered by location, continent, or Autonomous System."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`content-type`,{type:`string`,description:`Filters results by content type category. When set, results can only be further filtered by location, continent, or Autonomous System.`}).option(`device-type`,{type:`string`,description:`Filters results by device type.`}).option(`http-protocol`,{type:`string`,description:`Filters results by HTTP protocol (HTTP vs. HTTPS).`}).option(`http-version`,{type:`string`,description:`Filters results by HTTP version.`}).option(`ip-version`,{type:`string`,description:`Filters results by IP version (Ipv4 vs. IPv6).`}).option(`os`,{type:`string`,description:`Filters results by operating system.`}).option(`tls-version`,{type:`string`,description:`Filters results by TLS version.`}).option(`browser-family`,{type:`string`,description:`Filters results by browser family.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ii={command:`timeseries`,describe:`Retrieves the HTTP requests over time.`,builder:o(Fi),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],normalization:i.normalization,apiTraffic:i[`api-traffic`],botClass:i[`bot-class`],contentType:i[`content-type`],deviceType:i[`device-type`],httpProtocol:i[`http-protocol`],httpVersion:i[`http-version`],ipVersion:i[`ip-version`],os:i.os,tlsVersion:i[`tls-version`],browserFamily:i[`browser-family`],format:i.format};if(i.dryRun){n({command:`cf radar http timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.http.timeseries(a)),{successLabel:`Loaded`})}},Li={command:`http`,describe:`HTTP protocol trends — TLS versions, HTTP versions, browser share, and OS distribution`,builder:e=>e.command(Mi).command(Ii).command(Pi).command(ri).command(Ai).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ri(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`compromised`,{type:`string`,description:`Filters results by compromised credential status (clean vs. compromised).`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zi={command:`summary-v2 <dimension>`,describe:`Retrieves an aggregated summary of HTTP authentication requests grouped by the specified dimension.`,builder:o(Ri),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,botClass:i[`bot-class`],compromised:i.compromised,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar leaked-credentials summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/leaked_credential_checks/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.leakedCredentials.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Bi(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`bot-class`,{type:`string`,description:`Filters results by bot class. Refer to [Bot classes](https://developers.cloudflare.com/radar/concepts/bot-classes/).`}).option(`compromised`,{type:`string`,description:`Filters results by compromised credential status (clean vs. compromised).`}).option(`check-result`,{type:`string`,description:`Filters results by leaked credential check result.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE_CHANGE`,`MIN0_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vi={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of HTTP authentication requests, grouped by the specified dimension over time.`,builder:o(Bi),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,botClass:i[`bot-class`],compromised:i.compromised,checkResult:i[`check-result`],limitPerGroup:i[`limit-per-group`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar leaked-credentials timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/leaked_credential_checks/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.leakedCredentials.timeseriesGroupsV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},Hi={command:`leaked-credentials`,describe:`Leaked credential detection trends and exposure statistics`,builder:e=>e.command(zi).command(Vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ui(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the NetFlows attribute by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`product`,{type:`string`,description:`Filters the results by network traffic product types.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wi={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of network traffic (NetFlows) by the specified dimension.`,builder:o(Ui),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],product:i.product,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar netflows summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.netflows.summaryV2({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function Gi(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the NetFlows attribute by which to group the results.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE`,`MIN0_MAX`,`PERCENTAGE_CHANGE`]}).option(`product`,{type:`string`,description:`Filters the results by network traffic product types.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ki={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of NetFlows traffic, grouped by the specified dimension over time.`,builder:o(Gi),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],limitPerGroup:i[`limit-per-group`],normalization:i.normalization,product:i.product,format:i.format};if(i.dryRun){n({command:`cf radar netflows timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.netflows.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function qi(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`product`,{type:`string`,description:`Filters the results by network traffic product types.`}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`normalization`,{type:`string`,description:"Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). `PERCENTAGE_CHANGE` requires exactly one comparison series (e.g. a `control` date range).",choices:[`PERCENTAGE_CHANGE`,`MIN0_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ji={command:`timeseries`,describe:`Retrieves network traffic (NetFlows) over time.`,builder:o(qi),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],product:i.product,asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar netflows timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.netflows.timeseries(a)),{successLabel:`Loaded`})}};function Yi(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xi={command:`ases`,describe:`Retrieves the top autonomous systems by network traffic (NetFlows).`,builder:o(Yi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],format:i.format};if(i.dryRun){n({command:`cf radar netflows top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.netflows.top.ases(a)),{successLabel:`Loaded`})}};function Zi(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`geo-id`,{type:`string`,description:"Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with `-` to exclude geoIds from results. For example, `-2267056,360689` excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York)."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qi={command:`locations`,describe:`Retrieves the top locations by network traffic (NetFlows).`,builder:o(Zi),handler:async i=>{let a={limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,geoId:i[`geo-id`],format:i.format};if(i.dryRun){n({command:`cf radar netflows top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/top/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.netflows.top.locations(a)),{successLabel:`Loaded`})}},$i={command:`top`,describe:`Operations for netflows.top`,builder:e=>e.command(Xi).command(Qi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ea={command:`netflows`,describe:`Network-layer traffic flow data and volumetric trend analysis`,builder:e=>e.command(Wi).command(Ji).command(Ki).command($i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ta(e){return e.positional(`slug`,{type:`string`,description:`Origin slug.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const na={command:`get <slug>`,describe:`Retrieves the requested origin information with its regions.`,builder:o(ta),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar origins get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/${i.slug==null?`<slug>`:encodeURIComponent(String(i.slug))}`,pathParams:{slug:String(i.slug??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.origins.get({slug:i.slug,...a})),{successLabel:`Loaded`})}};function ra(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ia={command:`list`,describe:`Retrieves a list of origins with their regions.`,builder:o(ra),handler:async i=>{let a={limit:i.limit,offset:i.offset,format:i.format};if(i.dryRun){n({command:`cf radar origins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.origins.list(a)),{successLabel:`Loaded`})}};function aa(e){return e.positional(`dimension`,{type:`string`,description:"Specifies the origin attribute by which to group the results. `ORIGIN` groups across all providers and does not accept an `origin` or `region`. `REGION` requires an `origin`. `SUCCESS_RATE` and `PERCENTILE` require both an `origin` and a `region` and constrain the `metric` (`SUCCESS_RATE` supports only `REQUESTS`; `PERCENTILE` supports any metric except `REQUESTS`). `limitPerGroup` is only supported on the `REGION` dimension.",demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`origin`,{type:`string`,description:"Filters results by origin. Required for every dimension except `ORIGIN`; must not be set on the `ORIGIN` dimension, which groups across all providers."}).option(`metric`,{type:`string`,description:"Specifies the metric to retrieve. Allowed metrics depend on the selected dimension (see the `dimension` path parameter).",choices:[`CONNECTION_FAILURES`,`REQUESTS`,`RESPONSE_HEADER_RECEIVE_DURATION`,`TCP_HANDSHAKE_DURATION`,`TCP_RTT`,`TLS_HANDSHAKE_DURATION`],demandOption:!0}).option(`region`,{type:`string`,description:"Filters results by origin region. Requires `origin` to be set and is validated against it."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oa={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of origin metrics grouped by the specified dimension.`,builder:o(aa),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],origin:i.origin,metric:i.metric,region:i.region,format:i.format};if(i.dryRun){n({command:`cf radar origins summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.origins.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function sa(e){return e.positional(`dimension`,{type:`string`,description:"Specifies the origin attribute by which to group the results. `ORIGIN` groups across all providers and does not accept an `origin` or `region`. `REGION` requires an `origin`. `SUCCESS_RATE` and `PERCENTILE` require both an `origin` and a `region` and constrain the `metric` (`SUCCESS_RATE` supports only `REQUESTS`; `PERCENTILE` supports any metric except `REQUESTS`). `limitPerGroup` is only supported on the `REGION` dimension.",demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`origin`,{type:`string`,description:"Filters results by origin. Required for every dimension except `ORIGIN`; must not be set on the `ORIGIN` dimension, which groups across all providers."}).option(`metric`,{type:`string`,description:"Specifies the metric to retrieve. Allowed metrics depend on the selected dimension (see the `dimension` path parameter).",choices:[`CONNECTION_FAILURES`,`REQUESTS`,`RESPONSE_HEADER_RECEIVE_DURATION`,`TCP_HANDSHAKE_DURATION`,`TCP_RTT`,`TLS_HANDSHAKE_DURATION`],demandOption:!0}).option(`region`,{type:`string`,description:"Filters results by origin region. Requires `origin` to be set and is validated against it."}).option(`normalization`,{type:`string`,description:`Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).`,choices:[`PERCENTAGE`,`MIN0_MAX`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ca={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of origin metrics grouped by the specified dimension over time.`,builder:o(sa),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],limitPerGroup:i[`limit-per-group`],origin:i.origin,metric:i.metric,region:i.region,normalization:i.normalization,format:i.format};if(i.dryRun){n({command:`cf radar origins timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.origins.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function la(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`origin`,{type:`string`,description:`Filters results by origin.`,demandOption:!0}).option(`metric`,{type:`string`,description:"Specifies the metric to retrieve. Without a `region`, only `REQUESTS` or `CONNECTION_FAILURES` are available; specify a `region` to use the latency metrics.",choices:[`CONNECTION_FAILURES`,`REQUESTS`,`RESPONSE_HEADER_RECEIVE_DURATION`,`TCP_HANDSHAKE_DURATION`,`TCP_RTT`,`TLS_HANDSHAKE_DURATION`],demandOption:!0}).option(`region`,{type:`string`,description:"Filters results by origin region. Requires `origin` to be set and is validated against it."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ua={command:`timeseries`,describe:`Retrieves the time series of origin metrics for the specified origin.`,builder:o(la),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],origin:i.origin,metric:i.metric,region:i.region,format:i.format};if(i.dryRun){n({command:`cf radar origins timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/timeseries`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.origins.timeseries(a)),{successLabel:`Loaded`})}},da={command:`origins`,describe:`Cloud and hosting origin providers (e.g. Amazon, by region) and their traffic metrics`,builder:e=>e.command(na).command(ia).command(oa).command(ua).command(ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function fa(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the origin post-quantum data dimension by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pa={command:`summary <dimension>`,describe:`Returns a summary of origin post-quantum data grouped by the specified dimension.`,builder:o(fa),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar post-quantum origin summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/origin/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.postQuantum.origin.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function ma(e){return e.positional(`dimension`,{type:`string`,description:`Specifies the origin post-quantum data dimension by which to group the results.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ha={command:`timeseries-groups <dimension>`,describe:`Returns a timeseries of origin post-quantum data grouped by the specified dimension.`,builder:o(ma),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar post-quantum origin timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/origin/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.postQuantum.origin.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},ga={command:`origin`,describe:`Operations for post-quantum.origin`,builder:e=>e.command(pa).command(ha).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _a(e){return e.option(`host`,{type:`string`,description:`Hostname or IP address to test for Post-Quantum TLS support, optionally with port (defaults to 443).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const va={command:`support`,describe:`Tests whether a hostname or IP address supports Post-Quantum (PQ) TLS key exchange. Returns information about the negotiated key exchange algorithm, whether it uses PQ cryptography, and any detected TLS implementation bugs (Split ClientHello, HRR failure, etc.).`,builder:_a,handler:async i=>{let a={host:i.host};if(i.dryRun){n({command:`cf radar post-quantum tls support`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/tls/support`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.postQuantum.tls.support(a)),{successLabel:`Loaded`})}},ya={command:`tls`,describe:`Operations for post-quantum.tls`,builder:e=>e.command(va).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ba={command:`post-quantum`,describe:`Post-quantum encryption adoption and deployment trends across the Internet`,builder:e=>e.command(ga).command(ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xa(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`metric`,{type:`string`,description:`Defines which metric to return (bandwidth, latency, or DNS response time).`,choices:[`BANDWIDTH`,`DNS`,`LATENCY`],demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sa={command:`summary`,describe:`Retrieves a summary (percentiles) of bandwidth, latency, or DNS response time from the Radar Internet Quality Index (IQI).`,builder:o(xa),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,metric:i.metric,format:i.format};if(i.dryRun){n({command:`cf radar quality iqi summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/iqi/summary`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.iqi.summary(a)),{successLabel:`Loaded`})}};function Ca(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`interpolation`,{type:`boolean`,description:`Enables interpolation for all series (using the average).`}).option(`metric`,{type:`string`,description:`Defines which metric to return (bandwidth, latency, or DNS response time).`,choices:[`BANDWIDTH`,`DNS`,`LATENCY`],demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wa={command:`timeseries-groups`,describe:`Retrieves a time series (percentiles) of bandwidth, latency, or DNS response time from the Radar Internet Quality Index (IQI).`,builder:o(Ca),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,interpolation:i.interpolation,metric:i.metric,format:i.format};if(i.dryRun){n({command:`cf radar quality iqi timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/iqi/timeseries_groups`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.iqi.timeseriesGroups(a)),{successLabel:`Loaded`})}},Ta={command:`iqi`,describe:`Operations for quality.iqi`,builder:e=>e.command(Sa).command(wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ea(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`bucket-size`,{type:`number`,description:`Specifies the width for every bucket in the histogram.`}).option(`metric-group`,{type:`string`,description:`Metrics to be returned.`,choices:[`BANDWIDTH`,`LATENCY`,`JITTER`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Da={command:`histogram`,describe:`Retrieves a histogram from the previous 90 days of Cloudflare Speed Test data, split into fixed bandwidth (Mbps), latency (ms), or jitter (ms) buckets.`,builder:o(Ea),handler:async i=>{let a={name:i.name,dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,bucketSize:i[`bucket-size`],metricGroup:i[`metric-group`],format:i.format};if(i.dryRun){n({command:`cf radar quality speed histogram`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/histogram`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.speed.histogram(a)),{successLabel:`Loaded`})}};function Oa(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ka={command:`summary`,describe:`Retrieves a summary of bandwidth, latency, jitter, and packet loss, from the previous 90 days of Cloudflare Speed Test data.`,builder:o(Oa),handler:async i=>{let a={name:i.name,dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar quality speed summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/summary`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.speed.summary(a)),{successLabel:`Loaded`})}};function Aa(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`order-by`,{type:`string`,description:`Specifies the metric to order the results by.`,choices:[`BANDWIDTH_DOWNLOAD`,`BANDWIDTH_UPLOAD`,`LATENCY_IDLE`,`LATENCY_LOADED`,`JITTER_IDLE`,`JITTER_LOADED`]}).option(`reverse`,{type:`boolean`,description:`Reverses the order of results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ja={command:`ases`,describe:`Retrieves the top autonomous systems by bandwidth, latency, jitter, or packet loss, from the previous 90 days of Cloudflare Speed Test data.`,builder:o(Aa),handler:async i=>{let a={limit:i.limit,name:i.name,dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,orderBy:i[`order-by`],reverse:i.reverse,format:i.format};if(i.dryRun){n({command:`cf radar quality speed top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/top/ases`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.speed.top.ases(a)),{successLabel:`Loaded`})}};function Ma(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`order-by`,{type:`string`,description:`Specifies the metric to order the results by.`,choices:[`BANDWIDTH_DOWNLOAD`,`BANDWIDTH_UPLOAD`,`LATENCY_IDLE`,`LATENCY_LOADED`,`JITTER_IDLE`,`JITTER_LOADED`]}).option(`reverse`,{type:`boolean`,description:`Reverses the order of results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Na={command:`locations`,describe:`Retrieves the top locations by bandwidth, latency, jitter, or packet loss, from the previous 90 days of Cloudflare Speed Test data.`,builder:o(Ma),handler:async i=>{let a={limit:i.limit,name:i.name,dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,orderBy:i[`order-by`],reverse:i.reverse,format:i.format};if(i.dryRun){n({command:`cf radar quality speed top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/top/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.quality.speed.top.locations(a)),{successLabel:`Loaded`})}},Pa={command:`top`,describe:`Operations for quality.speed.top`,builder:e=>e.command(ja).command(Na).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fa={command:`speed`,describe:`Operations for quality.speed`,builder:e=>e.command(Da).command(ka).command(Pa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ia={command:`quality`,describe:`Internet connection quality metrics — speed, latency, and jitter by geography and ASN`,builder:e=>e.command(Ta).command(Fa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function La(e){return e.positional(`domain`,{type:`string`,description:`Domain name.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`ranking-type`,{type:`string`,description:`The ranking type.`,choices:[`POPULAR`,`TRENDING_RISE`,`TRENDING_STEADY`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`include-top-locations`,{type:`boolean`,description:`Includes top locations in the response.`}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ra={command:`get <domain>`,describe:`Retrieves domain rank details. Cloudflare provides an ordered rank for the top 100 domains, but for the remainder it only provides ranking buckets like top 200 thousand, top one million, etc.. These are available through Radar datasets endpoints.`,builder:o(La),handler:async i=>{let a={limit:i.limit,rankingType:i[`ranking-type`],name:i.name,includeTopLocations:i[`include-top-locations`],date:i.date,format:i.format};if(i.dryRun){n({command:`cf radar ranking domain get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/domain/${i.domain==null?`<domain>`:encodeURIComponent(String(i.domain))}`,pathParams:{domain:String(i.domain??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.domain.get({domain:i.domain,...a})),{successLabel:`Loaded`})}},za={command:`domain`,describe:`Operations for ranking.domain`,builder:e=>e.command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ba(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Va={command:`categories`,describe:`Retrieves the list of Internet services categories.`,builder:o(Ba),handler:async i=>{let a={limit:i.limit,name:i.name,date:i.date,format:i.format};if(i.dryRun){n({command:`cf radar ranking internet-services categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/internet_services/categories`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.internetServices.categories(a)),{successLabel:`Loaded`})}};function Ha(e){return e.option(`service-category`,{type:`string`,description:`Filters results by Internet service category.`}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`timeseries-groups`,describe:`Retrieves Internet Services rank update changes over time.`,builder:o(Ha),handler:async i=>{let a={serviceCategory:i[`service-category`],limit:i.limit,name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar ranking internet-services timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/internet_services/timeseries_groups`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.internetServices.timeseriesGroups(a)),{successLabel:`Loaded`})}};function Wa(e){return e.option(`service-category`,{type:`string`,description:`Filters results by Internet service category.`}).option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ga={command:`top`,describe:`Retrieves top Internet services based on their rank.`,builder:o(Wa),handler:async i=>{let a={serviceCategory:i[`service-category`],limit:i.limit,name:i.name,date:i.date,format:i.format};if(i.dryRun){n({command:`cf radar ranking internet-services top`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/internet_services/top`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.internetServices.top(a)),{successLabel:`Loaded`})}},Ka={command:`internet-services`,describe:`Operations for ranking.internet-services`,builder:e=>e.command(Va).command(Ua).command(Ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qa(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`ranking-type`,{type:`string`,description:`The ranking type.`,choices:[`POPULAR`,`TRENDING_RISE`,`TRENDING_STEADY`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`domains`,{type:`string`,description:`Filters results by domain name. Specify a comma-separated list of domain names.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ja={command:`timeseries-groups`,describe:`Retrieves domains rank over time.`,builder:o(qa),handler:async i=>{let a={limit:i.limit,rankingType:i[`ranking-type`],name:i.name,location:i.location,domains:i.domains,domainCategory:i[`domain-category`],dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],format:i.format};if(i.dryRun){n({command:`cf radar ranking timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/timeseries_groups`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.timeseriesGroups(a)),{successLabel:`Loaded`})}};function Ya(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify a comma-separated list of alpha-2 location codes.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`ranking-type`,{type:`string`,description:`The ranking type.`,choices:[`POPULAR`,`TRENDING_RISE`,`TRENDING_STEADY`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xa={command:`top`,describe:`Retrieves the top or trending domains based on their rank. Popular domains are domains of broad appeal based on how people use the Internet. Trending domains are domains that are generating a surge in interest. For more information on top domains, see https://blog.cloudflare.com/radar-domain-rankings/.`,builder:o(Ya),handler:async i=>{let a={limit:i.limit,name:i.name,location:i.location,domainCategory:i[`domain-category`],date:i.date,rankingType:i[`ranking-type`],format:i.format};if(i.dryRun){n({command:`cf radar ranking top`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/top`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.ranking.top(a)),{successLabel:`Loaded`})}},Za={command:`ranking`,describe:`Top domain rankings based on DNS query popularity across the Cloudflare network`,builder:e=>e.command(Ja).command(Xa).command(za).command(Ka).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qa(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`user-agent-category`,{type:`string`,description:`Filters results by user agent category.`,choices:[`AI`]}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $a={command:`domain-categories`,describe:`Retrieves the top domain categories by the number of robots.txt files parsed.`,builder:o(Qa),handler:async i=>{let a={limit:i.limit,name:i.name,userAgentCategory:i[`user-agent-category`],date:i.date,format:i.format};if(i.dryRun){n({command:`cf radar robots-txt top domain-categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/robots_txt/top/domain_categories`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.robotsTxt.top.domainCategories(a)),{successLabel:`Loaded`})}};function eo(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`user-agent-category`,{type:`string`,description:`Filters results by user agent category.`,choices:[`AI`]}).option(`date`,{type:`string`,description:`Filters results by the specified array of dates.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`directive`,{type:`string`,description:`Filters results by robots.txt directive.`,choices:[`ALLOW`,`DISALLOW`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const to={command:`directive`,describe:`Retrieves the top user agents on robots.txt files.`,builder:o(eo),handler:async i=>{let a={limit:i.limit,name:i.name,userAgentCategory:i[`user-agent-category`],date:i.date,domainCategory:i[`domain-category`],directive:i.directive,format:i.format};if(i.dryRun){n({command:`cf radar robots-txt top user-agents directive`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/robots_txt/top/user_agents/directive`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.robotsTxt.top.userAgents.directive(a)),{successLabel:`Loaded`})}},no={command:`user-agents`,describe:`Operations for robots-txt.top.user-agents`,builder:e=>e.command(to).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ro={command:`top`,describe:`Operations for robots-txt.top`,builder:e=>e.command($a).command(no).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},io={command:`robots-txt`,describe:`Robots.txt adoption and crawler directive trends across the web`,builder:e=>e.command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ao(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per search category.`}).option(`query`,{type:`string`,description:`String used to perform the search operation.`,demandOption:!0}).option(`include`,{type:`string`,description:`Search types included in results.`}).option(`exclude`,{type:`string`,description:`Search types excluded from results.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oo={command:`global`,describe:"Searches for locations, autonomous systems, reports, bots, certificate logs, certificate authorities, industries and verticals. Location names can be localized by sending an `Accept-Language` HTTP header with a BCP 47 language tag (e.g., `Accept-Language: pt-PT`). The full quality-value chain is supported (e.g., `pt-PT,pt;q=0.9,en;q=0.8`).",builder:o(ao),handler:async i=>{let a={limit:i.limit,limitPerGroup:i[`limit-per-group`],query:i.query,include:i.include,exclude:i.exclude,format:i.format};if(i.dryRun){n({command:`cf radar search global`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/search/global`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.search.global(a)),{successLabel:`Loaded`})}},so={command:`search`,describe:`Search Radar data across IPs, ASNs, domains, and locations`,builder:e=>e.command(oo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function co(e){return e.option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lo={command:`summary`,describe:`Retrieves the distribution of connection stage by TCP connections terminated within the first 10 packets by a reset or timeout.`,builder:o(co),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar tcp-resets-timeouts summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tcp_resets_timeouts/summary`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tcpResetsTimeouts.summary(a)),{successLabel:`Loaded`})}};function uo(e){return e.option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`asn`,{type:`string`,description:"Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fo={command:`timeseries-groups`,describe:`Retrieves the distribution of connection stage by TCP connections terminated within the first 10 packets by a reset or timeout over time.`,builder:o(uo),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],asn:i.asn,location:i.location,continent:i.continent,format:i.format};if(i.dryRun){n({command:`cf radar tcp-resets-timeouts timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tcp_resets_timeouts/timeseries_groups`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tcpResetsTimeouts.timeseriesGroups(a)),{successLabel:`Loaded`})}},po={command:`tcp-resets-timeouts`,describe:`TCP connection reset and timeout statistics indicating network health issues`,builder:e=>e.command(lo).command(fo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mo(e){return e.positional(`tld`,{type:`string`,description:`Top-level domain.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ho={command:`get <tld>`,describe:`Retrieves the requested TLD information.`,builder:o(mo),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar tlds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/${i.tld==null?`<tld>`:encodeURIComponent(String(i.tld))}`,pathParams:{tld:String(i.tld??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tlds.get({tld:i.tld,...a})),{successLabel:`Loaded`})}};function go(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`tld-manager`,{type:`string`,description:`Filters results by TLD manager.`}).option(`tld-type`,{type:`string`,description:`Filters results by TLD type.`,choices:[`GENERIC`,`COUNTRY_CODE`,`GENERIC_RESTRICTED`,`INFRASTRUCTURE`,`SPONSORED`]}).option(`tld`,{type:`string`,description:`Filters results by top-level domain. Specify a comma-separated list of TLDs.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _o={command:`list`,describe:`Retrieves a list of TLDs.`,builder:o(go),handler:async i=>{let a={limit:i.limit,offset:i.offset,tldManager:i[`tld-manager`],tldType:i[`tld-type`],tld:i.tld,format:i.format};if(i.dryRun){n({command:`cf radar tlds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tlds.list(a)),{successLabel:`Loaded`})}};function vo(e){return e.positional(`dimension`,{type:`string`,description:`Dimension to summarize TLD nameserver latency by.`,demandOption:!0}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`tld`,{type:`string`,description:`Filters results by top-level domain.`}).option(`nameserver`,{type:`string`,description:`Filters results by nameserver hostname.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yo={command:`summary <dimension>`,describe:`Returns a summary of TLD authoritative nameserver performance grouped by the specified dimension.`,builder:o(vo),handler:async i=>{let a={name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,tld:i.tld,nameserver:i.nameserver,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar tlds performance summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/performance/summary/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tlds.performance.summary({dimension:i.dimension,...a})),{successLabel:`Loaded`})}};function bo(e){return e.positional(`dimension`,{type:`string`,description:`Dimension for the TLD nameserver latency timeseries.`,demandOption:!0}).option(`agg-interval`,{type:`string`,description:`Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). When omitted, the interval is auto-selected from the requested date range; finer intervals are only available for shorter ranges. If the requested interval is too granular for the date range, the request is rejected.`,choices:[`15m`,`1h`,`1d`,`1w`]}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by relative date range ending at the current time, with each value producing a separate series. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`). Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `7dcontrol` covers days -14 to -7, `10dcontrol` covers days -24 to -14). For example, pass `7d` and `7dcontrol` to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including `control`) satisfy this automatically. Use this parameter or set specific start and end dates (`dateStart` and `dateEnd` parameters)."}).option(`date-start`,{type:`string`,description:"Start of the date range. Alternative to `dateRange`; provide together with `dateEnd`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`. When requesting comparison series, every series must resolve to the same duration as the main series. Each `dateStart`/`dateEnd` is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected."}).option(`location`,{type:`string`,description:"Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude locations from results. For example, `-US,PT` excludes results from the US, but includes results from PT."}).option(`continent`,{type:`string`,description:"Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with `-` to exclude continents from results. For example, `-EU,NA` excludes results from EU, but includes results from NA."}).option(`tld`,{type:`string`,description:`Filters results by top-level domain.`}).option(`nameserver`,{type:`string`,description:`Filters results by nameserver hostname.`}).option(`limit-per-group`,{type:`number`,description:`Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category. Only supported on high-cardinality dimensions; otherwise the request is rejected. Minimum value is 2.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xo={command:`timeseries-groups <dimension>`,describe:`Returns a timeseries of TLD authoritative nameserver performance grouped by the specified dimension.`,builder:o(bo),handler:async i=>{let a={aggInterval:i[`agg-interval`],name:i.name,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],location:i.location,continent:i.continent,tld:i.tld,nameserver:i.nameserver,limitPerGroup:i[`limit-per-group`],format:i.format};if(i.dryRun){n({command:`cf radar tlds performance timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/performance/timeseries_groups/${i.dimension==null?`<dimension>`:encodeURIComponent(String(i.dimension))}`,pathParams:{dimension:String(i.dimension??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.tlds.performance.timeseriesGroups({dimension:i.dimension,...a})),{successLabel:`Loaded`})}},So={command:`performance`,describe:`Operations for tlds.performance`,builder:e=>e.command(yo).command(xo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Co={command:`tlds`,describe:`Top-level domain (TLD) metadata and performance trends`,builder:e=>e.command(ho).command(_o).command(So).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wo(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`offset`,{type:`number`,description:`Skips the specified number of objects before fetching the results.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`status`,{type:`string`,description:`Status`,choices:[`VERIFIED`,`UNVERIFIED`]}).option(`type`,{type:`string`,description:`Filters results by entity type (LOCATION, AS, or ORIGIN).`}).option(`data-source`,{type:`string`,description:`Filters results by data source.`,choices:[`ALL`,`AI_BOTS`,`AI_GATEWAY`,`BGP`,`BOTS`,`CONNECTION_ANOMALY`,`CT`,`DNS`,`DNS_MAGNITUDE`,`DNS_AS112`,`DOS`,`EMAIL_ROUTING`,`EMAIL_SECURITY`,`FW`,`FW_PG`,`HTTP`,`HTTP_CONTROL`,`HTTP_CRAWLER_REFERER`,`HTTP_ORIGINS`,`IQI`,`LEAKED_CREDENTIALS`,`NET`,`ROBOTS_TXT`,`SPEED`,`WORKERS_AI`]}).option(`asn`,{type:`number`,description:`Filters results by Autonomous System. Specify a single Autonomous System Number (ASN) as integer.`}).option(`location`,{type:`string`,description:`Filters results by location. Specify an alpha-2 location code.`}).option(`origin`,{type:`string`,description:`Filters results by origin.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const To={command:`get`,describe:`Retrieves the latest Internet traffic anomalies, which are signals that might indicate an outage. These alerts are automatically detected by Radar and manually verified by our team.`,builder:o(wo),handler:async i=>{let a={limit:i.limit,offset:i.offset,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],status:i.status,type:i.type,dataSource:i[`data-source`],asn:i.asn,location:i.location,origin:i.origin,format:i.format};if(i.dryRun){n({command:`cf radar traffic-anomalies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/traffic_anomalies`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.trafficAnomalies.get(a)),{successLabel:`Loaded`})}};function Eo(e){return e.positional(`uuid`,{type:`string`,description:`Traffic anomaly UUID.`,demandOption:!0}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Do={command:`getById <uuid>`,describe:`Retrieves a single Internet traffic anomaly by UUID.`,builder:o(Eo),handler:async i=>{let a={format:i.format};if(i.dryRun){n({command:`cf radar traffic-anomalies getById`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/traffic_anomalies/${i.uuid==null?`<uuid>`:encodeURIComponent(String(i.uuid))}`,pathParams:{uuid:String(i.uuid??``)},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.trafficAnomalies.getById({uuid:i.uuid,...a})),{successLabel:`Loaded`})}};function Oo(e){return e.option(`limit`,{type:`number`,description:`Limits the number of objects returned in the response.`}).option(`date-range`,{type:`string`,description:"Filters results by a relative date range ending at the current time. Use `<n>d` for days (up to `364d`) or `<n>w` for weeks (up to `52w`), e.g. `7d`. Append `control` to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. `3dcontrol` covers days -10 to -7, `7dcontrol` covers days -14 to -7, `28dcontrol` covers days -56 to -28, and `10dcontrol` covers days -24 to -14). Mutually exclusive with `dateStart`/`dateEnd`."}).option(`date-start`,{type:`string`,description:"Start of the date range (inclusive). Alternative to `dateRange`; provide together with `dateEnd`."}).option(`date-end`,{type:`string`,description:"End of the date range (inclusive). Alternative to `dateRange`; provide together with `dateStart`."}).option(`status`,{type:`string`,description:`Status`,choices:[`VERIFIED`,`UNVERIFIED`]}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ko={command:`get`,describe:`Retrieves the sum of Internet traffic anomalies, grouped by location. These anomalies are signals that might indicate an outage, automatically detected by Radar and manually verified by our team.`,builder:o(Oo),handler:async i=>{let a={limit:i.limit,dateRange:i[`date-range`],dateStart:i[`date-start`],dateEnd:i[`date-end`],status:i.status,format:i.format};if(i.dryRun){n({command:`cf radar traffic-anomalies locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/traffic_anomalies/locations`,pathParams:{},query:a,bodyKind:`none`});return}let o=await e(i);t(await r(`Loading`,async()=>o.radar.trafficAnomalies.locations.get(a)),{successLabel:`Loaded`})}},Ao={command:`locations`,describe:`Operations for traffic-anomalies.locations`,builder:e=>e.command(ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},jo={command:`traffic-anomalies`,describe:`Detected traffic anomalies and unusual patterns in Internet traffic flows`,builder:e=>e.command(To).command(Do).command(Ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mo={command:`radar`,describe:`Internet-wide traffic intelligence — BGP, DNS, HTTP trends, attack data, and network quality insights`,builder:e=>e.command(te).command(O).command(R).command(re).command(Le).command(It).command(Qt).command(gn).command(Cn).command(Fn).command(ar).command(Tr).command(Ar).command(Li).command(Hi).command(ea).command(da).command(ba).command(Ia).command(Za).command(io).command(so).command(po).command(Co).command(jo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Mo as default};