cf 0.3.0 → 0.5.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.
- package/README.md +7 -1
- package/dist/_meta/agent-context.json +26 -21
- package/dist/_meta/commands.json +7696 -18100
- package/dist/_meta/schemas.json +6411 -13925
- package/dist/{abuse-reports-dMIfUJ8v.mjs → abuse-reports-Ina5TlsU.mjs} +2 -2
- package/dist/{accounts-Kx1epdA1.mjs → accounts-B_joQcMi.mjs} +9 -9
- package/dist/{acm-Utu252kC.mjs → acm-_kIHqYME.mjs} +2 -2
- package/dist/{addressing-CBq7Z7Vq.mjs → addressing-CaFlw8y1.mjs} +10 -10
- package/dist/{agent-context-BGTU299M.mjs → agent-context-DMPfi54f.mjs} +1 -1
- package/dist/ai-CqnhNb_c.mjs +2 -0
- package/dist/ai-gateway-pgYGI519.mjs +8 -0
- package/dist/ai-search-eqQMPQol.mjs +7 -0
- package/dist/ai_gateway--vuVLnOm.mjs +4 -0
- package/dist/{alerting-CqmEIaKn.mjs → alerting-CPxHiYHb.mjs} +5 -5
- package/dist/{analytics-Dv-X8x7D.mjs → analytics-DSSRDZz8.mjs} +1 -1
- package/dist/analytics_engine-gWyfnsCs.mjs +2 -0
- package/dist/{api-gateway-CNv0IHTU.mjs → api-gateway-BXXGFCVR.mjs} +10 -10
- package/dist/argo-aC6A3JyX.mjs +2 -0
- package/dist/artifacts-HD4V2xpK.mjs +4 -0
- package/dist/audit-logs-BuExU_nz.mjs +2 -0
- package/dist/auth-CSC4yhEJ.mjs +9 -0
- package/dist/auth-D5hNsOFq.mjs +5 -0
- package/dist/billing-COaghyxl.mjs +2 -0
- package/dist/bot-management-DmEzeV1Y.mjs +5 -0
- package/dist/botnet-feed-ByEAXAkw.mjs +3 -0
- package/dist/brand-protection-dPrGe8sL.mjs +3 -0
- package/dist/browser-rendering-BiSGnpBf.mjs +4 -0
- package/dist/{build-DYkGW4dh.mjs → build-HuS9-R0V.mjs} +131 -131
- package/dist/{cache-DsoW6Xwv.mjs → cache-CY-7Lt71.mjs} +4 -4
- package/dist/calls-wOQGDWPl.mjs +4 -0
- package/dist/certificate-authorities-CtqzAtxQ.mjs +2 -0
- package/dist/chunk-6IEM75FG-BEjRFMGh.mjs +2 -0
- package/dist/client-certificates-CRf41xLe.mjs +3 -0
- package/dist/cloud-connector-BA5IRZUP.mjs +2 -0
- package/dist/{cloudforce-one-2Bhz8YdW.mjs → cloudforce-one-Bq_qPAWs.mjs} +20 -20
- package/dist/{completions-BwRpZQVn.mjs → completions-DOeHPdCG.mjs} +2 -2
- package/dist/config-B5k-XbwS.mjs +2 -0
- package/dist/connectivity-Bx3MgTHX.mjs +3 -0
- package/dist/connector-interrupts-D7ylweJZ.mjs +2 -0
- package/dist/connector-telemetry-events-6izV1kbP.mjs +2 -0
- package/dist/connector-telemetry-snapshots-BnjKbyxX.mjs +2 -0
- package/dist/connectors-DRt4e6d_.mjs +3 -0
- package/dist/content-scanning-Cd2vy5Sz.mjs +4 -0
- package/dist/context-jpewmual.mjs +2 -0
- package/dist/{custom-certificates-aAiEguR7.mjs → custom-certificates-DYE-9epx.mjs} +3 -3
- package/dist/{custom-hostnames-AG5yBHIi.mjs → custom-hostnames-CtuTdFcX.mjs} +4 -4
- package/dist/custom-nameservers-CWqA51in.mjs +3 -0
- package/dist/custom-pages-DeUKEFGe.mjs +4 -0
- package/dist/d1-DvWY9Gp4.mjs +4 -0
- package/dist/data-security-BPo6dIWu.mjs +6 -0
- package/dist/dcv-delegation-Bgf86J-r.mjs +2 -0
- package/dist/{deploy-CQial3kN.mjs → deploy-dVrgDUOp.mjs} +1 -1
- package/dist/{dev-B38LfCTl.mjs → dev-C01_Lby6.mjs} +1 -1
- package/dist/diagnostics-6nKPmVgz.mjs +3 -0
- package/dist/{dispatch-namespaces-DmHvoBOg.mjs → dispatch-namespaces-64lXx2WJ.mjs} +6 -6
- package/dist/dist-C6zxsVdY.mjs +306 -0
- package/dist/{dist-AIcZFk0U.mjs → dist-t_YrL25p.mjs} +7 -7
- package/dist/{dns-VMhQSr5n.mjs → dns-ClciFGxx.mjs} +13 -13
- package/dist/dns-firewall-DfUmXDCe.mjs +57 -0
- package/dist/durable-objects-CMaYZ-YU.mjs +2 -0
- package/dist/{email-routing-tIR2SFu-.mjs → email-routing-CGXhFqF5.mjs} +9 -9
- package/dist/{email-security-Ca1id3rZ.mjs → email-security-D5viPq8S.mjs} +7 -7
- package/dist/email-sending-C2jpc3gh.mjs +3 -0
- package/dist/{filters-A4dg_a68.mjs → filters-bzsFcWt0.mjs} +3 -3
- package/dist/{firewall-DWPQgYd9.mjs → firewall-DYZcTtIC.mjs} +10 -10
- package/dist/{fraud-BMkSsJGU.mjs → fraud-C03MtdZb.mjs} +1 -1
- package/dist/google-tag-gateway-Dfy887yA.mjs +2 -0
- package/dist/{healthchecks-CtIfrFql.mjs → healthchecks-DRoAlWgr.mjs} +3 -3
- package/dist/hostnames-CFgIVI3s.mjs +3 -0
- package/dist/hyperdrive-C7-gwTSV.mjs +18 -0
- package/dist/iam-DqVPzGrb.mjs +6 -0
- package/dist/images-BYfl4YgR.mjs +7 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-duTEPIHc.mjs +3 -0
- package/dist/{ips-K4bzaGqd.mjs → ips-nv9INuWZ.mjs} +1 -1
- package/dist/keyless-certificates-CRCDVd3g.mjs +3 -0
- package/dist/{kv-8o27w_pY.mjs → kv-CZoV4tiv.mjs} +4 -4
- package/dist/leaked-credential-checks-DNIBg7Pe.mjs +3 -0
- package/dist/{load-balancers-DtG8nj25.mjs → load-balancers--OMg0HNt.mjs} +5 -5
- package/dist/{logpush-4L0njy1d.mjs → logpush-C0_lZTyY.mjs} +3 -3
- package/dist/{logs-B_Yp95hv.mjs → logs-BtpWZQfV.mjs} +2 -2
- package/dist/magic-cloud-networking-u6rwYbGg.mjs +5 -0
- package/dist/{magic-network-monitoring-BnwvM4-I.mjs → magic-network-monitoring-CKgQyRj4.mjs} +3 -3
- package/dist/{magic-transit-CXDyvhxq.mjs → magic-transit-CLhMcJ_-.mjs} +32 -33
- package/dist/managed-transforms-D0Z2mlth.mjs +3 -0
- package/dist/mtls-certificates-BL65NK5T.mjs +3 -0
- package/dist/{network-interconnects-rrr7red3.mjs → network-interconnects-Bgu9gmaG.mjs} +5 -5
- package/dist/oauth-Bk-F-tIO.mjs +52 -0
- package/dist/{observability-DWvpqnQJ.mjs → observability-BynRbTF4.mjs} +3 -3
- package/dist/open-YWOUIZ5Y-3jqSKAB1.mjs +4 -0
- package/dist/{organizations-T77D50Sq.mjs → organizations-BqJHyvMK.mjs} +3 -3
- package/dist/origin-ca-certificates-BGvYwm3C.mjs +3 -0
- package/dist/origin-post-quantum-encryption-9KOE8YPI.mjs +2 -0
- package/dist/{origin-tls-client-auth-CaVW1Ztp.mjs → origin-tls-client-auth-d3snC3vr.mjs} +3 -3
- package/dist/{output-BJFNwj7b.mjs → output-B6fBFRqe.mjs} +1 -1
- package/dist/{page-rules-CjZPTMQX.mjs → page-rules-EZHJePmn.mjs} +4 -4
- package/dist/{page-shield-D5RRNJCY.mjs → page-shield-CXJioWPs.mjs} +5 -5
- package/dist/{pages-CWJtJnL0.mjs → pages-D4aYteKk.mjs} +8 -8
- package/dist/{pipelines-B0L_7j9e.mjs → pipelines-G8Iusxq-.mjs} +5 -5
- package/dist/progress-DrDErV9w.mjs +2 -0
- package/dist/queues-DEkbKqZX.mjs +6 -0
- package/dist/{r2-DQIcyRtA.mjs → r2-CV0IkCAW.mjs} +9 -9
- package/dist/r2-data-catalog-NtqGC_a_.mjs +14 -0
- package/dist/radar-D986zPJr.mjs +2 -0
- package/dist/{rate-limits-DcrQV6Ar.mjs → rate-limits-B2wRsUX1.mjs} +3 -3
- package/dist/raw-fetch-_n0lMAnD.mjs +2 -0
- package/dist/{realtime-kit-CaquuVOE.mjs → realtime-kit-Ld3c5eU6.mjs} +9 -9
- package/dist/{registrar-Ko-xZemf.mjs → registrar-CDIwTz3G.mjs} +6 -6
- package/dist/request-tracers-D7SFMDik.mjs +2 -0
- package/dist/resource-sharing-YIQ04jXE.mjs +5 -0
- package/dist/{resource-tagging-C3qtLzCz.mjs → resource-tagging-Bd6Y03sg.mjs} +7 -7
- package/dist/rules-DHjLP5Kx.mjs +4 -0
- package/dist/{rulesets-CBgpeSvJ.mjs → rulesets-q4QABpKs.mjs} +7 -7
- package/dist/rum-SmT4HZmM.mjs +4 -0
- package/dist/{schema-D16TgWBg.mjs → schema-BR31o4P6.mjs} +1 -1
- package/dist/{schema-validation-Dgv_opM3.mjs → schema-validation-vVetgC_P.mjs} +5 -5
- package/dist/{scim-DdSEr4kZ.mjs → scim-ChOkZpNx.mjs} +2 -2
- package/dist/{session-COHHdS7A.mjs → sdk-DhIhH6GB.mjs} +4 -4
- package/dist/{secrets-store-7BfyvJLb.mjs → secrets-store-BAK9G12O.mjs} +12 -12
- package/dist/security-center-eScuYDKP.mjs +2 -0
- package/dist/security-txt-x7R4gmQu.mjs +3 -0
- package/dist/session-DHYCE-PM.mjs +93 -0
- package/dist/shared-BAjo72Lz.mjs +2 -0
- package/dist/{smart-shield-TeWZFnH2.mjs → smart-shield-CWlSsNi8.mjs} +2 -2
- package/dist/snippets-DrlgYJYp.mjs +4 -0
- package/dist/{spawn-DcppKGI5.mjs → spawn-CCGzKlC4.mjs} +1 -1
- package/dist/{spectrum-CTTZID8u.mjs → spectrum-pVGxb7u5.mjs} +6 -6
- package/dist/speed-ZFrMWDgd.mjs +4 -0
- package/dist/src-DU7FBCOX.mjs +108 -0
- package/dist/ssl-9JY05sYt.mjs +15 -0
- package/dist/stream-tRU39b8K.mjs +14 -0
- package/dist/{tenants-Bd7NGQ_m.mjs → tenants-HLGUazms.mjs} +1 -1
- package/dist/{token-validation-DAgtFOvs.mjs → token-validation-_VdamKpz.mjs} +4 -4
- package/dist/{tools-DXQmfFuE.mjs → tools-D_hfUU_Z.mjs} +1 -1
- package/dist/{turnstile-cfdaO4ca.mjs → turnstile-BRzXd28B.mjs} +4 -4
- package/dist/{ui-D4KtlMh9.mjs → ui-erjBdVKL.mjs} +1 -1
- package/dist/url-normalization-D-NxuLtN.mjs +3 -0
- package/dist/url-scanner-BzzR6iDx.mjs +2 -0
- package/dist/{user-CAo-yCJA.mjs → user-C4omq__w.mjs} +2 -2
- package/dist/vectorize-By6EqcNR.mjs +4 -0
- package/dist/{versions-CUwWJWmy.mjs → versions-CBHwWPAM.mjs} +1 -1
- package/dist/{waiting-rooms-Dln5ICg5.mjs → waiting-rooms-u6KwrzWd.mjs} +6 -6
- package/dist/{web3-HQJRm38W.mjs → web3-DQ5dmE9W.mjs} +3 -3
- package/dist/{workers-Dg7ddG2Q.mjs → workers-D8Be7_as.mjs} +14 -14
- package/dist/workers-builds-BE3W3qNk.mjs +7 -0
- package/dist/{workflows-VquuSh2J.mjs → workflows-BWWufqFA.mjs} +3 -3
- package/dist/zaraz-Bsa9AvVL.mjs +2 -0
- package/dist/{zero-trust-CP96wnSh.mjs → zero-trust-UNVZFnKu.mjs} +87 -87
- package/dist/zero_trust-B0_Rk4p2.mjs +3 -0
- package/dist/zones-BXtdwt6E.mjs +21 -0
- package/package.json +4 -4
- package/dist/ai-DOOKLPkG.mjs +0 -2
- package/dist/ai-gateway-Cj1T3avF.mjs +0 -8
- package/dist/ai-search-CQF_Sn7d.mjs +0 -7
- package/dist/ai_gateway-C3fH22C0.mjs +0 -4
- package/dist/analytics_engine-DdXVR8z2.mjs +0 -2
- package/dist/argo-CX_A4kcn.mjs +0 -2
- package/dist/audit-logs-BfBf3oo-.mjs +0 -2
- package/dist/auth-SyWhMmPu.mjs +0 -6
- package/dist/auth-ffdf9yR0.mjs +0 -135
- package/dist/autorag-BuGhGTeZ.mjs +0 -2
- package/dist/billing-PoG81XaQ.mjs +0 -2
- package/dist/bot-management-CFvtVx62.mjs +0 -5
- package/dist/botnet-feed-B-M4Yu0W.mjs +0 -3
- package/dist/brand-protection-D05Eg-_6.mjs +0 -3
- package/dist/browser-rendering-xu8F_Rrv.mjs +0 -4
- package/dist/calls-CZbO7TyR.mjs +0 -4
- package/dist/certificate-authorities-D2yr7_3t.mjs +0 -2
- package/dist/client-certificates-MJcDsTId.mjs +0 -3
- package/dist/cloud-connector-DWOrN2eM.mjs +0 -2
- package/dist/config-DYzlVxcB.mjs +0 -2
- package/dist/connectivity-BX8C7tvK.mjs +0 -3
- package/dist/content-scanning-r6uzMO1r.mjs +0 -4
- package/dist/context-DGlHRGWM.mjs +0 -2
- package/dist/custom-nameservers-D1DtlRue.mjs +0 -3
- package/dist/custom-pages-DQCi2plU.mjs +0 -4
- package/dist/d1-DbnYhw45.mjs +0 -4
- package/dist/data-security-D_EtYBfo.mjs +0 -6
- package/dist/dcv-delegation-CHspSzTI.mjs +0 -2
- package/dist/diagnostics-BJQGjVJn.mjs +0 -3
- package/dist/dist-DNBSHor6.mjs +0 -301
- package/dist/dns-firewall-B4DVXFBQ.mjs +0 -57
- package/dist/durable-objects-CTboySEo.mjs +0 -2
- package/dist/email-sending-DwWKc5jC.mjs +0 -3
- package/dist/google-tag-gateway-BGD49nRC.mjs +0 -2
- package/dist/hostnames-BiomxukN.mjs +0 -3
- package/dist/hyperdrive-Da104VaQ.mjs +0 -18
- package/dist/iam-BIGKo0WW.mjs +0 -6
- package/dist/images-BO8FbDAa.mjs +0 -5
- package/dist/intel-CY6_79v8.mjs +0 -3
- package/dist/keyless-certificates-CZC-L8gM.mjs +0 -3
- package/dist/leaked-credential-checks-qLzRyu85.mjs +0 -3
- package/dist/magic-cloud-networking-CSOM3EM-.mjs +0 -5
- package/dist/managed-transforms-D15yVbZx.mjs +0 -3
- package/dist/mtls-certificates-D8k0AXWK.mjs +0 -3
- package/dist/origin-ca-certificates-DXIvD8H5.mjs +0 -3
- package/dist/origin-post-quantum-encryption-C8oOczyV.mjs +0 -2
- package/dist/progress-CrCGTq7N.mjs +0 -2
- package/dist/queues-CN6DPhRR.mjs +0 -6
- package/dist/r2-data-catalog-Bbo93TJx.mjs +0 -14
- package/dist/radar-Bxb0WX8V.mjs +0 -2
- package/dist/raw-fetch-Dlccg0Tr.mjs +0 -2
- package/dist/request-tracers-DOW_reTJ.mjs +0 -2
- package/dist/resource-sharing-D7TX0JV0.mjs +0 -5
- package/dist/rules-BXRADHL5.mjs +0 -4
- package/dist/rum-BjPptTUP.mjs +0 -4
- package/dist/security-center-DAy6AKtT.mjs +0 -2
- package/dist/security-txt-xAMb7K6Y.mjs +0 -3
- package/dist/shared-AGtpXwwL.mjs +0 -2
- package/dist/snippets-CCSsCXVs.mjs +0 -4
- package/dist/speed-CuzTE0AL.mjs +0 -4
- package/dist/src-BW6vfAwE.mjs +0 -108
- package/dist/ssl-BWA2LdwC.mjs +0 -15
- package/dist/stream-GFsIZ-pP.mjs +0 -14
- package/dist/url-normalization-B5RN4nLD.mjs +0 -3
- package/dist/url-scanner-BrZ1L9OC.mjs +0 -2
- package/dist/vectorize-C7_oQlaI.mjs +0 -4
- package/dist/workers-builds-AVfx8IyL.mjs +0 -7
- package/dist/zaraz-xYSWIV4P.mjs +0 -2
- package/dist/zones-BSgmZ9WC.mjs +0 -21
- /package/dist/{body-parser-DKa8Ipg1.mjs → body-parser-DWSy7uZ8.mjs} +0 -0
- /package/dist/{cli-types-CRIDdDw3.mjs → cli-types-BeyOc81z.mjs} +0 -0
- /package/dist/{input-validation-zEO81MWN.mjs → input-validation-_fMCApaH.mjs} +0 -0
- /package/dist/{lib-Eu1wXxuh.mjs → lib-4PQI6yRW.mjs} +0 -0
- /package/dist/{local-VJaJ3BZ1.mjs → local-CYc9q7l2.mjs} +0 -0
- /package/dist/{metadata-5VwHPW6C.mjs → metadata-OOwvpR8m.mjs} +0 -0
- /package/dist/{resolve-4-OSeHlK.mjs → resolve-C3h-mwp7.mjs} +0 -0
- /package/dist/{theme-BklJDrb2.mjs → theme-DbNbIY4d.mjs} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e}from"./auth-CSC4yhEJ.mjs";import{n as t,t as n}from"./body-parser-DWSy7uZ8.mjs";import{t as r}from"./output-B6fBFRqe.mjs";import{n as i,t as a}from"./progress-DrDErV9w.mjs";import{t as o}from"./cli-types-BeyOc81z.mjs";import{n as s,t as c}from"./raw-fetch-_n0lMAnD.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 t=>{let n={date:t.date,domainCategory:t[`domain-category`],name:t.name,format:t.format};if(t.dryRun){i({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},te={command:`agent-readiness`,describe:`Operations for agent-readiness`,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 t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,crawlPurpose:t[`crawl-purpose`],userAgent:t[`user-agent`],industry:t.industry,vertical:t.vertical,contentType:t[`content-type`],responseStatus:t[`response-status`],responseStatusCategory:t[`response-status-category`],limitPerGroup:t[`limit-per-group`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar ai bots timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.bots.timeseriesGroups({dimension:t.dimension,...n})),{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 t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,crawlPurpose:t[`crawl-purpose`],userAgent:t[`user-agent`],industry:t.industry,vertical:t.vertical,contentType:t[`content-type`],responseStatus:t[`response-status`],responseStatusCategory:t[`response-status-category`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar ai bots timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.bots.timeseries(n)),{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 t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar ai inference summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/inference/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.inference.summaryV2({dimension:t.dimension,...n})),{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 t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,limitPerGroup:t[`limit-per-group`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar ai inference timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/inference/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.inference.timeseriesGroupsV2({dimension:t.dimension,...n})),{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 t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.markdownForAgents.summary(n)),{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 t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.markdownForAgents.timeseries(n)),{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 t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,crawlPurpose:t[`crawl-purpose`],userAgent:t[`user-agent`],vertical:t.vertical,industry:t.industry,contentType:t[`content-type`],responseStatus:t[`response-status`],responseStatusCategory:t[`response-status-category`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar ai timeseries-groups summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ai/bots/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ai.timeseriesGroups.summary({dimension:t.dimension,...n})),{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:`Operations for ai`,builder:e=>e.command(m).command(y).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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.`,choices:[`EVENT`,`GENERAL`,`OUTAGE`,`PARTIAL_PROJECTION`,`PIPELINE`,`TRAFFIC_ANOMALY`]}).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 A={command:`list`,describe:`Retrieves the latest annotations.`,builder:o(k),handler:async t=>{let n={limit:t.limit,offset:t.offset,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],dataSource:t[`data-source`],eventType:t[`event-type`],asn:t.asn,location:t.location,origin:t.origin,format:t.format};if(t.dryRun){i({command:`cf radar annotations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.annotations.list(n)),{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(`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 M={command:`get`,describe:`Retrieves the latest Internet outages and anomalies.`,builder:o(j),handler:async t=>{let n={limit:t.limit,offset:t.offset,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,origin:t.origin,format:t.format};if(t.dryRun){i({command:`cf radar annotations outages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations/outages`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.annotations.outages.get(n)),{successLabel:`Loaded`})}};function N(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 P={command:`locations`,describe:`Retrieves the number of outages by location.`,builder:o(N),handler:async t=>{let n={limit:t.limit,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({command:`cf radar annotations outages locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/annotations/outages/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.annotations.outages.locations(n)),{successLabel:`Loaded`})}},F={command:`outages`,describe:`Operations for annotations.outages`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`annotations`,describe:`Operations for annotations`,builder:e=>e.command(A).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(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 R={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of AS112 queries by the specified dimension.`,builder:o(L),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,queryType:t[`query-type`],protocol:t.protocol,responseCode:t[`response-code`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar as112 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function z(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 B={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of AS112 queries grouped by dimension over time.`,builder:o(z),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,queryType:t[`query-type`],protocol:t.protocol,responseCode:t[`response-code`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar as112 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function V(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 H={command:`timeseries`,describe:`Retrieves the AS112 DNS queries over time.`,builder:o(V),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,queryType:t[`query-type`],protocol:t.protocol,responseCode:t[`response-code`],format:t.format};if(t.dryRun){i({command:`cf radar as112 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.timeseries(n)),{successLabel:`Loaded`})}};function U(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 W={command:`dnssec <dnssec>`,describe:`Retrieves the top locations of DNS queries to AS112 with DNSSEC (DNS Security Extensions) support.`,builder:o(U),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar as112 top dnssec`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/dnssec/${t.dnssec==null?`<dnssec>`:encodeURIComponent(String(t.dnssec))}`,pathParams:{dnssec:String(t.dnssec??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.top.dnssec({dnssec:t.dnssec,...n})),{successLabel:`Loaded`})}};function G(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 K={command:`edns <edns>`,describe:`Retrieves the top locations of DNS queries to AS112 with EDNS (Extension Mechanisms for DNS) support.`,builder:o(G),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar as112 top edns`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/edns/${t.edns==null?`<edns>`:encodeURIComponent(String(t.edns))}`,pathParams:{edns:String(t.edns??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.top.edns({edns:t.edns,...n})),{successLabel:`Loaded`})}};function q(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 J={command:`ip-version <ip-version>`,describe:`Retrieves the top locations of DNS queries to AS112 for an IP version.`,builder:o(q),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar as112 top ip-version`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations/ip_version/${t[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(t[`ip-version`]))}`,pathParams:{"ip-version":String(t[`ip-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.top.ipVersion({ip_version:t[`ip-version`],...n})),{successLabel:`Loaded`})}};function Y(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 X={command:`locations`,describe:`Retrieves the top locations by AS112 DNS queries.`,builder:o(Y),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar as112 top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/as112/top/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.as112.top.locations(n)),{successLabel:`Loaded`})}},Z={command:`top`,describe:`Operations for as112.top`,builder:e=>e.command(W).command(K).command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`as112`,describe:`Operations for as112`,builder:e=>e.command(R).command(H).command(B).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(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 re={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of layer 3 attacks by the specified dimension.`,builder:o(ne),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,direction:t.direction,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar attacks layer3 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function ie(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 ae={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of layer 3 attacks grouped by dimension over time.`,builder:o(ie),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,normalization:t.normalization,direction:t.direction,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar attacks layer3 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function oe(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 se={command:`timeseries`,describe:`Retrieves layer 3 attacks over time.`,builder:o(oe),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,normalization:t.normalization,metric:t.metric,direction:t.direction,format:t.format};if(t.dryRun){i({command:`cf radar attacks layer3 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.timeseries(n)),{successLabel:`Loaded`})}};function ce(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 le={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(ce),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,limitDirection:t[`limit-direction`],limitPerLocation:t[`limit-per-location`],magnitude:t.magnitude,normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar attacks layer3 top attacks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer3/top/attacks`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.top.attacks(n)),{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(`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:`origin`,describe:`Retrieves the origin locations of layer 3 attacks.`,builder:o(ue),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.top.locations.origin(n)),{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:`target`,describe:`Retrieves the target locations of layer 3 attacks.`,builder:o(fe),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],protocol:t.protocol,format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer3.top.locations.target(n)),{successLabel:`Loaded`})}},me={command:`locations`,describe:`Operations for attacks.layer3.top.locations`,builder:e=>e.command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},he={command:`top`,describe:`Operations for attacks.layer3.top`,builder:e=>e.command(le).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`layer3`,describe:`Operations for attacks.layer3`,builder:e=>e.command(re).command(se).command(ae).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(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 ve={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of layer 7 attacks by the specified dimension.`,builder:o(_e),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,ipVersion:t[`ip-version`],httpVersion:t[`http-version`],httpMethod:t[`http-method`],mitigationProduct:t[`mitigation-product`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar attacks layer7 summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function ye(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 be={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of layer 7 attacks grouped by dimension over time.`,builder:o(ye),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,ipVersion:t[`ip-version`],httpVersion:t[`http-version`],httpMethod:t[`http-method`],mitigationProduct:t[`mitigation-product`],normalization:t.normalization,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar attacks layer7 timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function xe(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 Se={command:`timeseries`,describe:`Retrieves layer 7 attacks over time.`,builder:o(xe),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,normalization:t.normalization,ipVersion:t[`ip-version`],httpVersion:t[`http-version`],httpMethod:t[`http-method`],mitigationProduct:t[`mitigation-product`],format:t.format};if(t.dryRun){i({command:`cf radar attacks layer7 timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.timeseries(n)),{successLabel:`Loaded`})}};function Ce(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 we={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(Ce),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,ipVersion:t[`ip-version`],httpVersion:t[`http-version`],httpMethod:t[`http-method`],mitigationProduct:t[`mitigation-product`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.top.ases.origin(n)),{successLabel:`Loaded`})}},Te={command:`ases`,describe:`Operations for attacks.layer7.top.ases`,builder:e=>e.command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(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 De={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(Ee),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,mitigationProduct:t[`mitigation-product`],limitDirection:t[`limit-direction`],limitPerLocation:t[`limit-per-location`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar attacks layer7 top attacks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/attacks/layer7/top/attacks`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.top.attacks(n)),{successLabel:`Loaded`})}};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(`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 ke={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(Oe),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,continent:t.continent,ipVersion:t[`ip-version`],httpVersion:t[`http-version`],httpMethod:t[`http-method`],mitigationProduct:t[`mitigation-product`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.top.locations.origin(n)),{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(`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 je={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(Ae),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],continent:t.continent,mitigationProduct:t[`mitigation-product`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.attacks.layer7.top.locations.target(n)),{successLabel:`Loaded`})}},Me={command:`locations`,describe:`Operations for attacks.layer7.top.locations`,builder:e=>e.command(ke).command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ne={command:`top`,describe:`Operations for attacks.layer7.top`,builder:e=>e.command(De).command(Te).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pe={command:`layer7`,describe:`Operations for attacks.layer7`,builder:e=>e.command(ve).command(Se).command(be).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Fe={command:`attacks`,describe:`Operations for attacks`,builder:e=>e.command(ge).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(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 Le={command:`list`,describe:`Retrieves the BGP hijack events.`,builder:o(Ie),handler:async t=>{let n={page:t.page,per_page:t[`per-page`],eventId:t[`event-id`],hijackerAsn:t[`hijacker-asn`],victimAsn:t[`victim-asn`],involvedAsn:t[`involved-asn`],involvedCountry:t[`involved-country`],prefix:t.prefix,minConfidence:t[`min-confidence`],maxConfidence:t[`max-confidence`],dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],sortBy:t[`sort-by`],sortOrder:t[`sort-order`],format:t.format};if(t.dryRun){i({command:`cf radar bgp hijacks events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/hijacks/events`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.hijacks.events.list(n)),{successLabel:`Loaded`})}},Re={command:`events`,describe:`Operations for bgp.hijacks.events`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`hijacks`,describe:`Operations for bgp.hijacks`,builder:e=>e.command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Be(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 Ve={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(Be),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,ipVersion:t[`ip-version`],includeDelay:t[`include-delay`],format:t.format};if(t.dryRun){i({command:`cf radar bgp ips timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/ips/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.ips.timeseries(n)),{successLabel:`Loaded`})}};function He(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 Ue={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(He),handler:async t=>{let n={date:t.date,limit:t.limit,metric:t.metric,country:t.country,format:t.format};if(t.dryRun){i({command:`cf radar bgp ips top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/ips/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.ips.top.ases(n)),{successLabel:`Loaded`})}},We={command:`top`,describe:`Operations for bgp.ips.top`,builder:e=>e.command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ge={command:`ips`,describe:`Operations for bgp.ips`,builder:e=>e.command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ke(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 qe={command:`list`,describe:`Retrieves the BGP route leak events.`,builder:o(Ke),handler:async t=>{let n={page:t.page,per_page:t[`per-page`],eventId:t[`event-id`],leakAsn:t[`leak-asn`],involvedAsn:t[`involved-asn`],involvedCountry:t[`involved-country`],dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],sortBy:t[`sort-by`],sortOrder:t[`sort-order`],format:t.format};if(t.dryRun){i({command:`cf radar bgp leaks events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/leaks/events`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.leaks.events.list(n)),{successLabel:`Loaded`})}},Je={command:`events`,describe:`Operations for bgp.leaks.events`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ye={command:`leaks`,describe:`Operations for bgp.leaks`,builder:e=>e.command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xe(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 Ze={command:`ases`,describe:`Retrieves all ASes in the current global routing tables with routing statistics.`,builder:o(Xe),handler:async t=>{let n={location:t.location,limit:t.limit,sortBy:t[`sort-by`],sortOrder:t[`sort-order`],format:t.format};if(t.dryRun){i({command:`cf radar bgp routes ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.routes.ases(n)),{successLabel:`Loaded`})}};function Qe(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 $e={command:`moas`,describe:`Retrieves all Multi-Origin AS (MOAS) prefixes in the global routing tables.`,builder:o(Qe),handler:async t=>{let n={origin:t.origin,prefix:t.prefix,invalid_only:t[`invalid-only`],format:t.format};if(t.dryRun){i({command:`cf radar bgp routes moas`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/moas`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.routes.moas(n)),{successLabel:`Loaded`})}};function et(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 tt={command:`pfx2as`,describe:`Retrieves the prefix-to-ASN mapping from global routing tables.`,builder:o(et),handler:async t=>{let n={prefix:t.prefix,origin:t.origin,rpkiStatus:t[`rpki-status`],longestPrefixMatch:t[`longest-prefix-match`],format:t.format};if(t.dryRun){i({command:`cf radar bgp routes pfx2as`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/pfx2as`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.routes.pfx2As(n)),{successLabel:`Loaded`})}};function nt(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 rt={command:`realtime`,describe:`Retrieves real-time BGP routes for a prefix, using public real-time data collectors (RouteViews and RIPE RIS).`,builder:o(nt),handler:async t=>{let n={prefix:t.prefix,format:t.format};if(t.dryRun){i({command:`cf radar bgp routes realtime`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/realtime`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.routes.realtime(n)),{successLabel:`Loaded`})}};function it(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 at={command:`stats`,describe:`Retrieves the BGP routing table stats.`,builder:o(it),handler:async t=>{let n={asn:t.asn,location:t.location,format:t.format};if(t.dryRun){i({command:`cf radar bgp routes stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/routes/stats`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.routes.stats(n)),{successLabel:`Loaded`})}},ot={command:`routes`,describe:`Operations for bgp.routes`,builder:e=>e.command(Ze).command($e).command(tt).command(rt).command(at).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(`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 ct={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(st),handler:async t=>{let n={dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,includeAsnInfo:t[`include-asn-info`],format:t.format};if(t.dryRun){i({command:`cf radar bgp rpki aspa changes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/changes`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.rpki.aspa.changes(n)),{successLabel:`Loaded`})}};function lt(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 ut={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(lt),handler:async t=>{let n={customerAsn:t[`customer-asn`],providerAsn:t[`provider-asn`],date:t.date,includeAsnInfo:t[`include-asn-info`],format:t.format};if(t.dryRun){i({command:`cf radar bgp rpki aspa snapshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/snapshot`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.rpki.aspa.snapshot(n)),{successLabel:`Loaded`})}};function dt(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 ft={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(dt),handler:async t=>{let n={dateStart:t[`date-start`],dateEnd:t[`date-end`],name:t.name,rir:t.rir,location:t.location,format:t.format};if(t.dryRun){i({command:`cf radar bgp rpki aspa timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/aspa/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.rpki.aspa.timeseries(n)),{successLabel:`Loaded`})}},pt={command:`aspa`,describe:`Operations for bgp.rpki.aspa`,builder:e=>e.command(ct).command(ut).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mt(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 ht={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(mt),handler:async t=>{let n={dateStart:t[`date-start`],dateEnd:t[`date-end`],metric:t.metric,asn:t.asn,location:t.location,name:t.name,format:t.format};if(t.dryRun){i({command:`cf radar bgp rpki roas timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/rpki/roas/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.rpki.roas.timeseries(n)),{successLabel:`Loaded`})}},gt={command:`roas`,describe:`Operations for bgp.rpki.roas`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_t={command:`rpki`,describe:`Operations for bgp.rpki`,builder:e=>e.command(pt).command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vt(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 yt={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(vt),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],prefix:t.prefix,updateType:t[`update-type`],asn:t.asn,format:t.format};if(t.dryRun){i({command:`cf radar bgp timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.timeseries(n)),{successLabel:`Loaded`})}};function bt(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 xt={command:`get`,describe:`Retrieves the top autonomous systems by BGP updates (announcements only).`,builder:o(bt),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,prefix:t.prefix,updateType:t[`update-type`],format:t.format};if(t.dryRun){i({command:`cf radar bgp top ases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.top.ases.get(n)),{successLabel:`Loaded`})}};function St(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 Ct={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(St),handler:async t=>{let n={country:t.country,limit:t.limit,format:t.format};if(t.dryRun){i({command:`cf radar bgp top ases prefixes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/ases/prefixes`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.top.ases.prefixes(n)),{successLabel:`Loaded`})}},wt={command:`ases`,describe:`Operations for bgp.top.ases`,builder:e=>e.command(xt).command(Ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Tt(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 Et={command:`prefixes`,describe:`Retrieves the top network prefixes by BGP updates.`,builder:o(Tt),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,updateType:t[`update-type`],format:t.format};if(t.dryRun){i({command:`cf radar bgp top prefixes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bgp/top/prefixes`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bgp.top.prefixes(n)),{successLabel:`Loaded`})}},Dt={command:`top`,describe:`Operations for bgp.top`,builder:e=>e.command(Et).command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`bgp`,describe:`Operations for bgp`,builder:e=>e.command(yt).command(ze).command(Ge).command(Ye).command(ot).command(_t).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kt(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 At={command:`get <bot-slug>`,describe:`Retrieves the requested bot information.`,builder:o(kt),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar bots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/${t[`bot-slug`]==null?`<bot-slug>`:encodeURIComponent(String(t[`bot-slug`]))}`,pathParams:{"bot-slug":String(t[`bot-slug`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.get({bot_slug:t[`bot-slug`],...n})),{successLabel:`Loaded`})}};function jt(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 Mt={command:`list`,describe:`Retrieves a list of bots.`,builder:o(jt),handler:async t=>{let n={limit:t.limit,offset:t.offset,botCategory:t[`bot-category`],botOperator:t[`bot-operator`],kind:t.kind,botVerificationStatus:t[`bot-verification-status`],format:t.format};if(t.dryRun){i({command:`cf radar bots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.list(n)),{successLabel:`Loaded`})}};function Nt(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 Pt={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of bots HTTP requests grouped by the specified dimension.`,builder:o(Nt),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,limitPerGroup:t[`limit-per-group`],bot:t.bot,botOperator:t[`bot-operator`],botCategory:t[`bot-category`],botKind:t[`bot-kind`],botVerificationStatus:t[`bot-verification-status`],format:t.format};if(t.dryRun){i({command:`cf radar bots summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Ft(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 It={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of HTTP requests from bots, grouped by the specified dimension over time.`,builder:o(Ft),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,limitPerGroup:t[`limit-per-group`],bot:t.bot,botOperator:t[`bot-operator`],botCategory:t[`bot-category`],botKind:t[`bot-kind`],botVerificationStatus:t[`bot-verification-status`],format:t.format};if(t.dryRun){i({command:`cf radar bots timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Lt(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 Rt={command:`timeseries`,describe:`Retrieves bots HTTP request volume over time.`,builder:o(Lt),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,bot:t.bot,botOperator:t[`bot-operator`],botCategory:t[`bot-category`],botKind:t[`bot-kind`],botVerificationStatus:t[`bot-verification-status`],format:t.format};if(t.dryRun){i({command:`cf radar bots timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.timeseries(n)),{successLabel:`Loaded`})}};function zt(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 Bt={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of HTTP requests from crawlers, grouped by the specified dimension.`,builder:o(zt),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],botOperator:t[`bot-operator`],vertical:t.vertical,industry:t.industry,clientType:t[`client-type`],responseStatus:t[`response-status`],responseStatusCategory:t[`response-status-category`],format:t.format};if(t.dryRun){i({command:`cf radar bots web-crawlers summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/crawlers/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.webCrawlers.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Vt(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 Ht={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of HTTP requests from crawlers, grouped by the specified dimension over time.`,builder:o(Vt),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],normalization:t.normalization,botOperator:t[`bot-operator`],vertical:t.vertical,industry:t.industry,clientType:t[`client-type`],responseStatus:t[`response-status`],responseStatusCategory:t[`response-status-category`],format:t.format};if(t.dryRun){i({command:`cf radar bots web-crawlers timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/bots/crawlers/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.bots.webCrawlers.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},Ut={command:`web-crawlers`,describe:`Operations for bots.web-crawlers`,builder:e=>e.command(Bt).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`bots`,describe:`Operations for bots`,builder:e=>e.command(At).command(Mt).command(Pt).command(Rt).command(It).command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gt(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 Kt={command:`get <ca-slug>`,describe:`Retrieves the requested CA information.`,builder:o(Gt),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar ct authorities get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/authorities/${t[`ca-slug`]==null?`<ca-slug>`:encodeURIComponent(String(t[`ca-slug`]))}`,pathParams:{"ca-slug":String(t[`ca-slug`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.authorities.get({ca_slug:t[`ca-slug`],...n})),{successLabel:`Loaded`})}};function qt(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 Jt={command:`list`,describe:`Retrieves a list of certificate authorities.`,builder:o(qt),handler:async t=>{let n={limit:t.limit,offset:t.offset,format:t.format};if(t.dryRun){i({command:`cf radar ct authorities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/authorities`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.authorities.list(n)),{successLabel:`Loaded`})}},Yt={command:`authorities`,describe:`Operations for ct.authorities`,builder:e=>e.command(Kt).command(Jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xt(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 Zt={command:`get <log-slug>`,describe:`Retrieves the requested certificate log information.`,builder:o(Xt),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar ct logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/logs/${t[`log-slug`]==null?`<log-slug>`:encodeURIComponent(String(t[`log-slug`]))}`,pathParams:{"log-slug":String(t[`log-slug`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.logs.get({log_slug:t[`log-slug`],...n})),{successLabel:`Loaded`})}};function Qt(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 $t={command:`list`,describe:`Retrieves a list of certificate logs.`,builder:o(Qt),handler:async t=>{let n={limit:t.limit,offset:t.offset,format:t.format};if(t.dryRun){i({command:`cf radar ct logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/logs`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.logs.list(n)),{successLabel:`Loaded`})}},en={command:`logs`,describe:`Operations for ct.logs`,builder:e=>e.command(Zt).command($t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function tn(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 nn={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of certificates grouped by the specified dimension.`,builder:o(tn),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],ca:t.ca,caOwner:t[`ca-owner`],duration:t.duration,entryType:t[`entry-type`],expirationStatus:t[`expiration-status`],hasIps:t[`has-ips`],hasWildcards:t[`has-wildcards`],log:t.log,logApi:t[`log-api`],logOperator:t[`log-operator`],publicKeyAlgorithm:t[`public-key-algorithm`],signatureAlgorithm:t[`signature-algorithm`],tld:t.tld,validationLevel:t[`validation-level`],uniqueEntries:t[`unique-entries`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar ct summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function rn(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 an={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of certificates grouped by the specified dimension over time.`,builder:o(rn),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],ca:t.ca,caOwner:t[`ca-owner`],duration:t.duration,entryType:t[`entry-type`],expirationStatus:t[`expiration-status`],hasIps:t[`has-ips`],hasWildcards:t[`has-wildcards`],log:t.log,logApi:t[`log-api`],logOperator:t[`log-operator`],publicKeyAlgorithm:t[`public-key-algorithm`],signatureAlgorithm:t[`signature-algorithm`],validationLevel:t[`validation-level`],tld:t.tld,normalization:t.normalization,uniqueEntries:t[`unique-entries`],format:t.format};if(t.dryRun){i({command:`cf radar ct timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.timeseriesGroups({dimension:t.dimension,...n})),{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(`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 sn={command:`timeseries`,describe:`Retrieves certificate volume over time.`,builder:o(on),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],ca:t.ca,caOwner:t[`ca-owner`],duration:t.duration,entryType:t[`entry-type`],expirationStatus:t[`expiration-status`],hasIps:t[`has-ips`],hasWildcards:t[`has-wildcards`],log:t.log,logApi:t[`log-api`],logOperator:t[`log-operator`],publicKeyAlgorithm:t[`public-key-algorithm`],signatureAlgorithm:t[`signature-algorithm`],tld:t.tld,validationLevel:t[`validation-level`],uniqueEntries:t[`unique-entries`],format:t.format};if(t.dryRun){i({command:`cf radar ct timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ct/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ct.timeseries(n)),{successLabel:`Loaded`})}},cn={command:`ct`,describe:`Operations for ct`,builder:e=>e.command(nn).command(sn).command(an).command(Yt).command(en).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ln(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 un={command:`download`,describe:`Retrieves an URL to download a single dataset.`,builder:o(ln),handler:async o=>{let s={format:o.format};if(o.dryRun){i({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?n({datasetId:o[`dataset-id`]}):t(o.body)});return}let c=await e(o);if(o.body){let e=t(o.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r(await a(`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=n({datasetId:o[`dataset-id`]});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r(await a(`Creating`,async()=>c.radar.datasets.download({...l,...s})),{successLabel:`Created`})}};function dn(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 fn={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:dn,handler:async t=>{if(t.dryRun){i({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 a(`Loading`,async()=>c(`/radar/datasets/${encodeURIComponent(String(t.alias))}`,{method:`GET`,localEndpoint:t.local?t.localEndpoint:void 0}))).toString(`utf-8`))}};function pn(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 mn={command:`list`,describe:`Retrieves a list of datasets.`,builder:o(pn),handler:async t=>{let n={limit:t.limit,offset:t.offset,datasetType:t[`dataset-type`],date:t.date,format:t.format};if(t.dryRun){i({command:`cf radar datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/datasets`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.datasets.list(n)),{successLabel:`Loaded`})}},hn={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(un).command(fn).command(mn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gn(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 _n={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of DNS queries by the specified dimension.`,builder:o(gn),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,cacheHit:t[`cache-hit`],nodata:t.nodata,protocol:t.protocol,queryType:t[`query-type`],responseCode:t[`response-code`],responseTtl:t[`response-ttl`],dnssec:t.dnssec,dnssecAware:t[`dnssec-aware`],dnssecE2e:t[`dnssec-e2e`],ipVersion:t[`ip-version`],limitPerGroup:t[`limit-per-group`],matchingAnswer:t[`matching-answer`],tld:t.tld,format:t.format};if(t.dryRun){i({command:`cf radar dns summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.dns.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function vn(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 yn={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of DNS queries grouped by dimension over time.`,builder:o(vn),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,cacheHit:t[`cache-hit`],nodata:t.nodata,protocol:t.protocol,queryType:t[`query-type`],responseCode:t[`response-code`],responseTtl:t[`response-ttl`],dnssec:t.dnssec,dnssecAware:t[`dnssec-aware`],dnssecE2e:t[`dnssec-e2e`],ipVersion:t[`ip-version`],limitPerGroup:t[`limit-per-group`],matchingAnswer:t[`matching-answer`],tld:t.tld,normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar dns timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.dns.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function bn(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 xn={command:`timeseries`,describe:`Retrieves normalized query volume to the 1.1.1.1 DNS resolver over time.`,builder:o(bn),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,cacheHit:t[`cache-hit`],nodata:t.nodata,protocol:t.protocol,queryType:t[`query-type`],responseCode:t[`response-code`],responseTtl:t[`response-ttl`],dnssec:t.dnssec,dnssecAware:t[`dnssec-aware`],dnssecE2e:t[`dnssec-e2e`],ipVersion:t[`ip-version`],matchingAnswer:t[`matching-answer`],tld:t.tld,format:t.format};if(t.dryRun){i({command:`cf radar dns timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.dns.timeseries(n)),{successLabel:`Loaded`})}};function Sn(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 Cn={command:`ases`,describe:`Retrieves the top autonomous systems by DNS queries made to 1.1.1.1 DNS resolver.`,builder:o(Sn),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,domain:t.domain,cacheHit:t[`cache-hit`],nodata:t.nodata,protocol:t.protocol,queryType:t[`query-type`],responseCode:t[`response-code`],responseTtl:t[`response-ttl`],dnssec:t.dnssec,dnssecAware:t[`dnssec-aware`],dnssecE2e:t[`dnssec-e2e`],ipVersion:t[`ip-version`],matchingAnswer:t[`matching-answer`],format:t.format};if(t.dryRun){i({command:`cf radar dns top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.dns.top.ases(n)),{successLabel:`Loaded`})}};function wn(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 Tn={command:`locations`,describe:`Retrieves the top locations by DNS queries made to 1.1.1.1 DNS resolver.`,builder:o(wn),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,domain:t.domain,cacheHit:t[`cache-hit`],nodata:t.nodata,protocol:t.protocol,queryType:t[`query-type`],responseCode:t[`response-code`],responseTtl:t[`response-ttl`],dnssec:t.dnssec,dnssecAware:t[`dnssec-aware`],dnssecE2e:t[`dnssec-e2e`],ipVersion:t[`ip-version`],matchingAnswer:t[`matching-answer`],tld:t.tld,format:t.format};if(t.dryRun){i({command:`cf radar dns top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/dns/top/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.dns.top.locations(n)),{successLabel:`Loaded`})}},En={command:`top`,describe:`Operations for dns.top`,builder:e=>e.command(Cn).command(Tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Dn={command:`dns`,describe:`Operations for dns`,builder:e=>e.command(_n).command(xn).command(yn).command(En).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function On(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 kn={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of email routing metrics by the specified dimension.`,builder:o(On),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,ipVersion:t[`ip-version`],encrypted:t.encrypted,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar email routing summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/routing/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.routing.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function An(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 jn={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of email routing metrics grouped by dimension over time.`,builder:o(An),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,ipVersion:t[`ip-version`],encrypted:t.encrypted,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar email routing timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/routing/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.routing.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},Mn={command:`routing`,describe:`Operations for email.routing`,builder:e=>e.command(kn).command(jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Nn(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 Pn={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of email security metrics by the specified dimension.`,builder:o(Nn),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar email security summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Fn(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 In={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of email security metrics grouped by dimension over time.`,builder:o(Fn),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar email security timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Ln(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 Rn={command:`get`,describe:`Retrieves the top TLDs by number of email messages.`,builder:o(Ln),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],tldCategory:t[`tld-category`],format:t.format};if(t.dryRun){i({command:`cf radar email security top tlds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.top.tlds.get(n)),{successLabel:`Loaded`})}};function zn(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 Bn={command:`get <malicious>`,describe:`Retrieves the top TLDs by emails classified as malicious or not.`,builder:o(zn),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],tldCategory:t[`tld-category`],format:t.format};if(t.dryRun){i({command:`cf radar email security top tlds malicious get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/malicious/${t.malicious==null?`<malicious>`:encodeURIComponent(String(t.malicious))}`,pathParams:{malicious:String(t.malicious??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.top.tlds.malicious.get({malicious:t.malicious,...n})),{successLabel:`Loaded`})}},Vn={command:`malicious`,describe:`Operations for email.security.top.tlds.malicious`,builder:e=>e.command(Bn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hn(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 Un={command:`get <spam>`,describe:`Retrieves the top TLDs by emails classified as spam or not.`,builder:o(Hn),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],tldCategory:t[`tld-category`],format:t.format};if(t.dryRun){i({command:`cf radar email security top tlds spam get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/spam/${t.spam==null?`<spam>`:encodeURIComponent(String(t.spam))}`,pathParams:{spam:String(t.spam??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.top.tlds.spam.get({spam:t.spam,...n})),{successLabel:`Loaded`})}},Wn={command:`spam`,describe:`Operations for email.security.top.tlds.spam`,builder:e=>e.command(Un).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gn(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 Kn={command:`get <spoof>`,describe:`Retrieves the top TLDs by emails classified as spoof or not.`,builder:o(Gn),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],arc:t.arc,dkim:t.dkim,dmarc:t.dmarc,spf:t.spf,tlsVersion:t[`tls-version`],tldCategory:t[`tld-category`],format:t.format};if(t.dryRun){i({command:`cf radar email security top tlds spoof get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/email/security/top/tlds/spoof/${t.spoof==null?`<spoof>`:encodeURIComponent(String(t.spoof))}`,pathParams:{spoof:String(t.spoof??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.email.security.top.tlds.spoof.get({spoof:t.spoof,...n})),{successLabel:`Loaded`})}},qn={command:`spoof`,describe:`Operations for email.security.top.tlds.spoof`,builder:e=>e.command(Kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Jn={command:`tlds`,describe:`Operations for email.security.top.tlds`,builder:e=>e.command(Rn).command(Vn).command(Wn).command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yn={command:`top`,describe:`Operations for email.security.top`,builder:e=>e.command(Jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Xn={command:`security`,describe:`Operations for email.security`,builder:e=>e.command(Pn).command(In).command(Yn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Zn={command:`email`,describe:`Operations for email`,builder:e=>e.command(Mn).command(Xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qn(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 $n={command:`as-set <asn>`,describe:`Retrieves Internet Routing Registry AS-SETs that an AS is a member of.`,builder:o(Qn),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar entities asns as-set`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}/as_set`,pathParams:{asn:String(t.asn??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.asSet({asn:t.asn,...n})),{successLabel:`Loaded`})}};function er(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 tr={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(er),handler:async t=>{let n={limit:t.limit,offset:t.offset,metric:t.metric,date:t.date,compareDateRange:t[`compare-date-range`],location:t.location,asn:t.asn,sortOrder:t[`sort-order`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.botnetThreatFeed(n)),{successLabel:`Loaded`})}};function nr(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 rr={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(nr),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar entities asns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}`,pathParams:{asn:String(t.asn??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.get({asn:t.asn,...n})),{successLabel:`Loaded`})}};function ir(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 ar={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(ir),handler:async t=>{let n={ip:t.ip,format:t.format};if(t.dryRun){i({command:`cf radar entities asns ip`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/ip`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.ip(n)),{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 or={command:`list`,describe:`Retrieves a list of autonomous systems.`,builder:o($),handler:async t=>{let n={limit:t.limit,offset:t.offset,asn:t.asn,location:t.location,orderBy:t[`order-by`],format:t.format};if(t.dryRun){i({command:`cf radar entities asns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.list(n)),{successLabel:`Loaded`})}};function sr(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 cr={command:`rel <asn>`,describe:`Retrieves AS-level relationship for given networks.`,builder:o(sr),handler:async t=>{let n={asn2:t.asn2,format:t.format};if(t.dryRun){i({command:`cf radar entities asns rel`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/asns/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}/rel`,pathParams:{asn:String(t.asn??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.asns.rel({asn:t.asn,...n})),{successLabel:`Loaded`})}},lr={command:`asns`,describe:`Operations for entities.asns`,builder:e=>e.command($n).command(tr).command(rr).command(ar).command(or).command(cr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ur(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 dr={command:`get`,describe:`Retrieves IP address information.`,builder:o(ur),handler:async t=>{let n={ip:t.ip,format:t.format};if(t.dryRun){i({command:`cf radar entities get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/ip`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.get(n)),{successLabel:`Loaded`})}};function fr(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 pr={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(fr),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar entities locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/locations/${t.location==null?`<location>`:encodeURIComponent(String(t.location))}`,pathParams:{location:String(t.location??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.locations.get({location:t.location,...n})),{successLabel:`Loaded`})}};function mr(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 hr={command:`list`,describe:`Retrieves a list of locations.`,builder:o(mr),handler:async t=>{let n={limit:t.limit,offset:t.offset,location:t.location,region:t.region,subregion:t.subregion,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar entities locations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/entities/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.entities.locations.list(n)),{successLabel:`Loaded`})}},gr={command:`locations`,describe:`Operations for entities.locations`,builder:e=>e.command(pr).command(hr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_r={command:`entities`,describe:`Operations for entities`,builder:e=>e.command(dr).command(lr).command(gr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vr(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 yr={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(vr),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar geolocations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/geolocations/${t[`geo-id`]==null?`<geo-id>`:encodeURIComponent(String(t[`geo-id`]))}`,pathParams:{"geo-id":String(t[`geo-id`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.geolocations.get({geo_id:t[`geo-id`],...n})),{successLabel:`Loaded`})}};function br(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 xr={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(br),handler:async t=>{let n={limit:t.limit,offset:t.offset,geoId:t[`geo-id`],location:t.location,format:t.format};if(t.dryRun){i({command:`cf radar geolocations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/geolocations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.geolocations.list(n)),{successLabel:`Loaded`})}},Sr={command:`geolocations`,describe:`Operations for geolocations`,builder:e=>e.command(yr).command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cr(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 wr={command:`get <bot-class>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested bot class.`,builder:o(Cr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases bot-class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/bot_class/${t[`bot-class`]==null?`<bot-class>`:encodeURIComponent(String(t[`bot-class`]))}`,pathParams:{"bot-class":String(t[`bot-class`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.botClass.get({bot_class:t[`bot-class`],...n})),{successLabel:`Loaded`})}},Tr={command:`bot-class`,describe:`Operations for http.ases.bot-class`,builder:e=>e.command(wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Er(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 Dr={command:`get <browser-family>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested browser family.`,builder:o(Er),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],format:t.format};if(t.dryRun){i({command:`cf radar http ases browser-family get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/browser_family/${t[`browser-family`]==null?`<browser-family>`:encodeURIComponent(String(t[`browser-family`]))}`,pathParams:{"browser-family":String(t[`browser-family`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.browserFamily.get({browser_family:t[`browser-family`],...n})),{successLabel:`Loaded`})}},Or={command:`browser-family`,describe:`Operations for http.ases.browser-family`,builder:e=>e.command(Dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kr(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 Ar={command:`get <device-type>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested device type.`,builder:o(kr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases device-type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/device_type/${t[`device-type`]==null?`<device-type>`:encodeURIComponent(String(t[`device-type`]))}`,pathParams:{"device-type":String(t[`device-type`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.deviceType.get({device_type:t[`device-type`],...n})),{successLabel:`Loaded`})}},jr={command:`device-type`,describe:`Operations for http.ases.device-type`,builder:e=>e.command(Ar).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mr(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 Nr={command:`get`,describe:`Retrieves the top autonomous systems by HTTP requests.`,builder:o(Mr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.get(n)),{successLabel:`Loaded`})}};function Pr(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 Fr={command:`get <http-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP version.`,builder:o(Pr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases http-method get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/http_version/${t[`http-version`]==null?`<http-version>`:encodeURIComponent(String(t[`http-version`]))}`,pathParams:{"http-version":String(t[`http-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.httpMethod.get({http_version:t[`http-version`],...n})),{successLabel:`Loaded`})}},Ir={command:`http-method`,describe:`Operations for http.ases.http-method`,builder:e=>e.command(Fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lr(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 Rr={command:`get <http-protocol>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP protocol.`,builder:o(Lr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases http-protocol get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/http_protocol/${t[`http-protocol`]==null?`<http-protocol>`:encodeURIComponent(String(t[`http-protocol`]))}`,pathParams:{"http-protocol":String(t[`http-protocol`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.httpProtocol.get({http_protocol:t[`http-protocol`],...n})),{successLabel:`Loaded`})}},zr={command:`http-protocol`,describe:`Operations for http.ases.http-protocol`,builder:e=>e.command(Rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Br(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 Vr={command:`get <ip-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested IP version.`,builder:o(Br),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases ip-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/ip_version/${t[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(t[`ip-version`]))}`,pathParams:{"ip-version":String(t[`ip-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.ipVersion.get({ip_version:t[`ip-version`],...n})),{successLabel:`Loaded`})}},Hr={command:`ip-version`,describe:`Operations for http.ases.ip-version`,builder:e=>e.command(Vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ur(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 Wr={command:`get <os>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested operating system.`,builder:o(Ur),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases os get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/os/${t.os==null?`<os>`:encodeURIComponent(String(t.os))}`,pathParams:{os:String(t.os??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.os.get({os:t.os,...n})),{successLabel:`Loaded`})}},Gr={command:`os`,describe:`Operations for http.ases.os`,builder:e=>e.command(Wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Kr(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 qr={command:`get <tls-version>`,describe:`Retrieves the top autonomous systems, by HTTP requests, of the requested TLS protocol version.`,builder:o(Kr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http ases tls-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/ases/tls_version/${t[`tls-version`]==null?`<tls-version>`:encodeURIComponent(String(t[`tls-version`]))}`,pathParams:{"tls-version":String(t[`tls-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.ases.tlsVersion.get({tls_version:t[`tls-version`],...n})),{successLabel:`Loaded`})}},Jr={command:`tls-version`,describe:`Operations for http.ases.tls-version`,builder:e=>e.command(qr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yr={command:`ases`,describe:`Operations for http.ases`,builder:e=>e.command(Nr).command(Tr).command(Or).command(jr).command(Ir).command(zr).command(Hr).command(Gr).command(Jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xr(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 Zr={command:`get <bot-class>`,describe:`Retrieves the top locations, by HTTP requests, of the requested bot class.`,builder:o(Xr),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations bot-class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/bot_class/${t[`bot-class`]==null?`<bot-class>`:encodeURIComponent(String(t[`bot-class`]))}`,pathParams:{"bot-class":String(t[`bot-class`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.botClass.get({bot_class:t[`bot-class`],...n})),{successLabel:`Loaded`})}},Qr={command:`bot-class`,describe:`Operations for http.locations.bot-class`,builder:e=>e.command(Zr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $r(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 ei={command:`get <browser-family>`,describe:`Retrieves the top locations, by HTTP requests, of the requested browser family.`,builder:o($r),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],format:t.format};if(t.dryRun){i({command:`cf radar http locations browser-family get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/browser_family/${t[`browser-family`]==null?`<browser-family>`:encodeURIComponent(String(t[`browser-family`]))}`,pathParams:{"browser-family":String(t[`browser-family`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.browserFamily.get({browser_family:t[`browser-family`],...n})),{successLabel:`Loaded`})}},ti={command:`browser-family`,describe:`Operations for http.locations.browser-family`,builder:e=>e.command(ei).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ni(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 ri={command:`get <device-type>`,describe:`Retrieves the top locations, by HTTP requests, of the requested device type.`,builder:o(ni),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations device-type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/device_type/${t[`device-type`]==null?`<device-type>`:encodeURIComponent(String(t[`device-type`]))}`,pathParams:{"device-type":String(t[`device-type`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.deviceType.get({device_type:t[`device-type`],...n})),{successLabel:`Loaded`})}},ii={command:`device-type`,describe:`Operations for http.locations.device-type`,builder:e=>e.command(ri).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ai(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 oi={command:`get`,describe:`Retrieves the top locations by HTTP requests.`,builder:o(ai),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.get(n)),{successLabel:`Loaded`})}};function si(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 ci={command:`get <http-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested HTTP version.`,builder:o(si),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations http-method get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/http_version/${t[`http-version`]==null?`<http-version>`:encodeURIComponent(String(t[`http-version`]))}`,pathParams:{"http-version":String(t[`http-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.httpMethod.get({http_version:t[`http-version`],...n})),{successLabel:`Loaded`})}},li={command:`http-method`,describe:`Operations for http.locations.http-method`,builder:e=>e.command(ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ui(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 di={command:`get <http-protocol>`,describe:`Retrieves the top locations, by HTTP requests, of the requested HTTP protocol.`,builder:o(ui),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations http-protocol get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/http_protocol/${t[`http-protocol`]==null?`<http-protocol>`:encodeURIComponent(String(t[`http-protocol`]))}`,pathParams:{"http-protocol":String(t[`http-protocol`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.httpProtocol.get({http_protocol:t[`http-protocol`],...n})),{successLabel:`Loaded`})}},fi={command:`http-protocol`,describe:`Operations for http.locations.http-protocol`,builder:e=>e.command(di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pi(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 mi={command:`get <ip-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested IP version.`,builder:o(pi),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations ip-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/ip_version/${t[`ip-version`]==null?`<ip-version>`:encodeURIComponent(String(t[`ip-version`]))}`,pathParams:{"ip-version":String(t[`ip-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.ipVersion.get({ip_version:t[`ip-version`],...n})),{successLabel:`Loaded`})}},hi={command:`ip-version`,describe:`Operations for http.locations.ip-version`,builder:e=>e.command(mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gi(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 _i={command:`get <os>`,describe:`Retrieves the top locations, by HTTP requests, of the requested operating system.`,builder:o(gi),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations os get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/os/${t.os==null?`<os>`:encodeURIComponent(String(t.os))}`,pathParams:{os:String(t.os??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.os.get({os:t.os,...n})),{successLabel:`Loaded`})}},vi={command:`os`,describe:`Operations for http.locations.os`,builder:e=>e.command(_i).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function yi(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 bi={command:`get <tls-version>`,describe:`Retrieves the top locations, by HTTP requests, of the requested TLS protocol version.`,builder:o(yi),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],botClass:t[`bot-class`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http locations tls-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/top/locations/tls_version/${t[`tls-version`]==null?`<tls-version>`:encodeURIComponent(String(t[`tls-version`]))}`,pathParams:{"tls-version":String(t[`tls-version`]??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.locations.tlsVersion.get({tls_version:t[`tls-version`],...n})),{successLabel:`Loaded`})}},xi={command:`tls-version`,describe:`Operations for http.locations.tls-version`,builder:e=>e.command(bi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Si={command:`locations`,describe:`Operations for http.locations`,builder:e=>e.command(oi).command(Qr).command(ti).command(ii).command(li).command(fi).command(hi).command(vi).command(xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ci(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 wi={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of HTTP requests by the specified dimension.`,builder:o(Ci),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],apiTraffic:t[`api-traffic`],botClass:t[`bot-class`],contentType:t[`content-type`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar http summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Ti(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 Ei={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of HTTP requests grouped by dimension.`,builder:o(Ti),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],apiTraffic:t[`api-traffic`],botClass:t[`bot-class`],contentType:t[`content-type`],limitPerGroup:t[`limit-per-group`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],normalization:t.normalization,ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],format:t.format};if(t.dryRun){i({command:`cf radar http timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Di(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 Oi={command:`timeseries`,describe:`Retrieves the HTTP requests over time.`,builder:o(Di),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],normalization:t.normalization,apiTraffic:t[`api-traffic`],botClass:t[`bot-class`],contentType:t[`content-type`],deviceType:t[`device-type`],httpProtocol:t[`http-protocol`],httpVersion:t[`http-version`],ipVersion:t[`ip-version`],os:t.os,tlsVersion:t[`tls-version`],browserFamily:t[`browser-family`],format:t.format};if(t.dryRun){i({command:`cf radar http timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/http/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.http.timeseries(n)),{successLabel:`Loaded`})}},ki={command:`http`,describe:`Operations for http`,builder:e=>e.command(wi).command(Oi).command(Ei).command(Yr).command(Si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ai(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 ji={command:`summary-v2 <dimension>`,describe:`Retrieves an aggregated summary of HTTP authentication requests grouped by the specified dimension.`,builder:o(Ai),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,botClass:t[`bot-class`],compromised:t.compromised,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar leaked-credentials summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/leaked_credential_checks/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.leakedCredentials.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Mi(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 Ni={command:`timeseries-groups-v2 <dimension>`,describe:`Retrieves the distribution of HTTP authentication requests, grouped by the specified dimension over time.`,builder:o(Mi),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,botClass:t[`bot-class`],compromised:t.compromised,checkResult:t[`check-result`],limitPerGroup:t[`limit-per-group`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar leaked-credentials timeseries-groups-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/leaked_credential_checks/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.leakedCredentials.timeseriesGroupsV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},Pi={command:`leaked-credentials`,describe:`Operations for leaked-credentials`,builder:e=>e.command(ji).command(Ni).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fi(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 Ii={command:`summary-v2 <dimension>`,describe:`Retrieves the distribution of network traffic (NetFlows) by the specified dimension.`,builder:o(Fi),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],product:t.product,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar netflows summary-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.netflows.summaryV2({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function Li(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 Ri={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of NetFlows traffic, grouped by the specified dimension over time.`,builder:o(Li),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],limitPerGroup:t[`limit-per-group`],normalization:t.normalization,product:t.product,format:t.format};if(t.dryRun){i({command:`cf radar netflows timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.netflows.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function zi(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 Bi={command:`timeseries`,describe:`Retrieves network traffic (NetFlows) over time.`,builder:o(zi),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],product:t.product,asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar netflows timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.netflows.timeseries(n)),{successLabel:`Loaded`})}};function Vi(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 Hi={command:`ases`,describe:`Retrieves the top autonomous systems by network traffic (NetFlows).`,builder:o(Vi),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],format:t.format};if(t.dryRun){i({command:`cf radar netflows top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.netflows.top.ases(n)),{successLabel:`Loaded`})}};function Ui(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 Wi={command:`locations`,describe:`Retrieves the top locations by network traffic (NetFlows).`,builder:o(Ui),handler:async t=>{let n={limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,geoId:t[`geo-id`],format:t.format};if(t.dryRun){i({command:`cf radar netflows top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/netflows/top/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.netflows.top.locations(n)),{successLabel:`Loaded`})}},Gi={command:`top`,describe:`Operations for netflows.top`,builder:e=>e.command(Hi).command(Wi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ki={command:`netflows`,describe:`Operations for netflows`,builder:e=>e.command(Ii).command(Bi).command(Ri).command(Gi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qi(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 Ji={command:`get <slug>`,describe:`Retrieves the requested origin information with its regions.`,builder:o(qi),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar origins get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/${t.slug==null?`<slug>`:encodeURIComponent(String(t.slug))}`,pathParams:{slug:String(t.slug??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.origins.get({slug:t.slug,...n})),{successLabel:`Loaded`})}};function Yi(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 Xi={command:`list`,describe:`Retrieves a list of origins with their regions.`,builder:o(Yi),handler:async t=>{let n={limit:t.limit,offset:t.offset,format:t.format};if(t.dryRun){i({command:`cf radar origins list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.origins.list(n)),{successLabel:`Loaded`})}};function Zi(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 Qi={command:`summary <dimension>`,describe:`Retrieves an aggregated summary of origin metrics grouped by the specified dimension.`,builder:o(Zi),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],origin:t.origin,metric:t.metric,region:t.region,format:t.format};if(t.dryRun){i({command:`cf radar origins summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.origins.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function $i(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 ea={command:`timeseries-groups <dimension>`,describe:`Retrieves the distribution of origin metrics grouped by the specified dimension over time.`,builder:o($i),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],limitPerGroup:t[`limit-per-group`],origin:t.origin,metric:t.metric,region:t.region,normalization:t.normalization,format:t.format};if(t.dryRun){i({command:`cf radar origins timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.origins.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function ta(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 na={command:`timeseries`,describe:`Retrieves the time series of origin metrics for the specified origin.`,builder:o(ta),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],origin:t.origin,metric:t.metric,region:t.region,format:t.format};if(t.dryRun){i({command:`cf radar origins timeseries`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/origins/timeseries`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.origins.timeseries(n)),{successLabel:`Loaded`})}},ra={command:`origins`,describe:`Operations for origins`,builder:e=>e.command(Ji).command(Xi).command(Qi).command(na).command(ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ia(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 aa={command:`summary <dimension>`,describe:`Returns a summary of origin post-quantum data grouped by the specified dimension.`,builder:o(ia),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({command:`cf radar post-quantum origin summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/origin/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.postQuantum.origin.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function oa(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 sa={command:`timeseries-groups <dimension>`,describe:`Returns a timeseries of origin post-quantum data grouped by the specified dimension.`,builder:o(oa),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({command:`cf radar post-quantum origin timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/origin/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.postQuantum.origin.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},ca={command:`origin`,describe:`Operations for post-quantum.origin`,builder:e=>e.command(aa).command(sa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function la(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 ua={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:la,handler:async t=>{let n={host:t.host};if(t.dryRun){i({command:`cf radar post-quantum tls support`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/post_quantum/tls/support`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.postQuantum.tls.support(n)),{successLabel:`Loaded`})}},da={command:`tls`,describe:`Operations for post-quantum.tls`,builder:e=>e.command(ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fa={command:`post-quantum`,describe:`Operations for post-quantum`,builder:e=>e.command(ca).command(da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pa(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 ma={command:`summary`,describe:`Retrieves a summary (percentiles) of bandwidth, latency, or DNS response time from the Radar Internet Quality Index (IQI).`,builder:o(pa),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,metric:t.metric,format:t.format};if(t.dryRun){i({command:`cf radar quality iqi summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/iqi/summary`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.iqi.summary(n)),{successLabel:`Loaded`})}};function ha(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 ga={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(ha),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,interpolation:t.interpolation,metric:t.metric,format:t.format};if(t.dryRun){i({command:`cf radar quality iqi timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/iqi/timeseries_groups`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.iqi.timeseriesGroups(n)),{successLabel:`Loaded`})}},_a={command:`iqi`,describe:`Operations for quality.iqi`,builder:e=>e.command(ma).command(ga).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function va(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 ya={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(va),handler:async t=>{let n={name:t.name,dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,bucketSize:t[`bucket-size`],metricGroup:t[`metric-group`],format:t.format};if(t.dryRun){i({command:`cf radar quality speed histogram`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/histogram`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.speed.histogram(n)),{successLabel:`Loaded`})}};function ba(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 xa={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(ba),handler:async t=>{let n={name:t.name,dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar quality speed summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/summary`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.speed.summary(n)),{successLabel:`Loaded`})}};function Sa(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 Ca={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(Sa),handler:async t=>{let n={limit:t.limit,name:t.name,dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,orderBy:t[`order-by`],reverse:t.reverse,format:t.format};if(t.dryRun){i({command:`cf radar quality speed top ases`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/top/ases`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.speed.top.ases(n)),{successLabel:`Loaded`})}};function wa(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 Ta={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(wa),handler:async t=>{let n={limit:t.limit,name:t.name,dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,orderBy:t[`order-by`],reverse:t.reverse,format:t.format};if(t.dryRun){i({command:`cf radar quality speed top locations`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/quality/speed/top/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.quality.speed.top.locations(n)),{successLabel:`Loaded`})}},Ea={command:`top`,describe:`Operations for quality.speed.top`,builder:e=>e.command(Ca).command(Ta).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Da={command:`speed`,describe:`Operations for quality.speed`,builder:e=>e.command(ya).command(xa).command(Ea).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oa={command:`quality`,describe:`Operations for quality`,builder:e=>e.command(_a).command(Da).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ka(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 Aa={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(ka),handler:async t=>{let n={limit:t.limit,rankingType:t[`ranking-type`],name:t.name,includeTopLocations:t[`include-top-locations`],date:t.date,format:t.format};if(t.dryRun){i({command:`cf radar ranking domain get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/domain/${t.domain==null?`<domain>`:encodeURIComponent(String(t.domain))}`,pathParams:{domain:String(t.domain??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.domain.get({domain:t.domain,...n})),{successLabel:`Loaded`})}},ja={command:`domain`,describe:`Operations for ranking.domain`,builder:e=>e.command(Aa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};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`,{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 Na={command:`categories`,describe:`Retrieves the list of Internet services categories.`,builder:o(Ma),handler:async t=>{let n={limit:t.limit,name:t.name,date:t.date,format:t.format};if(t.dryRun){i({command:`cf radar ranking internet-services categories`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/internet_services/categories`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.internetServices.categories(n)),{successLabel:`Loaded`})}};function Pa(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 Fa={command:`timeseries-groups`,describe:`Retrieves Internet Services rank update changes over time.`,builder:o(Pa),handler:async t=>{let n={serviceCategory:t[`service-category`],limit:t.limit,name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.internetServices.timeseriesGroups(n)),{successLabel:`Loaded`})}};function Ia(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 La={command:`top`,describe:`Retrieves top Internet services based on their rank.`,builder:o(Ia),handler:async t=>{let n={serviceCategory:t[`service-category`],limit:t.limit,name:t.name,date:t.date,format:t.format};if(t.dryRun){i({command:`cf radar ranking internet-services top`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/internet_services/top`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.internetServices.top(n)),{successLabel:`Loaded`})}},Ra={command:`internet-services`,describe:`Operations for ranking.internet-services`,builder:e=>e.command(Na).command(Fa).command(La).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function za(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 Ba={command:`timeseries-groups`,describe:`Retrieves domains rank over time.`,builder:o(za),handler:async t=>{let n={limit:t.limit,rankingType:t[`ranking-type`],name:t.name,location:t.location,domains:t.domains,domainCategory:t[`domain-category`],dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],format:t.format};if(t.dryRun){i({command:`cf radar ranking timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/timeseries_groups`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.timeseriesGroups(n)),{successLabel:`Loaded`})}};function Va(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 Ha={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(Va),handler:async t=>{let n={limit:t.limit,name:t.name,location:t.location,domainCategory:t[`domain-category`],date:t.date,rankingType:t[`ranking-type`],format:t.format};if(t.dryRun){i({command:`cf radar ranking top`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/ranking/top`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.ranking.top(n)),{successLabel:`Loaded`})}},Ua={command:`ranking`,describe:`Operations for ranking`,builder:e=>e.command(Ba).command(Ha).command(ja).command(Ra).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wa(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 Ga={command:`domain-categories`,describe:`Retrieves the top domain categories by the number of robots.txt files parsed.`,builder:o(Wa),handler:async t=>{let n={limit:t.limit,name:t.name,userAgentCategory:t[`user-agent-category`],date:t.date,format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.robotsTxt.top.domainCategories(n)),{successLabel:`Loaded`})}};function Ka(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 qa={command:`directive`,describe:`Retrieves the top user agents on robots.txt files.`,builder:o(Ka),handler:async t=>{let n={limit:t.limit,name:t.name,userAgentCategory:t[`user-agent-category`],date:t.date,domainCategory:t[`domain-category`],directive:t.directive,format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.robotsTxt.top.userAgents.directive(n)),{successLabel:`Loaded`})}},Ja={command:`user-agents`,describe:`Operations for robots-txt.top.user-agents`,builder:e=>e.command(qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ya={command:`top`,describe:`Operations for robots-txt.top`,builder:e=>e.command(Ga).command(Ja).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Xa={command:`robots-txt`,describe:`Operations for robots-txt`,builder:e=>e.command(Ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Za(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 Qa={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(Za),handler:async t=>{let n={limit:t.limit,limitPerGroup:t[`limit-per-group`],query:t.query,include:t.include,exclude:t.exclude,format:t.format};if(t.dryRun){i({command:`cf radar search global`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/search/global`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.search.global(n)),{successLabel:`Loaded`})}},$a={command:`search`,describe:`Operations for search`,builder:e=>e.command(Qa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function eo(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 to={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(eo),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({command:`cf radar tcp-resets-timeouts summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tcp_resets_timeouts/summary`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tcpResetsTimeouts.summary(n)),{successLabel:`Loaded`})}};function no(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 ro={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(no),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],asn:t.asn,location:t.location,continent:t.continent,format:t.format};if(t.dryRun){i({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:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tcpResetsTimeouts.timeseriesGroups(n)),{successLabel:`Loaded`})}},io={command:`tcp-resets-timeouts`,describe:`Operations for tcp-resets-timeouts`,builder:e=>e.command(to).command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ao(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 oo={command:`get <tld>`,describe:`Retrieves the requested TLD information.`,builder:o(ao),handler:async t=>{let n={format:t.format};if(t.dryRun){i({command:`cf radar tlds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/${t.tld==null?`<tld>`:encodeURIComponent(String(t.tld))}`,pathParams:{tld:String(t.tld??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tlds.get({tld:t.tld,...n})),{successLabel:`Loaded`})}};function so(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 co={command:`list`,describe:`Retrieves a list of TLDs.`,builder:o(so),handler:async t=>{let n={limit:t.limit,offset:t.offset,tldManager:t[`tld-manager`],tldType:t[`tld-type`],tld:t.tld,format:t.format};if(t.dryRun){i({command:`cf radar tlds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tlds.list(n)),{successLabel:`Loaded`})}};function lo(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 uo={command:`summary <dimension>`,describe:`Returns a summary of TLD authoritative nameserver performance grouped by the specified dimension.`,builder:o(lo),handler:async t=>{let n={name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,tld:t.tld,nameserver:t.nameserver,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar tlds performance summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/performance/summary/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tlds.performance.summary({dimension:t.dimension,...n})),{successLabel:`Loaded`})}};function fo(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 po={command:`timeseries-groups <dimension>`,describe:`Returns a timeseries of TLD authoritative nameserver performance grouped by the specified dimension.`,builder:o(fo),handler:async t=>{let n={aggInterval:t[`agg-interval`],name:t.name,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],location:t.location,continent:t.continent,tld:t.tld,nameserver:t.nameserver,limitPerGroup:t[`limit-per-group`],format:t.format};if(t.dryRun){i({command:`cf radar tlds performance timeseries-groups`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/tlds/performance/timeseries_groups/${t.dimension==null?`<dimension>`:encodeURIComponent(String(t.dimension))}`,pathParams:{dimension:String(t.dimension??``)},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.tlds.performance.timeseriesGroups({dimension:t.dimension,...n})),{successLabel:`Loaded`})}},mo={command:`performance`,describe:`Operations for tlds.performance`,builder:e=>e.command(uo).command(po).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ho={command:`tlds`,describe:`Operations for tlds`,builder:e=>e.command(oo).command(co).command(mo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};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(`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(`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 _o={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(go),handler:async t=>{let n={limit:t.limit,offset:t.offset,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],status:t.status,type:t.type,asn:t.asn,location:t.location,origin:t.origin,format:t.format};if(t.dryRun){i({command:`cf radar traffic-anomalies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/traffic_anomalies`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.trafficAnomalies.get(n)),{successLabel:`Loaded`})}};function vo(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 yo={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(vo),handler:async t=>{let n={limit:t.limit,dateRange:t[`date-range`],dateStart:t[`date-start`],dateEnd:t[`date-end`],status:t.status,format:t.format};if(t.dryRun){i({command:`cf radar traffic-anomalies locations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/traffic_anomalies/locations`,pathParams:{},query:n,bodyKind:`none`});return}let o=await e(t);r(await a(`Loading`,async()=>o.radar.trafficAnomalies.locations.get(n)),{successLabel:`Loaded`})}},bo={command:`locations`,describe:`Operations for traffic-anomalies.locations`,builder:e=>e.command(yo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xo={command:`traffic-anomalies`,describe:`Operations for traffic-anomalies`,builder:e=>e.command(_o).command(bo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},So={command:`radar`,describe:`radar`,builder:e=>e.command(te).command(O).command(I).command(Q).command(Fe).command(Ot).command(Wt).command(cn).command(hn).command(Dn).command(Zn).command(_r).command(Sr).command(ki).command(Pi).command(Ki).command(ra).command(fa).command(Oa).command(Ua).command(Xa).command($a).command(io).command(ho).command(xo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{So as default};
|