cf 1.0.0-beta.17 → 1.0.0-beta.18
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/dist/_meta/commands.json +6117 -4540
- package/dist/_meta/schemas.json +5016 -3257
- package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
- package/dist/{access-DnWW2AAT.mjs → access-BtsMwesh.mjs} +1 -1
- package/dist/{accounts-8UcHNm3S.mjs → accounts-X5QVzEUW.mjs} +27 -21
- package/dist/{acm-qRM3iy4Z.mjs → acm-C_NepMi6.mjs} +1 -1
- package/dist/{addressing-CAb8z2Dq.mjs → addressing-BkQY1hoA.mjs} +18 -18
- package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
- package/dist/{ai-DnhytGdc.mjs → ai-Bb0_Zknm.mjs} +1 -1
- package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-DuEjVdML.mjs} +1 -1
- package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
- package/dist/ai-search-DDRpxyOM.mjs +79 -0
- package/dist/{ai-security-KUs94UW-.mjs → ai-security-A2STvE1b.mjs} +5 -5
- package/dist/{alerting-CCmyEPzN.mjs → alerting-CIwSk-Ks.mjs} +1 -1
- package/dist/{analytics-BAvBj6qx.mjs → analytics-H--uM3DA.mjs} +7 -7
- package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
- package/dist/{api-security-BItVQymb.mjs → api-security-D-pcnhUL.mjs} +26 -26
- package/dist/{argo-DsJCvfml.mjs → argo-Lvmcx3am.mjs} +1 -1
- package/dist/{artifacts-DzHXeah6.mjs → artifacts-xT5S-mVa.mjs} +1 -1
- package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
- package/dist/{auth-C530fHKQ.mjs → auth-B73lQS2h.mjs} +1 -1
- package/dist/auth-DMzEmOhG.mjs +2 -0
- package/dist/{auth-MNz2D-PD.mjs → auth-Db1KT0vm.mjs} +1 -1
- package/dist/{auth-token-Cw4c0y89.mjs → auth-token-D9XIPlwf.mjs} +1 -1
- package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
- package/dist/{billing-COgAWTYh.mjs → billing-Bm2JNSGa.mjs} +6 -6
- package/dist/body-parser-DnBfDdx3.mjs +2 -0
- package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CSr38g-O.mjs} +4 -4
- package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
- package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
- package/dist/browser-run-BcWxzhAn.mjs +42 -0
- package/dist/{builds-DmEFTQTa.mjs → builds-BMwDzi7G.mjs} +39 -39
- package/dist/{cache-BUh85NRr.mjs → cache-_VaTLC5T.mjs} +1 -1
- package/dist/{cli-DJhpXf38.mjs → cli-P3q5DG3W.mjs} +1 -1
- package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
- package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
- package/dist/{cloudforce-one-DN5N3C3w.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
- package/dist/{command-B694oLDo.mjs → command-BXiA79DP.mjs} +1 -1
- package/dist/{command-rx0Kb5pn.mjs → command-BbsPxJBT.mjs} +1 -1
- package/dist/{command-RC9WM5jq.mjs → command-Bkc04OyY.mjs} +1 -1
- package/dist/{command-Bmee6uwe.mjs → command-BtTc28ql.mjs} +1 -1
- package/dist/{command-CAs3SxlI.mjs → command-CBZhxmKD.mjs} +1 -1
- package/dist/{command-CCq-Z2Ua.mjs → command-CL7LLXM7.mjs} +1 -1
- package/dist/{command-DerHAjQL.mjs → command-CYyfigfC.mjs} +1 -1
- package/dist/{command-D1JR8Fb7.mjs → command-CxWLFv5Y.mjs} +1 -1
- package/dist/{command-CiApsRql.mjs → command-DDcBC4px.mjs} +1 -1
- package/dist/{command-CbQFbfps.mjs → command-NoxvOARP.mjs} +1 -1
- package/dist/{completions-11latun5.mjs → completions-CrDmwKnK.mjs} +1 -1
- package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
- package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
- package/dist/{connectors-DXIUG4Zi.mjs → connectors-DvVlxGDx.mjs} +1 -1
- package/dist/{containers-DCH6MFjY.mjs → containers-Bt2zFsFd.mjs} +8 -8
- package/dist/{containers-WMWKhLkp.mjs → containers-BtcOgwm5.mjs} +2 -2
- package/dist/{content-scan-CRDmR7rD.mjs → content-scan-DldLmTjy.mjs} +1 -1
- package/dist/{context-q-6bMSL-.mjs → context-C_a8oSY9.mjs} +1 -1
- package/dist/cps-REo1OWP1.mjs +6 -0
- package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
- package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
- package/dist/{custom-hostnames-DI_dFaof.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
- package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
- package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
- package/dist/{d1-Dbs8HItA.mjs → d1-DvCiQibO.mjs} +8 -8
- package/dist/{deploy-5utIiOMN.mjs → deploy-K664XPOb.mjs} +1 -1
- package/dist/{deploy-context-C0iVbWRG.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
- package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
- package/dist/{dls-lbM3i4x-.mjs → dls-DoqfqutH.mjs} +1 -1
- package/dist/{dns-QTMPGYMa.mjs → dns-DC6WcO3m.mjs} +21 -21
- package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
- package/dist/{docs-bV3hPwQL.mjs → docs-CqNRBHab.mjs} +1 -1
- package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
- package/dist/{email-auth-PzRqG0ex.mjs → email-auth--NHg1TjG.mjs} +1 -1
- package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-COjENK55.mjs} +13 -13
- package/dist/{email-security-CSTKIecn.mjs → email-security-rdjH95T2.mjs} +38 -38
- package/dist/{email-sending-BSwuAir8.mjs → email-sending-26VJhR6Q.mjs} +18 -18
- package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
- package/dist/{firewall-BsZxVitA.mjs → firewall-D8K93ffF.mjs} +20 -20
- package/dist/{flagship-qBohOZaM.mjs → flagship-CHdmCmvQ.mjs} +11 -11
- package/dist/{fraud-vGNdrSm-.mjs → fraud-CY4TV5Vc.mjs} +1 -1
- package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
- package/dist/healthchecks-B52Mf3uL.mjs +22 -0
- package/dist/{hostnames-CLlaMqHu.mjs → hostnames-BMITIM8P.mjs} +1 -1
- package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
- package/dist/{iam-Dl_n_Lqq.mjs → iam-o1n9eUXf.mjs} +9 -9
- package/dist/{images-vMtXk2Rf.mjs → images-CJHAGxX6.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/{init-_7djeBVw.mjs → init-CqQDL6i3.mjs} +1 -1
- package/dist/{intel-Bq4GGXv-.mjs → intel-B3S1gxUg.mjs} +1 -1
- package/dist/{ips-BcvZS46g.mjs → ips-q_UJMiy8.mjs} +1 -1
- package/dist/{k2-DL4hrVTj.mjs → k2-BNqVZnDN.mjs} +2 -2
- package/dist/{kv-BLo9wMgb.mjs → kv-B0nXSOcW.mjs} +1 -1
- package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
- package/dist/load-balancers-DJtMztJ0.mjs +76 -0
- package/dist/{login-Du_W6b9o.mjs → login-D-1FiBNv.mjs} +1 -1
- package/dist/{login-DT6Q1UJw.mjs → login-chQP8825.mjs} +1 -1
- package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
- package/dist/{logos-BuhvSu_H.mjs → logos-tnIahhcu.mjs} +1 -1
- package/dist/{logpush-DgZtF9vG.mjs → logpush-D4s3pJRw.mjs} +24 -24
- package/dist/{logs-CaKOk-1v.mjs → logs-cw7UL5V2.mjs} +3 -3
- package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
- package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
- package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-BFopRdPs.mjs} +170 -170
- package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
- package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
- package/dist/{matches-DkLSWb5X.mjs → matches-ClJ_24EY.mjs} +1 -1
- package/dist/{mcp-BcV1XqE8.mjs → mcp-50os3IRG.mjs} +10 -10
- package/dist/{mesh-CSSlZ-0F.mjs → mesh-jxtQP8sS.mjs} +2 -2
- package/dist/{monetization-B-nJ0SyI.mjs → monetization-D6cCDi-h.mjs} +4 -4
- package/dist/{network-ZzxQ_Dcz.mjs → network-dnWHB2uY.mjs} +27 -25
- package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
- package/dist/{o11y-LG6Y9LUZ.mjs → o11y-oMSg1pG4.mjs} +49 -49
- package/dist/{oauth-CP82E1_0.mjs → oauth-BfBdHhPS.mjs} +1 -1
- package/dist/{oauth-Bx693Af5.mjs → oauth-DDOiiH7h.mjs} +1 -1
- package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
- package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
- package/dist/organization-94lHeeOs.mjs +75 -0
- package/dist/{organizations-CcgZPmFl.mjs → organizations-BJf3UTFi.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
- package/dist/{page-rules-DFfqfllI.mjs → page-rules-BUI-50oz.mjs} +4 -4
- package/dist/pages-CcdpCzHs.mjs +54 -0
- package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
- package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-t066I5wm.mjs} +7 -7
- package/dist/{pipelines-DUMIVwof.mjs → pipelines-Co6S044l.mjs} +8 -8
- package/dist/precursor-BftyvS86.mjs +4 -0
- package/dist/previews-BLhnhElx.mjs +7 -0
- package/dist/{progress-DaQ4MzBI.mjs → progress-Q5w9PNTT.mjs} +1 -1
- package/dist/{prompt-KWYZvJWM.mjs → prompt-C0hKSr-R.mjs} +1 -1
- package/dist/{queries-DoyhspQf.mjs → queries-4MubO6Sz.mjs} +3 -3
- package/dist/{queues-BPxTU2rU.mjs → queues-CteS5M92.mjs} +17 -17
- package/dist/{r2-CQt4S7o7.mjs → r2-2QpT_Gso.mjs} +24 -24
- package/dist/{radar-CALpR1vq.mjs → radar-ODKaK4FJ.mjs} +1 -1
- package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
- package/dist/{realtime-BiHKBoI4.mjs → realtime-DkfU8uEX.mjs} +84 -84
- package/dist/registrar-DM6JTVPS.mjs +43 -0
- package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
- package/dist/{reporting-8aRJD5HX.mjs → reporting-5yFNXbJg.mjs} +1 -1
- package/dist/{request-headers-CqfJOkpO.mjs → request-headers-DXvswze2.mjs} +1 -1
- package/dist/request-tracers-BarLZY95.mjs +4 -0
- package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
- package/dist/{rules-CFOuN3t2.mjs → rules-_C31X4Jz.mjs} +6 -6
- package/dist/{rulesets-DkhV2Hny.mjs → rulesets-8RwxoFhG.mjs} +6 -6
- package/dist/{rum-BnMW0Tlb.mjs → rum-CAUcpXpM.mjs} +6 -6
- package/dist/{run-Clc3P2u7.mjs → run-DtFLvOHB.mjs} +1 -1
- package/dist/run-LcOb9rhI.mjs +2 -0
- package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DibfxEF6.mjs} +1 -1
- package/dist/{scim-tvZm6A-r.mjs → scim-DX5XrQ4w.mjs} +1 -1
- package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-DSqqrr25.mjs} +1 -1
- package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-FSktO04S.mjs} +1 -1
- package/dist/{security-txt-D4pRk7-w.mjs → security-txt-D2g3lQdg.mjs} +1 -1
- package/dist/{shared-zePemxHi.mjs → shared-eefMO8R4.mjs} +1 -1
- package/dist/smart-shield-IVb2sR0C.mjs +24 -0
- package/dist/{snippets-BIcZ6vSW.mjs → snippets-cWwWficN.mjs} +2 -2
- package/dist/{spectrum-DjDX0geK.mjs → spectrum-DYiIBYRB.mjs} +1 -1
- package/dist/{speed-DiPoFJMm.mjs → speed-C7uiW2Wf.mjs} +1 -1
- package/dist/{sql-DLjCt_R3.mjs → sql-TGV8qQMj.mjs} +1 -1
- package/dist/{src-CutrsNl4.mjs → src-BUH-P_zd.mjs} +5 -5
- package/dist/ssl-xQP_HbWN.mjs +139 -0
- package/dist/{stream-uhn_Zsni.mjs → stream-CfWgj8Cr.mjs} +55 -55
- package/dist/{submit-C3suIDBX.mjs → submit-DxGr1T40.mjs} +1 -1
- package/dist/tags-LEJ2VYhQ.mjs +23 -0
- package/dist/{telemetry-DYjsavEr.mjs → telemetry-BHne10Yy.mjs} +1 -1
- package/dist/telemetry-BavSU4ku.mjs +2 -0
- package/dist/{tenant-DK88yQM4.mjs → tenant-7d5vwc6K.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
- package/dist/{tunnels-DjbomhCa.mjs → tunnels-DlGODvwT.mjs} +4 -4
- package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DhLkdhij.mjs} +5 -5
- package/dist/update-check-nLfkSfdz.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{update-check-BhhtSXVZ.mjs → update-check-wvjOsnGK.mjs} +1 -1
- package/dist/{url-info-a0mY4UsC.mjs → url-info-CeoV5dBc.mjs} +1 -1
- package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
- package/dist/{url-scanner-D0egjBe5.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
- package/dist/{user-DDH9lxf5.mjs → user-D33B3alX.mjs} +59 -59
- package/dist/{vectorize-DaT3amFV.mjs → vectorize-Wp9De13y.mjs} +17 -17
- package/dist/version-B2RUUqGT.mjs +2 -0
- package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
- package/dist/{web-assets-NqNglLSI.mjs → web-assets-ew0iaP7c.mjs} +35 -35
- package/dist/{web3-UnCUuIfB.mjs → web3-BUyXBaqq.mjs} +6 -6
- package/dist/{workers-builds-Cy6fdtm5.mjs → workers-builds-DzU9NGno.mjs} +7 -7
- package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
- package/dist/{workers-DfA9ugmb.mjs → workers-pP5tsDbD.mjs} +25 -22
- package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
- package/dist/{workflows-Dq-k81hU.mjs → workflows-DXYGKtqq.mjs} +1 -1
- package/dist/zaraz-DoH4QD0u.mjs +22 -0
- package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-DKt20rzE.mjs} +461 -458
- package/dist/{zone-DcZIUTWt.mjs → zone-BXM3p0JR.mjs} +1 -1
- package/dist/{zones-BVdvYUCv.mjs → zones-CJdtqEBx.mjs} +21 -21
- package/package.json +9 -9
- package/dist/account-tags-zvHRQZxb.mjs +0 -15
- package/dist/ai-search-CtfW5fzl.mjs +0 -79
- package/dist/auth-Ccm5viK_.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-ChXohmNG.mjs +0 -42
- package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
- package/dist/client-certificates-B3UxH_Au.mjs +0 -13
- package/dist/cps-Due0P5IW.mjs +0 -6
- package/dist/csam-scanner-DvLrPw45.mjs +0 -10
- package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
- package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
- package/dist/custom-pages-ubava9Qm.mjs +0 -21
- package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
- package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
- package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
- package/dist/keys-BSV5IXdU.mjs +0 -4
- package/dist/load-balancers-CCCWoQXv.mjs +0 -76
- package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
- package/dist/organization-DMr_z6n4.mjs +0 -71
- package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
- package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
- package/dist/pages-BkcL5rC4.mjs +0 -54
- package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
- package/dist/precursor-DsGbA_YJ.mjs +0 -4
- package/dist/previews-Cma3-M7K.mjs +0 -7
- package/dist/registrar-gERQ3b85.mjs +0 -43
- package/dist/request-tracers-DcnwQg3K.mjs +0 -4
- package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
- package/dist/run-CHNyLZLG.mjs +0 -2
- package/dist/smart-shield-2egm1Vaw.mjs +0 -24
- package/dist/ssl-vNzK0c9S.mjs +0 -45
- package/dist/tags-Dy2jG-Dt.mjs +0 -4
- package/dist/telemetry-Bdv5LZZs.mjs +0 -2
- package/dist/update-check-Dld7rbLd.mjs +0 -2
- package/dist/values-Bfr5-bL6.mjs +0 -4
- package/dist/version-CAuKDZAG.mjs +0 -2
- package/dist/zaraz-Dpr1pLDx.mjs +0 -22
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{a as u,i as d,n as f,r as p,t as m}from"./body-parser-DnBfDdx3.mjs";import{n as h,t as g}from"./input-validation-D7z60HJH.mjs";import{a as _,i as v,n as y}from"./prompt-C0hKSr-R.mjs";import{n as b,t as x}from"./raw-fetch-CEOuoKl9.mjs";function ee(e){return e.usage(`$0 cloudforce-one binary-storage create
|
|
3
3
|
|
|
4
|
-
Uploads a binary file to Cloudforce One's binary database for malware analysis and threat intelligence correlation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Binary file to be uploaded to the database.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const te={command:`create`,describe:`Posts a file to Binary Storage`,builder:ee,handler:async e=>l({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let t=new FormData;if(e.file){let n=
|
|
4
|
+
Uploads a binary file to Cloudforce One's binary database for malware analysis and threat intelligence correlation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Binary file to be uploaded to the database.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const te={command:`create`,describe:`Posts a file to Binary Storage`,builder:ee,handler:async e=>l({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:t}));o(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/binary/${t.hash}`,response:!1,errors:{400:`BadRequestError`}};function re(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
|
|
5
5
|
|
|
6
6
|
Retrieves a binary file from the Cloudforce One binary storage for analysis.`).positional(`hash`,{type:`string`,description:`hash of the binary`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <hash>`,describe:`Retrieves a file from Binary Storage`,builder:re,handler:async e=>l({command:`cloudforce-one binary-storage get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one binary-storage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/binary/${e.hash==null?`<hash>`:encodeURIComponent(String(e.hash))}`,pathParams:{hash:String(e.hash??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ne,{account_id:l,hash:e.hash}));o(u,{successLabel:`Loaded`})})},ae={command:`binary-storage`,describe:`Upload and retrieve malware samples and suspicious binaries for analysis`,builder:e=>e.command(te).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oe={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/credential-monitor/domains`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function se(e){return e.usage(`$0 cloudforce-one credential-monitor domains create
|
|
7
7
|
|
|
8
|
-
Register a domain for credential monitoring.`).option(`domain`,{type:`string`,description:`Domain to monitor (e.g. my-company.com)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`create`,describe:`Create monitored domain`,builder:se,handler:async e=>l({command:`cloudforce-one credential-monitor domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one credential-monitor domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
8
|
+
Register a domain for credential monitoring.`).option(`domain`,{type:`string`,description:`Domain to monitor (e.g. my-company.com)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`create`,describe:`Create monitored domain`,builder:se,handler:async e=>l({command:`cloudforce-one credential-monitor domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one credential-monitor domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({domain:h(e.domain,`domain`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(oe,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.domain===void 0&&(e.domain=await _(`domain`,`Domain to monitor (e.g. my-company.com)`));let u=m({domain:h(e.domain,`domain`,`text`)}),d=await c(`Creating`,async()=>n.send(oe,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var le={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/credential-monitor/domains/${t.id}`,errors:{404:`NotFoundError`}};function ue(e){return e.usage(`$0 cloudforce-one credential-monitor domains delete <id>
|
|
9
9
|
|
|
10
|
-
Remove a domain from credential monitoring.`).positional(`id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const de={command:`delete <id>`,describe:`Delete monitored domain`,builder:ue,handler:async e=>l({command:`cloudforce-one credential-monitor domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one credential-monitor domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
10
|
+
Remove a domain from credential monitoring.`).positional(`id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const de={command:`delete <id>`,describe:`Delete monitored domain`,builder:ue,handler:async e=>l({command:`cloudforce-one credential-monitor domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one credential-monitor domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
11
11
|
`);return}let u=await c(`Deleting`,async()=>n.send(le,{account_id:l,id:e.id}));o(u,{successLabel:`Deleted`})})};var fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/credential-monitor/domains`,query:[`page`,`per_page`],errors:{400:`BadRequestError`}};function pe(e){return e.usage(`$0 cloudforce-one credential-monitor domains list
|
|
12
12
|
|
|
13
13
|
List all domains registered for credential monitoring.`).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List monitored domains`,builder:pe,handler:async e=>l({command:`cloudforce-one credential-monitor domains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one credential-monitor domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/credential-monitor/domains`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(fe,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},he={command:`domains`,describe:`Operations for credential-monitor.domains`,builder:e=>e.command(ce).command(de).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ge={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/credential-monitor/matches`,query:[`domain`,`username`,`page`,`per_page`],errors:{400:`BadRequestError`}};function _e(e){return e.usage(`$0 cloudforce-one credential-monitor matches list
|
|
@@ -18,71 +18,71 @@ Aggregate threat events by one or more columns (e.g., attacker, targetIndustry)
|
|
|
18
18
|
|
|
19
19
|
Lists categories`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get`,describe:`Lists categories`,builder:Ee,handler:async e=>l({command:`cloudforce-one events categories catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events categories catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories/catalog`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Te,{account_id:l}));o(u,{successLabel:`Loaded`})})},Oe={command:`catalog`,describe:`Operations for events.categories.catalog`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ke={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function Ae(e){return e.usage(`$0 cloudforce-one events categories create <category-id>
|
|
20
20
|
|
|
21
|
-
Updates a category`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname 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 je={command:`create <category-id>`,describe:`Updates a category`,builder:Ae,handler:async e=>l({command:`cloudforce-one events categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
21
|
+
Updates a category`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname 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 je={command:`create <category-id>`,describe:`Updates a category`,builder:Ae,handler:async e=>l({command:`cloudforce-one events categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ke,{body:t,account_id:l,category_id:e[`category-id`]}));o(r,{successLabel:`Created`});return}let u=m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}),d=await c(`Creating`,async()=>n.send(ke,{body:u,account_id:l,category_id:e[`category-id`]}));o(d,{successLabel:`Created`})})},Me={command:`categories`,describe:`Operations for events.categories`,builder:e=>e.command(je).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ne={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function Pe(e){return e.usage(`$0 cloudforce-one events create <event-id>
|
|
22
22
|
|
|
23
|
-
Updates an event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp 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 Fe={command:`create <event-id>`,describe:`Updates an event`,builder:Pe,handler:async e=>l({command:`cloudforce-one events create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
23
|
+
Updates an event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-data`,{type:`string`,description:`The raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp 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 Fe={command:`create <event-id>`,describe:`Updates an event`,builder:Pe,handler:async e=>l({command:`cloudforce-one events create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),createdAt:h(e[`created-at`],`created-at`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ne,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`Dataset ID containing the event to update.`));let u=m({attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),createdAt:h(e[`created-at`],`created-at`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),d=await c(`Creating`,async()=>n.send(Ne,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/copy`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function Ie(e){return e.usage(`$0 cloudforce-one events dataset copy create <dataset-id>
|
|
24
24
|
|
|
25
|
-
Copies specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied).`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds 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 Le={command:`create <dataset-id>`,describe:`Copies specified events from one dataset to another dataset`,builder:Ie,handler:async e=>l({command:`cloudforce-one events dataset copy create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset copy create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/copy`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?
|
|
25
|
+
Copies specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied).`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds 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 Le={command:`create <dataset-id>`,describe:`Copies specified events from one dataset to another dataset`,builder:Ie,handler:async e=>l({command:`cloudforce-one events dataset copy create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset copy create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/copy`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?m({destDatasetId:h(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(S,{body:t,account_id:u,dataset_id:e[`dataset-id`],...n}));o(r,{successLabel:`Created`});return}if(e[`dest-dataset-id`]===void 0&&(e[`dest-dataset-id`]=await _(`dest-dataset-id`,`The destDatasetId field`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=m({destDatasetId:h(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(S,{body:d,account_id:u,dataset_id:e[`dataset-id`],...n}));o(p,{successLabel:`Created`})})},Re={command:`copy`,describe:`Operations for events.dataset.copy`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function ze(e){return e.usage(`$0 cloudforce-one events dataset create <dataset-id>
|
|
26
26
|
|
|
27
|
-
Updates an existing dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Be={command:`create <dataset-id>`,describe:`Updates an existing dataset`,builder:ze,handler:async e=>l({command:`cloudforce-one events dataset create`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
27
|
+
Updates an existing dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Be={command:`create <dataset-id>`,describe:`Updates an existing dataset`,builder:ze,handler:async e=>l({command:`cloudforce-one events dataset create`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(C,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await _(`name`,`Used to describe the dataset within the account context.`));let u=m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}),d=await c(`Creating`,async()=>n.send(C,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Created`})})};var Ve={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function He(e){return e.usage(`$0 cloudforce-one events dataset delete <dataset-id>
|
|
28
28
|
|
|
29
|
-
Soft-deletes a dataset given a datasetId.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID to delete`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ue={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:He,handler:async e=>l({command:`cloudforce-one events dataset delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
29
|
+
Soft-deletes a dataset given a datasetId.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID to delete`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ue={command:`delete <dataset-id>`,describe:`Delete a dataset`,builder:He,handler:async e=>l({command:`cloudforce-one events dataset delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
30
30
|
`);return}let u=await c(`Deleting`,async()=>n.send(Ve,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Deleted`})})};var We={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/events/${t.event_id}`,errors:{404:`NotFoundError`}};function Ge(e){return e.usage(`$0 cloudforce-one events dataset events get <event-id>
|
|
31
31
|
|
|
32
|
-
Retrieves a specific event by its UUID.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get <event-id>`,describe:`Reads an event`,builder:Ge,handler:async e=>l({command:`cloudforce-one events dataset events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(We,{account_id:l,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})},qe={command:`events`,describe:`Operations for events.dataset.events`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
32
|
+
Retrieves a specific event by its UUID.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get <event-id>`,describe:`Reads an event`,builder:Ge,handler:async e=>l({command:`cloudforce-one events dataset events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(We,{account_id:l,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})},qe={command:`events`,describe:`Operations for events.dataset.events`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups`,body:`json`,errors:{400:`BadRequestError`}};function Je(e){return e.usage(`$0 cloudforce-one events dataset groups create
|
|
33
33
|
|
|
34
|
-
Create a group`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ye={command:`create`,describe:`Create a group`,builder:Je,handler:async e=>l({command:`cloudforce-one events dataset groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
34
|
+
Create a group`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ye={command:`create`,describe:`Create a group`,builder:Je,handler:async e=>l({command:`cloudforce-one events dataset groups create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(w,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.description===void 0&&(e.description=await _(`description`,`The description field`)),e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`)}),d=await c(`Creating`,async()=>n.send(w,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}`,errors:{400:`BadRequestError`}};function Ze(e){return e.usage(`$0 cloudforce-one events dataset groups delete <group-id>
|
|
35
35
|
|
|
36
|
-
Delete a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Qe={command:`delete <group-id>`,describe:`Delete a group for an account`,builder:Ze,handler:async e=>l({command:`cloudforce-one events dataset groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
36
|
+
Delete a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Qe={command:`delete <group-id>`,describe:`Delete a group for an account`,builder:Ze,handler:async e=>l({command:`cloudforce-one events dataset groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
37
37
|
`);return}let u=await c(`Deleting`,async()=>n.send(Xe,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Deleted`})})};var $e={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups`,errors:{400:`BadRequestError`}};function et(e){return e.usage(`$0 cloudforce-one events dataset groups get group
|
|
38
38
|
|
|
39
39
|
List groups for an account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tt={command:`group`,describe:`List groups for an account`,builder:et,handler:async e=>l({command:`cloudforce-one events dataset groups get group`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events dataset groups get group`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/-/groups`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($e,{account_id:l}));o(u,{successLabel:`Loaded`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}`,errors:{400:`BadRequestError`}};function rt(e){return e.usage(`$0 cloudforce-one events dataset groups get v2 <group-id>
|
|
40
40
|
|
|
41
|
-
Read a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`v2 <group-id>`,describe:`Read a group for an account`,builder:rt,handler:async e=>l({command:`cloudforce-one events dataset groups get v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(nt,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Loaded`})})},at={command:`get`,describe:`Operations for events.dataset.groups.get`,builder:e=>e.command(tt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
41
|
+
Read a group for an account`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`v2 <group-id>`,describe:`Read a group for an account`,builder:rt,handler:async e=>l({command:`cloudforce-one events dataset groups get v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(nt,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Loaded`})})},at={command:`get`,describe:`Operations for events.dataset.groups.get`,builder:e=>e.command(tt).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var T={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}/members`,body:`json`,errors:{400:`BadRequestError`}};function ot(e){return e.usage(`$0 cloudforce-one events dataset groups members create <group-id>
|
|
42
42
|
|
|
43
|
-
Create a group member`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`account-tag`,{type:`string`,description:`The accountTag 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 st={command:`create <group-id>`,describe:`Create a group member`,builder:ot,handler:async e=>l({command:`cloudforce-one events dataset groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
43
|
+
Create a group member`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`account-tag`,{type:`string`,description:`The accountTag 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 st={command:`create <group-id>`,describe:`Create a group member`,builder:ot,handler:async e=>l({command:`cloudforce-one events dataset groups members create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({accountTag:h(e[`account-tag`],`account-tag`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(T,{body:t,account_id:l,group_id:e[`group-id`]}));o(r,{successLabel:`Created`});return}let u=m({accountTag:h(e[`account-tag`],`account-tag`,`text`)}),d=await c(`Creating`,async()=>n.send(T,{body:u,account_id:l,group_id:e[`group-id`]}));o(d,{successLabel:`Created`})})};var ct={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}/members/${t.member_id}`,errors:{400:`BadRequestError`}};function lt(e){return e.usage(`$0 cloudforce-one events dataset groups members delete <member-id>
|
|
44
44
|
|
|
45
|
-
Delete a group member`).positional(`member-id`,{type:`string`,description:`Member ID`,demandOption:!0}).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`delete <member-id>`,describe:`Delete a group member`,builder:lt,handler:async e=>l({command:`cloudforce-one events dataset groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
45
|
+
Delete a group member`).positional(`member-id`,{type:`string`,description:`Member ID`,demandOption:!0}).option(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ut={command:`delete <member-id>`,describe:`Delete a group member`,builder:lt,handler:async e=>l({command:`cloudforce-one events dataset groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`member-id`]==null?`<member-id>`:encodeURIComponent(String(e[`member-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"member-id":String(e[`member-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
46
46
|
`);return}let u=await c(`Deleting`,async()=>n.send(ct,{account_id:l,group_id:e[`group-id`],member_id:e[`member-id`]}));o(u,{successLabel:`Deleted`})})};var dt={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}/members`,errors:{400:`BadRequestError`}};function ft(e){return e.usage(`$0 cloudforce-one events dataset groups members get <group-id>
|
|
47
47
|
|
|
48
|
-
List group members`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pt={command:`get <group-id>`,describe:`List group members`,builder:ft,handler:async e=>l({command:`cloudforce-one events dataset groups members get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(dt,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Loaded`})})},mt={command:`members`,describe:`Operations for events.dataset.groups.members`,builder:e=>e.command(st).command(ut).command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
48
|
+
List group members`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pt={command:`get <group-id>`,describe:`List group members`,builder:ft,handler:async e=>l({command:`cloudforce-one events dataset groups members get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(dt,{account_id:l,group_id:e[`group-id`]}));o(u,{successLabel:`Loaded`})})},mt={command:`members`,describe:`Operations for events.dataset.groups.members`,builder:e=>e.command(st).command(ut).command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/-/groups/${t.group_id}`,body:`json`,errors:{400:`BadRequestError`}};function ht(e){return e.usage(`$0 cloudforce-one events dataset groups update <group-id>
|
|
49
49
|
|
|
50
|
-
Update a group`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gt={command:`update <group-id>`,describe:`Update a group`,builder:ht,handler:async e=>l({command:`cloudforce-one events dataset groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
50
|
+
Update a group`).positional(`group-id`,{type:`string`,description:`Group ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gt={command:`update <group-id>`,describe:`Update a group`,builder:ht,handler:async e=>l({command:`cloudforce-one events dataset groups update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/-/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(E,{body:t,account_id:l,group_id:e[`group-id`]}));o(r,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await _(`description`,`The description field`)),e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`)}),d=await c(`Updating`,async()=>n.send(E,{body:u,account_id:l,group_id:e[`group-id`]}));o(d,{successLabel:`Updated`})})},_t={command:`groups`,describe:`Operations for events.dataset.groups`,builder:e=>e.command(Ye).command(Qe).command(gt).command(at).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicatorTypes/create`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function vt(e){return e.usage(`$0 cloudforce-one events dataset indicator types create create <dataset-id>
|
|
51
51
|
|
|
52
|
-
Creates a new indicator type and initializes its dedicated Durable Object`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description for the indicator type`}).option(`indicator-type`,{type:`string`,description:`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`}).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 yt={command:`create <dataset-id>`,describe:`Create a new indicator type`,builder:vt,handler:async e=>l({command:`cloudforce-one events dataset indicator types create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicator types create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicatorTypes/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
52
|
+
Creates a new indicator type and initializes its dedicated Durable Object`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`description`,{type:`string`,description:`Optional description for the indicator type`}).option(`indicator-type`,{type:`string`,description:`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`}).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 yt={command:`create <dataset-id>`,describe:`Create a new indicator type`,builder:vt,handler:async e=>l({command:`cloudforce-one events dataset indicator types create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicator types create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicatorTypes/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(D,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await _(`indicator-type`,`The indicator type to create (e.g., 'DOMAIN', 'IP', 'URL', 'HASH', 'EMAIL')`));let u=m({description:h(e.description,`description`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`)}),d=await c(`Creating`,async()=>n.send(D,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Created`})})},bt={command:`create`,describe:`Operations for events.dataset.indicator.types.create`,builder:e=>e.command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`types`,describe:`Operations for events.dataset.indicator.types`,builder:e=>e.command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},St={command:`indicator`,describe:`Operations for events.dataset.indicator`,builder:e=>e.command(xt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/bulk`,body:`json`,errors:{400:`BadRequestError`}};function Ct(e){return e.usage(`$0 cloudforce-one events dataset indicators bulk create <dataset-id>
|
|
53
53
|
|
|
54
|
-
Creates multiple indicators at once with their respective types and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag.`}).option(`indicators`,{type:`string`,description:`The indicators field. Provide as a JSON array of objects or @path/to/file.json.`}).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 wt={command:`create <dataset-id>`,describe:`Creates multiple indicators in bulk`,builder:Ct,handler:async e=>l({command:`cloudforce-one events dataset indicators bulk create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/bulk`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
54
|
+
Creates multiple indicators at once with their respective types and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`Global flag to automatically create indicator types if they don't exist. Individual indicators can override this with their own autoCreateType flag.`}).option(`indicators`,{type:`string`,description:`The indicators field. Provide as a JSON array of objects or @path/to/file.json.`}).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 wt={command:`create <dataset-id>`,describe:`Creates multiple indicators in bulk`,builder:Ct,handler:async e=>l({command:`cloudforce-one events dataset indicators bulk create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/bulk`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({autoCreateType:e[`auto-create-type`],indicators:d(e.indicators,`indicators`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(O,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}if(e.indicators===void 0)throw Error(`--indicators is required (or pass --body with this field set).`);let u=m({autoCreateType:e[`auto-create-type`],indicators:d(e.indicators,`indicators`)}),p=await c(`Creating`,async()=>n.send(O,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})},Tt={command:`bulk`,describe:`Operations for events.dataset.indicators.bulk`,builder:e=>e.command(wt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/create`,body:`json`,errors:{400:`BadRequestError`}};function Et(e){return e.usage(`$0 cloudforce-one events dataset indicators create create <dataset-id>
|
|
55
55
|
|
|
56
|
-
Creates a new indicator with the specified type and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist.`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value 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 Dt={command:`create <dataset-id>`,describe:`Creates a new indicator`,builder:Et,handler:async e=>l({command:`cloudforce-one events dataset indicators create create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
56
|
+
Creates a new indicator with the specified type and related datasets.`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`auto-create-type`,{type:`boolean`,description:`If true, automatically create the indicator type if it doesn't exist. If false (default), throw an error when the indicator type doesn't exist.`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value 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 Dt={command:`create <dataset-id>`,describe:`Creates a new indicator`,builder:Et,handler:async e=>l({command:`cloudforce-one events dataset indicators create create`,classification:{safeFlags:[`auto-create-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/create`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({autoCreateType:e[`auto-create-type`],indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(e[`related-events`],`related-events`),tlp:h(e.tlp,`tlp`,`text`),value:h(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(k,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e[`indicator-type`]===void 0&&(e[`indicator-type`]=await _(`indicator-type`,`The indicatorType field`)),e.value===void 0&&(e.value=await _(`value`,`The value field`));let u=m({autoCreateType:e[`auto-create-type`],indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(e[`related-events`],`related-events`),tlp:h(e.tlp,`tlp`,`text`),value:h(e.value,`value`,`text`)}),p=await c(`Creating`,async()=>n.send(k,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(p,{successLabel:`Created`})})},Ot={command:`create`,describe:`Operations for events.dataset.indicators.create`,builder:e=>e.command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var kt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function At(e){return e.usage(`$0 cloudforce-one events dataset indicators delete <indicator-id>
|
|
57
57
|
|
|
58
|
-
Deletes a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const jt={command:`delete <indicator-id>`,describe:`Deletes an indicator`,builder:At,handler:async e=>l({command:`cloudforce-one events dataset indicators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
58
|
+
Deletes a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const jt={command:`delete <indicator-id>`,describe:`Deletes an indicator`,builder:At,handler:async e=>l({command:`cloudforce-one events dataset indicators delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
59
59
|
`);return}let u=await c(`Deleting`,async()=>n.send(kt,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Deleted`})})};var Mt={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,errors:{404:`NotFoundError`}};function Nt(e){return e.usage(`$0 cloudforce-one events dataset indicators get indicator <indicator-id>
|
|
60
60
|
|
|
61
|
-
Retrieves a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pt={command:`indicator <indicator-id>`,describe:`Reads an indicator`,builder:Nt,handler:async e=>l({command:`cloudforce-one events dataset indicators get indicator`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators get indicator`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Mt,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Loaded`})})},Ft={command:`get`,describe:`Operations for events.dataset.indicators.get`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
61
|
+
Retrieves a specific indicator by its UUID.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pt={command:`indicator <indicator-id>`,describe:`Reads an indicator`,builder:Nt,handler:async e=>l({command:`cloudforce-one events dataset indicators get indicator`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators get indicator`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Mt,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(u,{successLabel:`Loaded`})})},Ft={command:`get`,describe:`Operations for events.dataset.indicators.get`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function It(e){return e.usage(`$0 cloudforce-one events dataset indicators patch <indicator-id>
|
|
62
62
|
|
|
63
|
-
Updates an existing indicator's properties.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value 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 Lt={command:`patch <indicator-id>`,describe:`Updates an indicator`,builder:It,handler:async e=>l({command:`cloudforce-one events dataset indicators patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
63
|
+
Updates an existing indicator's properties.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`related-events`,{type:`string`,description:`The relatedEvents field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Traffic Light Protocol designation. Case-insensitive on input, stored and returned as UPPERCASE. Allowed values: clear, green, amber, amber-strict, red, purple.`}).option(`value`,{type:`string`,description:`The value 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 Lt={command:`patch <indicator-id>`,describe:`Updates an indicator`,builder:It,handler:async e=>l({command:`cloudforce-one events dataset indicators patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(e[`related-events`],`related-events`),tlp:h(e.tlp,`tlp`,`text`),value:h(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(A,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Updated`});return}let u=m({indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(e[`related-events`],`related-events`),tlp:h(e.tlp,`tlp`,`text`),value:h(e.value,`value`,`text`)}),p=await c(`Updating`,async()=>n.send(A,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(p,{successLabel:`Updated`})})};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Rt(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships create <indicator-id>
|
|
64
64
|
|
|
65
|
-
Creates a new relationship with the indicator as the source entity. Indicator↔indicator relationships are not supported.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,choices:[`event`,`tag`]}).coerce(`target-type`,e=>
|
|
65
|
+
Creates a new relationship with the indicator as the source entity. Indicator↔indicator relationships are not supported.`).positional(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,choices:[`event`,`tag`]}).coerce(`target-type`,e=>h(e,`target-type`,`text`)).option(`type`,{type:`string`,description:`Relationship type.`}).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 zt={command:`create <indicator-id>`,describe:`Create a relationship for an indicator`,builder:Rt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:h(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:h(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(j,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(r,{successLabel:`Created`});return}e[`target-id`]===void 0&&(e[`target-id`]=await _(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await v(`target-type`,`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,[`event`,`tag`])),e.type===void 0&&(e.type=await _(`type`,`Relationship type.`));let u=m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),targetId:h(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:h(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(j,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`]}));o(d,{successLabel:`Created`})})};var Bt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,errors:{400:`BadRequestError`}};function Vt(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships delete <rel-uuid>
|
|
66
66
|
|
|
67
|
-
Deletes a relationship by UUID. Idempotent: returns deleted=false if not found.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ht={command:`delete <rel-uuid>`,describe:`Delete a relationship`,builder:Vt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
67
|
+
Deletes a relationship by UUID. Idempotent: returns deleted=false if not found.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ht={command:`delete <rel-uuid>`,describe:`Delete a relationship`,builder:Vt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
68
68
|
`);return}let u=await c(`Deleting`,async()=>n.send(Bt,{account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(u,{successLabel:`Deleted`})})};var Ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships`,query:[`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function Wt(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships list
|
|
69
69
|
|
|
70
|
-
Returns sparse relationship edges. Optionally hydrate related entities via \`expand\`.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters, AND-combined. Fields: entityType (other-end type), type (relationship type), confidence (0–100), metadata.<key>. Example: [{"field":"type","op":"equals","value":"appears_in"},{"field":"confidence","op":"gte","value":50}]`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Keyset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gt={command:`list`,describe:`List relationships for an indicator`,builder:Wt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ut,{account_id:u,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));o(d,{successLabel:`Loaded`})})};var
|
|
70
|
+
Returns sparse relationship edges. Optionally hydrate related entities via \`expand\`.`).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters, AND-combined. Fields: entityType (other-end type), type (relationship type), confidence (0–100), metadata.<key>. Example: [{"field":"type","op":"equals","value":"appears_in"},{"field":"confidence","op":"gte","value":50}]`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Keyset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gt={command:`list`,describe:`List relationships for an indicator`,builder:Wt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ut,{account_id:u,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],...n}));o(d,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/${t.indicator_id}/relationships/${t.rel_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Kt(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships update <rel-uuid>
|
|
71
71
|
|
|
72
|
-
Partially updates a relationship by UUID. Only provided fields are changed.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).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 qt={command:`update <rel-uuid>`,describe:`Update a relationship`,builder:Kt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
72
|
+
Partially updates a relationship by UUID. Only provided fields are changed.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`indicator-id`,{type:`string`,description:`Indicator UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).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 qt={command:`update <rel-uuid>`,describe:`Update a relationship`,builder:Kt,handler:async e=>l({command:`cloudforce-one events dataset indicators relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/${e[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(e[`indicator-id`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"indicator-id":String(e[`indicator-id`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:h(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(M,{body:t,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(r,{successLabel:`Updated`});return}let u=m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:h(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Updating`,async()=>n.send(M,{body:u,account_id:l,dataset_id:e[`dataset-id`],indicator_id:e[`indicator-id`],rel_uuid:e[`rel-uuid`]}));o(d,{successLabel:`Updated`})})},Jt={command:`relationships`,describe:`Operations for events.dataset.indicators.relationships`,builder:e=>e.command(zt).command(Ht).command(Gt).command(qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yt={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/indicators/tags`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function Xt(e){return e.usage(`$0 cloudforce-one events dataset indicators tags get <dataset-id>
|
|
73
73
|
|
|
74
|
-
Returns all mirrored tags from the indicator dataset (DO mirror table). No pagination.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zt={command:`get <dataset-id>`,describe:`List mirrored tags for an indicator dataset`,builder:Xt,handler:async e=>l({command:`cloudforce-one events dataset indicators tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/tags`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Yt,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})},Qt={command:`tags`,describe:`Operations for events.dataset.indicators.tags`,builder:e=>e.command(Zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$t={command:`indicators`,describe:`Operations for events.dataset.indicators`,builder:e=>e.command(jt).command(Lt).command(Tt).command(Ot).command(Ft).command(Jt).command(Qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
74
|
+
Returns all mirrored tags from the indicator dataset (DO mirror table). No pagination.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zt={command:`get <dataset-id>`,describe:`List mirrored tags for an indicator dataset`,builder:Xt,handler:async e=>l({command:`cloudforce-one events dataset indicators tags get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset indicators tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/indicators/tags`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Yt,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})},Qt={command:`tags`,describe:`Operations for events.dataset.indicators.tags`,builder:e=>e.command(Zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$t={command:`indicators`,describe:`Operations for events.dataset.indicators`,builder:e=>e.command(jt).command(Lt).command(Tt).command(Ot).command(Ft).command(Jt).command(Qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/move`,query:[`keepRawData`],body:`json`,errors:{400:`BadRequestError`}};function en(e){return e.usage(`$0 cloudforce-one events dataset move create <dataset-id>
|
|
75
75
|
|
|
76
|
-
Moves specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). Raw data is always deleted from the source.`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds 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 tn={command:`create <dataset-id>`,describe:`Moves specified events from one dataset to another dataset`,builder:en,handler:async e=>l({command:`cloudforce-one events dataset move create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset move create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?
|
|
76
|
+
Moves specified events from one dataset to another dataset`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`keep-raw-data`,{type:`boolean`,description:`If true, copies raw data to the destination dataset. Default is false (raw data is stripped/not copied). Raw data is always deleted from the source.`}).option(`dest-dataset-id`,{type:`string`,description:`The destDatasetId field`}).option(`event-ids`,{type:`string`,array:!0,description:`The eventIds 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 tn={command:`create <dataset-id>`,describe:`Moves specified events from one dataset to another dataset`,builder:en,handler:async e=>l({command:`cloudforce-one events dataset move create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},e,async()=>{let n={keepRawData:e[`keep-raw-data`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset move create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?m({destDatasetId:h(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(N,{body:t,account_id:u,dataset_id:e[`dataset-id`],...n}));o(r,{successLabel:`Created`});return}if(e[`dest-dataset-id`]===void 0&&(e[`dest-dataset-id`]=await _(`dest-dataset-id`,`The destDatasetId field`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let d=m({destDatasetId:h(e[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:e[`event-ids`]});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let p=await c(`Creating`,async()=>l.send(N,{body:d,account_id:u,dataset_id:e[`dataset-id`],...n}));o(p,{successLabel:`Created`})})},nn={command:`move`,describe:`Operations for events.dataset.move`,builder:e=>e.command(tn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/permissions`,body:`json`,errors:{400:`BadRequestError`}};function rn(e){return e.usage(`$0 cloudforce-one events dataset permissions create <dataset-id>
|
|
77
77
|
|
|
78
|
-
Create a permission`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>
|
|
78
|
+
Create a permission`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>h(e,`role`,`text`)).option(`subject-id`,{type:`string`,description:`The subjectId field`}).option(`subject-type`,{type:`string`,description:`The subjectType field`,choices:[`account`,`group`]}).coerce(`subject-type`,e=>h(e,`subject-type`,`text`)).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 an={command:`create <dataset-id>`,describe:`Create a permission for dataset`,builder:rn,handler:async e=>l({command:`cloudforce-one events dataset permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({role:e.role,subjectId:h(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(P,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Created`});return}e.role===void 0&&(e.role=await v(`role`,`The role field`,[`read`,`write`])),e[`subject-id`]===void 0&&(e[`subject-id`]=await _(`subject-id`,`The subjectId field`)),e[`subject-type`]===void 0&&(e[`subject-type`]=await v(`subject-type`,`The subjectType field`,[`account`,`group`]));let u=m({role:e.role,subjectId:h(e[`subject-id`],`subject-id`,`text`),subjectType:e[`subject-type`]}),d=await c(`Creating`,async()=>n.send(P,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Created`})})};var on={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/permissions/${t.grant_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function sn(e){return e.usage(`$0 cloudforce-one events dataset permissions delete <grant-id>
|
|
79
79
|
|
|
80
|
-
Delete a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const cn={command:`delete <grant-id>`,describe:`Delete a permission for dataset`,builder:sn,handler:async e=>l({command:`cloudforce-one events dataset permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
80
|
+
Delete a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const cn={command:`delete <grant-id>`,describe:`Delete a permission for dataset`,builder:sn,handler:async e=>l({command:`cloudforce-one events dataset permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
81
81
|
`);return}let u=await c(`Deleting`,async()=>n.send(on,{account_id:l,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));o(u,{successLabel:`Deleted`})})};var ln={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/permissions`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function un(e){return e.usage(`$0 cloudforce-one events dataset permissions get <dataset-id>
|
|
82
82
|
|
|
83
|
-
List permissions`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dn={command:`get <dataset-id>`,describe:`List permissions for dataset`,builder:un,handler:async e=>l({command:`cloudforce-one events dataset permissions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ln,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})};var
|
|
83
|
+
List permissions`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dn={command:`get <dataset-id>`,describe:`List permissions for dataset`,builder:un,handler:async e=>l({command:`cloudforce-one events dataset permissions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ln,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/permissions/${t.grant_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function fn(e){return e.usage(`$0 cloudforce-one events dataset permissions update <grant-id>
|
|
84
84
|
|
|
85
|
-
Update a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>
|
|
85
|
+
Update a permission`).positional(`grant-id`,{type:`string`,description:`Grant ID`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`role`,{type:`string`,description:`The role field`,choices:[`read`,`write`]}).coerce(`role`,e=>h(e,`role`,`text`)).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 pn={command:`update <grant-id>`,describe:`Update a permission for dataset`,builder:fn,handler:async e=>l({command:`cloudforce-one events dataset permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/permissions/${e[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(e[`grant-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"grant-id":String(e[`grant-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({role:e.role}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(F,{body:t,account_id:l,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));o(r,{successLabel:`Updated`});return}e.role===void 0&&(e.role=await v(`role`,`The role field`,[`read`,`write`]));let u=m({role:e.role}),d=await c(`Updating`,async()=>n.send(F,{body:u,account_id:l,dataset_id:e[`dataset-id`],grant_id:e[`grant-id`]}));o(d,{successLabel:`Updated`})})},mn={command:`permissions`,describe:`Operations for events.dataset.permissions`,builder:e=>e.command(an).command(cn).command(dn).command(pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var hn={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/indicators`,query:[`datasetIds`,`page`,`pageSize`,`indicatorType`,`relatedEvent`,`search`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function gn(e){return e.usage(`$0 cloudforce-one events dataset tags indicators get <tag-uuid>
|
|
86
86
|
|
|
87
87
|
Returns indicators associated with the provided tag UUID, with pagination. By default fans out across every intelligence (isAnalytics=false) indicator dataset the account can read; pass datasetIds to scope to dataset UUIDs or a scope value. Analytics datasets do not expose tag associations, so the analytics scope returns an empty result.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to scope to (repeat the param for multiple), or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit for 'all'.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-event`,{type:`string`,description:`Filter indicators by related event UUID(s). Multiple UUIDs can be provided by repeating the parameter.`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _n={command:`get <tag-uuid>`,describe:`List indicators related to a tag`,builder:gn,handler:async e=>l({command:`cloudforce-one events dataset tags indicators get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],indicatorType:e[`indicator-type`],relatedEvent:e[`related-event`],search:e.search};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events dataset tags indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/indicators`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(hn,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})},vn={command:`indicators`,describe:`Operations for events.dataset.tags.indicators`,builder:e=>e.command(_n).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},yn={command:`tags`,describe:`Operations for events.dataset.tags`,builder:e=>e.command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bn={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}/targetIndustries`,errors:{400:`BadRequestError`}};function xn(e){return e.usage(`$0 cloudforce-one events dataset target industries get <dataset-id>
|
|
88
88
|
|
|
@@ -90,7 +90,7 @@ Lists all target industries for a specific dataset`).positional(`dataset-id`,{ty
|
|
|
90
90
|
|
|
91
91
|
Populate dataset-specific lookup tables from existing Events data with batch processing`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const On={command:`create`,describe:`Populate dataset-specific lookup tables from existing Events data with batch processing`,builder:Dn,handler:async e=>l({command:`cloudforce-one events datasets populate create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events datasets populate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/populate`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(En,{account_id:l}));o(u,{successLabel:`Created`})})},kn={command:`populate`,describe:`Operations for events.datasets.populate`,builder:e=>e.command(On).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},An={command:`datasets`,describe:`Operations for events.datasets`,builder:e=>e.command(kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jn={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/datasets/${t.dataset_id}/events`,query:[`eventIds`],errors:{400:`BadRequestError`}};function Mn(e){return e.usage(`$0 cloudforce-one events delete delete <dataset-id>
|
|
92
92
|
|
|
93
|
-
Deletes one or more events`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`event-ids`,{type:`string`,description:`Array of Event IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Nn={command:`delete <dataset-id>`,describe:`Deletes one or more events`,builder:Mn,handler:async e=>l({command:`cloudforce-one events delete delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={eventIds:e[`event-ids`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events delete delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await
|
|
93
|
+
Deletes one or more events`).positional(`dataset-id`,{type:`string`,description:`Dataset UUID.`,demandOption:!0}).option(`event-ids`,{type:`string`,description:`Array of Event IDs to delete.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Nn={command:`delete <dataset-id>`,describe:`Deletes one or more events`,builder:Mn,handler:async e=>l({command:`cloudforce-one events delete delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={eventIds:e[`event-ids`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events delete delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
94
94
|
`);return}let d=await c(`Deleting`,async()=>l.send(jn,{account_id:u,dataset_id:e[`dataset-id`],...n}));o(d,{successLabel:`Deleted`})})},Pn={command:`delete`,describe:`Operations for events.delete`,builder:e=>e.command(Nn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fn={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/graphql`,errors:{400:`BadRequestError`}};function In(e){return e.usage(`$0 cloudforce-one events graphql create graph ql
|
|
95
95
|
|
|
96
96
|
Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ln={command:`ql`,describe:`GraphQL endpoint for event aggregation`,builder:In,handler:async e=>l({command:`cloudforce-one events graphql create graph ql`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events graphql create graph ql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/graphql`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Fn,{account_id:l}));o(u,{successLabel:`Created`})})};var Rn={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/events/graphql`,errors:{400:`BadRequestError`}};function zn(e){return e.usage(`$0 cloudforce-one events graphql create graph qlv2
|
|
@@ -99,307 +99,307 @@ Execute GraphQL aggregations over threat events. Supports multi-dimensional grou
|
|
|
99
99
|
|
|
100
100
|
Lists indicator types across multiple datasets`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'operational' for readable intelligence datasets (isAnalytics=false), 'analytics' for readable analytics datasets (isAnalytics=true), or 'all'/'*' for every readable dataset including analytics datasets. If not provided, queries all accessible datasets, including analytics datasets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Kn={command:`get`,describe:`Lists indicator types across multiple datasets`,builder:Gn,handler:async e=>l({command:`cloudforce-one events indicator types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events indicator types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Wn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},qn={command:`types`,describe:`Operations for events.indicator.types`,builder:e=>e.command(Kn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Jn={command:`indicator`,describe:`Operations for events.indicator`,builder:e=>e.command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yn={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicators`,query:[`datasetIds`,`page`,`pageSize`,`search`,`name`,`indicatorType`,`relatedEvents`,`tags`,`tagSearch`,`createdAfter`,`createdBefore`,`relatedEventsLimit`,`includeTags`,`includeTotalCount`,`format`,`cache`,`cursor`],errors:{400:`BadRequestError`}};function Xn(e){return e.usage(`$0 cloudforce-one events indicators get
|
|
101
101
|
|
|
102
|
-
Retrieves indicators across specified datasets, ordered by createdAt descending then UUID, dataset ID, and shard ID ascending. Use one standalone datasetIds scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If no datasetIds are provided, uses the default dataset.`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType, uuid. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the 'in' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`name`,{type:`string`,description:`Filter indicators by value using substring match (LIKE). Legacy alternative to structured search.`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-events`,{type:`string`,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,description:`Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value.`}).option(`tag-search`,{type:`string`,description:'Structured tag-metadata filter as a JSON array of {field, op, value} objects. Operates against the per-dataset IndicatorTag mirror so you can find indicators by tag attributes (origin country, motive, sophistication, priority, etc.) without a separate Tags lookup. Common dashboard usage: drill from a country into indicators, e.g. tagSearch=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Operators: equals, not, gt/gte/lt/lte (numeric only), contains/like/find/startsWith/endsWith (string only), in. AND-joined across entries; combined with `tags`, a matching tag must satisfy both. Max 10 entries per request, max 100 values per \'in\'. Performance notes: `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`created-after`,{type:`string`,description:`Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z').`}).option(`created-before`,{type:`string`,description:`Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z').`}).option(`related-events-limit`,{type:`number`,description:"Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events. For JSON responses, when the limit hides events, the indicator carries `relatedEventsHasMore: true` and the response includes an advisory message — the cap is never applied silently. STIX and TAXII representations do not include related-event data."}).option(`include-tags`,{type:`boolean`,description:`Whether to include full tag details for each indicator. Defaults to true.`}).option(`include-total-count`,{type:`boolean`,description:`Whether to compute total count via COUNT(*). Defaults to false for performance. total_count is null unless this is true and the complete fan-out succeeds.`}).option(`format`,{type:`string`,description:`Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:"Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit. Cannot be combined with `cursor`.",choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `pagination.cursor`. When provided, all filters, datasetIds, page, `pageSize`, `includeTags` and `relatedEventsLimit` come from the cursor — do not resend them. Sending any filter, `page`, `pageSize`, `includeTags`, `relatedEventsLimit`, `includeTotalCount=true`, or `cache=from-graph` alongside a cursor yields a 400 `CursorFilterConflictError`. A cursor issued for a different entity, an unsupported version, or a dataset that has since been reconfigured as analytics-only yields a 400 `InvalidCursorError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get`,describe:`Lists indicators across multiple datasets`,builder:Xn,handler:async e=>l({command:`cloudforce-one events indicators get`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],search:e.search,name:e.name,indicatorType:e[`indicator-type`],relatedEvents:e[`related-events`],tags:e.tags,tagSearch:e[`tag-search`],createdAfter:e[`created-after`],createdBefore:e[`created-before`],relatedEventsLimit:e[`related-events-limit`],includeTags:e[`include-tags`],includeTotalCount:e[`include-total-count`],format:e.format,cache:e.cache,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Yn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Qn={command:`indicators`,describe:`Operations for events.indicators`,builder:e=>e.command(Zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
102
|
+
Retrieves indicators across specified datasets, ordered by createdAt descending then UUID, dataset ID, and shard ID ascending. Use one standalone datasetIds scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If no datasetIds are provided, uses the default dataset.`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType, uuid. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the 'in' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`name`,{type:`string`,description:`Filter indicators by value using substring match (LIKE). Legacy alternative to structured search.`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-events`,{type:`string`,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,description:`Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value.`}).option(`tag-search`,{type:`string`,description:'Structured tag-metadata filter as a JSON array of {field, op, value} objects. Operates against the per-dataset IndicatorTag mirror so you can find indicators by tag attributes (origin country, motive, sophistication, priority, etc.) without a separate Tags lookup. Common dashboard usage: drill from a country into indicators, e.g. tagSearch=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Operators: equals, not, gt/gte/lt/lte (numeric only), contains/like/find/startsWith/endsWith (string only), in. AND-joined across entries; combined with `tags`, a matching tag must satisfy both. Max 10 entries per request, max 100 values per \'in\'. Performance notes: `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`created-after`,{type:`string`,description:`Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z').`}).option(`created-before`,{type:`string`,description:`Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z').`}).option(`related-events-limit`,{type:`number`,description:"Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events. For JSON responses, when the limit hides events, the indicator carries `relatedEventsHasMore: true` and the response includes an advisory message — the cap is never applied silently. STIX and TAXII representations do not include related-event data."}).option(`include-tags`,{type:`boolean`,description:`Whether to include full tag details for each indicator. Defaults to true.`}).option(`include-total-count`,{type:`boolean`,description:`Whether to compute total count via COUNT(*). Defaults to false for performance. total_count is null unless this is true and the complete fan-out succeeds.`}).option(`format`,{type:`string`,description:`Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:"Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit. Cannot be combined with `cursor`.",choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `pagination.cursor`. When provided, all filters, datasetIds, page, `pageSize`, `includeTags` and `relatedEventsLimit` come from the cursor — do not resend them. Sending any filter, `page`, `pageSize`, `includeTags`, `relatedEventsLimit`, `includeTotalCount=true`, or `cache=from-graph` alongside a cursor yields a 400 `CursorFilterConflictError`. A cursor issued for a different entity, an unsupported version, or a dataset that has since been reconfigured as analytics-only yields a 400 `InvalidCursorError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zn={command:`get`,describe:`Lists indicators across multiple datasets`,builder:Xn,handler:async e=>l({command:`cloudforce-one events indicators get`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`],page:e.page,pageSize:e[`page-size`],search:e.search,name:e.name,indicatorType:e[`indicator-type`],relatedEvents:e[`related-events`],tags:e.tags,tagSearch:e[`tag-search`],createdAfter:e[`created-after`],createdBefore:e[`created-before`],relatedEventsLimit:e[`related-events-limit`],includeTags:e[`include-tags`],includeTotalCount:e[`include-total-count`],format:e.format,cache:e.cache,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Yn,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Qn={command:`indicators`,describe:`Operations for events.indicators`,builder:e=>e.command(Zn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/create`,body:`json`,errors:{400:`BadRequestError`}};function $n(e){return e.usage(`$0 cloudforce-one events queries create-create
|
|
103
103
|
|
|
104
|
-
Create a new saved event query for the account`).option(`alert-enabled`,{type:`boolean`,description:`
|
|
104
|
+
Create a new saved event query for the account`).option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`,default:!1}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).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 er={command:`create-create`,describe:`Create a saved event query`,builder:$n,handler:async e=>l({command:`cloudforce-one events queries create-create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries create-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(I,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,`Unique name for the saved query`)),e[`query-json`]===void 0&&(e[`query-json`]=await _(`query-json`,`JSON string containing the query parameters`));let u=m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}),d=await c(`Creating`,async()=>n.send(I,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function tr(e){return e.usage(`$0 cloudforce-one events queries create <query-id>
|
|
105
105
|
|
|
106
|
-
Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`
|
|
106
|
+
Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).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 nr={command:`create <query-id>`,describe:`Update a saved event query`,builder:tr,handler:async e=>l({command:`cloudforce-one events queries create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(L,{body:t,account_id:l,query_id:e[`query-id`]}));o(r,{successLabel:`Created`});return}let u=m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}),d=await c(`Creating`,async()=>n.send(L,{body:u,account_id:l,query_id:e[`query-id`]}));o(d,{successLabel:`Created`})})};var rr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,response:!1,errors:{404:`NotFoundError`}};function ir(e){return e.usage(`$0 cloudforce-one events queries delete <query-id>
|
|
107
107
|
|
|
108
|
-
Delete a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ar={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:ir,handler:async e=>l({command:`cloudforce-one events queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
108
|
+
Delete a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ar={command:`delete <query-id>`,describe:`Delete a saved event query`,builder:ir,handler:async e=>l({command:`cloudforce-one events queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
109
109
|
`);return}let u=await c(`Deleting`,async()=>n.send(rr,{account_id:l,query_id:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var or={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries`,errors:{500:`InternalServerError`}};function sr(e){return e.usage(`$0 cloudforce-one events queries get event
|
|
110
110
|
|
|
111
111
|
Retrieve all saved event queries for the account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cr={command:`event`,describe:`List all saved event queries`,builder:sr,handler:async e=>l({command:`cloudforce-one events queries get event`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events queries get event`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/queries`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(or,{account_id:l}));o(u,{successLabel:`Loaded`})})};var lr={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,errors:{404:`NotFoundError`}};function ur(e){return e.usage(`$0 cloudforce-one events queries get v2 <query-id>
|
|
112
112
|
|
|
113
|
-
Retrieve a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dr={command:`v2 <query-id>`,describe:`Read a saved event query`,builder:ur,handler:async e=>l({command:`cloudforce-one events queries get v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(lr,{account_id:l,query_id:e[`query-id`]}));o(u,{successLabel:`Loaded`})})},fr={command:`get`,describe:`Operations for events.queries.get`,builder:e=>e.command(cr).command(dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
113
|
+
Retrieve a saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dr={command:`v2 <query-id>`,describe:`Read a saved event query`,builder:ur,handler:async e=>l({command:`cloudforce-one events queries get v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries get v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(lr,{account_id:l,query_id:e[`query-id`]}));o(u,{successLabel:`Loaded`})})},fr={command:`get`,describe:`Operations for events.queries.get`,builder:e=>e.command(cr).command(dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/queries/${t.query_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function pr(e){return e.usage(`$0 cloudforce-one events queries patch <query-id>
|
|
114
114
|
|
|
115
|
-
Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`
|
|
115
|
+
Update an existing saved event query by its ID`).positional(`query-id`,{type:`string`,description:`Event query ID`,demandOption:!0}).option(`alert-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).option(`rule-scope`,{type:`string`,description:`Deprecated and ignored: saved-query alerting and rules were removed.`}).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 mr={command:`patch <query-id>`,describe:`Update a saved event query`,builder:pr,handler:async e=>l({command:`cloudforce-one events queries patch`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events queries patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(R,{body:t,account_id:l,query_id:e[`query-id`]}));o(r,{successLabel:`Updated`});return}let u=m({alert_enabled:e[`alert-enabled`],alert_rollup_enabled:e[`alert-rollup-enabled`],name:h(e.name,`name`,`text`),query_json:h(e[`query-json`],`query-json`,`text`),rule_enabled:e[`rule-enabled`],rule_scope:h(e[`rule-scope`],`rule-scope`,`text`)}),d=await c(`Updating`,async()=>n.send(R,{body:u,account_id:l,query_id:e[`query-id`]}));o(d,{successLabel:`Updated`})})},hr={command:`queries`,describe:`Operations for events.queries`,builder:e=>e.command(nr).command(er).command(ar).command(mr).command(fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}/raw/${t.raw_id}`,body:`json`,errors:{400:`BadRequestError`}};function gr(e){return e.usage(`$0 cloudforce-one events raw create <raw-id>
|
|
116
116
|
|
|
117
|
-
Updates a raw event`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp 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 _r={command:`create <raw-id>`,describe:`Updates a raw event`,builder:gr,handler:async e=>l({command:`cloudforce-one events raw create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events raw create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`json`,body:e.body===void 0?p(
|
|
117
|
+
Updates a raw event`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`data`,{type:`string`,description:`The data field. Provide as a JSON object or @path/to/file.json.`}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp 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 _r={command:`create <raw-id>`,describe:`Updates a raw event`,builder:gr,handler:async e=>l({command:`cloudforce-one events raw create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events raw create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({data:p(e.data,`data`),source:h(e.source,`source`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(z,{body:t,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(r,{successLabel:`Created`});return}let u=m({data:p(e.data,`data`),source:h(e.source,`source`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`data`]]),d=await c(`Creating`,async()=>n.send(z,{body:u,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(d,{successLabel:`Created`})})},vr={command:`raw`,describe:`Operations for events.raw`,builder:e=>e.command(_r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function yr(e){return e.usage(`$0 cloudforce-one events relate create create <event-id>
|
|
118
118
|
|
|
119
|
-
Creates event references for a event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events 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 br={command:`create <event-id>`,describe:`Creates event references for a event`,builder:yr,handler:async e=>l({command:`cloudforce-one events relate create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events relate create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
119
|
+
Creates event references for a event`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events 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 br={command:`create <event-id>`,describe:`Creates event references for a event`,builder:yr,handler:async e=>l({command:`cloudforce-one events relate create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events relate create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(B,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=m({events:e.events}),d=await c(`Creating`,async()=>n.send(B,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})},xr={command:`create`,describe:`Operations for events.relate.create`,builder:e=>e.command(br).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Sr={command:`relate`,describe:`Operations for events.relate`,builder:e=>e.command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relationships/create`,body:`json`,errors:{400:`BadRequestError`}};function Cr(e){return e.usage(`$0 cloudforce-one events relationships create create
|
|
120
120
|
|
|
121
|
-
Creates a directed relationship between two events. The relationship is from parent to child with a specified type.`).option(`child-ids`,{type:`string`,array:!0,description:`Array of UUIDs for child events. Single child = 1:1 relationship, multiple = 1:many relationships`}).option(`dataset-id`,{type:`string`,description:`Dataset identifier where the events are stored`}).option(`parent-id`,{type:`string`,description:`UUID of the parent event that will be the source of the relationship`}).option(`relationship-type`,{type:`string`,description:`Type of relationship to create between parent and child events`,choices:[`related_to`,`caused_by`,`attributed_to`]}).coerce(`relationship-type`,e=>
|
|
121
|
+
Creates a directed relationship between two events. The relationship is from parent to child with a specified type.`).option(`child-ids`,{type:`string`,array:!0,description:`Array of UUIDs for child events. Single child = 1:1 relationship, multiple = 1:many relationships`}).option(`dataset-id`,{type:`string`,description:`Dataset identifier where the events are stored`}).option(`parent-id`,{type:`string`,description:`UUID of the parent event that will be the source of the relationship`}).option(`relationship-type`,{type:`string`,description:`Type of relationship to create between parent and child events`,choices:[`related_to`,`caused_by`,`attributed_to`]}).coerce(`relationship-type`,e=>h(e,`relationship-type`,`text`)).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 wr={command:`create`,describe:`Create a relationship between two events`,builder:Cr,handler:async e=>l({command:`cloudforce-one events relationships create create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events relationships create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({childIds:e[`child-ids`],datasetId:h(e[`dataset-id`],`dataset-id`,`text`),parentId:h(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(V,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`child-ids`]===void 0)throw Error(`--child-ids is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`Dataset identifier where the events are stored`)),e[`parent-id`]===void 0&&(e[`parent-id`]=await _(`parent-id`,`UUID of the parent event that will be the source of the relationship`)),e[`relationship-type`]===void 0&&(e[`relationship-type`]=await v(`relationship-type`,`Type of relationship to create between parent and child events`,[`related_to`,`caused_by`,`attributed_to`]));let u=m({childIds:e[`child-ids`],datasetId:h(e[`dataset-id`],`dataset-id`,`text`),parentId:h(e[`parent-id`],`parent-id`,`text`),relationshipType:e[`relationship-type`]}),d=await c(`Creating`,async()=>n.send(V,{body:u,account_id:l}));o(d,{successLabel:`Created`})})},Tr={command:`create`,describe:`Operations for events.relationships.create`,builder:e=>e.command(wr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Er={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/by-id/${t.event_id}/relationships`,query:[`direction`,`maxDepth`,`relationshipTypes`,`indicatorTypeIds`,`datasetId`,`includeParent`,`page`,`pageSize`],errors:{400:`BadRequestError`}};function Dr(e){return e.usage("$0 cloudforce-one events relationships get <event-id>\n\nThe `event_id` must be defined (to list existing events (and their IDs), use the [`Filter and List Events`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/methods/list/) endpoint). Also, must provide query parameters.").positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`direction`,{type:`string`,description:`The direction to traverse the graph. Defaults to 'both' to search all.`,choices:[`ancestors`,`descendants`,`both`]}).option(`max-depth`,{type:`number`,description:`The maximum depth to traverse. Defaults to 5.`}).option(`relationship-types`,{type:`string`,description:`An optional array of relationship types to filter by.`}).option(`indicator-type-ids`,{type:`string`,description:`An optional array of indicator type IDs to filter the results by.`}).option(`dataset-id`,{type:`string`,description:`The dataset ID to search within.`,demandOption:!0}).option(`include-parent`,{type:`boolean`,description:`Whether to include the starting event in the results. Defaults to true.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Or={command:`get <event-id>`,describe:`Filter and list events related to specific event`,builder:Dr,handler:async e=>l({command:`cloudforce-one events relationships get`,classification:{safeFlags:[`direction`,`include-parent`,`dry-run`]}},e,async()=>{let n={direction:e.direction,maxDepth:e[`max-depth`],relationshipTypes:e[`relationship-types`],indicatorTypeIds:e[`indicator-type-ids`],datasetId:e[`dataset-id`],includeParent:e[`include-parent`],page:e.page,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events relationships get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/by-id/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/relationships`,pathParams:{"event-id":String(e[`event-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Er,{account_id:u,event_id:e[`event-id`],...n}));o(d,{successLabel:`Loaded`})})},kr={command:`relationships`,describe:`Operations for events.relationships`,builder:e=>e.command(Or).command(Tr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ar={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/actors`,query:[`page`,`pageSize`,`value`,`filters`],errors:{400:`BadRequestError`}};function jr(e){return e.usage("$0 cloudforce-one events tags categories actors list\n\nReturns all known Actors from the shared CFONE-owned catalog. Accounts other than the catalog owner receive a redacted public projection: identity (`uuid`, `value`, `categoryUuid`, `categoryName`), metadata (`description`, `dateOfDiscovery`, `tlp`, `confidence`, `properties`), origin (`originCountryISO`, `originCountryISO_annotated`), and public aliases/references (`aliasGroupNames`, `aliases`, `externalReferences`, `externalReferences_annotated`). Owner-private fields (internal aliases, attribution, motive, opsec level, etc.) are stripped from non-owner responses.").option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`value`,{type:`string`,description:`Free-text substring match on actor name (Tag.value).`}).option(`filters`,{type:`string`,description:'Structured filters as a JSON array of {field, op, value} objects. Same shape as the events search API. Common use: filter actors by country with filters=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Max 10 entries per request, max 100 values per \'in\'. Accounts other than the catalog owner may only filter on fields that are also public-readable (`uuid`, `value`, `categoryName`, `aliasGroupNames`, `originCountryISO`); filtering on a redacted field returns 400. `uuid` filters accept only the `equals` and `in` operators. Performance notes: `originCountryISO` uses its B-tree index for equals/in. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mr={command:`list`,describe:`Lists all Actors`,builder:jr,handler:async e=>l({command:`cloudforce-one events tags categories actors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],value:e.value,filters:e.filters};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events tags categories actors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories/actors`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ar,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Nr={command:`actors`,describe:`Operations for events.tags.categories.actors`,builder:e=>e.command(Mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories/create`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`}};function Pr(e){return e.usage(`$0 cloudforce-one events tags categories create create
|
|
122
122
|
|
|
123
|
-
Creates a new Source-of-Truth tag category for an account.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects defining custom fields for tags in this category. Persisted as JSON; returned as a parsed array. Provide as a JSON array of objects or @path/to/file.json.`}).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 Fr={command:`create`,describe:`Creates a new tag category (SoT)`,builder:Pr,handler:async e=>l({command:`cloudforce-one events tags categories create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
123
|
+
Creates a new Source-of-Truth tag category for an account.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects defining custom fields for tags in this category. Persisted as JSON; returned as a parsed array. Provide as a JSON array of objects or @path/to/file.json.`}).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 Fr={command:`create`,describe:`Creates a new tag category (SoT)`,builder:Pr,handler:async e=>l({command:`cloudforce-one events tags categories create create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`),schema:d(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(H,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`),schema:d(e.schema,`schema`)}),p=await c(`Creating`,async()=>n.send(H,{body:u,account_id:l}));o(p,{successLabel:`Created`})})},Ir={command:`create`,describe:`Operations for events.tags.categories.create`,builder:e=>e.command(Fr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Lr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Rr(e){return e.usage(`$0 cloudforce-one events tags categories delete <category-uuid>
|
|
124
124
|
|
|
125
|
-
Deletes a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const zr={command:`delete <category-uuid>`,describe:`Deletes a tag category (SoT)`,builder:Rr,handler:async e=>l({command:`cloudforce-one events tags categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
125
|
+
Deletes a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const zr={command:`delete <category-uuid>`,describe:`Deletes a tag category (SoT)`,builder:Rr,handler:async e=>l({command:`cloudforce-one events tags categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
126
126
|
`);return}let u=await c(`Deleting`,async()=>n.send(Lr,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Deleted`})})};var Br={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,errors:{404:`NotFoundError`}};function Vr(e){return e.usage(`$0 cloudforce-one events tags categories get-by-id <category-uuid>
|
|
127
127
|
|
|
128
128
|
Returns a single Source-of-Truth tag category by UUID, including its full schema.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Hr={command:`get-by-id <category-uuid>`,describe:`Gets a tag category by UUID (SoT)`,builder:Vr,handler:async e=>l({command:`cloudforce-one events tags categories get-by-id`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Br,{account_id:l,category_uuid:e[`category-uuid`]}));o(u,{successLabel:`Loaded`})})};var Ur={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/categories`,query:[`search`],errors:{400:`BadRequestError`}};function Wr(e){return e.usage(`$0 cloudforce-one events tags categories get
|
|
129
129
|
|
|
130
|
-
Returns all Source-of-Truth tag categories for an account.`).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gr={command:`get`,describe:`Lists all tag categories (SoT)`,builder:Wr,handler:async e=>l({command:`cloudforce-one events tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events tags categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ur,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var
|
|
130
|
+
Returns all Source-of-Truth tag categories for an account.`).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gr={command:`get`,describe:`Lists all tag categories (SoT)`,builder:Wr,handler:async e=>l({command:`cloudforce-one events tags categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={search:e.search};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events tags categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ur,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var U={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tag-categories/${t.category_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function Kr(e){return e.usage(`$0 cloudforce-one events tags categories patch <category-uuid>
|
|
131
131
|
|
|
132
|
-
Updates a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects. When provided, replaces the existing field schema. When omitted, the existing schema is preserved. Provide as a JSON array of objects or @path/to/file.json.`}).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 qr={command:`patch <category-uuid>`,describe:`Updates a tag category (SoT)`,builder:Kr,handler:async e=>l({command:`cloudforce-one events tags categories patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?
|
|
132
|
+
Updates a Source-of-Truth tag category by UUID.`).positional(`category-uuid`,{type:`string`,description:`Tag Category UUID.`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`schema`,{type:`string`,description:`Optional array of FieldDefinition objects. When provided, replaces the existing field schema. When omitted, the existing schema is preserved. Provide as a JSON array of objects or @path/to/file.json.`}).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 qr={command:`patch <category-uuid>`,describe:`Updates a tag category (SoT)`,builder:Kr,handler:async e=>l({command:`cloudforce-one events tags categories patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags categories patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tag-categories/${e[`category-uuid`]==null?`<category-uuid>`:encodeURIComponent(String(e[`category-uuid`]))}`,pathParams:{"category-uuid":String(e[`category-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`),schema:d(e.schema,`schema`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(U,{body:t,account_id:l,category_uuid:e[`category-uuid`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),name:h(e.name,`name`,`text`),schema:d(e.schema,`schema`)}),p=await c(`Updating`,async()=>n.send(U,{body:u,account_id:l,category_uuid:e[`category-uuid`]}));o(p,{successLabel:`Updated`})})},Jr={command:`categories`,describe:`Operations for events.tags.categories`,builder:e=>e.command(zr).command(Gr).command(Hr).command(qr).command(Nr).command(Ir).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Yr={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Xr(e){return e.usage(`$0 cloudforce-one events tags delete <tag-uuid>
|
|
133
133
|
|
|
134
|
-
Deletes a Source-of-Truth tag by UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Zr={command:`delete <tag-uuid>`,describe:`Deletes a tag (SoT)`,builder:Xr,handler:async e=>l({command:`cloudforce-one events tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
134
|
+
Deletes a Source-of-Truth tag by UUID.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Zr={command:`delete <tag-uuid>`,describe:`Deletes a tag (SoT)`,builder:Xr,handler:async e=>l({command:`cloudforce-one events tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
135
135
|
`);return}let u=await c(`Deleting`,async()=>n.send(Yr,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Deleted`})})};var Qr={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,errors:{404:`NotFoundError`}};function $r(e){return e.usage(`$0 cloudforce-one events tags get-by-id <tag-uuid>
|
|
136
136
|
|
|
137
|
-
Returns the complete owner projection of an account-scoped Source-of-Truth tag by UUID, including custom fields (properties). Purple TLP remains CFONE-only.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ei={command:`get-by-id <tag-uuid>`,describe:`Gets a tag by UUID (SoT)`,builder:$r,handler:async e=>l({command:`cloudforce-one events tags get-by-id`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Qr,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Loaded`})})};var ti={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function ni(e){return e.usage("$0 cloudforce-one events tags get\n\nReturns all Source-of-Truth tags for an account. Supports legacy free-text `search` on tag value and `categoryUuid` exact match, plus a structured `filters` JSON array for filtering by metadata fields (originCountryISO, actorCategory, motive, priority, etc.). The authenticated account owns these account-scoped tags and receives their complete owner projection. Country values may be passed as alpha-2, alpha-3, name, or common alias. Purple TLP remains CFONE-only.").option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:"Free-text substring match on tag value AND custom-field properties. Searches case-insensitively inside both `Tag.value` and the serialized `Tag.properties` JSON blob (keys, values, and annotation metadata like confidence/tlp are all searchable). Same serialized-text tradeoff as `aliasGroupNames` — substrings can cross JSON boundaries."}).option(`category-uuid`,{type:`string`,description:`CategoryUuid`}).option(`filters`,{type:`string`,description:'Structured filters as a JSON array of {field, op, value} objects. Searchable fields: uuid, value, categoryName, description, dateOfDiscovery, tlp, confidence, actorCategory, motive, attributionOrganization, originCountryISO, aliases, externalReferences, opsecLevel, sophisticationLevel, activeDuration, priority, lastSeen, aliasGroupNames. Operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use \'in\' for bulk OR within a single field, e.g. filters=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Multiple entries are AND-joined. Max 10 entries per request, max 100 values per \'in\'. Per-field notes: `uuid` accepts only \'equals\' and \'in\' (other operators throw ValidationError) — matched against the canonical lowercase storage but callers may pass either case (the server lowercases before comparison); index-backed by the column\'s UNIQUE constraint and intended for batched UUID → tag resolution. `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries (a search for "apt28" will also match "apt280" if both appear in the same tag\'s alias list).'}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ri={command:`get`,describe:`Lists all tags (SoT)`,builder:ni,handler:async e=>l({command:`cloudforce-one events tags get`,classification:{safeFlags:[`cache`,`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],search:e.search,categoryUuid:e[`category-uuid`],filters:e.filters,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ti,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var
|
|
137
|
+
Returns the complete owner projection of an account-scoped Source-of-Truth tag by UUID, including custom fields (properties). Purple TLP remains CFONE-only.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ei={command:`get-by-id <tag-uuid>`,describe:`Gets a tag by UUID (SoT)`,builder:$r,handler:async e=>l({command:`cloudforce-one events tags get-by-id`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Qr,{account_id:l,tag_uuid:e[`tag-uuid`]}));o(u,{successLabel:`Loaded`})})};var ti={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags`,query:[`page`,`pageSize`,`search`,`categoryUuid`,`filters`,`cache`],errors:{400:`BadRequestError`}};function ni(e){return e.usage("$0 cloudforce-one events tags get\n\nReturns all Source-of-Truth tags for an account. Supports legacy free-text `search` on tag value and `categoryUuid` exact match, plus a structured `filters` JSON array for filtering by metadata fields (originCountryISO, actorCategory, motive, priority, etc.). The authenticated account owns these account-scoped tags and receives their complete owner projection. Country values may be passed as alpha-2, alpha-3, name, or common alias. Purple TLP remains CFONE-only.").option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:"Free-text substring match on tag value AND custom-field properties. Searches case-insensitively inside both `Tag.value` and the serialized `Tag.properties` JSON blob (keys, values, and annotation metadata like confidence/tlp are all searchable). Same serialized-text tradeoff as `aliasGroupNames` — substrings can cross JSON boundaries."}).option(`category-uuid`,{type:`string`,description:`CategoryUuid`}).option(`filters`,{type:`string`,description:'Structured filters as a JSON array of {field, op, value} objects. Searchable fields: uuid, value, categoryName, description, dateOfDiscovery, tlp, confidence, actorCategory, motive, attributionOrganization, originCountryISO, aliases, externalReferences, opsecLevel, sophisticationLevel, activeDuration, priority, lastSeen, aliasGroupNames. Operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use \'in\' for bulk OR within a single field, e.g. filters=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Multiple entries are AND-joined. Max 10 entries per request, max 100 values per \'in\'. Per-field notes: `uuid` accepts only \'equals\' and \'in\' (other operators throw ValidationError) — matched against the canonical lowercase storage but callers may pass either case (the server lowercases before comparison); index-backed by the column\'s UNIQUE constraint and intended for batched UUID → tag resolution. `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries (a search for "apt28" will also match "apt280" if both appear in the same tag\'s alias list).'}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ri={command:`get`,describe:`Lists all tags (SoT)`,builder:ni,handler:async e=>l({command:`cloudforce-one events tags get`,classification:{safeFlags:[`cache`,`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],search:e.search,categoryUuid:e[`category-uuid`],filters:e.filters,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ti,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ii(e){return e.usage(`$0 cloudforce-one events tags patch <tag-uuid>
|
|
138
138
|
|
|
139
|
-
Updates an account-owned Source-of-Truth tag by UUID and returns its complete owner projection.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. When changed, existing `properties` are re-validated against the new category's schema (400 on mismatch). Set to null to unlink (typeless; properties stop being validated)."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Omit to preserve existing.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Omit to preserve existing.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`tlp`,{type:`string`,description:`Tag-level TLP marking. Omit to preserve existing. Cannot be cleared to null.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>
|
|
139
|
+
Updates an account-owned Source-of-Truth tag by UUID and returns its complete owner projection.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. When changed, existing `properties` are re-validated against the new category's schema (400 on mismatch). Set to null to unlink (typeless; properties stop being validated)."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Omit to preserve existing.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Omit to preserve existing.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:`Custom field values blob. When omitted, the existing value is preserved. When provided, performs a shallow per-key merge over the stored value (unmentioned keys are retained). Setting an individual key to null deletes that key. Validation runs against the merged result, so a partial update may omit a schema-required key if the stored value supplies it. Provide as a JSON object or @path/to/file.json.`}).option(`tlp`,{type:`string`,description:`Tag-level TLP marking. Omit to preserve existing. Cannot be cleared to null.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).option(`value`,{type:`string`,description:`The value 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 ai={command:`patch <tag-uuid>`,describe:`Updates a tag (SoT)`,builder:ii,handler:async e=>l({command:`cloudforce-one events tags patch`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?m({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:d(e.aliases,`aliases`),categoryUuid:h(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:h(e[`date-of-discovery`],`date-of-discovery`,`text`),description:h(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:d(e[`external-references`],`external-references`),internalAliases:d(e[`internal-aliases`],`internal-aliases`),internalDescription:h(e[`internal-description`],`internal-description`,`text`),lastSeen:h(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:h(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(W,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Updated`});return}let u=m({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:d(e.aliases,`aliases`),categoryUuid:h(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:h(e[`date-of-discovery`],`date-of-discovery`,`text`),description:h(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:d(e[`external-references`],`external-references`),internalAliases:d(e[`internal-aliases`],`internal-aliases`),internalDescription:h(e[`internal-description`],`internal-description`,`text`),lastSeen:h(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:h(e.value,`value`,`text`)},[[`properties`]]),g=await c(`Updating`,async()=>n.send(W,{body:u,account_id:l,tag_uuid:e[`tag-uuid`]}));o(g,{successLabel:`Updated`})})};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,body:`json`,errors:{400:`BadRequestError`}};function oi(e){return e.usage(`$0 cloudforce-one events tags relationships create <tag-uuid>
|
|
140
140
|
|
|
141
|
-
Creates a new relationship with the tag as the source entity. Requires a datasetId to locate the Indicators DO.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`dataset-id`,{type:`string`,description:`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,choices:[`event`,`indicator`]}).coerce(`target-type`,e=>
|
|
141
|
+
Creates a new relationship with the tag as the source entity. Requires a datasetId to locate the Indicators DO.`).positional(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Confidence score 0–100.`}).option(`dataset-id`,{type:`string`,description:`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`}).option(`metadata`,{type:`string`,description:`Arbitrary JSON metadata. Provide as a JSON object or @path/to/file.json.`}).option(`target-id`,{type:`string`,description:`UUID of the target entity.`}).option(`target-type`,{type:`string`,description:`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,choices:[`event`,`indicator`]}).coerce(`target-type`,e=>h(e,`target-type`,`text`)).option(`type`,{type:`string`,description:`Relationship type.`}).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 si={command:`create <tag-uuid>`,describe:`Create a relationship for a tag`,builder:oi,handler:async e=>l({command:`cloudforce-one events tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?m({confidence:e.confidence,datasetId:h(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:h(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:h(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(G,{body:t,account_id:l,tag_uuid:e[`tag-uuid`]}));o(r,{successLabel:`Created`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`)),e[`target-id`]===void 0&&(e[`target-id`]=await _(`target-id`,`UUID of the target entity.`)),e[`target-type`]===void 0&&(e[`target-type`]=await v(`target-type`,`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,[`event`,`indicator`])),e.type===void 0&&(e.type=await _(`type`,`Relationship type.`));let u=m({confidence:e.confidence,datasetId:h(e[`dataset-id`],`dataset-id`,`text`),metadata:p(e.metadata,`metadata`),targetId:h(e[`target-id`],`target-id`,`text`),targetType:e[`target-type`],type:h(e.type,`type`,`text`)},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(G,{body:u,account_id:l,tag_uuid:e[`tag-uuid`]}));o(d,{successLabel:`Created`})})};var ci={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],errors:{400:`BadRequestError`}};function li(e){return e.usage(`$0 cloudforce-one events tags relationships delete <rel-uuid>
|
|
142
142
|
|
|
143
|
-
Deletes a relationship by UUID. Idempotent: returns deleted=false if not found. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ui={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:li,handler:async e=>l({command:`cloudforce-one events tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await
|
|
144
|
-
`);return}let d=await c(`Deleting`,async()=>l.send(ci,{account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(d,{successLabel:`Deleted`})})};var di={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function fi(e){return e.usage("$0 cloudforce-one events tags relationships list\n\nReturns sparse relationship edges. Optionally hydrate related entities via `expand`. Fans out across accessible intelligence (isAnalytics=false) indicator dataset shards; `all` and `operational` are equivalent. Analytics datasets do not expose tag associations, so the analytics scope returns an empty result.").option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`datasets`,{type:`string`,description:`Comma-separated dataset UUIDs to scope to, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit for 'all'.`}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters (same as indicator list search).`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Offset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pi={command:`list`,describe:`List relationships for a tag`,builder:fi,handler:async e=>l({command:`cloudforce-one events tags relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasets:e.datasets,search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(di,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})};var
|
|
143
|
+
Deletes a relationship by UUID. Idempotent: returns deleted=false if not found. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ui={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:li,handler:async e=>l({command:`cloudforce-one events tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
144
|
+
`);return}let d=await c(`Deleting`,async()=>l.send(ci,{account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(d,{successLabel:`Deleted`})})};var di={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships`,query:[`datasets`,`search`,`expand`,`cursor`,`pageSize`],errors:{400:`BadRequestError`}};function fi(e){return e.usage("$0 cloudforce-one events tags relationships list\n\nReturns sparse relationship edges. Optionally hydrate related entities via `expand`. Fans out across accessible intelligence (isAnalytics=false) indicator dataset shards; `all` and `operational` are equivalent. Analytics datasets do not expose tag associations, so the analytics scope returns an empty result.").option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`datasets`,{type:`string`,description:`Comma-separated dataset UUIDs to scope to, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit for 'all'.`}).option(`search`,{type:`string`,description:`JSON array of {field, op, value} filters (same as indicator list search).`}).option(`expand`,{type:`string`,description:`Comma-separated entity types to hydrate (event, indicator, tag).`}).option(`cursor`,{type:`string`,description:`Offset cursor from a previous page.`}).option(`page-size`,{type:`number`,description:`Page size (1–100, default 25).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pi={command:`list`,describe:`List relationships for a tag`,builder:fi,handler:async e=>l({command:`cloudforce-one events tags relationships list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasets:e.datasets,search:e.search,expand:e.expand,cursor:e.cursor,pageSize:e[`page-size`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(di,{account_id:u,tag_uuid:e[`tag-uuid`],...n}));o(d,{successLabel:`Loaded`})})};var K={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/${t.tag_uuid}/relationships/${t.rel_uuid}`,query:[`datasetId`],body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function mi(e){return e.usage(`$0 cloudforce-one events tags relationships update <rel-uuid>
|
|
145
145
|
|
|
146
|
-
Partially updates a relationship by UUID. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).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 hi={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:mi,handler:async e=>l({command:`cloudforce-one events tags relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?
|
|
146
|
+
Partially updates a relationship by UUID. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`metadata`,{type:`string`,description:`Updated metadata. null clears it. Provide as a JSON object or @path/to/file.json.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).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 hi={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:mi,handler:async e=>l({command:`cloudforce-one events tags relationships update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetId:e[`dataset-id`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events tags relationships update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/${e[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(e[`tag-uuid`]))}/relationships/${e[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(e[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(e[`tag-uuid`]??``),"rel-uuid":String(e[`rel-uuid`]??``)},query:n,bodyKind:`json`,body:e.body===void 0?m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:h(e.type,`type`,`text`)},[[`metadata`]]):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Updating`,async()=>l.send(K,{body:t,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(r,{successLabel:`Updated`});return}let d=m({confidence:e.confidence,metadata:p(e.metadata,`metadata`),type:h(e.type,`type`,`text`)},[[`metadata`]]);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await c(`Updating`,async()=>l.send(K,{body:d,account_id:u,tag_uuid:e[`tag-uuid`],rel_uuid:e[`rel-uuid`],...n}));o(g,{successLabel:`Updated`})})},gi={command:`relationships`,describe:`Operations for events.tags.relationships`,builder:e=>e.command(si).command(ui).command(pi).command(hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_i={command:`tags`,describe:`Operations for events.tags`,builder:e=>e.command(Zr).command(ri).command(ei).command(ai).command(Jr).command(gi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vi={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries/catalog`,errors:{400:`BadRequestError`}};function yi(e){return e.usage(`$0 cloudforce-one events target industries catalog get
|
|
147
147
|
|
|
148
|
-
Lists all target industries from industry map catalog`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bi={command:`get`,describe:`Lists all target industries from industry map catalog`,builder:yi,handler:async e=>l({command:`cloudforce-one events target industries catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events target industries catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries/catalog`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(vi,{account_id:l}));o(u,{successLabel:`Loaded`})})},xi={command:`catalog`,describe:`Operations for events.target.industries.catalog`,builder:e=>e.command(bi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Si={command:`industries`,describe:`Operations for events.target.industries`,builder:e=>e.command(xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ci={command:`target`,describe:`Operations for events.target`,builder:e=>e.command(Si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
148
|
+
Lists all target industries from industry map catalog`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bi={command:`get`,describe:`Lists all target industries from industry map catalog`,builder:yi,handler:async e=>l({command:`cloudforce-one events target industries catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one events target industries catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries/catalog`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(vi,{account_id:l}));o(u,{successLabel:`Loaded`})})},xi={command:`catalog`,describe:`Operations for events.target.industries.catalog`,builder:e=>e.command(bi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Si={command:`industries`,describe:`Operations for events.target.industries`,builder:e=>e.command(xi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ci={command:`target`,describe:`Operations for events.target`,builder:e=>e.command(Si).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/update/bulk`,body:`json`,errors:{400:`BadRequestError`}};function wi(e){return e.usage(`$0 cloudforce-one events update bulk patch
|
|
149
149
|
|
|
150
|
-
Updates multiple events with the same field values. Maximum 100 events per request.`).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the events to update. Required to prevent cross-account modifications.`}).option(`event-ids`,{type:`string`,array:!0,description:`List of event UUIDs to update (1-100)`}).option(`updates-attacker`,{type:`string`,description:`The updates.attacker field`}).option(`updates-attacker-country`,{type:`string`,description:`The updates.attackerCountry field`}).option(`updates-category`,{type:`string`,description:`The updates.category field`}).option(`updates-created-at`,{type:`string`,description:`The updates.createdAt field`}).option(`updates-event`,{type:`string`,description:`The updates.event field`}).option(`updates-indicator`,{type:`string`,description:`The updates.indicator field`}).option(`updates-indicator-type`,{type:`string`,description:`The updates.indicatorType field`}).option(`updates-insight`,{type:`string`,description:`The updates.insight field`}).option(`updates-raw-source`,{type:`string`,description:`The updates.raw.source field`}).option(`updates-raw-tlp`,{type:`string`,description:`The updates.raw.tlp field`}).option(`updates-target-country`,{type:`string`,description:`The updates.targetCountry field`}).option(`updates-target-industry`,{type:`string`,description:`The updates.targetIndustry field`}).option(`updates-tlp`,{type:`string`,description:`The updates.tlp 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 Ti={command:`patch`,describe:`Bulk update events`,builder:wi,handler:async e=>l({command:`cloudforce-one events update bulk patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events update bulk patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/update/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
150
|
+
Updates multiple events with the same field values. Maximum 100 events per request.`).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the events to update. Required to prevent cross-account modifications.`}).option(`event-ids`,{type:`string`,array:!0,description:`List of event UUIDs to update (1-100)`}).option(`updates-attacker`,{type:`string`,description:`The updates.attacker field`}).option(`updates-attacker-country`,{type:`string`,description:`The updates.attackerCountry field`}).option(`updates-category`,{type:`string`,description:`The updates.category field`}).option(`updates-created-at`,{type:`string`,description:`The updates.createdAt field`}).option(`updates-event`,{type:`string`,description:`The updates.event field`}).option(`updates-indicator`,{type:`string`,description:`The updates.indicator field`}).option(`updates-indicator-type`,{type:`string`,description:`The updates.indicatorType field`}).option(`updates-insight`,{type:`string`,description:`The updates.insight field`}).option(`updates-raw-data`,{type:`string`,description:`The updates.raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`updates-raw-source`,{type:`string`,description:`The updates.raw.source field`}).option(`updates-raw-tlp`,{type:`string`,description:`The updates.raw.tlp field`}).option(`updates-target-country`,{type:`string`,description:`The updates.targetCountry field`}).option(`updates-target-industry`,{type:`string`,description:`The updates.targetIndustry field`}).option(`updates-tlp`,{type:`string`,description:`The updates.tlp 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 Ti={command:`patch`,describe:`Bulk update events`,builder:wi,handler:async e=>l({command:`cloudforce-one events update bulk patch`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one events update bulk patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/update/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({datasetId:h(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:h(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:h(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:h(e[`updates-category`],`updates-category`,`text`),createdAt:h(e[`updates-created-at`],`updates-created-at`,`text`),event:h(e[`updates-event`],`updates-event`,`text`),indicator:h(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:h(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:h(e[`updates-insight`],`updates-insight`,`text`),raw:{data:p(e[`updates-raw-data`],`updates-raw-data`),source:h(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:h(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:h(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:h(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:h(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(q,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`Dataset ID containing the events to update. Required to prevent cross-account modifications.`)),e[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let u=m({datasetId:h(e[`dataset-id`],`dataset-id`,`text`),eventIds:e[`event-ids`],updates:{attacker:h(e[`updates-attacker`],`updates-attacker`,`text`),attackerCountry:h(e[`updates-attacker-country`],`updates-attacker-country`,`text`),category:h(e[`updates-category`],`updates-category`,`text`),createdAt:h(e[`updates-created-at`],`updates-created-at`,`text`),event:h(e[`updates-event`],`updates-event`,`text`),indicator:h(e[`updates-indicator`],`updates-indicator`,`text`),indicatorType:h(e[`updates-indicator-type`],`updates-indicator-type`,`text`),insight:h(e[`updates-insight`],`updates-insight`,`text`),raw:{data:p(e[`updates-raw-data`],`updates-raw-data`),source:h(e[`updates-raw-source`],`updates-raw-source`,`text`),tlp:h(e[`updates-raw-tlp`],`updates-raw-tlp`,`text`)},targetCountry:h(e[`updates-target-country`],`updates-target-country`,`text`),targetIndustry:h(e[`updates-target-industry`],`updates-target-industry`,`text`),tlp:h(e[`updates-tlp`],`updates-tlp`,`text`)}},[[`updates`,`raw`,`data`]]),d=await c(`Updating`,async()=>n.send(q,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})},Ei={command:`bulk`,describe:`Operations for events.update.bulk`,builder:e=>e.command(Ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Di={command:`update`,describe:`Operations for events.update`,builder:e=>e.command(Ei).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oi={command:`events`,describe:`Operations for events`,builder:e=>e.command(Fe).command(we).command(Me).command(Tn).command(An).command(Pn).command(Un).command(Jn).command(Qn).command(hr).command(vr).command(Sr).command(kr).command(_i).command(Ci).command(Di).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ki={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/constants`,response:!1};function Ai(e){return e.usage(`$0 cloudforce-one priority-intelligence constants get
|
|
151
151
|
|
|
152
|
-
Requirements is the existing free-form PIR method. Interests is the experimental structured-interest method, evaluated independently from requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ji={command:`get`,describe:`Get PIR constants (methods, dimensions, and TLP values)`,builder:Ai,handler:async e=>l({command:`cloudforce-one priority-intelligence constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/constants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ki,{account_id:l}));o(u,{successLabel:`Loaded`})})},Mi={command:`constants`,describe:`Operations for priority-intelligence.constants`,builder:e=>e.command(ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
152
|
+
Requirements is the existing free-form PIR method. Interests is the experimental structured-interest method, evaluated independently from requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ji={command:`get`,describe:`Get PIR constants (methods, dimensions, and TLP values)`,builder:Ai,handler:async e=>l({command:`cloudforce-one priority-intelligence constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/constants`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ki,{account_id:l}));o(u,{successLabel:`Loaded`})})},Mi={command:`constants`,describe:`Operations for priority-intelligence.constants`,builder:e=>e.command(ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence`,body:`json`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,429:`TooManyRequestsError`}};function Ni(e){return e.usage(`$0 cloudforce-one priority-intelligence create
|
|
153
153
|
|
|
154
|
-
Creates a new PIR for the account.
|
|
154
|
+
Creates a new PIR for the account. The account may hold at most the number of PIRs set by the cfone.priority_intelligence_requirement_limit entitlement. An active PIR requires a query.`).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>h(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`.",default:24}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`],default:`none`}).coerce(`notification-mode`,e=>h(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`,default:0}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>h(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`status`,{type:`string`,description:`The status field`,choices:[`draft`,`active`,`paused`],default:`draft`}).coerce(`status`,e=>h(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp field`,default:`amber`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0)){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset_scope-* flag is set`)}return!0}).check(e=>{if([`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0)){let t=[`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0})}const Pi={command:`create`,describe:`Create a priority intelligence requirement`,builder:Ni,handler:async e=>l({command:`cloudforce-one priority-intelligence create`,classification:{safeFlags:[`dataset-scope-type`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:h(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{version:e[`query-version`]},query_source:e[`query-source`],requirement:h(e.requirement,`requirement`,`text`),status:e.status,title:h(e.title,`title`,`text`),tlp:h(e.tlp,`tlp`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(J,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.requirement===void 0&&(e.requirement=await _(`requirement`,`The requirement field`));let u=m({dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:h(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{version:e[`query-version`]},query_source:e[`query-source`],requirement:h(e.requirement,`requirement`,`text`),status:e.status,title:h(e.title,`title`,`text`),tlp:h(e.tlp,`tlp`,`text`)}),d=await c(`Creating`,async()=>n.send(J,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Fi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/${t.priority_id}`,response:!1,errors:{404:`NotFoundError`}};function Ii(e){return e.usage(`$0 cloudforce-one priority-intelligence delete <priority-id>
|
|
155
155
|
|
|
156
|
-
Soft-deletes a PIR. The PIR will no longer count against quota.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Li={command:`delete <priority-id>`,describe:`Delete a priority intelligence requirement`,builder:Ii,handler:async e=>l({command:`cloudforce-one priority-intelligence delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
157
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(Fi,{account_id:l,priority_id:e[`priority-id`]}));o(u,{successLabel:`Deleted`})})};var
|
|
156
|
+
Soft-deletes a PIR. The PIR will no longer count against quota.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Li={command:`delete <priority-id>`,describe:`Delete a priority intelligence requirement`,builder:Ii,handler:async e=>l({command:`cloudforce-one priority-intelligence delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
157
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Fi,{account_id:l,priority_id:e[`priority-id`]}));o(u,{successLabel:`Deleted`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/filters/generate`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`,502:`BadGatewayError`,503:`ServiceUnavailableError`}};function Ri(e){return e.usage("$0 cloudforce-one priority-intelligence filters generate\n\nTranslates a natural-language Priority Intelligence Requirement into Threat Events `searchBranches` with Workers AI. Terms that cannot be expressed as event filters are returned in `unresolved_terms`. Nothing is stored or executed.").option(`requirement`,{type:`string`,description:`Natural-language Priority Intelligence Requirement.`}).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 zi={command:`generate`,describe:`Generate event filters from a PIR`,builder:Ri,handler:async e=>l({command:`cloudforce-one priority-intelligence filters generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence filters generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/filters/generate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({requirement:h(e.requirement,`requirement`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Y,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.requirement===void 0&&(e.requirement=await _(`requirement`,`Natural-language Priority Intelligence Requirement.`));let u=m({requirement:h(e.requirement,`requirement`,`text`)}),d=await c(`Creating`,async()=>n.send(Y,{body:u,account_id:l}));o(d,{successLabel:`Created`})})},Bi={command:`filters`,describe:`Operations for priority-intelligence.filters`,builder:e=>e.command(zi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Vi={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/${t.priority_id}`,response:!1,errors:{404:`NotFoundError`}};function Hi(e){return e.usage(`$0 cloudforce-one priority-intelligence get <priority-id>
|
|
158
158
|
|
|
159
|
-
Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ui={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:Hi,handler:async e=>l({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Vi,{account_id:l,priority_id:e[`priority-id`]}));o(u,{successLabel:`Loaded`})})};var
|
|
159
|
+
Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ui={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:Hi,handler:async e=>l({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Vi,{account_id:l,priority_id:e[`priority-id`]}));o(u,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/backtests`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function Wi(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
|
|
160
160
|
|
|
161
|
-
Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).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 Gi={command:`create`,describe:`Backtest account-interest change detection`,builder:Wi,handler:async e=>l({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
161
|
+
Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).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 Gi={command:`create`,describe:`Backtest account-interest change detection`,builder:Wi,handler:async e=>l({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({as_of:h(e[`as-of`],`as-of`,`text`),backtest_days:e[`backtest-days`],candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(X,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=m({as_of:h(e[`as-of`],`as-of`,`text`),backtest_days:e[`backtest-days`],candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}),d=await c(`Creating`,async()=>n.send(X,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Ki={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/backtests/${t.backtest_id}`,response:!1,errors:{404:`NotFoundError`}};function qi(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests get <backtest-id>
|
|
162
162
|
|
|
163
|
-
Returns a previously completed account-interest backtest by ID. The backtest must belong to this account.`).positional(`backtest-id`,{type:`string`,description:`Backtest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ji={command:`get <backtest-id>`,describe:`Get a persisted account-interest backtest`,builder:qi,handler:async e=>l({command:`cloudforce-one priority-intelligence interests backtests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests backtests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests/${e[`backtest-id`]==null?`<backtest-id>`:encodeURIComponent(String(e[`backtest-id`]))}`,pathParams:{"backtest-id":String(e[`backtest-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ki,{account_id:l,backtest_id:e[`backtest-id`]}));o(u,{successLabel:`Loaded`})})},Yi={command:`backtests`,describe:`Operations for priority-intelligence.interests.backtests`,builder:e=>e.command(Gi).command(Ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var
|
|
163
|
+
Returns a previously completed account-interest backtest by ID. The backtest must belong to this account.`).positional(`backtest-id`,{type:`string`,description:`Backtest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ji={command:`get <backtest-id>`,describe:`Get a persisted account-interest backtest`,builder:qi,handler:async e=>l({command:`cloudforce-one priority-intelligence interests backtests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests backtests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests/${e[`backtest-id`]==null?`<backtest-id>`:encodeURIComponent(String(e[`backtest-id`]))}`,pathParams:{"backtest-id":String(e[`backtest-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ki,{account_id:l,backtest_id:e[`backtest-id`]}));o(u,{successLabel:`Loaded`})})},Yi={command:`backtests`,describe:`Operations for priority-intelligence.interests.backtests`,builder:e=>e.command(Gi).command(Ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests`,body:`json`,response:!1,errors:{400:`BadRequestError`,409:`ConflictError`}};function Xi(e){return e.usage(`$0 cloudforce-one priority-intelligence interests create
|
|
164
164
|
|
|
165
|
-
Creates a structured account interest used by Priority Intelligence Option 2 evaluations. Interests are evaluated independently from free-form PIR requirements.`).option(`dimension`,{type:`string`,description:`The dimension field`,choices:[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`]}).coerce(`dimension`,e=>
|
|
165
|
+
Creates a structured account interest used by Priority Intelligence Option 2 evaluations. Interests are evaluated independently from free-form PIR requirements.`).option(`dimension`,{type:`string`,description:`The dimension field`,choices:[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`]}).coerce(`dimension`,e=>h(e,`dimension`,`text`)).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`value`,{type:`string`,description:`The value 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 Zi={command:`create`,describe:`Create an account interest for PIR Option 2`,builder:Xi,handler:async e=>l({command:`cloudforce-one priority-intelligence interests create`,classification:{safeFlags:[`dimension`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({dimension:e.dimension,enabled:e.enabled,value:h(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.dimension===void 0&&(e.dimension=await v(`dimension`,`The dimension field`,[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`])),e.value===void 0&&(e.value=await _(`value`,`The value field`));let u=m({dimension:e.dimension,enabled:e.enabled,value:h(e.value,`value`,`text`)}),d=await c(`Creating`,async()=>n.send(Z,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Qi={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/${t.interest_id}`,response:!1,errors:{404:`NotFoundError`}};function $i(e){return e.usage(`$0 cloudforce-one priority-intelligence interests delete <interest-id>
|
|
166
166
|
|
|
167
|
-
Deletes a structured account interest so later Priority Intelligence Option 2 evaluations no longer include it.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ea={command:`delete <interest-id>`,describe:`Delete an account interest for PIR Option 2`,builder:$i,handler:async e=>l({command:`cloudforce-one priority-intelligence interests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${e[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(e[`interest-id`]))}`,pathParams:{"interest-id":String(e[`interest-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await
|
|
168
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(Qi,{account_id:l,interest_id:e[`interest-id`]}));o(u,{successLabel:`Deleted`})})};var
|
|
167
|
+
Deletes a structured account interest so later Priority Intelligence Option 2 evaluations no longer include it.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ea={command:`delete <interest-id>`,describe:`Delete an account interest for PIR Option 2`,builder:$i,handler:async e=>l({command:`cloudforce-one priority-intelligence interests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${e[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(e[`interest-id`]))}`,pathParams:{"interest-id":String(e[`interest-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
168
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Qi,{account_id:l,interest_id:e[`interest-id`]}));o(u,{successLabel:`Deleted`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,body:`json`,response:!1,errors:{400:`BadRequestError`}};function ta(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations create
|
|
169
169
|
|
|
170
|
-
Compares the trailing event-date window with the preceding window. Results are precision-gated to enabled account interests. Late ingestion can cause an older event to appear in a later evaluation, so results describe changes in event-dated intelligence rather than exact adversary-activity timing.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).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 na={command:`create`,describe:`Evaluate recent event-dated changes for account interests`,builder:ta,handler:async e=>l({command:`cloudforce-one priority-intelligence interests evaluations create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests evaluations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?
|
|
170
|
+
Compares the trailing event-date window with the preceding window. Results are precision-gated to enabled account interests. Late ingestion can cause an older event to appear in a later evaluation, so results describe changes in event-dated intelligence rather than exact adversary-activity timing.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).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 na={command:`create`,describe:`Evaluate recent event-dated changes for account interests`,builder:ta,handler:async e=>l({command:`cloudforce-one priority-intelligence interests evaluations create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests evaluations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({as_of:h(e[`as-of`],`as-of`,`text`),candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Q,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=m({as_of:h(e[`as-of`],`as-of`,`text`),candidate_limit:e[`candidate-limit`],dataset_ids:e[`dataset-ids`],emerging_min_current_count:e[`emerging-min-current-count`],established_min_absolute_delta:e[`established-min-absolute-delta`],established_min_prior_count:e[`established-min-prior-count`],established_min_relative_delta:e[`established-min-relative-delta`],window_days:e[`window-days`]}),d=await c(`Creating`,async()=>n.send(Q,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var ra={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/evaluations/${t.evaluation_id}`,response:!1,errors:{404:`NotFoundError`}};function ia(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations get <evaluation-id>
|
|
171
171
|
|
|
172
172
|
Returns a previously completed live account-interest evaluation by ID. The evaluation must belong to this account.`).positional(`evaluation-id`,{type:`string`,description:`Evaluation UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const aa={command:`get <evaluation-id>`,describe:`Get a persisted account-interest evaluation`,builder:ia,handler:async e=>l({command:`cloudforce-one priority-intelligence interests evaluations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests evaluations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations/${e[`evaluation-id`]==null?`<evaluation-id>`:encodeURIComponent(String(e[`evaluation-id`]))}`,pathParams:{"evaluation-id":String(e[`evaluation-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ra,{account_id:l,evaluation_id:e[`evaluation-id`]}));o(u,{successLabel:`Loaded`})})},oa={command:`evaluations`,describe:`Operations for priority-intelligence.interests.evaluations`,builder:e=>e.command(na).command(aa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sa={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests`,query:[`page`,`per_page`,`enabled`],response:!1};function ca(e){return e.usage(`$0 cloudforce-one priority-intelligence interests list
|
|
173
173
|
|
|
174
|
-
Lists structured account interests for Priority Intelligence Option 2. Filter by enabled state and paginate results.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enabled`,{type:`string`,description:`Enabled`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const la={command:`list`,describe:`List account interests for PIR Option 2`,builder:ca,handler:async e=>l({command:`cloudforce-one priority-intelligence interests list`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],enabled:e.enabled};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence interests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(sa,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var
|
|
174
|
+
Lists structured account interests for Priority Intelligence Option 2. Filter by enabled state and paginate results.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enabled`,{type:`string`,description:`Enabled`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const la={command:`list`,describe:`List account interests for PIR Option 2`,builder:ca,handler:async e=>l({command:`cloudforce-one priority-intelligence interests list`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],enabled:e.enabled};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence interests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(sa,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ua={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/interests/${t.interest_id}`,body:`json`,response:!1,errors:{404:`NotFoundError`,409:`ConflictError`}};function da(e){return e.usage(`$0 cloudforce-one priority-intelligence interests update <interest-id>
|
|
175
175
|
|
|
176
|
-
Updates a structured account interest used by Priority Intelligence Option 2 evaluations. Changing the value re-resolves the interest against the current catalog.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`value`,{type:`string`,description:`The value 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
|
|
176
|
+
Updates a structured account interest used by Priority Intelligence Option 2 evaluations. Changing the value re-resolves the interest against the current catalog.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`value`,{type:`string`,description:`The value 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 fa={command:`update <interest-id>`,describe:`Update an account interest for PIR Option 2`,builder:da,handler:async e=>l({command:`cloudforce-one priority-intelligence interests update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence interests update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${e[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(e[`interest-id`]))}`,pathParams:{"interest-id":String(e[`interest-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({enabled:e.enabled,value:h(e.value,`value`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ua,{body:t,account_id:l,interest_id:e[`interest-id`]}));o(r,{successLabel:`Updated`});return}let u=m({enabled:e.enabled,value:h(e.value,`value`,`text`)}),d=await c(`Updating`,async()=>n.send(ua,{body:u,account_id:l,interest_id:e[`interest-id`]}));o(d,{successLabel:`Updated`})})},pa={command:`interests`,describe:`Operations for priority-intelligence.interests`,builder:e=>e.command(Zi).command(ea).command(la).command(fa).command(Yi).command(oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ma={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence`,query:[`page`,`per_page`],response:!1};function ha(e){return e.usage(`$0 cloudforce-one priority-intelligence list
|
|
177
177
|
|
|
178
|
-
Lists free-form Priority Intelligence Requirements for the account. Results are scoped to the authenticated account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
178
|
+
Lists free-form Priority Intelligence Requirements for the account. Results are scoped to the authenticated account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ga={command:`list`,describe:`List priority intelligence requirements for an account`,builder:ha,handler:async e=>l({command:`cloudforce-one priority-intelligence list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ma,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var _a={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/quota`,response:!1};function va(e){return e.usage(`$0 cloudforce-one priority-intelligence quota create
|
|
179
179
|
|
|
180
|
-
Returns the account's
|
|
180
|
+
Returns the account's PIR quota: the entitlement limit and the number of PIRs the account can still create. Deleting a PIR frees its slot. Anniversary dates are informational.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ya={command:`create`,describe:`Get PIR quota for an account`,builder:va,handler:async e=>l({command:`cloudforce-one priority-intelligence quota create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one priority-intelligence quota create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/quota`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(_a,{account_id:l}));o(u,{successLabel:`Created`})})},ba={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(ya).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var xa={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/priority-intelligence/${t.priority_id}`,body:`json`,response:!1,errors:{400:`BadRequestError`,404:`NotFoundError`,409:`ConflictError`}};function Sa(e){return e.usage(`$0 cloudforce-one priority-intelligence update <priority-id>
|
|
181
181
|
|
|
182
|
-
Updates a
|
|
182
|
+
Updates a Priority Intelligence Requirement for the authenticated account. Changing the query increments its version; editing the requirement without saving a query marks the query stale.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`confirm-query`,{type:`boolean`,description:"Write-only. `true` confirms the query still fits the requirement, clearing `query_stale` without changing the query or its version. Requires a query."}).option(`dataset-scope-type`,{type:`string`,description:`The dataset_scope.type field`,choices:[`default`,`datasets`]}).coerce(`dataset-scope-type`,e=>h(e,`dataset-scope-type`,`text`)).option(`dataset-scope-dataset-ids`,{type:`string`,array:!0,description:`The dataset_scope.dataset_ids field`}).option(`digest-interval-hours`,{type:`number`,description:"Hours between digests: 6, 12, or 24. Used only when `notification_mode` is `digest`."}).option(`intent-indicators`,{type:`string`,array:!0,description:`The intent.indicators field`}).option(`intent-unsupported-terms`,{type:`string`,array:!0,description:`The intent.unsupported_terms field`}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`model`,{type:`string`,description:`The model field`}).option(`notification-mode`,{type:`string`,description:"`none` or `digest`. Notifications are opt-in. `immediate` is reserved and currently rejected.",choices:[`none`,`immediate`,`digest`]}).coerce(`notification-mode`,e=>h(e,`notification-mode`,`text`)).option(`priority`,{type:`number`,description:`The priority field`}).option(`query-version`,{type:`number`,description:`Ignored. Accepted so a PIR read from the API can be sent back unchanged.`}).option(`query-source`,{type:`string`,description:`The query_source field`,choices:[`generated`,`edited`]}).coerce(`query-source`,e=>h(e,`query-source`,`text`)).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`status`,{type:`string`,description:`The status field`,choices:[`draft`,`active`,`paused`]}).coerce(`status`,e=>h(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`tlp`,{type:`string`,description:`The tlp 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)`}).check(e=>{if([`dataset-scope-type`,`dataset-scope-dataset-ids`].some(t=>e[t]!==void 0)){let t=[`dataset-scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --dataset_scope-* flag is set`)}return!0}).check(e=>{if([`intent-indicators`,`intent-unsupported-terms`].some(t=>e[t]!==void 0)){let t=[`intent-indicators`,`intent-unsupported-terms`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --intent-* flag is set`)}return!0})}const Ca={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:Sa,handler:async e=>l({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`confirm-query`,`dataset-scope-type`,`notification-mode`,`query-source`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${e[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(e[`priority-id`]))}`,pathParams:{"priority-id":String(e[`priority-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:h(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{version:e[`query-version`]},query_source:e[`query-source`],requirement:h(e.requirement,`requirement`,`text`),status:e.status,title:h(e.title,`title`,`text`),tlp:h(e.tlp,`tlp`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(xa,{body:t,account_id:l,priority_id:e[`priority-id`]}));o(r,{successLabel:`Updated`});return}let u=m({confirm_query:e[`confirm-query`],dataset_scope:{type:e[`dataset-scope-type`],dataset_ids:e[`dataset-scope-dataset-ids`]},digest_interval_hours:e[`digest-interval-hours`],intent:{indicators:e[`intent-indicators`],unsupported_terms:e[`intent-unsupported-terms`]},labels:e.labels,model:h(e.model,`model`,`text`),notification_mode:e[`notification-mode`],priority:e.priority,query:{version:e[`query-version`]},query_source:e[`query-source`],requirement:h(e.requirement,`requirement`,`text`),status:e.status,title:h(e.title,`title`,`text`),tlp:h(e.tlp,`tlp`,`text`)}),d=await c(`Updating`,async()=>n.send(xa,{body:u,account_id:l,priority_id:e[`priority-id`]}));o(d,{successLabel:`Updated`})})},wa={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(Pi).command(Li).command(Ui).command(ga).command(Ca).command(Mi).command(Bi).command(pa).command(ba).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ta(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
|
|
183
183
|
|
|
184
|
-
Download a file asset from R2 storage. Customer can only download from their own account.`).positional(`asset-id`,{type:`string`,description:`Asset UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const
|
|
184
|
+
Download a file asset from R2 storage. Customer can only download from their own account.`).positional(`asset-id`,{type:`string`,description:`Asset UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const Ea={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Ta,handler:async e=>l({command:`cloudforce-one requests assets download`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/${e[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(e[`asset-id`]))}/download`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"asset-id":String(e[`asset-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>x(`/accounts/${n}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/assets/${encodeURIComponent(String(e[`asset-id`]))}/download`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));b(e.text===!0?o.toString(`utf-8`):o)})};var Da={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}/assets/list`};function Oa(e){return e.usage(`$0 cloudforce-one requests assets list
|
|
185
185
|
|
|
186
|
-
List all file assets for a request. Customer can only list assets from their own account.`).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
186
|
+
List all file assets for a request. Customer can only list assets from their own account.`).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ka={command:`list`,describe:`List assets in request (Customer)`,builder:Oa,handler:async e=>l({command:`cloudforce-one requests assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/list`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Da,{account_id:l,project_type:e[`project-type`],request_id:e[`request-id`]}));o(u,{successLabel:`Loaded`})})};var Aa={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}/assets/upload`,pathParams:[`account_id`,`project_type`,`request_id`],body:`form`};function ja(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
|
|
187
187
|
|
|
188
|
-
Upload a file asset to R2 storage and associate it with a request. Customer can only upload to their own account.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`description`,{type:`string`,description:`Optional description of the asset`}).option(`metadata`,{type:`string`,description:`Optional JSON string of key-value pairs (e.g., '{"key1":"value1"}')`})}const
|
|
188
|
+
Upload a file asset to R2 storage and associate it with a request. Customer can only upload to their own account.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`description`,{type:`string`,description:`Optional description of the asset`}).option(`metadata`,{type:`string`,description:`Optional JSON string of key-value pairs (e.g., '{"key1":"value1"}')`})}const Ma={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:ja,handler:async e=>l({command:`cloudforce-one requests assets upload`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests assets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/assets/upload`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,description:e.description,metadata:e.metadata}});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.file!==void 0||e.body!==void 0||e.description!==void 0||e.metadata!==void 0){let t=new FormData;if(e.file){let n=g(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.description!==void 0&&t.append(`description`,String(h(e.description,`description`,`text`)??``)),e.metadata!==void 0&&t.append(`metadata`,String(h(e.metadata,`metadata`,`text`)??``));let r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/assets/upload`,{body:t}));o(r,{successLabel:`Created`});return}if(e.body){let t=h(e.body,`body`,`binary`),r=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/assets/upload`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));o(r,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>l.send(Aa,{account_id:u,project_type:e[`project-type`],request_id:e[`request-id`]}));o(d,{successLabel:`Created`})})},Na={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Ea).command(ka).command(Ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Pa={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/constants`};function Fa(e){return e.usage(`$0 cloudforce-one requests constants get <project-type>
|
|
189
189
|
|
|
190
|
-
Returns available priorities, statuses, and TLP levels for request workflows`).positional(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
190
|
+
Returns available priorities, statuses, and TLP levels for request workflows`).positional(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ia={command:`get <project-type>`,describe:`Get request constants`,builder:Fa,handler:async e=>l({command:`cloudforce-one requests constants get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/constants`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Pa,{account_id:l,project_type:e[`project-type`]}));o(u,{successLabel:`Loaded`})})},La={command:`constants`,describe:`Operations for requests.constants`,builder:e=>e.command(Ia).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ra={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}`,query:[`page`,`pageSize`,`status`,`search`,`createdBy`,`assignee`,`requestType`,`priority`,`tlp`,`id`,`readableId`,`summary`,`accountId`,`metadata`,`orderBy`,`order`]};function za(e){return e.usage(`$0 cloudforce-one requests get-request-list <project-type>
|
|
191
191
|
|
|
192
|
-
Retrieves a paginated list of RFIs with filtering and sorting options.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`status`,{type:`string`,description:`Status filter. Projects with a narrowed dashboard vocabulary accept only their customer-facing values.`}).option(`search`,{type:`string`,description:`Search`}).option(`created-by`,{type:`string`,description:"Filter by creator email. NOTE: For the `legal-response` project type this query parameter is **rejected with HTTP 400** — the server derives the filter from the authenticated user's JWT automatically and does not accept a client-supplied value. Requests to `legal-response` with no valid JWT identity are rejected with HTTP 401."}).option(`assignee`,{type:`string`,description:`Assignee`}).option(`request-type`,{type:`string`,description:`RequestType`}).option(`priority`,{type:`string`,description:`Priority`}).option(`tlp`,{type:`string`,description:`Tlp`}).option(`id`,{type:`string`,description:`ID`}).option(`readable-id`,{type:`string`,description:`ReadableId`}).option(`summary`,{type:`string`,description:`Summary`}).option(`filter-account-id`,{type:`string`,description:`AccountId`}).option(`metadata`,{type:`string`,description:`JSON string object of metadata filters. Supports two formats: 1) Simple values for exact match (backward compatible): {"status": "open"} 2) Operator objects for advanced filtering: {"identifiers": {"operator": "contains_line", "value": "blah.com"}}. Available operators: 'eq' (exact match, default), 'contains' (substring match), 'contains_line' (match complete line in newline-separated text). Date fields are automatically normalized to YYYY-MM-DD format.`}).option(`order-by`,{type:`string`,description:`Sort field. SOC Communications support customer-safe latest_activity ordering.`}).option(`order`,{type:`string`,description:`Order`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
192
|
+
Retrieves a paginated list of RFIs with filtering and sorting options.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`status`,{type:`string`,description:`Status filter. Projects with a narrowed dashboard vocabulary accept only their customer-facing values.`}).option(`search`,{type:`string`,description:`Search`}).option(`created-by`,{type:`string`,description:"Filter by creator email. NOTE: For the `legal-response` project type this query parameter is **rejected with HTTP 400** — the server derives the filter from the authenticated user's JWT automatically and does not accept a client-supplied value. Requests to `legal-response` with no valid JWT identity are rejected with HTTP 401."}).option(`assignee`,{type:`string`,description:`Assignee`}).option(`request-type`,{type:`string`,description:`RequestType`}).option(`priority`,{type:`string`,description:`Priority`}).option(`tlp`,{type:`string`,description:`Tlp`}).option(`id`,{type:`string`,description:`ID`}).option(`readable-id`,{type:`string`,description:`ReadableId`}).option(`summary`,{type:`string`,description:`Summary`}).option(`filter-account-id`,{type:`string`,description:`AccountId`}).option(`metadata`,{type:`string`,description:`JSON string object of metadata filters. Supports two formats: 1) Simple values for exact match (backward compatible): {"status": "open"} 2) Operator objects for advanced filtering: {"identifiers": {"operator": "contains_line", "value": "blah.com"}}. Available operators: 'eq' (exact match, default), 'contains' (substring match), 'contains_line' (match complete line in newline-separated text). Date fields are automatically normalized to YYYY-MM-DD format.`}).option(`order-by`,{type:`string`,description:`Sort field. SOC Communications support customer-safe latest_activity ordering.`}).option(`order`,{type:`string`,description:`Order`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ba={command:`get-request-list <project-type>`,describe:`List RFIs`,builder:za,handler:async e=>l({command:`cloudforce-one requests get-request-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,pageSize:e[`page-size`],status:e.status,search:e.search,createdBy:e[`created-by`],assignee:e.assignee,requestType:e[`request-type`],priority:e.priority,tlp:e.tlp,id:e.id,readableId:e[`readable-id`],summary:e.summary,accountId:e[`filter-account-id`],metadata:e.metadata,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests get-request-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ra,{account_id:u,project_type:e[`project-type`],...n}));o(d,{successLabel:`Loaded`})})};var Va={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function Ha(e){return e.usage(`$0 cloudforce-one requests get-request-read <request-id>
|
|
193
193
|
|
|
194
|
-
Retrieves a specific RFI by its UUID with related data.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
194
|
+
Retrieves a specific RFI by its UUID with related data.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ua={command:`get-request-read <request-id>`,describe:`Get an RFI by ID`,builder:Ha,handler:async e=>l({command:`cloudforce-one requests get-request-read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests get-request-read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Va,{account_id:l,project_type:e[`project-type`],request_id:e[`request-id`]}));o(u,{successLabel:`Loaded`})})};var Wa={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/legal-response/access-check`,errors:{401:`UnauthorizedError`}};function Ga(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
|
|
195
195
|
|
|
196
|
-
Returns whether the JWT-authenticated user's email is on the legal-response allowlist. This endpoint is purely informational for UI gating; actual access enforcement is performed by \`legalResponseMiddleware\` on real legal-response endpoints. Read-only — no Durable Object writes are performed.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
196
|
+
Returns whether the JWT-authenticated user's email is on the legal-response allowlist. This endpoint is purely informational for UI gating; actual access enforcement is performed by \`legalResponseMiddleware\` on real legal-response endpoints. Read-only — no Durable Object writes are performed.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ka={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:Ga,handler:async e=>l({command:`cloudforce-one requests legal-response access-check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one requests legal-response access-check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/legal-response/access-check`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Wa,{account_id:l}));o(u,{successLabel:`Loaded`})})},qa={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(Ka).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ja(e){return e.usage(`$0 cloudforce-one requests messages create <request-id>
|
|
197
197
|
|
|
198
|
-
Creates a customer dashboard message on an RFI request. Messages are always published on send. Workflow-enabled projects require Idempotency-Key and atomically record message activity and any policy transition. For token-billed project types, substantive follow-on messages consume message tokens and are subject to quarterly quota enforcement.`).positional(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`author-id`,{type:`string`,description:`The author_id field`}).option(`author-name`,{type:`string`,description:`The author_name field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`,default:!1}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`],default:`red`}).coerce(`tlp`,e=>
|
|
198
|
+
Creates a customer dashboard message on an RFI request. Messages are always published on send. Workflow-enabled projects require Idempotency-Key and atomically record message activity and any policy transition. For token-billed project types, substantive follow-on messages consume message tokens and are subject to quarterly quota enforcement.`).positional(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`author-id`,{type:`string`,description:`The author_id field`}).option(`author-name`,{type:`string`,description:`The author_name field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`,default:!1}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`],default:`red`}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).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 Ya={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:Ja,handler:async e=>l({command:`cloudforce-one requests messages create`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf cloudforce-one requests messages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages/new`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({attachment_asset_ids:e[`attachment-asset-ids`],author_id:h(e[`author-id`],`author-id`,`text`),author_name:h(e[`author-name`],`author-name`,`text`),content:h(e.content,`content`,`text`),publish:e.publish,tlp:e.tlp}):f(e.body)});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/messages/new`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.content===void 0&&(e.content=await _(`content`,`The content field`));let g={};e[`attachment-asset-ids`]!==void 0&&u(g,[`attachment_asset_ids`],e[`attachment-asset-ids`]),e[`author-id`]!==void 0&&u(g,[`author_id`],h(e[`author-id`],`author-id`,`text`)),e[`author-name`]!==void 0&&u(g,[`author_name`],h(e[`author-name`],`author-name`,`text`)),e.content!==void 0&&u(g,[`content`],h(e.content,`content`,`text`)),e.publish!==void 0&&u(g,[`publish`],e.publish),e.tlp!==void 0&&u(g,[`tlp`],e.tlp);let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${p}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/messages/new`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var Xa={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}/messages/${t.message_id}`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function Za(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
|
|
199
199
|
|
|
200
|
-
Returns the details for a specific message belonging to an RFI request.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
200
|
+
Returns the details for a specific message belonging to an RFI request.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qa={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:Za,handler:async e=>l({command:`cloudforce-one requests messages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests messages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Xa,{account_id:l,project_type:e[`project-type`],request_id:e[`request-id`],message_id:e[`message-id`]}));o(u,{successLabel:`Loaded`})})};var $a={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}/messages`,query:[`page`,`per_page`],errors:{404:`NotFoundError`,500:`InternalServerError`}};function eo(e){return e.usage(`$0 cloudforce-one requests messages list
|
|
201
201
|
|
|
202
|
-
Retrieves the published, non-deleted messages visible to the agent for an RFI request, with pagination.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`page`,{type:`string`,description:`Page`}).option(`per-page`,{type:`string`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
202
|
+
Retrieves the published, non-deleted messages visible to the agent for an RFI request, with pagination.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`page`,{type:`string`,description:`Page`}).option(`per-page`,{type:`string`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const to={command:`list`,describe:`List messages for an RFI request`,builder:eo,handler:async e=>l({command:`cloudforce-one requests messages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send($a,{account_id:u,project_type:e[`project-type`],request_id:e[`request-id`],...n}));o(d,{successLabel:`Loaded`})})};function no(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
|
|
203
203
|
|
|
204
|
-
Updates an existing message, typically to publish a draft by setting publish=true. Workflow-enabled publication requires Idempotency-Key and atomically records message activity and any policy transition.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]}).coerce(`tlp`,e=>
|
|
204
|
+
Updates an existing message, typically to publish a draft by setting publish=true. Workflow-enabled publication requires Idempotency-Key and atomically records message activity and any policy transition.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-id`,{type:`string`,description:`Request ID`,demandOption:!0}).option(`idempotency-key`,{type:`string`,description:`Client command key. Required when publishing a message for a workflow-enabled project; trimmed and limited to 255 characters.`}).option(`attachment-asset-ids`,{type:`string`,array:!0,description:`The attachment_asset_ids field`}).option(`content`,{type:`string`,description:`The content field`}).option(`publish`,{type:`boolean`,description:`The publish field`}).option(`tlp`,{type:`string`,description:`The tlp field`,choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).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 ro={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:no,handler:async e=>l({command:`cloudforce-one requests messages update`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf cloudforce-one requests messages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``),"message-id":String(e[`message-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({attachment_asset_ids:e[`attachment-asset-ids`],content:h(e.content,`content`,`text`),publish:e.publish,tlp:e.tlp}):f(e.body)});return}let d=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/messages/${encodeURIComponent(String(e[`message-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.content===void 0&&(e.content=await _(`content`,`The content field`)),e.publish===void 0)throw Error(`--publish is required (or pass --body with this field set).`);e.tlp===void 0&&(e.tlp=await v(`tlp`,`The tlp field`,[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]));let g={};e[`attachment-asset-ids`]!==void 0&&u(g,[`attachment_asset_ids`],e[`attachment-asset-ids`]),e.content!==void 0&&u(g,[`content`],h(e.content,`content`,`text`)),e.publish!==void 0&&u(g,[`publish`],e.publish),e.tlp!==void 0&&u(g,[`tlp`],e.tlp);let y=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${p}/cloudforce-one/v2/requests/${encodeURIComponent(String(e[`project-type`]))}/${encodeURIComponent(String(e[`request-id`]))}/messages/${encodeURIComponent(String(e[`message-id`]))}`,{body:g,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},io={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(Ya).command(Qa).command(to).command(ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ao={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/metadata`,query:[`request_type`,`country`],errors:{401:`UnauthorizedError`}};function oo(e){return e.usage(`$0 cloudforce-one requests metadata list
|
|
205
205
|
|
|
206
|
-
Get custom metadata fields available for the specified project type`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-type`,{type:`string`,description:`Filter fields to those applicable to this request type. Fields without request type restrictions are always included.`}).option(`country`,{type:`string`,description:`Exclude fields restricted for this alpha-2 country code`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
206
|
+
Get custom metadata fields available for the specified project type`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`request-type`,{type:`string`,description:`Filter fields to those applicable to this request type. Fields without request type restrictions are always included.`}).option(`country`,{type:`string`,description:`Exclude fields restricted for this alpha-2 country code`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const so={command:`list`,describe:`List metadata fields for an RFI type`,builder:oo,handler:async e=>l({command:`cloudforce-one requests metadata list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={request_type:e[`request-type`],country:e.country};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/metadata`,pathParams:{"project-type":String(e[`project-type`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ao,{account_id:u,project_type:e[`project-type`],...n}));o(d,{successLabel:`Loaded`})})},co={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command(so).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var lo={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}`,body:`json`,errors:{400:`BadRequestError`,500:`InternalServerError`}};function uo(e){return e.usage(`$0 cloudforce-one requests post-request-create <project-type>
|
|
207
207
|
|
|
208
|
-
Creates a new Request for Information with the specified project type and details.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description (optional). Defaults to an empty string when omitted.`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use `low`, `routine`, `high`, `urgent`; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases. Defaults to `routine`.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>
|
|
208
|
+
Creates a new Request for Information with the specified project type and details.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description (optional). Defaults to an empty string when omitted.`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`metadata`,{type:`string`,description:`Optional metadata fields specific to the RFI type. Provide as a JSON object or @path/to/file.json.`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use `low`, `routine`, `high`, `urgent`; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases. Defaults to `routine`.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>h(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Optional request type for the request`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`title`,{type:`string`,description:`RFI title (optional). When omitted, the server generates a summary from the request type and readable ID.`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. Canonical values are `clear`, `green`, `amber`, `amber-strict`, `red`, `purple`. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).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 fo={command:`post-request-create <project-type>`,describe:`Creates a new RFI`,builder:uo,handler:async e=>l({command:`cloudforce-one requests post-request-create`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests post-request-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),eventId:h(e[`event-id`],`event-id`,`text`),metadata:p(e.metadata,`metadata`),priority:e.priority,request_type:h(e[`request-type`],`request-type`,`text`),subtypeId:h(e[`subtype-id`],`subtype-id`,`text`),title:h(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(lo,{body:t,account_id:l,project_type:e[`project-type`]}));o(r,{successLabel:`Created`});return}let u=m({description:h(e.description,`description`,`text`),eventId:h(e[`event-id`],`event-id`,`text`),metadata:p(e.metadata,`metadata`),priority:e.priority,request_type:h(e[`request-type`],`request-type`,`text`),subtypeId:h(e[`subtype-id`],`subtype-id`,`text`),title:h(e.title,`title`,`text`),tlp:e.tlp},[[`metadata`]]),d=await c(`Creating`,async()=>n.send(lo,{body:u,account_id:l,project_type:e[`project-type`]}));o(d,{successLabel:`Created`})})};var po={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/${t.request_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function mo(e){return e.usage(`$0 cloudforce-one requests put-request-update <request-id>
|
|
209
209
|
|
|
210
|
-
Updates an existing RFI with the provided fields. Only provided fields will be updated.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use a distinct `low` level; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>
|
|
210
|
+
Updates an existing RFI with the provided fields. Only provided fields will be updated.`).positional(`request-id`,{type:`string`,description:`RFI UUID`,demandOption:!0}).option(`project-type`,{type:`string`,description:`RFI project type. Valid values: threat-intelligence, incident-response, ir-emergency-response, table-top, pentest, irp, threat-hunting, cybersecurity-assessment, react-general, legal-response, soc-alerts, demo`,demandOption:!0}).option(`description`,{type:`string`,description:`RFI description`}).option(`event-id`,{type:`string`,description:`Optional related event ID`}).option(`priority`,{type:`string`,description:"RFI priority. Four-level projects use a distinct `low` level; existing projects retain legacy `low`->routine compatibility. `medium`, `critical`, and `unknown` remain accepted legacy aliases.",choices:[`low`,`routine`,`high`,`urgent`,`unknown`,`medium`,`critical`]}).coerce(`priority`,e=>h(e,`priority`,`text`)).option(`request-type`,{type:`string`,description:`Request type. May only be changed while the request is still open; changing it recalculates the request's token cost.`}).option(`subtype-id`,{type:`string`,description:`Optional subtype ID`}).option(`summary`,{type:`string`,description:`RFI summary`}).option(`title`,{type:`string`,description:`RFI title (alias for summary field)`}).option(`tlp`,{type:`string`,description:"Traffic Light Protocol level. `white` and `amber+strict` are accepted input aliases; responses always use the canonical spelling.",choices:[`clear`,`green`,`amber`,`amber-strict`,`red`,`purple`,`white`,`amber+strict`]}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).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 ho={command:`put-request-update <request-id>`,describe:`Update an RFI`,builder:mo,handler:async e=>l({command:`cloudforce-one requests put-request-update`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests put-request-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/${e[`request-id`]==null?`<request-id>`:encodeURIComponent(String(e[`request-id`]))}`,pathParams:{"project-type":String(e[`project-type`]??``),"request-id":String(e[`request-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),eventId:h(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:h(e[`request-type`],`request-type`,`text`),subtypeId:h(e[`subtype-id`],`subtype-id`,`text`),summary:h(e.summary,`summary`,`text`),title:h(e.title,`title`,`text`),tlp:e.tlp}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(po,{body:t,account_id:l,project_type:e[`project-type`],request_id:e[`request-id`]}));o(r,{successLabel:`Updated`});return}let u=m({description:h(e.description,`description`,`text`),eventId:h(e[`event-id`],`event-id`,`text`),priority:e.priority,request_type:h(e[`request-type`],`request-type`,`text`),subtypeId:h(e[`subtype-id`],`subtype-id`,`text`),summary:h(e.summary,`summary`,`text`),title:h(e.title,`title`,`text`),tlp:e.tlp}),d=await c(`Updating`,async()=>n.send(po,{body:u,account_id:l,project_type:e[`project-type`],request_id:e[`request-id`]}));o(d,{successLabel:`Updated`})})};var go={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/quota`,response:!1,errors:{404:`NotFoundError`,422:`UnprocessableEntityError`}};function _o(e){return e.usage(`$0 cloudforce-one requests quota get <project-type>
|
|
211
211
|
|
|
212
|
-
Returns the account's token quota for the current anniversary quarter: total granted, used, remaining, and the quarter/anniversary boundaries.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
212
|
+
Returns the account's token quota for the current anniversary quarter: total granted, used, remaining, and the quarter/anniversary boundaries.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vo={command:`get <project-type>`,describe:`Get request token quota`,builder:_o,handler:async e=>l({command:`cloudforce-one requests quota get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/quota`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(go,{account_id:l,project_type:e[`project-type`]}));o(u,{successLabel:`Loaded`})})},yo={command:`quota`,describe:`Operations for requests.quota`,builder:e=>e.command(vo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var bo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/types`};function xo(e){return e.usage(`$0 cloudforce-one requests types list
|
|
213
213
|
|
|
214
|
-
Returns request types available to dashboard (external) callers. For restricted project types (e.g. legal-response), only the allowlisted subset is returned.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
214
|
+
Returns request types available to dashboard (external) callers. For restricted project types (e.g. legal-response), only the allowlisted subset is returned.`).option(`project-type`,{type:`string`,description:`Project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const So={command:`list`,describe:`List visible request types for a project (dashboard)`,builder:xo,handler:async e=>l({command:`cloudforce-one requests types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/types`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(bo,{account_id:l,project_type:e[`project-type`]}));o(u,{successLabel:`Loaded`})})},Co={command:`types`,describe:`Operations for requests.types`,builder:e=>e.command(So).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/requests/${t.project_type}/user/me`,errors:{404:`NotFoundError`}};function To(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
|
|
215
215
|
|
|
216
|
-
Get the current user's profile in a specific RFI project.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
216
|
+
Get the current user's profile in a specific RFI project.`).positional(`project-type`,{type:`string`,description:`RFI project type`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Eo={command:`get <project-type>`,describe:`Get current user profile`,builder:To,handler:async e=>l({command:`cloudforce-one requests user get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one requests user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/requests/${e[`project-type`]==null?`<project-type>`:encodeURIComponent(String(e[`project-type`]))}/user/me`,pathParams:{"project-type":String(e[`project-type`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(wo,{account_id:l,project_type:e[`project-type`]}));o(u,{successLabel:`Loaded`})})},Do={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(Eo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oo={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(Ba).command(Ua).command(fo).command(ho).command(Na).command(La).command(qa).command(io).command(co).command(yo).command(Co).command(Do).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ko={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/approvals/${t.id}/cancel`,errors:{403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Ao(e){return e.usage(`$0 cloudforce-one rules approvals cancel <id>
|
|
217
217
|
|
|
218
|
-
Cancel a pending rule approval. Only its original requester may cancel it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
218
|
+
Cancel a pending rule approval. Only its original requester may cancel it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const jo={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:Ao,handler:async e=>l({command:`cloudforce-one rules approvals cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules approvals cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/cancel`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(ko,{account_id:l,id:e.id}));o(u,{successLabel:`Created`})})};var Mo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/approvals/${t.id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function No(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
|
|
219
219
|
|
|
220
|
-
Get a single rule approval with current rule data.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
220
|
+
Get a single rule approval with current rule data.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Po={command:`get <id>`,describe:`Get rule approval details`,builder:No,handler:async e=>l({command:`cloudforce-one rules approvals get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules approvals get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Mo,{account_id:l,id:e.id}));o(u,{successLabel:`Loaded`})})};var Fo={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/approvals`,query:[`status`,`latest_only`,`limit`,`offset`,`reviewer_scope`,`change_type`,`rule_id`],errors:{400:`BadRequestError`,403:`ForbiddenError`}};function Io(e){return e.usage(`$0 cloudforce-one rules approvals list
|
|
221
221
|
|
|
222
|
-
Returns rule approvals with optional status, revision, reviewer-scope, and mutation-type filtering.`).option(`status`,{type:`string`,description:`Selects approval statuses. Repeat the parameter to OR-match statuses (for example, status=pending&status=rejected). Use status=all alone to disable status filtering.`,choices:[`pending`,`approved`,`rejected`,`cancelled`,`all`]}).option(`latest-only`,{type:`string`,description:`When true, returns the newest revision in each approval chain.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`reviewer-scope`,{type:`string`,description:`Limits approvals to the specified reviewer scope.`,choices:[`default`,`email`,`unresolved`]}).option(`change-type`,{type:`string`,description:`Limits approvals to the specified mutation type.`,choices:[`create`,`update`,`delete`]}).option(`rule-id`,{type:`string`,description:`Filter approvals by rule ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
222
|
+
Returns rule approvals with optional status, revision, reviewer-scope, and mutation-type filtering.`).option(`status`,{type:`string`,description:`Selects approval statuses. Repeat the parameter to OR-match statuses (for example, status=pending&status=rejected). Use status=all alone to disable status filtering.`,choices:[`pending`,`approved`,`rejected`,`cancelled`,`all`]}).option(`latest-only`,{type:`string`,description:`When true, returns the newest revision in each approval chain.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`reviewer-scope`,{type:`string`,description:`Limits approvals to the specified reviewer scope.`,choices:[`default`,`email`,`unresolved`]}).option(`change-type`,{type:`string`,description:`Limits approvals to the specified mutation type.`,choices:[`create`,`update`,`delete`]}).option(`rule-id`,{type:`string`,description:`Filter approvals by rule ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lo={command:`list`,describe:`List rule approvals`,builder:Io,handler:async e=>l({command:`cloudforce-one rules approvals list`,classification:{safeFlags:[`status`,`latest-only`,`reviewer-scope`,`change-type`,`dry-run`]}},e,async()=>{let n={status:e.status,latest_only:e[`latest-only`],limit:e.limit,offset:e.offset,reviewer_scope:e[`reviewer-scope`],change_type:e[`change-type`],rule_id:e[`rule-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules approvals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Fo,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Ro={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/approvals/${t.id}/resubmit`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function zo(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
|
|
223
223
|
|
|
224
|
-
Create a new pending revision from a rejected rule approval. Only the original requester may resubmit the latest revision.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`The commit_message field`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces 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
|
|
224
|
+
Create a new pending revision from a rejected rule approval. Only the original requester may resubmit the latest revision.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`The commit_message field`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces 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 Bo={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:zo,handler:async e=>l({command:`cloudforce-one rules approvals resubmit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?m({commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,name:h(e.name,`name`,`text`),namespaces:e.namespaces}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ro,{body:t,account_id:l,id:e.id}));o(r,{successLabel:`Created`});return}let u=m({commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,name:h(e.name,`name`,`text`),namespaces:e.namespaces}),d=await c(`Creating`,async()=>n.send(Ro,{body:u,account_id:l,id:e.id}));o(d,{successLabel:`Created`})})},Vo={command:`approvals`,describe:`Approval workflow operations`,builder:e=>e.command(jo).command(Po).command(Lo).command(Bo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ho={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function Uo(e){return e.usage(`$0 cloudforce-one rules create
|
|
225
225
|
|
|
226
|
-
Create a new detection rule.`).option(`actions`,{type:`string`,description:`The actions field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`,default:!0}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`,default:!1}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`Optional WfP deployment tags (customer rules only). Internal rules leave empty.`}).option(`path`,{type:`string`,description:`The path 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
|
|
226
|
+
Create a new detection rule.`).option(`actions`,{type:`string`,description:`The actions field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`,default:!0}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`,default:!1}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`Optional WfP deployment tags (customer rules only). Internal rules leave empty.`}).option(`path`,{type:`string`,description:`The path 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 Wo={command:`create`,describe:`Create a rule`,builder:Uo,handler:async e=>l({command:`cloudforce-one rules create`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({actions:d(e.actions,`actions`),commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Ho,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.content===void 0&&(e.content=await _(`content`,`The content field`)),e.name===void 0&&(e.name=await _(`name`,`The name field`)),e.path===void 0&&(e.path=await _(`path`,`The path field`));let u=m({actions:d(e.actions,`actions`),commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}),p=await c(`Creating`,async()=>n.send(Ho,{body:u,account_id:l}));o(p,{successLabel:`Created`})})};var Go={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules`,errors:{401:`UnauthorizedError`,409:`ConflictError`}};function Ko(e){return e.usage(`$0 cloudforce-one rules delete-all
|
|
227
227
|
|
|
228
|
-
Delete all rules in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
229
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
228
|
+
Delete all rules in an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const qo={command:`delete-all`,describe:`Delete all rules`,builder:Ko,handler:async e=>l({command:`cloudforce-one rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
229
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Go,{account_id:l}));o(u,{successLabel:`Deleted`})})};var Jo={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/${t.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function Yo(e){return e.usage(`$0 cloudforce-one rules delete <id>
|
|
230
230
|
|
|
231
|
-
Delete an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for the deletion. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
232
|
-
`);return}if(e.body){let t=
|
|
231
|
+
Delete an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for the deletion. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xo={command:`delete <id>`,describe:`Delete a rule`,builder:Yo,handler:async e=>l({command:`cloudforce-one rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?m({commit_message:h(e[`commit-message`],`commit-message`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
232
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Jo,{body:t,account_id:l,id:e.id}));o(r,{successLabel:`Deleted`});return}let u=m({commit_message:h(e[`commit-message`],`commit-message`,`text`)}),d=await c(`Deleting`,async()=>n.send(Jo,{body:u,account_id:l,id:e.id}));o(d,{successLabel:`Deleted`})})};var Zo={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/approvals/${t.id}/resubmit`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Qo(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
|
|
233
233
|
|
|
234
|
-
Validates and compiles a complete structured email rule, then creates an immutable pending revision of its rejected approval.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>
|
|
234
|
+
Validates and compiles a complete structured email rule, then creates an immutable pending revision of its rejected approval.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>h(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>h(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>h(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $o={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:Qo,handler:async e=>l({command:`cloudforce-one rules email approvals resubmit`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/resubmit`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Creating`,async()=>l.send(Zo,{body:t,account_id:u,id:e.id,...n}));o(r,{successLabel:`Created`});return}e[`condition-operator`]===void 0&&(e[`condition-operator`]=await v(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await v(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await _(`name`,`The name field`));let p=m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await c(`Creating`,async()=>l.send(Zo,{body:p,account_id:u,id:e.id,...n}));o(g,{successLabel:`Created`})})},es={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command($o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ts={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`}};function ns(e){return e.usage(`$0 cloudforce-one rules email create
|
|
235
235
|
|
|
236
|
-
Create a structured email rule.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>
|
|
236
|
+
Create a structured email rule.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>h(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>h(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>h(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).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 rs={command:`create`,describe:`Create an email rule`,builder:ns,handler:async e=>l({command:`cloudforce-one rules email create`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ts,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`condition-operator`]===void 0&&(e[`condition-operator`]=await v(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await v(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}),p=await c(`Creating`,async()=>n.send(ts,{body:u,account_id:l}));o(p,{successLabel:`Created`})})};var is={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/${t.id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function as(e){return e.usage(`$0 cloudforce-one rules email delete <id>
|
|
237
237
|
|
|
238
|
-
Delete an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
239
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
238
|
+
Delete an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const os={command:`delete <id>`,describe:`Delete an email rule`,builder:as,handler:async e=>l({command:`cloudforce-one rules email delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
239
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(is,{account_id:l,id:e.id}));o(u,{successLabel:`Deleted`})})};var ss={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/${t.id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function cs(e){return e.usage(`$0 cloudforce-one rules email get <id>
|
|
240
240
|
|
|
241
|
-
Get a structured email rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
241
|
+
Get a structured email rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ls={command:`get <id>`,describe:`Get an email rule`,builder:cs,handler:async e=>l({command:`cloudforce-one rules email get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ss,{account_id:l,id:e.id}));o(u,{successLabel:`Loaded`})})};var us={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured`,query:[`limit`,`offset`,`search`],errors:{400:`BadRequestError`}};function ds(e){return e.usage(`$0 cloudforce-one rules email list
|
|
242
242
|
|
|
243
|
-
Returns structured email rules.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
243
|
+
Returns structured email rules.`).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`search`,{type:`string`,description:`Search`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fs={command:`list`,describe:`List email rules`,builder:ds,handler:async e=>l({command:`cloudforce-one rules email list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,offset:e.offset,search:e.search};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules email list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(us,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ps={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/schema`,errors:{400:`BadRequestError`}};function ms(e){return e.usage(`$0 cloudforce-one rules email schema get
|
|
244
244
|
|
|
245
|
-
Get the field catalog for structured email rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
245
|
+
Get the field catalog for structured email rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hs={command:`get`,describe:`Get email rule schema`,builder:ms,handler:async e=>l({command:`cloudforce-one rules email schema get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules email schema get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/schema`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(ps,{account_id:l}));o(u,{successLabel:`Loaded`})})},gs={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _s={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/${t.id}/test`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function vs(e){return e.usage(`$0 cloudforce-one rules email test <id>
|
|
246
246
|
|
|
247
|
-
Test a structured email rule against sample email JSON.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`sample-json`,{type:`string`,description:`The sample_json 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
|
|
247
|
+
Test a structured email rule against sample email JSON.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`sample-json`,{type:`string`,description:`The sample_json 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 ys={command:`test <id>`,describe:`Test an email rule`,builder:vs,handler:async e=>l({command:`cloudforce-one rules email test`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/test`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?m({sample_json:h(e[`sample-json`],`sample-json`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(_s,{body:t,account_id:l,id:e.id}));o(r,{successLabel:`Created`});return}e[`sample-json`]===void 0&&(e[`sample-json`]=await _(`sample-json`,`The sample_json field`));let u=m({sample_json:h(e[`sample-json`],`sample-json`,`text`)}),d=await c(`Creating`,async()=>n.send(_s,{body:u,account_id:l,id:e.id}));o(d,{successLabel:`Created`})})};var bs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/approvals/${t.id}`,query:[`module`],body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function xs(e){return e.usage(`$0 cloudforce-one rules email update-pending-approval <id>
|
|
248
248
|
|
|
249
|
-
Validate, compile, and replace the proposed structured email rule on a pending approval. Only the original requester may update it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>
|
|
249
|
+
Validate, compile, and replace the proposed structured email rule on a pending approval. Only the original requester may update it.`).positional(`id`,{type:`string`,description:`The unique identifier for the approval.`,demandOption:!0}).option(`module`,{type:`string`,description:`Structured rule module.`,choices:[`eml`]}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>h(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>h(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>h(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).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 Ss={command:`update-pending-approval <id>`,describe:`Update a pending structured email rule approval`,builder:xs,handler:async e=>l({command:`cloudforce-one rules email update-pending-approval`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{let n={module:e.module};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email update-pending-approval`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/approvals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},query:n,bodyKind:`json`,body:e.body===void 0?m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Updating`,async()=>l.send(bs,{body:t,account_id:u,id:e.id,...n}));o(r,{successLabel:`Updated`});return}e[`condition-operator`]===void 0&&(e[`condition-operator`]=await v(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await v(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await _(`name`,`The name field`));let p=m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await c(`Updating`,async()=>l.send(bs,{body:p,account_id:u,id:e.id,...n}));o(g,{successLabel:`Updated`})})};var Cs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/${t.id}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function ws(e){return e.usage(`$0 cloudforce-one rules email update <id>
|
|
250
250
|
|
|
251
|
-
Updates an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>
|
|
251
|
+
Updates an existing structured email rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>h(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>h(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`]}).coerce(`status`,e=>h(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`condition-operator`,`condition-type`].some(t=>e[t]!==void 0)){let t=[`condition-operator`,`condition-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --condition-* flag is set`)}return!0})}const Ts={command:`update <id>`,describe:`Update an email rule`,builder:ws,handler:async e=>l({command:`cloudforce-one rules email update`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Cs,{body:t,account_id:l,id:e.id}));o(r,{successLabel:`Updated`});return}let u=m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}),p=await c(`Updating`,async()=>n.send(Cs,{body:u,account_id:l,id:e.id}));o(p,{successLabel:`Updated`})})};var Es={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/structured/validate`,body:`json`,errors:{400:`BadRequestError`}};function Ds(e){return e.usage(`$0 cloudforce-one rules email validate
|
|
252
252
|
|
|
253
|
-
Validates structured email rule syntax and metadata.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>
|
|
253
|
+
Validates structured email rule syntax and metadata.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>h(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>h(e,`condition-type`,`text`)).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`existing-rule-id`,{type:`string`,description:`Existing rule ID to exclude from duplicate-name checks when validating an update.`}).option(`meta`,{type:`string`,description:`The meta field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`status`,{type:`string`,description:`Disposition for matching email. This emits status metadata with the selected value.`,choices:[`silent`,`blocking`],default:`silent`}).coerce(`status`,e=>h(e,`status`,`text`)).option(`strings`,{type:`string`,description:`The strings field. Provide as a JSON array of objects or @path/to/file.json.`}).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 Os={command:`validate`,describe:`Validate an email rule`,builder:Ds,handler:async e=>l({command:`cloudforce-one rules email validate`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules email validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/structured/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:h(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Es,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e[`condition-operator`]===void 0&&(e[`condition-operator`]=await v(`condition-operator`,`The condition.operator field`,[`and`,`or`])),e[`condition-type`]===void 0&&(e[`condition-type`]=await v(`condition-type`,`The condition.type field`,[`group`])),e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({condition:{operator:e[`condition-operator`],type:e[`condition-type`]},description:h(e.description,`description`,`text`),enabled:e.enabled,existing_rule_id:h(e[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),status:e.status,strings:d(e.strings,`strings`)}),p=await c(`Creating`,async()=>n.send(Es,{body:u,account_id:l}));o(p,{successLabel:`Created`})})},ks={command:`email`,describe:`Email rule operations`,builder:e=>e.command(rs).command(os).command(ls).command(fs).command(ys).command(Ts).command(Ss).command(Os).command(es).command(gs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var As={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function js(e){return e.usage(`$0 cloudforce-one rules exemptions create
|
|
254
254
|
|
|
255
|
-
Add regex patterns to per-account exemption rules (union semantics). Missing keys leave that type untouched; duplicates are silently deduped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
255
|
+
Add regex patterns to per-account exemption rules (union semantics). Missing keys leave that type untouched; duplicates are silently deduped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ms={command:`create`,describe:`Add patterns to exemption rules`,builder:js,handler:async e=>l({command:`cloudforce-one rules exemptions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules exemptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(As,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=m({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),d=await c(`Creating`,async()=>n.send(As,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Ns={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Ps(e){return e.usage(`$0 cloudforce-one rules exemptions delete
|
|
256
256
|
|
|
257
|
-
Remove regex patterns from per-account exemption rules. Missing keys leave that type untouched; non-existent patterns are silently skipped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
258
|
-
`);return}if(e.body){let t=
|
|
257
|
+
Remove regex patterns from per-account exemption rules. Missing keys leave that type untouched; non-existent patterns are silently skipped.`).option(`namespace`,{type:`string`,array:!0,description:`The namespace field`}).option(`tag-match`,{type:`string`,array:!0,description:`The tag_match field`}).option(`worker-name`,{type:`string`,array:!0,description:`The worker_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fs={command:`delete`,describe:`Remove patterns from exemption rules`,builder:Ps,handler:async e=>l({command:`cloudforce-one rules exemptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules exemptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
258
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Ns,{body:t,account_id:l}));o(r,{successLabel:`Deleted`});return}let u=m({namespace:e.namespace,tag_match:e[`tag-match`],worker_name:e[`worker-name`]}),d=await c(`Deleting`,async()=>n.send(Ns,{body:u,account_id:l}));o(d,{successLabel:`Deleted`})})};var Is={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/exemptions`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`}};function Ls(e){return e.usage(`$0 cloudforce-one rules exemptions get
|
|
259
259
|
|
|
260
|
-
Get all exemption rule patterns for the account, grouped by type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
260
|
+
Get all exemption rule patterns for the account, grouped by type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rs={command:`get`,describe:`Get exemption rules for an account`,builder:Ls,handler:async e=>l({command:`cloudforce-one rules exemptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules exemptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Is,{account_id:l}));o(u,{successLabel:`Loaded`})})};var zs={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/exemptions`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Bs(e){return e.usage(`$0 cloudforce-one rules exemptions update
|
|
261
261
|
|
|
262
|
-
Replace existing exemption patterns with new values. Each key maps to an array of {old_pattern, new_pattern} entries. Missing keys leave that type untouched. Fails if any old pattern is not found or any new pattern already exists.`).option(`namespace`,{type:`string`,description:`The namespace field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tag-match`,{type:`string`,description:`The tag_match field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`worker-name`,{type:`string`,description:`The worker_name field. Provide as a JSON array of objects or @path/to/file.json.`}).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
|
|
262
|
+
Replace existing exemption patterns with new values. Each key maps to an array of {old_pattern, new_pattern} entries. Missing keys leave that type untouched. Fails if any old pattern is not found or any new pattern already exists.`).option(`namespace`,{type:`string`,description:`The namespace field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`tag-match`,{type:`string`,description:`The tag_match field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`worker-name`,{type:`string`,description:`The worker_name field. Provide as a JSON array of objects or @path/to/file.json.`}).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 Vs={command:`update`,describe:`Update exemption rule patterns`,builder:Bs,handler:async e=>l({command:`cloudforce-one rules exemptions update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules exemptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({namespace:d(e.namespace,`namespace`),tag_match:d(e[`tag-match`],`tag-match`),worker_name:d(e[`worker-name`],`worker-name`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(zs,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=m({namespace:d(e.namespace,`namespace`),tag_match:d(e[`tag-match`],`tag-match`),worker_name:d(e[`worker-name`],`worker-name`)}),p=await c(`Updating`,async()=>n.send(zs,{body:u,account_id:l}));o(p,{successLabel:`Updated`})})},Hs={command:`exemptions`,describe:`Exemption rule operations`,builder:e=>e.command(Ms).command(Fs).command(Rs).command(Vs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Us={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/${t.id}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ws(e){return e.usage(`$0 cloudforce-one rules get <id>
|
|
263
263
|
|
|
264
|
-
Get a single rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
264
|
+
Get a single rule by ID.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gs={command:`get <id>`,describe:`Get a rule`,builder:Ws,handler:async e=>l({command:`cloudforce-one rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Us,{account_id:l,id:e.id}));o(u,{successLabel:`Loaded`})})};var Ks={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`],errors:{401:`UnauthorizedError`}};function qs(e){return e.usage(`$0 cloudforce-one rules list
|
|
265
265
|
|
|
266
|
-
Returns all rules for an account with optional filtering.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
266
|
+
Returns all rules for an account with optional filtering.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Js={command:`list`,describe:`List rules`,builder:qs,handler:async e=>l({command:`cloudforce-one rules list`,classification:{safeFlags:[`recursive`,`is-public`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ks,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Ys={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/managed`,errors:{401:`UnauthorizedError`}};function Xs(e){return e.usage(`$0 cloudforce-one rules managed get
|
|
267
267
|
|
|
268
|
-
Get DFP managed rule metadata (name and description) from YARA rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
268
|
+
Get DFP managed rule metadata (name and description) from YARA rules.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Zs={command:`get`,describe:`Get managed rules`,builder:Xs,handler:async e=>l({command:`cloudforce-one rules managed get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules managed get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/managed`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ys,{account_id:l}));o(u,{successLabel:`Loaded`})})},Qs={command:`managed`,describe:`Managed rule operations`,builder:e=>e.command(Zs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $s={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/search`,query:[`namespace`,`path`,`recursive`,`search`,`is_public`,`limit`,`offset`,`query`,`mode`,`language`],errors:{401:`UnauthorizedError`,503:`ServiceUnavailableError`}};function ec(e){return e.usage(`$0 cloudforce-one rules search
|
|
269
269
|
|
|
270
|
-
Search rules using hybrid, vector, keyword, or exact retrieval, backed by AI Search with a SQL fallback.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`query`,{type:`string`,description:`Natural-language or keyword search query.`,demandOption:!0}).option(`search-mode`,{type:`string`,description:`Retrieval strategy used for the query.`,choices:[`exact`,`hybrid`,`vector`,`keyword`]}).option(`language`,{type:`string`,description:`Limits results to the specified rule language.`,choices:[`yara`,`js`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
270
|
+
Search rules using hybrid, vector, keyword, or exact retrieval, backed by AI Search with a SQL fallback.`).option(`namespace`,{type:`string`,description:`Selects namespaces. Repeat the parameter to select multiple namespaces (for example, namespace=foo&namespace=bar).`}).option(`path`,{type:`string`,description:"Selects paths with exact-match semantics. Omit the parameter to return rules from all paths. Pass an empty string (path=) to return only rules with an empty or uncategorized path. Pass a value (for example, path=yara) to match that exact path. Repeat the parameter (for example, path=yara&path=expr) to OR-match multiple paths with SQL `IN (...)` semantics. The `recursive` flag affects only customer-account namespace selection."}).option(`recursive`,{type:`string`,description:`For customer accounts, true enables descendant matching for namespaces. Paths always use exact matching.`,choices:[`true`,`false`]}).option(`search`,{type:`string`,description:`Search`}).option(`is-public`,{type:`string`,description:`Limits rules to the specified public visibility.`,choices:[`true`,`false`]}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`query`,{type:`string`,description:`Natural-language or keyword search query.`,demandOption:!0}).option(`search-mode`,{type:`string`,description:`Retrieval strategy used for the query.`,choices:[`exact`,`hybrid`,`vector`,`keyword`]}).option(`language`,{type:`string`,description:`Limits results to the specified rule language.`,choices:[`yara`,`js`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tc={command:`search`,describe:`Search rules`,builder:ec,handler:async e=>l({command:`cloudforce-one rules search`,classification:{safeFlags:[`recursive`,`is-public`,`search-mode`,`language`,`dry-run`]}},e,async()=>{let n={namespace:e.namespace,path:e.path,recursive:e.recursive,search:e.search,is_public:e[`is-public`],limit:e.limit,offset:e.offset,query:e.query,mode:e[`search-mode`],language:e.language};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/search`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send($s,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var nc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/stats`,errors:{401:`UnauthorizedError`}};function rc(e){return e.usage(`$0 cloudforce-one rules stats get
|
|
271
271
|
|
|
272
|
-
Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
272
|
+
Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ic={command:`get`,describe:`Get dashboard stats`,builder:rc,handler:async e=>l({command:`cloudforce-one rules stats get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules stats get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/stats`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(nc,{account_id:l}));o(u,{successLabel:`Loaded`})})},ac={command:`stats`,describe:`Rule statistics operations`,builder:e=>e.command(ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var oc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/tree`,errors:{401:`UnauthorizedError`}};function sc(e){return e.usage(`$0 cloudforce-one rules tree get
|
|
273
273
|
|
|
274
|
-
Get the folder tree structure for rules navigation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
274
|
+
Get the folder tree structure for rules navigation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const cc={command:`get`,describe:`Get folder tree structure`,builder:sc,handler:async e=>l({command:`cloudforce-one rules tree get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one rules tree get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/tree`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oc,{account_id:l}));o(u,{successLabel:`Loaded`})})},lc={command:`tree`,describe:`Rule navigation tree operations`,builder:e=>e.command(cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var uc={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/${t.id}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function dc(e){return e.usage(`$0 cloudforce-one rules update <id>
|
|
275
275
|
|
|
276
|
-
Updates an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`Path change goes through approval workflow.`}).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
|
|
276
|
+
Updates an existing rule.`).positional(`id`,{type:`string`,description:`The unique identifier for the rule.`,demandOption:!0}).option(`commit-message`,{type:`string`,description:`Human-readable justification for this change. Required for internal-account submissions; optional for customer accounts and automated sync.`}).option(`content`,{type:`string`,description:`The content field`}).option(`description`,{type:`string`,description:`Human-readable description of the rule. Auto-extracted from YARA meta if present.`}).option(`enabled`,{type:`boolean`,description:`Whether this rule is active for dice consumers.`}).option(`is-public`,{type:`boolean`,description:`Whether this rule is visible to other internal accounts.`}).option(`meta`,{type:`string`,description:`Adds YARA meta entries to the rule's meta block and stores them in rule_meta alongside content metadata. Use valid YARA identifiers for keys; exclude 'name', 'enabled', and 'description'. You may repeat keys. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`Path change goes through approval workflow.`}).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 fc={command:`update <id>`,describe:`Update a rule`,builder:dc,handler:async e=>l({command:`cloudforce-one rules update`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?m({commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(uc,{body:t,account_id:l,id:e.id}));o(r,{successLabel:`Updated`});return}let u=m({commit_message:h(e[`commit-message`],`commit-message`,`text`),content:h(e.content,`content`,`text`),description:h(e.description,`description`,`text`),enabled:e.enabled,is_public:e[`is-public`],meta:d(e.meta,`meta`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}),p=await c(`Updating`,async()=>n.send(uc,{body:u,account_id:l,id:e.id}));o(p,{successLabel:`Updated`})})};var pc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/rules/validate`,body:`json`,errors:{401:`UnauthorizedError`}};function mc(e){return e.usage(`$0 cloudforce-one rules validate
|
|
277
277
|
|
|
278
|
-
Validates rule syntax, name uniqueness, namespace, and metadata.`).option(`content`,{type:`string`,description:`The content field`}).option(`exclude-rule-id`,{type:`string`,description:`The excludeRuleId field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`The path 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
|
|
278
|
+
Validates rule syntax, name uniqueness, namespace, and metadata.`).option(`content`,{type:`string`,description:`The content field`}).option(`exclude-rule-id`,{type:`string`,description:`The excludeRuleId field`}).option(`name`,{type:`string`,description:`The name field`}).option(`namespaces`,{type:`string`,array:!0,description:`The namespaces field`}).option(`path`,{type:`string`,description:`The path 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 hc={command:`validate`,describe:`Validate rule with context`,builder:mc,handler:async e=>l({command:`cloudforce-one rules validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one rules validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/rules/validate`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({content:h(e.content,`content`,`text`),excludeRuleId:h(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(pc,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.content===void 0&&(e.content=await _(`content`,`The content field`)),e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({content:h(e.content,`content`,`text`),excludeRuleId:h(e[`exclude-rule-id`],`exclude-rule-id`,`text`),name:h(e.name,`name`,`text`),namespaces:e.namespaces,path:h(e.path,`path`,`text`)}),d=await c(`Creating`,async()=>n.send(pc,{body:u,account_id:l}));o(d,{successLabel:`Created`})})},gc={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(Wo).command(Xo).command(qo).command(Gs).command(Js).command(tc).command(fc).command(hc).command(Vo).command(ks).command(Hs).command(Qs).command(ac).command(lc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _c={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/scans/config`,body:`json`};function vc(e){return e.usage(`$0 cloudforce-one scans config create
|
|
279
279
|
|
|
280
|
-
Creates a new scan configuration for Cloudforce One's network scanning service.`).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).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
|
|
280
|
+
Creates a new scan configuration for Cloudforce One's network scanning service.`).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).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 yc={command:`create`,describe:`Create a new Scan Config`,builder:vc,handler:async e=>l({command:`cloudforce-one scans config create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one scans config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({frequency:e.frequency,ips:e.ips,ports:e.ports}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(_c,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.ips===void 0)throw Error(`--ips is required (or pass --body with this field set).`);let u=m({frequency:e.frequency,ips:e.ips,ports:e.ports}),d=await c(`Creating`,async()=>n.send(_c,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var bc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/scans/config/${t.config_id}`};function xc(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
|
|
281
281
|
|
|
282
|
-
Deletes a scan configuration from Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
283
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
282
|
+
Deletes a scan configuration from Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Sc={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:xc,handler:async e=>l({command:`cloudforce-one scans config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one scans config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
283
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(bc,{account_id:l,config_id:e[`config-id`]}));o(u,{successLabel:`Deleted`})})};var Cc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/scans/config/${t.config_id}`,body:`json`};function wc(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
|
|
284
284
|
|
|
285
|
-
Updates an existing scan configuration in Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).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
|
|
285
|
+
Updates an existing scan configuration in Cloudforce One's network scanning service.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`frequency`,{type:`number`,description:`Defines the number of days between each scan (0 = One-off scan).`}).option(`ips`,{type:`string`,array:!0,description:`Defines a list of IP addresses or CIDR blocks to scan. The maximum number of total IP addresses allowed is 5000.`}).option(`ports`,{type:`string`,array:!0,description:`Defines a list of ports to scan. Valid values are:"default", "all", or a comma-separated list of ports or range of ports (e.g. ["1-80", "443"]). "default" scans the 100 most commonly open ports.`}).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 Tc={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:wc,handler:async e=>l({command:`cloudforce-one scans config edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one scans config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/config/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({frequency:e.frequency,ips:e.ips,ports:e.ports}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Cc,{body:t,account_id:l,config_id:e[`config-id`]}));o(r,{successLabel:`Updated`});return}let u=m({frequency:e.frequency,ips:e.ips,ports:e.ports}),d=await c(`Updating`,async()=>n.send(Cc,{body:u,account_id:l,config_id:e[`config-id`]}));o(d,{successLabel:`Updated`})})};var Ec={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/scans/config`};function Dc(e){return e.usage(`$0 cloudforce-one scans config list
|
|
286
286
|
|
|
287
|
-
Lists scan configurations for Cloudforce One's network scanning service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
287
|
+
Lists scan configurations for Cloudforce One's network scanning service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oc={command:`list`,describe:`List Scan Configs`,builder:Dc,handler:async e=>l({command:`cloudforce-one scans config list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one scans config list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ec,{account_id:l}));o(u,{successLabel:`Loaded`})})},kc={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(yc).command(Sc).command(Tc).command(Oc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ac={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/banner/${t.config_id}`};function jc(e){return e.usage(`$0 cloudforce-one scans results get-banners <config-id>
|
|
288
288
|
|
|
289
|
-
Retrieves the latest banner grab results for a Cloudforce One scan configuration, including service banners from open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
289
|
+
Retrieves the latest banner grab results for a Cloudforce One scan configuration, including service banners from open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mc={command:`get-banners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:jc,handler:async e=>l({command:`cloudforce-one scans results get-banners`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one scans results get-banners`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/banner/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ac,{account_id:l,config_id:e[`config-id`]}));o(u,{successLabel:`Loaded`})})};var Nc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/scans/results/${t.config_id}`};function Pc(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
|
|
290
290
|
|
|
291
|
-
Retrieves the latest scan results for a Cloudforce One scan configuration, including discovered open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
291
|
+
Retrieves the latest scan results for a Cloudforce One scan configuration, including discovered open ports.`).positional(`config-id`,{type:`string`,description:`Defines the Config ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fc={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:Pc,handler:async e=>l({command:`cloudforce-one scans results get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one scans results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/scans/results/${e[`config-id`]==null?`<config-id>`:encodeURIComponent(String(e[`config-id`]))}`,pathParams:{"config-id":String(e[`config-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Nc,{account_id:l,config_id:e[`config-id`]}));o(u,{successLabel:`Loaded`})})},Ic={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(Fc).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lc={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(kc).command(Ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Rc={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/attackers`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function zc(e){return e.usage(`$0 cloudforce-one threat-events attackers list
|
|
292
292
|
|
|
293
|
-
Lists known threat attackers tracked in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query attackers from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
293
|
+
Lists known threat attackers tracked in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query attackers from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bc={command:`list`,describe:`Lists attackers across multiple datasets`,builder:zc,handler:async e=>l({command:`cloudforce-one threat-events attackers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events attackers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/attackers`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Rc,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Vc={command:`attackers`,describe:`Operations for threat-events.attackers`,builder:e=>e.command(Bc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/create/bulk`,body:`json`,errors:{400:`BadRequestError`}};function Uc(e){return e.usage("$0 cloudforce-one threat-events bulk-create\n\nThe `datasetId` parameter must be defined. To list existing datasets (and their IDs) in your account, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.").option(`data`,{type:`string`,description:`The data field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dataset-id`,{type:`string`,description:`The datasetId field`}).option(`include-created-events`,{type:`boolean`,description:`When true, response includes array of created event UUIDs and shard IDs. Useful for tracking which events were created and where.`}).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 Wc={command:`bulk-create`,describe:`Creates bulk events`,builder:Uc,handler:async e=>l({command:`cloudforce-one threat-events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/create/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({data:d(e.data,`data`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Hc,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.data===void 0)throw Error(`--data is required (or pass --body with this field set).`);e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`The datasetId field`));let u=m({data:d(e.data,`data`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:e[`include-created-events`]}),p=await c(`Creating`,async()=>n.send(Hc,{body:u,account_id:l}));o(p,{successLabel:`Created`})})};var Gc={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/categories/create`,body:`json`,errors:{400:`BadRequestError`}};function Kc(e){return e.usage(`$0 cloudforce-one threat-events categories create
|
|
294
294
|
|
|
295
|
-
Creates a new threat event category in Cloudforce One for organizing and classifying threat events.`).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname 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
|
|
295
|
+
Creates a new threat event category in Cloudforce One for organizing and classifying threat events.`).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname 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 qc={command:`create`,describe:`Creates a new category`,builder:Kc,handler:async e=>l({command:`cloudforce-one threat-events categories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/categories/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Gc,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`kill-chain`]===void 0)throw Error(`--kill-chain is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await _(`name`,`The name field`));let u=m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}),d=await c(`Creating`,async()=>n.send(Gc,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Jc={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,errors:{400:`BadRequestError`}};function Yc(e){return e.usage(`$0 cloudforce-one threat-events categories delete <category-id>
|
|
296
296
|
|
|
297
|
-
Removes a threat event category from Cloudforce One.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
298
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
297
|
+
Removes a threat event category from Cloudforce One.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xc={command:`delete <category-id>`,describe:`Deletes a category`,builder:Yc,handler:async e=>l({command:`cloudforce-one threat-events categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
298
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Jc,{account_id:l,category_id:e[`category-id`]}));o(u,{successLabel:`Deleted`})})};var Zc={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,body:`json`,errors:{400:`BadRequestError`}};function Qc(e){return e.usage(`$0 cloudforce-one threat-events categories edit <category-id>
|
|
299
299
|
|
|
300
|
-
Partially updates a threat event category in Cloudforce One, modifying specific fields without replacing the entire category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname 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
|
|
300
|
+
Partially updates a threat event category in Cloudforce One, modifying specific fields without replacing the entire category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`kill-chain`,{type:`number`,description:`The killChain field`}).option(`mitre-attack`,{type:`string`,array:!0,description:`The mitreAttack field`}).option(`mitre-capec`,{type:`string`,array:!0,description:`The mitreCapec field`}).option(`name`,{type:`string`,description:`The name field`}).option(`shortname`,{type:`string`,description:`The shortname field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $c={command:`edit <category-id>`,describe:`Updates a category`,builder:Qc,handler:async e=>l({command:`cloudforce-one threat-events categories edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events categories edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Zc,{body:t,account_id:l,category_id:e[`category-id`]}));o(r,{successLabel:`Updated`});return}let u=m({killChain:e[`kill-chain`],mitreAttack:e[`mitre-attack`],mitreCapec:e[`mitre-capec`],name:h(e.name,`name`,`text`),shortname:h(e.shortname,`shortname`,`text`)}),d=await c(`Updating`,async()=>n.send(Zc,{body:u,account_id:l,category_id:e[`category-id`]}));o(d,{successLabel:`Updated`})})};var el={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event-categories/by-id/${t.category_id}`,errors:{400:`BadRequestError`}};function tl(e){return e.usage(`$0 cloudforce-one threat-events categories get <category-id>
|
|
301
301
|
|
|
302
|
-
Retrieves details for a specific threat event category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
302
|
+
Retrieves details for a specific threat event category.`).positional(`category-id`,{type:`string`,description:`Category UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nl={command:`get <category-id>`,describe:`Reads a category`,builder:tl,handler:async e=>l({command:`cloudforce-one threat-events categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${e[`category-id`]==null?`<category-id>`:encodeURIComponent(String(e[`category-id`]))}`,pathParams:{"category-id":String(e[`category-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(el,{account_id:l,category_id:e[`category-id`]}));o(u,{successLabel:`Loaded`})})};var rl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/categories`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function il(e){return e.usage(`$0 cloudforce-one threat-events categories list
|
|
303
303
|
|
|
304
|
-
Lists all threat event categories configured for classifying and organizing threat events.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query categories from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
304
|
+
Lists all threat event categories configured for classifying and organizing threat events.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query categories from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const al={command:`list`,describe:`Lists categories across multiple datasets`,builder:il,handler:async e=>l({command:`cloudforce-one threat-events categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(rl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},ol={command:`categories`,describe:`Operations for threat-events.categories`,builder:e=>e.command(qc).command(Xc).command($c).command(nl).command(al).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var sl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/countries`,errors:{400:`BadRequestError`}};function cl(e){return e.usage(`$0 cloudforce-one threat-events countries list
|
|
305
305
|
|
|
306
|
-
Lists countries referenced in Cloudforce One threat intelligence data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
306
|
+
Lists countries referenced in Cloudforce One threat intelligence data.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ll={command:`list`,describe:`Retrieves countries information for all countries`,builder:cl,handler:async e=>l({command:`cloudforce-one threat-events countries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events countries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/countries`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(sl,{account_id:l}));o(u,{successLabel:`Loaded`})})},ul={command:`countries`,describe:`Operations for threat-events.countries`,builder:e=>e.command(ll).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var dl={method:`POST`,path:t=>e`/accounts/${t.account_id_path}/cloudforce-one/events/create`,body:`json`,errors:{400:`BadRequestError`}};function fl(e){return e.usage("$0 cloudforce-one threat-events create <account-id-path>\n\nTo create a dataset, see the [`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/) endpoint. When `datasetId` parameter is unspecified, it will be created in a default dataset named `Cloudforce One Threat Events`.").positional(`account-id-path`,{type:`string`,description:`Account ID.`,demandOption:!0}).option(`account-id-body`,{type:`number`,description:`The accountId field`}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`dataset-id`,{type:`string`,description:`The datasetId field`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`indicators`,{type:`string`,description:`Array of indicators for this event. Supports multiple indicators per event for complex scenarios. Provide as a JSON array of objects or @path/to/file.json.`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-data`,{type:`string`,description:`The raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`source-resource-id`,{type:`string`,description:`The source.resourceId field`}).option(`source-resource-type`,{type:`string`,description:`The source.resourceType field`,choices:[`article`]}).coerce(`source-resource-type`,e=>h(e,`source-resource-type`,`text`)).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).coerce(`source-system`,e=>h(e,`source-system`,`text`)).option(`source-title`,{type:`string`,description:`Threat Signals article title; null for historical provenance without a stored title.`}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp 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)`}).check(e=>{if([`source-resource-id`,`source-resource-type`,`source-system`,`source-title`].some(t=>e[t]!==void 0)){let t=[`source-resource-id`,`source-resource-type`,`source-system`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --source-* flag is set`)}return!0})}const pl={command:`create <account-id-path>`,describe:`Creates a new event`,builder:fl,handler:async e=>l({command:`cloudforce-one threat-events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf cloudforce-one threat-events create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/cloudforce-one/events/create`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?m({accountId:e[`account-id-body`],attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`,!0),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:h(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:h(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):f(e.body,[{path:[`raw`,`data`],flag:`raw-data`}])});return}let t=await r(e);if(e.body){let n=f(e.body,[{path:[`raw`,`data`],flag:`raw-data`}]),r=await c(`Creating`,async()=>t.send(dl,{body:n,account_id_path:e[`account-id-path`]}));o(r,{successLabel:`Created`});return}if(e.category===void 0&&(e.category=await _(`category`,`The category field`)),e.date===void 0&&(e.date=await _(`date`,`The date field`)),e.event===void 0&&(e.event=await _(`event`,`The event field`)),e[`raw-data`]===void 0)throw Error(`--raw-data is required (or pass --body with this field set).`);e.tlp===void 0&&(e.tlp=await _(`tlp`,`The tlp field`));let n=m({accountId:e[`account-id-body`],attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`,!0),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:h(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:h(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),i=await c(`Creating`,async()=>t.send(dl,{body:n,account_id_path:e[`account-id-path`]}));o(i,{successLabel:`Created`})})};var ml={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/create`,body:`json`,errors:{400:`BadRequestError`}};function hl(e){return e.usage(`$0 cloudforce-one threat-events datasets create
|
|
307
307
|
|
|
308
|
-
Creates a new threat event dataset in Cloudforce One for organizing related threat events.`).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).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
|
|
308
|
+
Creates a new threat event dataset in Cloudforce One for organizing related threat events.`).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).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 gl={command:`create`,describe:`Creates a dataset`,builder:hl,handler:async e=>l({command:`cloudforce-one threat-events datasets create`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ml,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await _(`name`,`Used to describe the dataset within the account context.`));let u=m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}),d=await c(`Creating`,async()=>n.send(ml,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var _l={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`}};function vl(e){return e.usage(`$0 cloudforce-one threat-events datasets edit <dataset-id>
|
|
309
309
|
|
|
310
|
-
Partially updates a threat event dataset in Cloudforce One, modifying specific fields without replacing the entire dataset configuration.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).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
|
|
310
|
+
Partially updates a threat event dataset in Cloudforce One, modifying specific fields without replacing the entire dataset configuration.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`is-public`,{type:`boolean`,description:`If true, then anyone can search the dataset. If false, then its limited to the account.`}).option(`name`,{type:`string`,description:`Used to describe the dataset within the account context.`}).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 yl={command:`edit <dataset-id>`,describe:`Updates an existing dataset`,builder:vl,handler:async e=>l({command:`cloudforce-one threat-events datasets edit`,classification:{safeFlags:[`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events datasets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(_l,{body:t,account_id:l,dataset_id:e[`dataset-id`]}));o(r,{successLabel:`Updated`});return}if(e[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await _(`name`,`Used to describe the dataset within the account context.`));let u=m({isPublic:e[`is-public`],name:h(e.name,`name`,`text`)}),d=await c(`Updating`,async()=>n.send(_l,{body:u,account_id:l,dataset_id:e[`dataset-id`]}));o(d,{successLabel:`Updated`})})};var bl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset/${t.dataset_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function xl(e){return e.usage(`$0 cloudforce-one threat-events datasets get <dataset-id>
|
|
311
311
|
|
|
312
|
-
Retrieves details for a specific threat event dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
312
|
+
Retrieves details for a specific threat event dataset.`).positional(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Sl={command:`get <dataset-id>`,describe:`Reads a dataset`,builder:xl,handler:async e=>l({command:`cloudforce-one threat-events datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/dataset/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(bl,{account_id:l,dataset_id:e[`dataset-id`]}));o(u,{successLabel:`Loaded`})})};var Cl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/dataset`,query:[`includeDeleted`],errors:{400:`BadRequestError`}};function wl(e){return e.usage(`$0 cloudforce-one threat-events datasets list
|
|
313
313
|
|
|
314
|
-
Lists all threat event datasets configured in Cloudforce One.`).option(`include-deleted`,{type:`boolean`,description:"When true, include soft-deleted datasets in the response. Each item includes a `deletedAt` field (ISO 8601 or null). Default: false."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
314
|
+
Lists all threat event datasets configured in Cloudforce One.`).option(`include-deleted`,{type:`boolean`,description:"When true, include soft-deleted datasets in the response. Each item includes a `deletedAt` field (ISO 8601 or null). Default: false."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tl={command:`list`,describe:`Lists all datasets in an account`,builder:wl,handler:async e=>l({command:`cloudforce-one threat-events datasets list`,classification:{safeFlags:[`include-deleted`,`dry-run`]}},e,async()=>{let n={includeDeleted:e[`include-deleted`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Cl,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var El={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/datasets/${t.dataset_id}/events/${t.event_id}/raw`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function Dl(e){return e.usage(`$0 cloudforce-one threat-events datasets raw <event-id>
|
|
315
315
|
|
|
316
|
-
Retrieves the raw data associated with an event. Searches across all shards in the dataset.`).positional(`event-id`,{type:`string`,description:`Event ID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
316
|
+
Retrieves the raw data associated with an event. Searches across all shards in the dataset.`).positional(`event-id`,{type:`string`,description:`Event ID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ol={command:`raw <event-id>`,describe:`Reads raw data for an event by UUID`,builder:Dl,handler:async e=>l({command:`cloudforce-one threat-events datasets raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events datasets raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(El,{account_id:l,dataset_id:e[`dataset-id`],event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})},kl={command:`datasets`,describe:`Operations for threat-events.datasets`,builder:e=>e.command(gl).command(yl).command(Sl).command(Tl).command(Ol).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Al={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function jl(e){return e.usage(`$0 cloudforce-one threat-events edit <event-id>
|
|
317
317
|
|
|
318
|
-
Partially updates a threat event in Cloudforce One, modifying specific fields without replacing the entire event.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp 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
|
|
318
|
+
Partially updates a threat event in Cloudforce One, modifying specific fields without replacing the entire event.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`attacker`,{type:`string`,description:`The attacker field`}).option(`attacker-country`,{type:`string`,description:`The attackerCountry field`}).option(`category`,{type:`string`,description:`The category field`}).option(`created-at`,{type:`string`,description:`The createdAt field`}).option(`dataset-id`,{type:`string`,description:`Dataset ID containing the event to update.`}).option(`date`,{type:`string`,description:`The date field`}).option(`event`,{type:`string`,description:`The event field`}).option(`indicator`,{type:`string`,description:`The indicator field`}).option(`indicator-type`,{type:`string`,description:`The indicatorType field`}).option(`insight`,{type:`string`,description:`The insight field`}).option(`raw-data`,{type:`string`,description:`The raw.data field. Provide as a JSON object or @path/to/file.json.`}).option(`raw-source`,{type:`string`,description:`The raw.source field`}).option(`raw-tlp`,{type:`string`,description:`The raw.tlp field`}).option(`target-country`,{type:`string`,description:`The targetCountry field`}).option(`target-industry`,{type:`string`,description:`The targetIndustry field`}).option(`tlp`,{type:`string`,description:`The tlp 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 Ml={command:`edit <event-id>`,describe:`Updates an event`,builder:jl,handler:async e=>l({command:`cloudforce-one threat-events edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),createdAt:h(e[`created-at`],`created-at`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Al,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Updated`});return}e[`dataset-id`]===void 0&&(e[`dataset-id`]=await _(`dataset-id`,`Dataset ID containing the event to update.`));let u=m({attacker:h(e.attacker,`attacker`,`text`),attackerCountry:h(e[`attacker-country`],`attacker-country`,`text`),category:h(e.category,`category`,`text`),createdAt:h(e[`created-at`],`created-at`,`text`),datasetId:h(e[`dataset-id`],`dataset-id`,`text`),date:h(e.date,`date`,`text`),event:h(e.event,`event`,`text`),indicator:h(e.indicator,`indicator`,`text`),indicatorType:h(e[`indicator-type`],`indicator-type`,`text`),insight:h(e.insight,`insight`,`text`),raw:{data:p(e[`raw-data`],`raw-data`),source:h(e[`raw-source`],`raw-source`,`text`),tlp:h(e[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:h(e[`target-country`],`target-country`,`text`),targetIndustry:h(e[`target-industry`],`target-industry`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`raw`,`data`]]),d=await c(`Updating`,async()=>n.send(Al,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Updated`})})};var Nl={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}/create`,body:`json`,errors:{400:`BadRequestError`}};function Pl(e){return e.usage(`$0 cloudforce-one threat-events event-tags create <event-id>
|
|
319
319
|
|
|
320
|
-
Adds a tag to a threat event in Cloudforce One for classification and filtering.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags 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
|
|
320
|
+
Adds a tag to a threat event in Cloudforce One for classification and filtering.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags 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 Fl={command:`create <event-id>`,describe:`Adds a tag to an event`,builder:Pl,handler:async e=>l({command:`cloudforce-one threat-events event-tags create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events event-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/create`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Nl,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Created`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=m({tags:e.tags}),d=await c(`Creating`,async()=>n.send(Nl,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Created`})})};var Il={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/event_tag/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function Ll(e){return e.usage(`$0 cloudforce-one threat-events event-tags delete <event-id>
|
|
321
321
|
|
|
322
|
-
Removes a tag from a threat event in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
323
|
-
`);return}if(e.body){let t=
|
|
322
|
+
Removes a tag from a threat event in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`tags`,{type:`string`,array:!0,description:`The tags field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Rl={command:`delete <event-id>`,describe:`Removes a tag from an event`,builder:Ll,handler:async e=>l({command:`cloudforce-one threat-events event-tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events event-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/event_tag/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({tags:e.tags}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
323
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(Il,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let u=m({tags:e.tags}),d=await c(`Deleting`,async()=>n.send(Il,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},zl={command:`event-tags`,describe:`Operations for threat-events.event-tags`,builder:e=>e.command(Fl).command(Rl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bl={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}`,errors:{404:`NotFoundError`}};function Vl(e){return e.usage(`$0 cloudforce-one threat-events get <event-id>
|
|
324
324
|
|
|
325
|
-
This Method is deprecated. Please use /events/dataset/:dataset_id/events/:event_id instead.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
325
|
+
This Method is deprecated. Please use /events/dataset/:dataset_id/events/:event_id instead.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Hl={command:`get <event-id>`,describe:`Reads an event`,builder:Vl,handler:async e=>l({command:`cloudforce-one threat-events get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Bl,{account_id:l,event_id:e[`event-id`]}));o(u,{successLabel:`Loaded`})})};var Ul={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/indicatorTypes`,errors:{400:`BadRequestError`}};function Wl(e){return e.usage(`$0 cloudforce-one threat-events indicator-types list
|
|
326
326
|
|
|
327
|
-
This Method is deprecated. Please use /events/dataset/:dataset_id/indicatorTypes instead.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
327
|
+
This Method is deprecated. Please use /events/dataset/:dataset_id/indicatorTypes instead.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Gl={command:`list`,describe:`Lists all indicator types`,builder:Wl,handler:async e=>l({command:`cloudforce-one threat-events indicator-types list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events indicator-types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicatorTypes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Ul,{account_id:l}));o(u,{successLabel:`Loaded`})})},Kl={command:`indicator-types`,describe:`Operations for threat-events.indicator-types`,builder:e=>e.command(Gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ql={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`cursor`,`search`,`searchBranches`,`page`,`pageSize`,`orderBy`,`order`,`datasetId`,`forceRefresh`,`format`,`cache`],errors:{400:`BadRequestError`}};function Jl(e){return e.usage("$0 cloudforce-one threat-events list\n\nUse one standalone `datasetId` scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Scope values query at most 50 datasets and must be used alone. When `datasetId` is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.").option(`cursor`,{type:`string`,description:`Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize. Returned in the previous response's result_info.cursor field. Use cursor-based pagination for deep pagination (beyond 100,000 records) or for optimal performance.`}).option(`search`,{type:`string`,description:`Search`}).option(`search-branches`,{type:`string`,description:"JSON-encoded. OR branches of structured search filters. Filters within a branch are AND'd, branches are OR'd, and the result is AND'd with `search`: `AND(search) AND OR(AND(branch 1), ...)`. Max 8 branches of 1-10 conditions each. Not supported for analytics datasets, and `indicator` filters are not yet supported inside branches. Cursor pages carry the original branches, so do not resend them with `cursor`."}).option(`page`,{type:`number`,description:`Page number (1-indexed) for offset-based pagination. Limited to offset of 100,000 records. For deep pagination, use cursor-based pagination instead.`}).option(`page-size`,{type:`number`,description:`Number of results per page. Maximum 25,000.`}).option(`order-by`,{type:`string`,description:`OrderBy`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`dataset-id`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Scope values query at most 50 datasets. If not provided, uses the default dataset.`}).option(`force-refresh`,{type:`boolean`,description:`ForceRefresh`}).option(`format`,{type:`string`,description:`Format`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Yl={command:`list`,describe:`Filter and list events`,builder:Jl,handler:async e=>l({command:`cloudforce-one threat-events list`,classification:{safeFlags:[`order`,`force-refresh`,`format`,`cache`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,search:e.search,searchBranches:e[`search-branches`],page:e.page,pageSize:e[`page-size`],orderBy:e[`order-by`],order:e.order,datasetId:e[`dataset-id`],forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ql,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Xl={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}/raw/${t.raw_id}`,body:`json`,errors:{400:`BadRequestError`}};function Zl(e){return e.usage(`$0 cloudforce-one threat-events raw edit <raw-id>
|
|
328
328
|
|
|
329
|
-
Partially updates raw threat event data in Cloudforce One, modifying specific fields of the event.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp 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
|
|
329
|
+
Partially updates raw threat event data in Cloudforce One, modifying specific fields of the event.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`data`,{type:`string`,description:`The data field. Provide as a JSON object or @path/to/file.json.`}).option(`source`,{type:`string`,description:`The source field`}).option(`tlp`,{type:`string`,description:`The tlp 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 Ql={command:`edit <raw-id>`,describe:`Updates a raw event`,builder:Zl,handler:async e=>l({command:`cloudforce-one threat-events raw edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events raw edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({data:p(e.data,`data`),source:h(e.source,`source`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`data`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Xl,{body:t,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(r,{successLabel:`Updated`});return}let u=m({data:p(e.data,`data`),source:h(e.source,`source`,`text`),tlp:h(e.tlp,`tlp`,`text`)},[[`data`]]),d=await c(`Updating`,async()=>n.send(Xl,{body:u,account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(d,{successLabel:`Updated`})})};var $l={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/${t.event_id}/raw/${t.raw_id}`,errors:{400:`BadRequestError`}};function eu(e){return e.usage(`$0 cloudforce-one threat-events raw get <raw-id>
|
|
330
330
|
|
|
331
|
-
Retrieves raw threat event data for a specific event in Cloudforce One.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
331
|
+
Retrieves raw threat event data for a specific event in Cloudforce One.`).positional(`raw-id`,{type:`string`,description:`Raw Event UUID.`,demandOption:!0}).option(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tu={command:`get <raw-id>`,describe:`Reads data for a raw event`,builder:eu,handler:async e=>l({command:`cloudforce-one threat-events raw get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}/raw/${e[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(e[`raw-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``),"raw-id":String(e[`raw-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($l,{account_id:l,event_id:e[`event-id`],raw_id:e[`raw-id`]}));o(u,{successLabel:`Loaded`})})},nu={command:`raw`,describe:`Operations for threat-events.raw`,builder:e=>e.command(Ql).command(tu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ru={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/relate/${t.event_id}`,body:`json`,errors:{400:`BadRequestError`}};function iu(e){return e.usage(`$0 cloudforce-one threat-events relate delete <event-id>
|
|
332
332
|
|
|
333
|
-
Removes a reference link between related threat events in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
334
|
-
`);return}if(e.body){let t=
|
|
333
|
+
Removes a reference link between related threat events in Cloudforce One.`).positional(`event-id`,{type:`string`,description:`Event UUID.`,demandOption:!0}).option(`events`,{type:`string`,array:!0,description:`The events field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const au={command:`delete <event-id>`,describe:`Removes an event reference`,builder:iu,handler:async e=>l({command:`cloudforce-one threat-events relate delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events relate delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/relate/${e[`event-id`]==null?`<event-id>`:encodeURIComponent(String(e[`event-id`]))}`,pathParams:{"event-id":String(e[`event-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({events:e.events}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
334
|
+
`);return}if(e.body){let t=f(e.body),r=await c(`Deleting`,async()=>n.send(ru,{body:t,account_id:l,event_id:e[`event-id`]}));o(r,{successLabel:`Deleted`});return}if(e.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let u=m({events:e.events}),d=await c(`Deleting`,async()=>n.send(ru,{body:u,account_id:l,event_id:e[`event-id`]}));o(d,{successLabel:`Deleted`})})},ou={command:`relate`,describe:`Operations for threat-events.relate`,builder:e=>e.command(au).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var su={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events`,query:[`forceRefresh`,`format`,`cache`],body:`json`,errors:{400:`BadRequestError`}};function cu(e){return e.usage("$0 cloudforce-one threat-events search\n\nUse one standalone `datasetId` scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Scope values query at most 50 datasets and must be used alone. When `datasetId` is unspecified, events are listed from the default Cloudforce One Threat Events dataset. To list existing datasets, use the [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) endpoint.").option(`force-refresh`,{type:`boolean`,description:`ForceRefresh`}).option(`format`,{type:`string`,description:`Output format for event data. 'json' returns the default format, 'stix2' returns STIX 2.1 Sighting SROs with linked Indicator SDOs, Observed Data SDOs, and SCOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:`Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit.`,choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:`Cursor for pagination. When provided, filters are embedded in the cursor so you only need to pass cursor and pageSize.`}).option(`dataset-id`,{type:`string`,array:!0,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). Scope values query at most 50 datasets. If not provided, uses the default dataset.`}).option(`order`,{type:`string`,description:`The order field`,choices:[`asc`,`desc`]}).coerce(`order`,e=>h(e,`order`,`text`)).option(`order-by`,{type:`string`,description:`The orderBy field`}).option(`page`,{type:`number`,description:`The page field`}).option(`page-size`,{type:`number`,description:`The pageSize field`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Use the 'in' operator with an array value to bulk-check up to 100 values. Multiple conditions are AND'd together. Max 10 conditions per request. Provide as a JSON array of objects or @path/to/file.json.`}).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 lu={command:`search`,describe:`Filter and list events`,builder:cu,handler:async e=>l({command:`cloudforce-one threat-events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},e,async()=>{let n={forceRefresh:e[`force-refresh`],format:e.format,cache:e.cache};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:n,bodyKind:`json`,body:e.body===void 0?m({cursor:h(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:h(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:d(e.search,`search`)}):f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body);new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let r=await c(`Loading`,async()=>l.send(su,{body:t,account_id:u,...n}));o(r,{successLabel:`Loaded`});return}let p=m({cursor:h(e.cursor,`cursor`,`text`),datasetId:e[`dataset-id`],order:e.order,orderBy:h(e[`order-by`],`order-by`,`text`),page:e.page,pageSize:e[`page-size`],search:d(e.search,`search`)});new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await c(`Loading`,async()=>l.send(su,{body:p,account_id:u,...n}));o(g,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/tags/create`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function uu(e){return e.usage(`$0 cloudforce-one threat-events tags create
|
|
335
335
|
|
|
336
|
-
Creates an account-owned tag for threat events and returns its complete owner projection.`).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. Optional — when present, `properties` is validated against this category's schema. When absent, the tag is typeless and properties are accepted free-form."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Optional.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Optional.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`tlp`,{type:`string`,description:`Tag-level TLP handling marking. Optional. Allowed values: red, amber, amber-strict, green, clear, purple, amber+strict.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>
|
|
336
|
+
Creates an account-owned tag for threat events and returns its complete owner projection.`).option(`alias-group-names`,{type:`string`,array:!0,description:`The aliasGroupNames field`}).option(`alias-group-names-internal`,{type:`string`,array:!0,description:`The aliasGroupNamesInternal field`}).option(`aliases`,{type:`string`,description:`Structured aliases ({ value, confidence 1-10, tlp }). Public: returned to all accounts with per-entry TLP filtering (entries with tlp: purple are removed for non-CFONE accounts). Provide as a JSON array of objects or @path/to/file.json.`}).option(`category-uuid`,{type:`string`,description:"Tag type (category) UUID. Optional — when present, `properties` is validated against this category's schema. When absent, the tag is typeless and properties are accepted free-form."}).option(`confidence`,{type:`number`,description:`Overall tag confidence (1-10). Optional.`}).option(`date-of-discovery`,{type:`string`,description:`Date of discovery (ISO YYYY-MM-DD). Optional.`}).option(`description`,{type:`string`,description:`The description field`}).option(`external-reference-links`,{type:`string`,array:!0,description:`The externalReferenceLinks field`}).option(`external-references`,{type:`string`,description:`Structured external references ({ url, description }). Public: returned to all accounts. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-aliases`,{type:`string`,description:`Owner-private structured aliases ({ value, confidence 1-10, tlp }). Returned to the owning account and omitted from shared-catalog non-owner responses. Provide as a JSON array of objects or @path/to/file.json.`}).option(`internal-description`,{type:`string`,description:`The internalDescription field`}).option(`last-seen`,{type:`string`,description:`The lastSeen field`}).option(`properties`,{type:`string`,description:"Structured metadata blob. Optional. When `categoryUuid` is given, validated against this category's schema on write. When typeless, accepted free-form. Use `{}` for a tag with no custom data. Provide as a JSON object or @path/to/file.json."}).option(`tlp`,{type:`string`,description:`Tag-level TLP handling marking. Optional. Allowed values: red, amber, amber-strict, green, clear, purple, amber+strict.`,choices:[`red`,`amber`,`amber-strict`,`green`,`clear`,`purple`,`amber+strict`]}).coerce(`tlp`,e=>h(e,`tlp`,`text`)).option(`value`,{type:`string`,description:`The value 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 du={command:`create`,describe:`Creates a new tag`,builder:uu,handler:async e=>l({command:`cloudforce-one threat-events tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-events tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/events/tags/create`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:d(e.aliases,`aliases`),categoryUuid:h(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:h(e[`date-of-discovery`],`date-of-discovery`,`text`),description:h(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:d(e[`external-references`],`external-references`),internalAliases:d(e[`internal-aliases`],`internal-aliases`),internalDescription:h(e[`internal-description`],`internal-description`,`text`),lastSeen:h(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:h(e.value,`value`,`text`)},[[`properties`]]):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.value===void 0&&(e.value=await _(`value`,`The value field`));let u=m({aliasGroupNames:e[`alias-group-names`],aliasGroupNamesInternal:e[`alias-group-names-internal`],aliases:d(e.aliases,`aliases`),categoryUuid:h(e[`category-uuid`],`category-uuid`,`text`),confidence:e.confidence,dateOfDiscovery:h(e[`date-of-discovery`],`date-of-discovery`,`text`),description:h(e.description,`description`,`text`),externalReferenceLinks:e[`external-reference-links`],externalReferences:d(e[`external-references`],`external-references`),internalAliases:d(e[`internal-aliases`],`internal-aliases`),internalDescription:h(e[`internal-description`],`internal-description`,`text`),lastSeen:h(e[`last-seen`],`last-seen`,`text`),properties:p(e.properties,`properties`),tlp:e.tlp,value:h(e.value,`value`,`text`)},[[`properties`]]),g=await c(`Creating`,async()=>n.send($,{body:u,account_id:l}));o(g,{successLabel:`Created`})})},fu={command:`tags`,describe:`Operations for threat-events.tags`,builder:e=>e.command(du).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/events/targetIndustries`,query:[`datasetIds`],errors:{400:`BadRequestError`}};function mu(e){return e.usage(`$0 cloudforce-one threat-events target-industries list
|
|
337
337
|
|
|
338
|
-
Retrieves the catalog of industry classifications used in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query target industries from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hu={command:`list`,describe:`Lists target industries across multiple datasets`,builder:mu,handler:async e=>l({command:`cloudforce-one threat-events target-industries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events target-industries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(pu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},gu={command:`target-industries`,describe:`Operations for threat-events.target-industries`,builder:e=>e.command(hu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_u={command:`threat-events`,describe:`Operations for threat-events`,builder:e=>e.command(
|
|
338
|
+
Retrieves the catalog of industry classifications used in Cloudforce One threat intelligence.`).option(`dataset-ids`,{type:`string`,description:`Array of dataset IDs to query target industries from. If not provided, uses the default dataset.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hu={command:`list`,describe:`Lists target industries across multiple datasets`,builder:mu,handler:async e=>l({command:`cloudforce-one threat-events target-industries list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={datasetIds:e[`dataset-ids`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-events target-industries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/targetIndustries`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(pu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},gu={command:`target-industries`,describe:`Operations for threat-events.target-industries`,builder:e=>e.command(hu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_u={command:`threat-events`,describe:`Operations for threat-events`,builder:e=>e.command(Wc).command(pl).command(Ml).command(Hl).command(Yl).command(lu).command(Vc).command(ol).command(ul).command(kl).command(zl).command(Kl).command(nu).command(ou).command(fu).command(gu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var vu={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,body:`json`};function yu(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
|
|
339
339
|
|
|
340
|
-
Marks up to 50 Threat Signals articles as read or unread.`).option(`article-ids`,{type:`string`,array:!0,description:`The article_ids field`}).option(`read`,{type:`boolean`,description:`The read 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
|
|
340
|
+
Marks up to 50 Threat Signals articles as read or unread.`).option(`article-ids`,{type:`string`,array:!0,description:`The article_ids field`}).option(`read`,{type:`boolean`,description:`The read 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 bu={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:yu,handler:async e=>l({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles bulk-mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({article_ids:e[`article-ids`],read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(vu,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`article-ids`]===void 0)throw Error(`--article-ids is required (or pass --body with this field set).`);if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=m({article_ids:e[`article-ids`],read:e.read}),d=await c(`Updating`,async()=>n.send(vu,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})};function xu(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
|
|
341
341
|
|
|
342
|
-
Retrieves the stored body of a Threat Signals article as plain text or HTML.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`text`,`html`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
342
|
+
Retrieves the stored body of a Threat Signals article as plain text or HTML.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`text`,`html`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Su={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:xu,handler:async e=>l({command:`cloudforce-one threat-signals articles get-content`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get-content`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/content`,pathParams:{"article-id":String(e[`article-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>x(`/accounts/${o}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/content${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));b(u.toString(`utf-8`))})};var Cu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`};function wu(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
|
|
343
343
|
|
|
344
|
-
Retrieves a Threat Signals article with its summary, tags and indicator status.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
344
|
+
Retrieves a Threat Signals article with its summary, tags and indicator status.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Tu={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:wu,handler:async e=>l({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Cu,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var Eu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles`,query:[`cursor`,`per_page`,`feed_id`,`article_id`,`read`,`tag_id`,`tag_category_id`,`tag`,`tag_category`,`include_total`,`search`,`published_after`,`published_before`,`fetched_after`,`fetched_before`,`feed_category`,`source_type`,`tag_applied_by`,`sort`]};function Du(e){return e.usage(`$0 cloudforce-one threat-signals articles list
|
|
345
345
|
|
|
346
|
-
Lists articles from the account's Threat Signals feeds.`).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `next_cursor`. When provided, pagination, ordering, totals, and article filters come from the cursor. Sending `per_page`, `sort`, `include_total`, or any article filter alongside it returns a 400 `CursorFilterConflictError`."}).option(`per-page`,{type:`number`,description:`Per page`}).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Repeatable article UUID filter. Returns the union of matching account-owned articles; use this to list every Threat Signals article referenced by an indicator's sources.`}).option(`read`,{type:`boolean`,description:`Read`}).option(`tag-id`,{type:`string`,description:`Repeatable tag UUID filter. An article matches any selected tag.`}).option(`tag-category-id`,{type:`string`,description:`Repeatable tag-category UUID filter. An article matches any selected category; when tag_id is also present, the tag and category groups are ANDed.`}).option(`tag`,{type:`string`,description:`Legacy human-readable tag-value filter. Ignored when tag_id is supplied; prefer tag_id.`}).option(`tag-category`,{type:`string`,description:`Legacy category-name disambiguator for tag. It has no effect without tag; prefer tag_category_id.`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`search`,{type:`string`,description:`Search`}).option(`published-after`,{type:`string`,description:`Published after`}).option(`published-before`,{type:`string`,description:`Published before`}).option(`fetched-after`,{type:`string`,description:`Fetched after`}).option(`fetched-before`,{type:`string`,description:`Fetched before`}).option(`feed-category`,{type:`string`,description:`Feed category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`tag-applied-by`,{type:`string`,description:`Assignment provenance filter. When combined with tag_id or tag_category_id, the matching assignment must have this provenance.`,choices:[`ai`,`analyst`,`system`]}).option(`sort`,{type:`string`,description:`Sort`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
346
|
+
Lists articles from the account's Threat Signals feeds.`).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `next_cursor`. When provided, pagination, ordering, totals, and article filters come from the cursor. Sending `per_page`, `sort`, `include_total`, or any article filter alongside it returns a 400 `CursorFilterConflictError`."}).option(`per-page`,{type:`number`,description:`Per page`}).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Repeatable article UUID filter. Returns the union of matching account-owned articles; use this to list every Threat Signals article referenced by an indicator's sources.`}).option(`read`,{type:`boolean`,description:`Read`}).option(`tag-id`,{type:`string`,description:`Repeatable tag UUID filter. An article matches any selected tag.`}).option(`tag-category-id`,{type:`string`,description:`Repeatable tag-category UUID filter. An article matches any selected category; when tag_id is also present, the tag and category groups are ANDed.`}).option(`tag`,{type:`string`,description:`Legacy human-readable tag-value filter. Ignored when tag_id is supplied; prefer tag_id.`}).option(`tag-category`,{type:`string`,description:`Legacy category-name disambiguator for tag. It has no effect without tag; prefer tag_category_id.`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`search`,{type:`string`,description:`Search`}).option(`published-after`,{type:`string`,description:`Published after`}).option(`published-before`,{type:`string`,description:`Published before`}).option(`fetched-after`,{type:`string`,description:`Fetched after`}).option(`fetched-before`,{type:`string`,description:`Fetched before`}).option(`feed-category`,{type:`string`,description:`Feed category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`tag-applied-by`,{type:`string`,description:`Assignment provenance filter. When combined with tag_id or tag_category_id, the matching assignment must have this provenance.`,choices:[`ai`,`analyst`,`system`]}).option(`sort`,{type:`string`,description:`Sort`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ou={command:`list`,describe:`List Threat Signals articles`,builder:Du,handler:async e=>l({command:`cloudforce-one threat-signals articles list`,classification:{safeFlags:[`read`,`include-total`,`source-type`,`tag-applied-by`,`dry-run`]}},e,async()=>{let n={cursor:e.cursor,per_page:e[`per-page`],feed_id:e[`feed-id`],article_id:e[`article-id`],read:e.read,tag_id:e[`tag-id`],tag_category_id:e[`tag-category-id`],tag:e.tag,tag_category:e[`tag-category`],include_total:e[`include-total`],search:e.search,published_after:e[`published-after`],published_before:e[`published-before`],fetched_after:e[`fetched-after`],fetched_before:e[`fetched-before`],feed_category:e[`feed-category`],source_type:e[`source-type`],tag_applied_by:e[`tag-applied-by`],sort:e.sort};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals articles list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Eu,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ku={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}`,body:`json`};function Au(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
|
|
347
347
|
|
|
348
|
-
Marks a Threat Signals article as read or unread.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`read`,{type:`boolean`,description:`The read 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
|
|
348
|
+
Marks a Threat Signals article as read or unread.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`read`,{type:`boolean`,description:`The read 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 ju={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:Au,handler:async e=>l({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read:e.read}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(ku,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Updated`});return}if(e.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let u=m({read:e.read}),d=await c(`Updating`,async()=>n.send(ku,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Updated`})})};var Mu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/output`};function Nu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
|
|
349
349
|
|
|
350
|
-
Retrieves the stored output of a skill for a Threat Signals article.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
350
|
+
Retrieves the stored output of a skill for a Threat Signals article.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pu={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:Nu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills get-output`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/output`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Mu,{account_id:l,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var Fu={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills`};function Iu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
|
|
351
351
|
|
|
352
|
-
Lists active custom skills currently assigned to the article's feed and whether each has a stored output. Output content and skill configuration are retrieved separately.`).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
352
|
+
Lists active custom skills currently assigned to the article's feed and whether each has a stored output. Output content and skill configuration are retrieved separately.`).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lu={command:`list`,describe:`List Threat Signals article custom skills`,builder:Iu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fu,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Loaded`})})};var Ru={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/skills/${t.skill_id}/run`,body:`json`};function zu(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
|
|
353
353
|
|
|
354
|
-
Paid customer operation that always persists a managed default skill or an assigned active custom skill result without exposing diagnostic model data.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
354
|
+
Paid customer operation that always persists a managed default skill or an assigned active custom skill result without exposing diagnostic model data.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bu={command:`run <skill-id>`,describe:`Run and persist a Threat Signals article skill`,builder:zu,handler:async e=>l({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/run`,pathParams:{"article-id":String(e[`article-id`]??``),"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=f(e.body),n=await c(`Creating`,async()=>l.send(Ru,{body:t,account_id:u,article_id:e[`article-id`],skill_id:e[`skill-id`]}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>n(l,`POST`,`/accounts/${u}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(e[`article-id`]))}/skills/${encodeURIComponent(String(e[`skill-id`]))}/run`));o(d,{successLabel:`Created`})})},Vu={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(Pu).command(Lu).command(Bu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags`,body:`json`};function Uu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
|
|
355
355
|
|
|
356
|
-
Applies a tag from the account's tag catalog to a Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`tag-id`,{type:`string`,description:`The tag_id 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
|
|
356
|
+
Applies a tag from the account's tag catalog to a Threat Signals article.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`tag-id`,{type:`string`,description:`The tag_id 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 Wu={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Uu,handler:async e=>l({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({tag_id:h(e[`tag-id`],`tag-id`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Hu,{body:t,account_id:l,article_id:e[`article-id`]}));o(r,{successLabel:`Created`});return}e[`tag-id`]===void 0&&(e[`tag-id`]=await _(`tag-id`,`The tag_id field`));let u=m({tag_id:h(e[`tag-id`],`tag-id`,`text`)}),d=await c(`Creating`,async()=>n.send(Hu,{body:u,account_id:l,article_id:e[`article-id`]}));o(d,{successLabel:`Created`})})};var Gu={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tag`};function Ku(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
|
|
357
357
|
|
|
358
|
-
Runs the default AI tagging skill on an article and replaces its AI-applied tags.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
358
|
+
Runs the default AI tagging skill on an article and replaces its AI-applied tags.`).positional(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const qu={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:Ku,handler:async e=>l({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tag`,pathParams:{"article-id":String(e[`article-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(Gu,{account_id:l,article_id:e[`article-id`]}));o(u,{successLabel:`Created`})})};var Ju={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/articles/${t.article_id}/tags/${t.tag_id}`};function Yu(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
|
|
359
359
|
|
|
360
|
-
Removes a tag from a Threat Signals article.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
361
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
360
|
+
Removes a tag from a Threat Signals article.`).positional(`tag-id`,{type:`string`,description:`Tag ID`,demandOption:!0}).option(`article-id`,{type:`string`,description:`Article ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xu={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:Yu,handler:async e=>l({command:`cloudforce-one threat-signals articles tags remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals articles tags remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${e[`article-id`]==null?`<article-id>`:encodeURIComponent(String(e[`article-id`]))}/tags/${e[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(e[`tag-id`]))}`,pathParams:{"article-id":String(e[`article-id`]??``),"tag-id":String(e[`tag-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
361
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Ju,{account_id:l,article_id:e[`article-id`],tag_id:e[`tag-id`]}));o(u,{successLabel:`Deleted`})})},Zu={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(Wu).command(qu).command(Xu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Qu={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(bu).command(Tu).command(Su).command(Ou).command(ju).command(Vu).command(Zu).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $u={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/categories`};function ed(e){return e.usage(`$0 cloudforce-one threat-signals categories list
|
|
362
362
|
|
|
363
|
-
Lists the predefined categories that can be assigned to feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
363
|
+
Lists the predefined categories that can be assigned to feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const td={command:`list`,describe:`List Threat Signals feed categories`,builder:ed,handler:async e=>l({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals categories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/categories`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send($u,{account_id:l}));o(u,{successLabel:`Loaded`})})},nd={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(td).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var rd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/curated-feeds`,query:[`category`,`include_inactive`]};function id(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds list
|
|
364
364
|
|
|
365
|
-
Lists the curated feeds the account can subscribe to.`).option(`category`,{type:`string`,description:`Category`}).option(`include-inactive`,{type:`boolean`,description:`Include inactive`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
365
|
+
Lists the curated feeds the account can subscribe to.`).option(`category`,{type:`string`,description:`Category`}).option(`include-inactive`,{type:`boolean`,description:`Include inactive`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ad={command:`list`,describe:`List curated Threat Signals feeds`,builder:id,handler:async e=>l({command:`cloudforce-one threat-signals curated-feeds list`,classification:{safeFlags:[`include-inactive`,`dry-run`]}},e,async()=>{let n={category:e.category,include_inactive:e[`include-inactive`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals curated-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(rd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var od={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/curated-feeds/opt-out`,body:`json`};function sd(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds opt-out
|
|
366
366
|
|
|
367
|
-
Opts the account out of, or back into, the curated feed catalog.`).option(`opted-out`,{type:`boolean`,description:`The opted_out 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
|
|
367
|
+
Opts the account out of, or back into, the curated feed catalog.`).option(`opted-out`,{type:`boolean`,description:`The opted_out 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 cd={command:`opt-out`,describe:`Opt out of curated Threat Signals feeds`,builder:sd,handler:async e=>l({command:`cloudforce-one threat-signals curated-feeds opt-out`,classification:{safeFlags:[`opted-out`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals curated-feeds opt-out`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/opt-out`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({opted_out:e[`opted-out`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(od,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}if(e[`opted-out`]===void 0)throw Error(`--opted-out is required (or pass --body with this field set).`);let u=m({opted_out:e[`opted-out`]}),d=await c(`Updating`,async()=>n.send(od,{body:u,account_id:l}));o(d,{successLabel:`Updated`})})},ld={command:`curated-feeds`,describe:`Operations for threat-signals.curated-feeds`,builder:e=>e.command(ad).command(cd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ud={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,body:`json`,errors:{403:`ForbiddenError`,503:`ServiceUnavailableError`}};function dd(e){return e.usage(`$0 cloudforce-one threat-signals feeds create
|
|
368
368
|
|
|
369
|
-
Subscribes the account to a custom or curated Threat Signals feed.`).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).coerce(`category-id`,e=>
|
|
369
|
+
Subscribes the account to a custom or curated Threat Signals feed.`).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).coerce(`category-id`,e=>h(e,`category-id`,`text`)).option(`curated-feed-id`,{type:`string`,description:`The curated_feed_id field`}).option(`display-name`,{type:`string`,description:`The display_name field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`,default:!0}).option(`poll-interval-s`,{type:`number`,description:`The poll_interval_s field`,default:300}).option(`title`,{type:`string`,description:`The title field`}).option(`url`,{type:`string`,description:`The url 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 fd={command:`create`,describe:`Create Threat Signals feed`,builder:dd,handler:async e=>l({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({category_id:e[`category-id`],curated_feed_id:h(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:h(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:h(e.title,`title`,`text`),url:h(e.url,`url`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(ud,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=m({category_id:e[`category-id`],curated_feed_id:h(e[`curated-feed-id`],`curated-feed-id`,`text`),display_name:h(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:h(e.title,`title`,`text`),url:h(e.url,`url`,`text`)}),d=await c(`Creating`,async()=>n.send(ud,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var pd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`};function md(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
|
|
370
370
|
|
|
371
|
-
Unsubscribes the account from a Threat Signals feed and deletes its articles.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
372
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
371
|
+
Unsubscribes the account from a Threat Signals feed and deletes its articles.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const hd={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:md,handler:async e=>l({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
372
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(pd,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Deleted`})})};function gd(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
|
|
373
373
|
|
|
374
|
-
Retrieves the feed document fetched by the most recent poll.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`xml`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
374
|
+
Retrieves the feed document fetched by the most recent poll.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`format`,{type:`string`,description:`Format`,choices:[`xml`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _d={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:gd,handler:async e=>l({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},e,async()=>{let n={format:e.format};if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/raw`,pathParams:{"feed-id":String(e[`feed-id`]??``)},query:n,bodyKind:`none`});return}await r(e);let o=e.local?t:await a();e.accountId=o;let l=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await c(`Loading`,async()=>x(`/accounts/${o}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(e[`feed-id`]))}/raw${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));b(u.toString(`utf-8`))})};var vd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds`,query:[`page`,`per_page`,`limit`,`sort`,`category`,`source_type`,`enabled`,`status`],errors:{503:`ServiceUnavailableError`}};function yd(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
|
|
375
375
|
|
|
376
|
-
Lists the account's Threat Signals feed subscriptions.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`limit`,{type:`number`,description:`Limit`}).option(`sort`,{type:`string`,description:`Sort`}).option(`category`,{type:`string`,description:`Category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`enabled`,{type:`boolean`,description:`Enabled`}).option(`status`,{type:`string`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
376
|
+
Lists the account's Threat Signals feed subscriptions.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`limit`,{type:`number`,description:`Limit`}).option(`sort`,{type:`string`,description:`Sort`}).option(`category`,{type:`string`,description:`Category`}).option(`source-type`,{type:`string`,description:`Source type`,choices:[`curated`,`custom`]}).option(`enabled`,{type:`boolean`,description:`Enabled`}).option(`status`,{type:`string`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bd={command:`list`,describe:`List Threat Signals feeds`,builder:yd,handler:async e=>l({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],limit:e.limit,sort:e.sort,category:e.category,source_type:e[`source-type`],enabled:e.enabled,status:e.status};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(vd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var xd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/poll`,query:[`feed_id`]};function Sd(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
|
|
377
377
|
|
|
378
|
-
Starts an immediate poll of one or all Threat Signals feeds.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
378
|
+
Starts an immediate poll of one or all Threat Signals feeds.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Cd={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:Sd,handler:async e=>l({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals feeds poll`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/poll`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Creating`,async()=>l.send(xd,{account_id:u,...n}));o(d,{successLabel:`Created`})})};var wd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`};function Td(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
|
|
379
379
|
|
|
380
|
-
Retrieves the effective skill pipeline for a Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
380
|
+
Retrieves the effective skill pipeline for a Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ed={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:Td,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(wd,{account_id:l,feed_id:e[`feed-id`]}));o(u,{successLabel:`Loaded`})})};var Dd={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}/skills`,body:`json`};function Od(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
|
|
381
381
|
|
|
382
|
-
Replaces the ordered custom skills assigned to a Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`skill-ids`,{type:`string`,array:!0,description:`The skill_ids 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
|
|
382
|
+
Replaces the ordered custom skills assigned to a Threat Signals feed.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`skill-ids`,{type:`string`,array:!0,description:`The skill_ids 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 kd={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Od,handler:async e=>l({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/skills`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({skill_ids:e[`skill-ids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(Dd,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}if(e[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let u=m({skill_ids:e[`skill-ids`]}),d=await c(`Updating`,async()=>n.send(Dd,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},Ad={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(Ed).command(kd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jd={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/feeds/${t.feed_id}`,body:`json`};function Md(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
|
|
383
383
|
|
|
384
|
-
Updates a Threat Signals feed subscription.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).coerce(`category-id`,e=>
|
|
384
|
+
Updates a Threat Signals feed subscription.`).positional(`feed-id`,{type:`string`,description:`Feed ID`,demandOption:!0}).option(`category-id`,{type:`string`,description:`One of the predefined Threat Signals feed categories; see GET /:account_id/v2/threat-signals/categories.`,choices:[`b12a0fd6-f7b9-5393-9ef3-f888d506c550`,`d5b70eaa-626f-5761-b55b-6d9590df49fb`,`3b572d2b-890d-5286-9433-f18c85079030`,`17f90d3b-37d3-5241-8ad4-7d6abbc2006c`,`c68f28e9-7e8f-5d4b-853b-f3076893a9ee`,`bb0e4a94-38ab-5c14-80a7-28cee9f4b139`,`b1ef66d9-a73c-58dc-b269-22d34dfd11f4`,`ab02a976-0a20-5c76-a553-7f6325afacfe`]}).coerce(`category-id`,e=>h(e,`category-id`,`text`)).option(`display-name`,{type:`string`,description:`The display_name field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`poll-interval-s`,{type:`number`,description:`The poll_interval_s field`}).option(`title`,{type:`string`,description:`The title 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 Nd={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:Md,handler:async e=>l({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({category_id:e[`category-id`],display_name:h(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:h(e.title,`title`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(jd,{body:t,account_id:l,feed_id:e[`feed-id`]}));o(r,{successLabel:`Updated`});return}let u=m({category_id:e[`category-id`],display_name:h(e[`display-name`],`display-name`,`text`),enabled:e.enabled,poll_interval_s:e[`poll-interval-s`],title:h(e.title,`title`,`text`)}),d=await c(`Updating`,async()=>n.send(jd,{body:u,account_id:l,feed_id:e[`feed-id`]}));o(d,{successLabel:`Updated`})})},Pd={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(fd).command(hd).command(_d).command(bd).command(Cd).command(Nd).command(Ad).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/health`};function Id(e){return e.usage(`$0 cloudforce-one threat-signals health
|
|
385
385
|
|
|
386
|
-
Checks that the Threat Signals API is reachable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
386
|
+
Checks that the Threat Signals API is reachable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ld={command:`health`,describe:`Check Threat Signals service health`,builder:Id,handler:async e=>l({command:`cloudforce-one threat-signals health`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals health`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/health`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Fd,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Rd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/indicators`,query:[`feed_id`,`article_id`,`search`,`per_page`,`sort`,`include_total`,`cursor`]};function zd(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
|
|
387
387
|
|
|
388
|
-
Lists indicators of compromise extracted from the account's Threat Signals articles.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Article ID`}).option(`search`,{type:`string`,description:`NFC-normalized and trimmed, case-insensitive literal substring search of indicator values. Requires 3–500 Unicode code points; the upper code-point bound is described here because OpenAPI string length cannot precisely express it without imposing UTF-16 semantics.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`sort`,{type:`string`,description:`Sort`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
388
|
+
Lists indicators of compromise extracted from the account's Threat Signals articles.`).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`article-id`,{type:`string`,description:`Article ID`}).option(`search`,{type:`string`,description:`NFC-normalized and trimmed, case-insensitive literal substring search of indicator values. Requires 3–500 Unicode code points; the upper code-point bound is described here because OpenAPI string length cannot precisely express it without imposing UTF-16 semantics.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`sort`,{type:`string`,description:`Sort`}).option(`include-total`,{type:`boolean`,description:`Include total`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Bd={command:`list`,describe:`List Threat Signals article indicators`,builder:zd,handler:async e=>l({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},e,async()=>{let n={feed_id:e[`feed-id`],article_id:e[`article-id`],search:e.search,per_page:e[`per-page`],sort:e.sort,include_total:e[`include-total`],cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals indicators list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/indicators`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Rd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},Vd={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(Bd).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Hd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/search`,query:[`query`,`max_results`,`feed_id`]};function Ud(e){return e.usage(`$0 cloudforce-one threat-signals search
|
|
389
389
|
|
|
390
|
-
Searches the account's Threat Signals articles using keyword and semantic retrieval.`).option(`query`,{type:`string`,description:`Query`,demandOption:!0}).option(`max-results`,{type:`string`,description:`Max results`}).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
390
|
+
Searches the account's Threat Signals articles using keyword and semantic retrieval.`).option(`query`,{type:`string`,description:`Query`,demandOption:!0}).option(`max-results`,{type:`string`,description:`Max results`}).option(`feed-id`,{type:`string`,description:`Feed ID`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Wd={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:Ud,handler:async e=>l({command:`cloudforce-one threat-signals search`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={query:e.query,max_results:e[`max-results`],feed_id:e[`feed-id`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals search`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/search`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Hd,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Gd={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,body:`json`};function Kd(e){return e.usage(`$0 cloudforce-one threat-signals skills create
|
|
391
391
|
|
|
392
|
-
Creates a custom AI skill for the account.`).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt field`}).option(`type`,{type:`string`,description:`Optional label; does not affect execution. Defaults to "summary".`,choices:[`summary`,`tags`],default:`summary`}).coerce(`type`,e=>
|
|
392
|
+
Creates a custom AI skill for the account.`).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt field`}).option(`type`,{type:`string`,description:`Optional label; does not affect execution. Defaults to "summary".`,choices:[`summary`,`tags`],default:`summary`}).coerce(`type`,e=>h(e,`type`,`text`)).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 qd={command:`create`,describe:`Create Threat Signals skill`,builder:Kd,handler:async e=>l({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({name:h(e.name,`name`,`text`),output_schema:h(e[`output-schema`],`output-schema`,`text`),prompt:h(e.prompt,`prompt`,`text`),type:e.type}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Creating`,async()=>n.send(Gd,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await _(`name`,`The name field`)),e[`output-schema`]===void 0&&(e[`output-schema`]=await _(`output-schema`,`The output_schema field`)),e.prompt===void 0&&(e.prompt=await _(`prompt`,`The prompt field`));let u=m({name:h(e.name,`name`,`text`),output_schema:h(e[`output-schema`],`output-schema`,`text`),prompt:h(e.prompt,`prompt`,`text`),type:e.type}),d=await c(`Creating`,async()=>n.send(Gd,{body:u,account_id:l}));o(d,{successLabel:`Created`})})};var Jd={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function Yd(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
|
|
393
393
|
|
|
394
|
-
Deletes a custom skill. Default skills cannot be deleted.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
395
|
-
`);return}let u=await c(`Deleting`,async()=>n.send(
|
|
394
|
+
Deletes a custom skill. Default skills cannot be deleted.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xd={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:Yd,handler:async e=>l({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
395
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(Jd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Deleted`})})};var Zd={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`};function Qd(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
|
|
396
396
|
|
|
397
|
-
Retrieves a default or custom skill by ID.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
397
|
+
Retrieves a default or custom skill by ID.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $d={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:Qd,handler:async e=>l({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(Zd,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var ef={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills`,query:[`page`,`per_page`]};function tf(e){return e.usage(`$0 cloudforce-one threat-signals skills list
|
|
398
398
|
|
|
399
|
-
Lists the default and custom skills available to the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
399
|
+
Lists the default and custom skills available to the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nf={command:`list`,describe:`List Threat Signals skills`,builder:tf,handler:async e=>l({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();s({command:`cf cloudforce-one threat-signals skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ef,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var rf={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`};function af(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
|
|
400
400
|
|
|
401
|
-
Retrieves the tag categories the default tagging skill may choose tags from.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
401
|
+
Retrieves the tag categories the default tagging skill may choose tags from.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const of={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:af,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(rf,{account_id:l,skill_id:e[`skill-id`]}));o(u,{successLabel:`Loaded`})})};var sf={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}/tag-categories`,body:`json`};function cf(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
|
|
402
402
|
|
|
403
|
-
Replaces the tag categories the default tagging skill may choose tags from.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`category-uuids`,{type:`string`,array:!0,description:`The category_uuids 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
|
|
403
|
+
Replaces the tag categories the default tagging skill may choose tags from.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`category-uuids`,{type:`string`,array:!0,description:`The category_uuids 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 lf={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:cf,handler:async e=>l({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({category_uuids:e[`category-uuids`]}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(sf,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}if(e[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let u=m({category_uuids:e[`category-uuids`]}),d=await c(`Updating`,async()=>n.send(sf,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},uf={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(of).command(lf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var df={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/threat-signals/skills/${t.skill_id}`,body:`json`};function ff(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
|
|
404
404
|
|
|
405
|
-
Updates a custom skill. Default skills are read-only.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`skill-config`,{type:`string`,description:`The config field`}).option(`is-active`,{type:`boolean`,description:`The is_active field`}).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt 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
|
|
405
|
+
Updates a custom skill. Default skills are read-only.`).positional(`skill-id`,{type:`string`,description:`Skill ID`,demandOption:!0}).option(`skill-config`,{type:`string`,description:`The config field`}).option(`is-active`,{type:`boolean`,description:`The is_active field`}).option(`name`,{type:`string`,description:`The name field`}).option(`output-schema`,{type:`string`,description:`The output_schema field`}).option(`prompt`,{type:`string`,description:`The prompt 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 pf={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:ff,handler:async e=>l({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${e[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(e[`skill-id`]))}`,pathParams:{"skill-id":String(e[`skill-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({config:h(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:h(e.name,`name`,`text`),output_schema:h(e[`output-schema`],`output-schema`,`text`),prompt:h(e.prompt,`prompt`,`text`)}):f(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=f(e.body),r=await c(`Updating`,async()=>n.send(df,{body:t,account_id:l,skill_id:e[`skill-id`]}));o(r,{successLabel:`Updated`});return}let u=m({config:h(e[`skill-config`],`skill-config`,`text`),is_active:e[`is-active`],name:h(e.name,`name`,`text`),output_schema:h(e[`output-schema`],`output-schema`,`text`),prompt:h(e.prompt,`prompt`,`text`)}),d=await c(`Updating`,async()=>n.send(df,{body:u,account_id:l,skill_id:e[`skill-id`]}));o(d,{successLabel:`Updated`})})},mf={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(qd).command(Xd).command($d).command(nf).command(pf).command(uf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},hf={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(Ld).command(Wd).command(Qu).command(nd).command(ld).command(Pd).command(Vd).command(mf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gf={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(ae).command(be).command(Oi).command(wa).command(Oo).command(gc).command(Lc).command(_u).command(hf).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gf as default};
|