cf 1.0.0-beta.13 → 1.0.0-beta.14
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 +1562 -1776
- package/dist/_meta/hand-written-commands.json +342 -22
- package/dist/_meta/schemas.json +611 -956
- package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
- package/dist/access-k1QjF5rE.mjs +2 -0
- package/dist/{account-tags-CaXDDeZ4.mjs → account-tags-RhvWOkOf.mjs} +4 -4
- package/dist/{accounts-BALwxDQY.mjs → accounts--3lrEkmu.mjs} +9 -15
- package/dist/{acm-CP9EaXQN.mjs → acm-BJxINEcu.mjs} +2 -2
- package/dist/{addressing-DRlaxqrI.mjs → addressing-BqByG9JW.mjs} +55 -43
- package/dist/{agent-memory-vGhlfZBx.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
- package/dist/{ai-CJtbWfB9.mjs → ai-CRkQ4pjC.mjs} +1 -1
- package/dist/{ai-audit-C0BJNqZZ.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
- package/dist/{ai-gateway-BQtv3U3x.mjs → ai-gateway-CbhvQK4L.mjs} +4 -4
- package/dist/ai-search-CvVSnOA0.mjs +79 -0
- package/dist/{ai-security-CFTaYk_X.mjs → ai-security-Z_qpI92I.mjs} +1 -1
- package/dist/{alerting-1hun27JC.mjs → alerting-CpbCB8br.mjs} +3 -3
- package/dist/{analytics-DXUSjvzT.mjs → analytics-DkY9dOP1.mjs} +3 -3
- package/dist/{analytics_engine-CQsnL09C.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
- package/dist/{api-security-BXhrfR6-.mjs → api-security-BHnOU5MM.mjs} +25 -25
- package/dist/{argo-LPUCTnee.mjs → argo-DhC5L_aN.mjs} +3 -3
- package/dist/{artifacts-Dt6easua.mjs → artifacts-CrIupY7P.mjs} +3 -3
- package/dist/{audit-logs-CVznAM2Z.mjs → audit-logs-BjeBxTox.mjs} +1 -1
- package/dist/{auth-eQr-kQCH.mjs → auth-BNYfOMl0.mjs} +1 -1
- package/dist/{auth-CGLsxbc6.mjs → auth-CAWalgW0.mjs} +1 -1
- package/dist/auth-DOwC01PW.mjs +2 -0
- package/dist/{auth-token-pNQrX_9O.mjs → auth-token-Dop0wLCw.mjs} +1 -1
- package/dist/{autoconfig-sD7Frryg.mjs → autoconfig-RQ3HS4m1.mjs} +1 -1
- package/dist/{basin-catalog-ZQICw-zF.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
- package/dist/{billing-Dy1-dV_B.mjs → billing-BFyte9fL.mjs} +3 -3
- package/dist/bot-management-DXcbV3am.mjs +9 -0
- package/dist/{botnet-feed-xb98Cj3Y.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
- package/dist/{brand-protection-Ck3okE2k.mjs → brand-protection-DN36XkxH.mjs} +2 -2
- package/dist/{browser-run-DJGJSzFX.mjs → browser-run-hHD1RT43.mjs} +3 -3
- package/dist/build-BhpWYgNm.mjs +2 -0
- package/dist/{build-HmSXqjGn.mjs → build-CCe7IrWT.mjs} +1 -1
- package/dist/{builds-CYxcZtkG.mjs → builds-6aO61R9R.mjs} +4 -4
- package/dist/{cache-D9tSfovH.mjs → cache-C5YJpMqi.mjs} +6 -6
- package/dist/{certificate-authorities-CpiveTFC.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
- package/dist/{cf-BxsXrVeh.mjs → cf-oRSQKirD.mjs} +1 -1
- package/dist/{chunk-DSGVRFIS-C1_SEtRK.mjs → chunk-DSGVRFIS-CPI5cYtB.mjs} +1 -1
- package/dist/{chunk-NDZDTP46-Bjx_wtJe.mjs → chunk-NDZDTP46-Civns3WA.mjs} +1 -1
- package/dist/{cli-DeJc9U8z.mjs → cli-ht4q6i2y.mjs} +1 -1
- package/dist/{client-certificates-CF6YZyvP.mjs → client-certificates-balaN_my.mjs} +1 -1
- package/dist/{client-side-security-BLoe9kS5.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
- package/dist/{cloud-connector-DXRUHsjt.mjs → cloud-connector-avx27sLw.mjs} +1 -1
- package/dist/{cloudflared--1Ws1RJy.mjs → cloudflared-D83U8Yn3.mjs} +1 -1
- package/dist/{cloudforce-one-CBLxXi6v.mjs → cloudforce-one-CXdeqJ9l.mjs} +126 -168
- package/dist/{command-Dh7RmjFu.mjs → command-9VAc7b30.mjs} +1 -1
- package/dist/{command-Cu7dcaHT.mjs → command-B_Ixlz8Q.mjs} +1 -1
- package/dist/{command-oNVwyjGB.mjs → command-BtDY_MKv.mjs} +1 -1
- package/dist/{command-CG6RvZs0.mjs → command-CUNMrMou.mjs} +1 -1
- package/dist/{command-D3fyhdy-.mjs → command-Ckb9FufU.mjs} +1 -1
- package/dist/{command-BDe67N_n.mjs → command-CtVUNm__.mjs} +1 -1
- package/dist/{command-DUhX8Dcr.mjs → command-CyJQ40fc.mjs} +1 -1
- package/dist/{command-UiHLJ8Ji.mjs → command-DPX9sJVi.mjs} +1 -1
- package/dist/{command-BlIb6RR2.mjs → command-DXaRn1ls.mjs} +1 -1
- package/dist/{command-CcuLC6CJ.mjs → command-DjEJaOwV.mjs} +1 -1
- package/dist/{command-_rqD0hXF.mjs → command-DtgJilOK.mjs} +1 -1
- package/dist/{command-BvfKhMl7.mjs → command-OHov3PEc.mjs} +1 -1
- package/dist/{command-DwXiDOeH.mjs → command-OWe3v69l.mjs} +1 -1
- package/dist/{command-83uVfXh9.mjs → command-SmWD-MeI.mjs} +1 -1
- package/dist/{completions-D06AO7A8.mjs → completions-CuqAO3N_.mjs} +1 -1
- package/dist/{connector-interrupts-DelTmNyw.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
- package/dist/{connector-telemetry-events-BwxR3G8d.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Bqq-hrpJ.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
- package/dist/{connectors-D-m3rEpk.mjs → connectors-6lVSr-fd.mjs} +1 -1
- package/dist/containers-Dqs_ZnO2.mjs +78 -0
- package/dist/containers-ncw3bd3a.mjs +376 -0
- package/dist/{content-scan-W0BNzbQp.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
- package/dist/{context-q7UaYK69.mjs → context-BBLtgdR1.mjs} +1 -1
- package/dist/{cps-BZ6hqRb5.mjs → cps-C5phNoVU.mjs} +2 -2
- package/dist/{csamScanner-Bo1t3CLh.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
- package/dist/{ct-alerting-E03faC7p.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
- package/dist/{custom-certificates-CUySSPzi.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
- package/dist/{custom-csrs-gNpWkJPQ.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
- package/dist/{custom-hostnames-abGBAbx7.mjs → custom-hostnames-wGtmFbz1.mjs} +3 -3
- package/dist/{custom-nameservers-BgNXol1P.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
- package/dist/{custom-pages-DMKX3aoD.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
- package/dist/d1-EQMUlHTJ.mjs +94 -0
- package/dist/{dcv-delegation-B5YUEWu0.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
- package/dist/{deploy-CWNm1-5v.mjs → deploy-B22sEVHd.mjs} +1 -1
- package/dist/{deploy-context-Dr6bxNcB.mjs → deploy-context-DmG9rgPO.mjs} +1 -1
- package/dist/{deploy-input-Cc0_2QlW.mjs → deploy-input-BCjcuP6u.mjs} +1 -1
- package/dist/{dev-ZA8itQE7.mjs → dev-ClhhXuNU.mjs} +1 -1
- package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
- package/dist/dist-DmRM6WSZ.mjs +449 -0
- package/dist/{dls-DIl16mLp.mjs → dls-BEHj4X9T.mjs} +1 -1
- package/dist/{dns-firewall-BZwJXHLj.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
- package/dist/{dns-QUpgljRG.mjs → dns-n4mfYBZg.mjs} +3 -3
- package/dist/{durable-objects-BCj4ykpU.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
- package/dist/{email-auth-DlHIYhCk.mjs → email-auth-DOi6yOt3.mjs} +1 -1
- package/dist/{email-routing-UKVS4DYy.mjs → email-routing-WcSPt22u.mjs} +5 -5
- package/dist/{email-security-CZjfRIg0.mjs → email-security-BXu3OGay.mjs} +15 -15
- package/dist/{email-sending-Dquc880C.mjs → email-sending-B9zTlIjt.mjs} +2 -2
- package/dist/{fieldExtractors-BbwDRquU.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
- package/dist/{firewall--mTfDnCJ.mjs → firewall-CRtYO0Ha.mjs} +5 -5
- package/dist/{flagship-cfoSwwM9.mjs → flagship-DvTFZSay.mjs} +3 -3
- package/dist/{fraud-Dcsq3EYK.mjs → fraud-uSyibsit.mjs} +5 -5
- package/dist/{google-tag-gateway-DPKSkZQi.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
- package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
- package/dist/{healthchecks-D78hIIBC.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
- package/dist/{hostnames-sF999-6H.mjs → hostnames-DvaUSzsj.mjs} +1 -1
- package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
- package/dist/{iam-Bvg_PayW.mjs → iam-Dl3cU9GI.mjs} +1 -1
- package/dist/{images-DI_lEZ4L.mjs → images-C2OkI1j7.mjs} +6 -6
- package/dist/index.mjs +1 -1
- package/dist/{init-1w_mcgk3.mjs → init-Da8pe296.mjs} +1 -1
- package/dist/{intel-BxElBUMP.mjs → intel-DoB1g_K7.mjs} +2 -2
- package/dist/{ips-DWoaKxi7.mjs → ips-BRt68epr.mjs} +1 -1
- package/dist/{k2-tFjaftl-.mjs → k2-_eq5ZY2t.mjs} +1 -1
- package/dist/{keyless-certificates-BrvxHU4J.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
- package/dist/{keys-DcwTYKRf.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
- package/dist/{kv-htXS-7uP.mjs → kv-BTYCXKML.mjs} +4 -4
- package/dist/{lazy-command-BDiIwpss.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
- package/dist/{leaked-credential-checks-bvGrLOmQ.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
- package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
- package/dist/{local-DlT72Xpn.mjs → local-BcPM4I0s.mjs} +1 -1
- package/dist/local-BundUuDT.mjs +2 -0
- package/dist/{local-runtime-CokO6qaX.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
- package/dist/{login-Ccw-mYwT.mjs → login-BBYC_BtH.mjs} +1 -1
- package/dist/{login-BGF_I_LT.mjs → login-D2uoWhWh.mjs} +1 -1
- package/dist/{logo-matches-tE8LTKgg.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
- package/dist/{logos-Bj845Mcw.mjs → logos-X5B8z7Iv.mjs} +1 -1
- package/dist/{logpush-Cs8JdvKi.mjs → logpush-C2ENi1et.mjs} +3 -3
- package/dist/{logs-C92XZvNu.mjs → logs-BKDz7kBW.mjs} +1 -1
- package/dist/{magic-cloud-networking-hNp5MMw-.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
- package/dist/{magic-network-monitoring-68GuWAnv.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
- package/dist/{magic-transit-DNd7gu4j.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
- package/dist/{managed-defense-B_wCAuFD.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
- package/dist/{managed-transforms-DZdxHPOh.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
- package/dist/{matches-B65CkflD.mjs → matches-rPMLS3Ip.mjs} +1 -1
- package/dist/{mcp-DrJW5ayK.mjs → mcp-DXUMvEWt.mjs} +4 -4
- package/dist/{mesh-DfVzYTn1.mjs → mesh-MmBCQ37q.mjs} +2 -2
- package/dist/{monetization-BGaI8CMO.mjs → monetization-DQE5VtUO.mjs} +2 -2
- package/dist/{mtls-certificates-BsU2emDD.mjs → mtls-certificates-DwkEb-Hy.mjs} +1 -1
- package/dist/{network-BEMD8P0U.mjs → network-BcfobxQY.mjs} +1 -1
- package/dist/{network-interconnects-DMu_fcbo.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -6
- package/dist/{o11y-C1a4gDGF.mjs → o11y-BBv7nedp.mjs} +13 -13
- package/dist/{oauth-Bj5Ne1o8.mjs → oauth-BUr8bPwo.mjs} +1 -1
- package/dist/{oauth-clients-p4Etdqy_.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
- package/dist/{oauth-mspHHU5U.mjs → oauth-n8um6MFk.mjs} +1 -1
- package/dist/{oauth-scopes-B2IabFza.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
- package/dist/organization-CJeOVWH7.mjs +71 -0
- package/dist/{organizations-5S6xEp7T.mjs → organizations-BpfoqZcG.mjs} +1 -1
- package/dist/{origin-ca-certificates-_VJAoK1D.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
- package/dist/{origin-post-quantum-encryption-GcldDsT2.mjs → origin-post-quantum-encryption-CM-If38w.mjs} +2 -2
- package/dist/{origin-tls-client-auth-DZHld9fA.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +1 -1
- package/dist/{page-rules-o1tAMMsD.mjs → page-rules-DOeekMrj.mjs} +4 -4
- package/dist/pages-Bn0Sg1ay.mjs +54 -0
- package/dist/{pay-per-crawl-BsnOxGYU.mjs → pay-per-crawl-qJpseNNx.mjs} +1 -1
- package/dist/{pay-per-use-BXWMCSyE.mjs → pay-per-use-C1MWKJ4O.mjs} +3 -3
- package/dist/pipelines-rCwXQw6S.mjs +44 -0
- package/dist/{precursor-B6DjBib6.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
- package/dist/previews-BEheHO3T.mjs +4 -0
- package/dist/{progress-BtkTVcHI.mjs → progress-CQqDtgmF.mjs} +1 -1
- package/dist/{prompt-RlgRrmbm.mjs → prompt-C8FyienX.mjs} +1 -1
- package/dist/{queries-yLwoJRHV.mjs → queries-DJ8looyq.mjs} +1 -1
- package/dist/{queues-CnJRaE1o.mjs → queues-BBH9Q-Tt.mjs} +7 -7
- package/dist/{r2-CuC6-zQX.mjs → r2-CdJKpP2w.mjs} +13 -13
- package/dist/{radar-DrQLcbkq.mjs → radar-CdvQL4xm.mjs} +1 -1
- package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
- package/dist/{realtime-CjsnzHxD.mjs → realtime-onrXppzh.mjs} +9 -9
- package/dist/{registrar-BgOsxTnX.mjs → registrar-CbEBc5IE.mjs} +2 -2
- package/dist/{registrar-sandbox-3ikBD9fB.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
- package/dist/{registry-CHowrQsZ.mjs → registry-PI6sO95I.mjs} +1 -1
- package/dist/{reporting-hE127s5r.mjs → reporting-bXZY6obP.mjs} +1 -1
- package/dist/{request-headers-DiJeDAn1.mjs → request-headers-D8L95bEQ.mjs} +1 -1
- package/dist/{request-tracers-BCwLxmPN.mjs → request-tracers-CihskC2A.mjs} +1 -1
- package/dist/{resource-sharing-2qvWUuMa.mjs → resource-sharing-DDqcCHVs.mjs} +2 -2
- package/dist/{resource-tagging-Dwx7iL3v.mjs → resource-tagging-D63RpBce.mjs} +1 -1
- package/dist/{rules-DxVQ6jIg.mjs → rules-CAW0-Wde.mjs} +1 -1
- package/dist/{rulesets-Cdh8YjI9.mjs → rulesets-CPir63Qc.mjs} +3 -3
- package/dist/{rum-a4CMq4Qu.mjs → rum-BfwTcuup.mjs} +1 -1
- package/dist/{run-BvHwWWUX.mjs → run-CW2Cgi0S.mjs} +1 -1
- package/dist/run-DEynXvCc.mjs +2 -0
- package/dist/{schema-flags-BzoBGPWk.mjs → schema-flags-BTItUu1K.mjs} +1 -1
- package/dist/{scim-B8XlXl8v.mjs → scim-CtZ1FeQE.mjs} +1 -1
- package/dist/{secrets-store-Cqhedh_i.mjs → secrets-store-BIuBYUJT.mjs} +1 -1
- package/dist/{security-insights-le2-DteL.mjs → security-insights-DfUus0bs.mjs} +3 -3
- package/dist/{security-txt-cCArWXur.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
- package/dist/{session-C1BhT1ZJ.mjs → session-BcM8Vyyx.mjs} +1 -1
- package/dist/{shared-BPjcpXuA.mjs → shared-CpS23WwR.mjs} +1 -1
- package/dist/{smart-shield-Csyh8hwB.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
- package/dist/{snippets-DUWx25q6.mjs → snippets-DLO3iFAg.mjs} +1 -1
- package/dist/{spawn-IysxuTNW.mjs → spawn-D07wH-MH.mjs} +1 -1
- package/dist/{spectrum-Da3UYSOR.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
- package/dist/{speed-NxlMnB2e.mjs → speed-DX5X2EIR.mjs} +1 -1
- package/dist/sql-CF044HDW.mjs +4 -0
- package/dist/src-BMATTZU_.mjs +125 -0
- package/dist/{ssl-BtaX2WEJ.mjs → ssl-CM-rChEC.mjs} +5 -5
- package/dist/{startup-profile-CdJWgNjd.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
- package/dist/startup-profile-D662WI9s.mjs +2 -0
- package/dist/state-D7uNYnoi.mjs +2 -0
- package/dist/{state-BDSvdSdP.mjs → state-DIiIGEtR.mjs} +1 -1
- package/dist/{stream-C1Ijjzn4.mjs → stream-5EmUOQvy.mjs} +3 -3
- package/dist/{submit-MdkuU_Pt.mjs → submit-lEAaRSMR.mjs} +1 -1
- package/dist/{tags-CA1xMM96.mjs → tags-CX23P4jg.mjs} +1 -1
- package/dist/telemetry-0Y5hAtCX.mjs +2 -0
- package/dist/{telemetry-Cm39QJ-M.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
- package/dist/{tenant-BB6Oszcl.mjs → tenant-DnI7QziH.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BsbgYAEo.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
- package/dist/{tunnels-CRFtyHWz.mjs → tunnels-NzYpsfi_.mjs} +15 -15
- package/dist/{turnstile-DBXWo_Xe.mjs → turnstile-M7sKCEz3.mjs} +11 -11
- package/dist/{update-check-CMXSdres.mjs → update-check-HFkPml6x.mjs} +1 -1
- package/dist/update-check-aTutXNRd.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-t-XAs0Mk.mjs → url-info-Dos9VOXV.mjs} +1 -1
- package/dist/{url-normalization-Cs4F8e0a.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
- package/dist/{url-scanner-CBIoDbTx.mjs → url-scanner-B7quLPGW.mjs} +2 -2
- package/dist/{user-CevdOMoa.mjs → user-rXca0J9M.mjs} +12 -12
- package/dist/{values-CjNlkbIh.mjs → values-D-rrZrDa.mjs} +1 -1
- package/dist/{vectorize-9d9tPmg5.mjs → vectorize-D2tf_oA8.mjs} +4 -4
- package/dist/version-BGnqDvNR.mjs +2 -0
- package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
- package/dist/{web-assets-BHot_MU8.mjs → web-assets-DQAfvPT9.mjs} +3 -3
- package/dist/{web3-CYfWAF6b.mjs → web3-MI0GQDnu.mjs} +5 -5
- package/dist/workers-By6Pf8fv.mjs +40 -0
- package/dist/{workers-builds-Dw7ho3So.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
- package/dist/{workers-for-platforms-A3yjyLh3.mjs → workers-for-platforms-DL8fC1qR.mjs} +2 -2
- package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
- package/dist/workflows-ByQLnV0E.mjs +52 -0
- package/dist/{zaraz-BsD2dMI3.mjs → zaraz-CgbpmA85.mjs} +1 -1
- package/dist/{zero-trust-CA3iGQbG.mjs → zero-trust-CpjTkkWt.mjs} +42 -42
- package/dist/{zone-D2M4EZD0.mjs → zone-DnKIe6po.mjs} +1 -1
- package/dist/{zones-BoOC_JzC.mjs → zones--5ZzsDmQ.mjs} +15 -15
- package/package.json +12 -12
- package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
- package/dist/access-C_G2MZnA.mjs +0 -2
- package/dist/ai-search-DGU1Y5By.mjs +0 -79
- package/dist/auth-CrmVwfpJ.mjs +0 -2
- package/dist/bot-management-DTgPwL7O.mjs +0 -9
- package/dist/build-B1L6xrgC.mjs +0 -2
- package/dist/containers-CVNfEjJs.mjs +0 -78
- package/dist/containers-DeoZyeQe.mjs +0 -375
- package/dist/d1-CE08YqYk.mjs +0 -93
- package/dist/diagnostics-UMbG6m4n.mjs +0 -15
- package/dist/dist-BHEmAAHr.mjs +0 -487
- package/dist/hyperdrive-qWACKfA4.mjs +0 -37
- package/dist/load-balancers-BNTUt4yG.mjs +0 -76
- package/dist/local-DlDumOSC.mjs +0 -2
- package/dist/organization-CdXt7AVZ.mjs +0 -75
- package/dist/pages-CmiOhjSl.mjs +0 -54
- package/dist/pipelines-DWLQC0F6.mjs +0 -44
- package/dist/previews-dUKEBGSM.mjs +0 -4
- package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
- package/dist/run-CkbrPJPx.mjs +0 -2
- package/dist/sql-CNdHAlQ8.mjs +0 -4
- package/dist/src-JfLDUxFr.mjs +0 -125
- package/dist/startup-profile-B2l0ChVu.mjs +0 -2
- package/dist/state-JB4_BU1o.mjs +0 -2
- package/dist/telemetry-BsYO3nxG.mjs +0 -2
- package/dist/update-check-C2oVEbXx.mjs +0 -2
- package/dist/version-BdVUXLnK.mjs +0 -2
- package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
- package/dist/workers-S17M0n3h.mjs +0 -40
- package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
- package/dist/workflows-BgGrVpSR.mjs +0 -43
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";import{t as v}from"./cli-types-9oYmRTHJ.mjs";import{n as y,t as b}from"./raw-fetch-DbXN3SlE.mjs";function ee(e){return e.usage(`$0 cloudforce-one binary-storage create
|
|
3
3
|
|
|
4
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 l=>c({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await r();o({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:l.body,file:l.file}});return}let c=await n(l),u=l.local?e:await i();if(l.accountId=u,l.file!==void 0||l.body!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);let n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e}));a(n,{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`),n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));a(n,{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function x(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ Retrieves a specific indicator by its UUID.`).positional(`indicator-id`,{type:`s
|
|
|
62
62
|
|
|
63
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 Ve={command:`patch <indicator-id>`,describe:`Updates an indicator`,builder:Be,handler:async t=>c({command:`cloudforce-one events dataset indicators patch`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset indicators patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/indicators/${t[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(t[`indicator-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"indicator-id":String(t[`indicator-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({indicatorType:p(t[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(t[`related-events`],`related-events`),tlp:p(t.tlp,`tlp`,`text`),value:p(t.value,`value`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.patch({...e,account_id:l,dataset_id:t[`dataset-id`],indicator_id:t[`indicator-id`]}));a(n,{successLabel:`Updated`});return}let m=f({indicatorType:p(t[`indicator-type`],`indicator-type`,`text`),relatedEvents:d(t[`related-events`],`related-events`),tlp:p(t.tlp,`tlp`,`text`),value:p(t.value,`value`,`text`)}),h=await s(`Updating`,async()=>c.cloudforceOne.events.dataset.indicators.patch({...m,account_id:l,dataset_id:t[`dataset-id`],indicator_id:t[`indicator-id`]}));a(h,{successLabel:`Updated`})})};function He(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`]}).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 Ue={command:`create <indicator-id>`,describe:`Create a relationship for an indicator`,builder:He,handler:async t=>c({command:`cloudforce-one events dataset indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/indicators/${t[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(t[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"indicator-id":String(t[`indicator-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({confidence:t.confidence,targetId:p(t[`target-id`],`target-id`,`text`),targetType:
|
|
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=>p(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 Ue={command:`create <indicator-id>`,describe:`Create a relationship for an indicator`,builder:He,handler:async t=>c({command:`cloudforce-one events dataset indicators relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset indicators relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/indicators/${t[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(t[`indicator-id`]))}/relationships`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"indicator-id":String(t[`indicator-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({confidence:t.confidence,targetId:p(t[`target-id`],`target-id`,`text`),targetType:t[`target-type`],type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.create({...e,account_id:l,dataset_id:t[`dataset-id`],indicator_id:t[`indicator-id`]}));a(n,{successLabel:`Created`});return}t[`target-id`]===void 0&&(t[`target-id`]=await h(`target-id`,`UUID of the target entity.`)),t[`target-type`]===void 0&&(t[`target-type`]=await g(`target-type`,`Target type. "indicator" is not allowed (indicator↔indicator relationships are not supported).`,[`event`,`tag`])),t.type===void 0&&(t.type=await h(`type`,`Relationship type.`));let d=f({confidence:t.confidence,targetId:p(t[`target-id`],`target-id`,`text`),targetType:t[`target-type`],type:p(t.type,`type`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.create({...d,account_id:l,dataset_id:t[`dataset-id`],indicator_id:t[`indicator-id`]}));a(m,{successLabel:`Created`})})};function We(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships delete <rel-uuid>
|
|
66
66
|
|
|
67
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 Ge={command:`delete <rel-uuid>`,describe:`Delete a relationship`,builder:We,handler:async t=>c({command:`cloudforce-one events dataset indicators relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset indicators relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/indicators/${t[`indicator-id`]==null?`<indicator-id>`:encodeURIComponent(String(t[`indicator-id`]))}/relationships/${t[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(t[`rel-uuid`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"indicator-id":String(t[`indicator-id`]??``),"rel-uuid":String(t[`rel-uuid`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
68
68
|
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.indicators.relationships.delete({account_id:l,dataset_id:t[`dataset-id`],indicator_id:t[`indicator-id`],rel_uuid:t[`rel-uuid`]}));a(u,{successLabel:`Deleted`})})};function Ke(e){return e.usage(`$0 cloudforce-one events dataset indicators relationships list
|
|
@@ -75,14 +75,14 @@ Returns all mirrored tags from the indicator dataset (DO mirror table). No pagin
|
|
|
75
75
|
|
|
76
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 nt={command:`create <dataset-id>`,describe:`Moves specified events from one dataset to another dataset`,builder:tt,handler:async t=>c({command:`cloudforce-one events dataset move create`,classification:{safeFlags:[`keep-raw-data`,`dry-run`]}},t,async()=>{let c={keepRawData:t[`keep-raw-data`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset move create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/move`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},query:c,bodyKind:`json`,body:t.body===void 0?f({destDatasetId:p(t[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:t[`event-ids`]}):u(t.body)});return}let l=await n(t),d=t.local?e:await i();if(t.accountId=d,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>l.cloudforceOne.events.dataset.move.create({...e,account_id:d,dataset_id:t[`dataset-id`],...c}));a(n,{successLabel:`Created`});return}if(t[`dest-dataset-id`]===void 0&&(t[`dest-dataset-id`]=await h(`dest-dataset-id`,`The destDatasetId field`)),t[`event-ids`]===void 0)throw Error(`--event-ids is required (or pass --body with this field set).`);let m=f({destDatasetId:p(t[`dest-dataset-id`],`dest-dataset-id`,`text`),eventIds:t[`event-ids`]});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Creating`,async()=>l.cloudforceOne.events.dataset.move.create({...m,account_id:d,dataset_id:t[`dataset-id`],...c}));a(g,{successLabel:`Created`})})},rt={command:`move`,describe:`Operations for events.dataset.move`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function it(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`]}).option(`subject-id`,{type:`string`,description:`The subjectId field`}).option(`subject-type`,{type:`string`,description:`The subjectType field`,choices:[`account`,`group`]}).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 at={command:`create <dataset-id>`,describe:`Create a permission for dataset`,builder:it,handler:async t=>c({command:`cloudforce-one events dataset permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({role:
|
|
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=>p(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=>p(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 at={command:`create <dataset-id>`,describe:`Create a permission for dataset`,builder:it,handler:async t=>c({command:`cloudforce-one events dataset permissions create`,classification:{safeFlags:[`role`,`subject-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({role:t.role,subjectId:p(t[`subject-id`],`subject-id`,`text`),subjectType:t[`subject-type`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.dataset.permissions.create({...e,account_id:l,dataset_id:t[`dataset-id`]}));a(n,{successLabel:`Created`});return}t.role===void 0&&(t.role=await g(`role`,`The role field`,[`read`,`write`])),t[`subject-id`]===void 0&&(t[`subject-id`]=await h(`subject-id`,`The subjectId field`)),t[`subject-type`]===void 0&&(t[`subject-type`]=await g(`subject-type`,`The subjectType field`,[`account`,`group`]));let d=f({role:t.role,subjectId:p(t[`subject-id`],`subject-id`,`text`),subjectType:t[`subject-type`]}),m=await s(`Creating`,async()=>c.cloudforceOne.events.dataset.permissions.create({...d,account_id:l,dataset_id:t[`dataset-id`]}));a(m,{successLabel:`Created`})})};function ot(e){return e.usage(`$0 cloudforce-one events dataset permissions delete <grant-id>
|
|
79
79
|
|
|
80
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 st={command:`delete <grant-id>`,describe:`Delete a permission for dataset`,builder:ot,handler:async t=>c({command:`cloudforce-one events dataset permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions/${t[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(t[`grant-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"grant-id":String(t[`grant-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
81
81
|
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.events.dataset.permissions.delete({account_id:l,dataset_id:t[`dataset-id`],grant_id:t[`grant-id`]}));a(u,{successLabel:`Deleted`})})};function ct(e){return e.usage(`$0 cloudforce-one events dataset permissions get <dataset-id>
|
|
82
82
|
|
|
83
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 lt={command:`get <dataset-id>`,describe:`List permissions for dataset`,builder:ct,handler:async t=>c({command:`cloudforce-one events dataset permissions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.events.dataset.permissions.get({account_id:l,dataset_id:t[`dataset-id`]}));a(u,{successLabel:`Loaded`})})};function ut(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`]}).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:`update <grant-id>`,describe:`Update a permission for dataset`,builder:ut,handler:async t=>c({command:`cloudforce-one events dataset permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions/${t[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(t[`grant-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"grant-id":String(t[`grant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({role:
|
|
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=>p(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 dt={command:`update <grant-id>`,describe:`Update a permission for dataset`,builder:ut,handler:async t=>c({command:`cloudforce-one events dataset permissions update`,classification:{safeFlags:[`role`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset permissions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/permissions/${t[`grant-id`]==null?`<grant-id>`:encodeURIComponent(String(t[`grant-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``),"grant-id":String(t[`grant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({role:t.role}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.events.dataset.permissions.update({...e,account_id:l,dataset_id:t[`dataset-id`],grant_id:t[`grant-id`]}));a(n,{successLabel:`Updated`});return}t.role===void 0&&(t.role=await g(`role`,`The role field`,[`read`,`write`]));let d=f({role:t.role}),p=await s(`Updating`,async()=>c.cloudforceOne.events.dataset.permissions.update({...d,account_id:l,dataset_id:t[`dataset-id`],grant_id:t[`grant-id`]}));a(p,{successLabel:`Updated`})})},ft={command:`permissions`,describe:`Operations for events.dataset.permissions`,builder:e=>e.command(at).command(st).command(lt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pt(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 mt={command:`get <tag-uuid>`,describe:`List indicators related to a tag`,builder:v(pt),handler:async t=>c({command:`cloudforce-one events dataset tags indicators get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`],page:t.page,pageSize:t[`page-size`],indicatorType:t[`indicator-type`],relatedEvent:t[`related-event`],search:t.search};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset tags indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}/indicators`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.events.dataset.tags.indicators.get({account_id:u,tag_uuid:t[`tag-uuid`],...c}));a(d,{successLabel:`Loaded`})})},ht={command:`indicators`,describe:`Operations for events.dataset.tags.indicators`,builder:e=>e.command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`tags`,describe:`Operations for events.dataset.tags`,builder:e=>e.command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _t(e){return e.usage(`$0 cloudforce-one events dataset target industries get <dataset-id>
|
|
88
88
|
|
|
@@ -118,7 +118,7 @@ Updates a raw event`).positional(`raw-id`,{type:`string`,description:`Raw Event
|
|
|
118
118
|
|
|
119
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 cn={command:`create <event-id>`,describe:`Creates event references for a event`,builder:sn,handler:async t=>c({command:`cloudforce-one events relate create create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events relate create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/relate/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/create`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({events:t.events}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.relate.create.create({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Created`});return}if(t.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=f({events:t.events}),p=await s(`Creating`,async()=>c.cloudforceOne.events.relate.create.create({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Created`})})},ln={command:`create`,describe:`Operations for events.relate.create`,builder:e=>e.command(cn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},un={command:`relate`,describe:`Operations for events.relate`,builder:e=>e.command(ln).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dn(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`]}).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 fn={command:`create`,describe:`Create a relationship between two events`,builder:dn,handler:async t=>c({command:`cloudforce-one events relationships create create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events relationships create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({childIds:t[`child-ids`],datasetId:p(t[`dataset-id`],`dataset-id`,`text`),parentId:p(t[`parent-id`],`parent-id`,`text`),relationshipType:
|
|
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=>p(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 fn={command:`create`,describe:`Create a relationship between two events`,builder:dn,handler:async t=>c({command:`cloudforce-one events relationships create create`,classification:{safeFlags:[`relationship-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events relationships create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/relationships/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({childIds:t[`child-ids`],datasetId:p(t[`dataset-id`],`dataset-id`,`text`),parentId:p(t[`parent-id`],`parent-id`,`text`),relationshipType:t[`relationship-type`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.relationships.create.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`child-ids`]===void 0)throw Error(`--child-ids is required (or pass --body with this field set).`);t[`dataset-id`]===void 0&&(t[`dataset-id`]=await h(`dataset-id`,`Dataset identifier where the events are stored`)),t[`parent-id`]===void 0&&(t[`parent-id`]=await h(`parent-id`,`UUID of the parent event that will be the source of the relationship`)),t[`relationship-type`]===void 0&&(t[`relationship-type`]=await g(`relationship-type`,`Type of relationship to create between parent and child events`,[`related_to`,`caused_by`,`attributed_to`]));let d=f({childIds:t[`child-ids`],datasetId:p(t[`dataset-id`],`dataset-id`,`text`),parentId:p(t[`parent-id`],`parent-id`,`text`),relationshipType:t[`relationship-type`]}),m=await s(`Creating`,async()=>c.cloudforceOne.events.relationships.create.create({...d,account_id:l}));a(m,{successLabel:`Created`})})},pn={command:`create`,describe:`Operations for events.relationships.create`,builder:e=>e.command(fn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mn(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 hn={command:`get <event-id>`,describe:`Filter and list events related to specific event`,builder:v(mn),handler:async t=>c({command:`cloudforce-one events relationships get`,classification:{safeFlags:[`direction`,`include-parent`,`dry-run`]}},t,async()=>{let c={direction:t.direction,maxDepth:t[`max-depth`],relationshipTypes:t[`relationship-types`],indicatorTypeIds:t[`indicator-type-ids`],datasetId:t[`dataset-id`],includeParent:t[`include-parent`],page:t.page,pageSize:t[`page-size`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events relationships get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/by-id/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/relationships`,pathParams:{"event-id":String(t[`event-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.events.relationships.get({account_id:u,event_id:t[`event-id`],...c}));a(d,{successLabel:`Loaded`})})},gn={command:`relationships`,describe:`Operations for events.relationships`,builder:e=>e.command(hn).command(pn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _n(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 vn={command:`list`,describe:`Lists all Actors`,builder:v(_n),handler:async t=>c({command:`cloudforce-one events tags categories actors list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,pageSize:t[`page-size`],value:t.value,filters:t.filters};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.events.tags.categories.actors.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},yn={command:`actors`,describe:`Operations for events.tags.categories.actors`,builder:e=>e.command(vn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bn(e){return e.usage(`$0 cloudforce-one events tags categories create create
|
|
122
122
|
|
|
123
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 xn={command:`create`,describe:`Creates a new tag category (SoT)`,builder:bn,handler:async t=>c({command:`cloudforce-one events tags categories create create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags categories create create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/categories/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),name:p(t.name,`name`,`text`),schema:d(t.schema,`schema`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.tags.categories.create.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await h(`name`,`The name field`));let m=f({description:p(t.description,`description`,`text`),name:p(t.name,`name`,`text`),schema:d(t.schema,`schema`)}),g=await s(`Creating`,async()=>c.cloudforceOne.events.tags.categories.create.create({...m,account_id:l}));a(g,{successLabel:`Created`})})},Sn={command:`create`,describe:`Operations for events.tags.categories.create`,builder:e=>e.command(xn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cn(e){return e.usage(`$0 cloudforce-one events tags categories delete <category-uuid>
|
|
124
124
|
|
|
@@ -136,9 +136,9 @@ Deletes a Source-of-Truth tag by UUID.`).positional(`tag-uuid`,{type:`string`,de
|
|
|
136
136
|
|
|
137
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 Fn={command:`get-by-id <tag-uuid>`,describe:`Gets a tag by UUID (SoT)`,builder:Pn,handler:async t=>c({command:`cloudforce-one events tags get-by-id`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags get-by-id`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.events.tags.getById({account_id:l,tag_uuid:t[`tag-uuid`]}));a(u,{successLabel:`Loaded`})})};function In(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 Ln={command:`get`,describe:`Lists all tags (SoT)`,builder:v(In),handler:async t=>c({command:`cloudforce-one events tags get`,classification:{safeFlags:[`cache`,`dry-run`]}},t,async()=>{let c={page:t.page,pageSize:t[`page-size`],search:t.search,categoryUuid:t[`category-uuid`],filters:t.filters,cache:t.cache};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.events.tags.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Rn(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`]}).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 zn={command:`patch <tag-uuid>`,describe:`Updates a tag (SoT)`,builder:Rn,handler:async t=>c({command:`cloudforce-one events tags patch`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},bodyKind:`json`,body:t.body===void 0?f({aliasGroupNames:t[`alias-group-names`],aliasGroupNamesInternal:t[`alias-group-names-internal`],aliases:d(t.aliases,`aliases`),categoryUuid:p(t[`category-uuid`],`category-uuid`,`text`),confidence:t.confidence,dateOfDiscovery:p(t[`date-of-discovery`],`date-of-discovery`,`text`),description:p(t.description,`description`,`text`),externalReferenceLinks:t[`external-reference-links`],externalReferences:d(t[`external-references`],`external-references`),internalAliases:d(t[`internal-aliases`],`internal-aliases`),internalDescription:p(t[`internal-description`],`internal-description`,`text`),lastSeen:p(t[`last-seen`],`last-seen`,`text`),tlp:
|
|
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=>p(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 zn={command:`patch <tag-uuid>`,describe:`Updates a tag (SoT)`,builder:Rn,handler:async t=>c({command:`cloudforce-one events tags patch`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},bodyKind:`json`,body:t.body===void 0?f({aliasGroupNames:t[`alias-group-names`],aliasGroupNamesInternal:t[`alias-group-names-internal`],aliases:d(t.aliases,`aliases`),categoryUuid:p(t[`category-uuid`],`category-uuid`,`text`),confidence:t.confidence,dateOfDiscovery:p(t[`date-of-discovery`],`date-of-discovery`,`text`),description:p(t.description,`description`,`text`),externalReferenceLinks:t[`external-reference-links`],externalReferences:d(t[`external-references`],`external-references`),internalAliases:d(t[`internal-aliases`],`internal-aliases`),internalDescription:p(t[`internal-description`],`internal-description`,`text`),lastSeen:p(t[`last-seen`],`last-seen`,`text`),tlp:t.tlp,value:p(t.value,`value`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.events.tags.patch({...e,account_id:l,tag_uuid:t[`tag-uuid`]}));a(n,{successLabel:`Updated`});return}let m=f({aliasGroupNames:t[`alias-group-names`],aliasGroupNamesInternal:t[`alias-group-names-internal`],aliases:d(t.aliases,`aliases`),categoryUuid:p(t[`category-uuid`],`category-uuid`,`text`),confidence:t.confidence,dateOfDiscovery:p(t[`date-of-discovery`],`date-of-discovery`,`text`),description:p(t.description,`description`,`text`),externalReferenceLinks:t[`external-reference-links`],externalReferences:d(t[`external-references`],`external-references`),internalAliases:d(t[`internal-aliases`],`internal-aliases`),internalDescription:p(t[`internal-description`],`internal-description`,`text`),lastSeen:p(t[`last-seen`],`last-seen`,`text`),tlp:t.tlp,value:p(t.value,`value`,`text`)}),h=await s(`Updating`,async()=>c.cloudforceOne.events.tags.patch({...m,account_id:l,tag_uuid:t[`tag-uuid`]}));a(h,{successLabel:`Updated`})})};function Bn(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`]}).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 Vn={command:`create <tag-uuid>`,describe:`Create a relationship for a tag`,builder:Bn,handler:async t=>c({command:`cloudforce-one events tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},bodyKind:`json`,body:t.body===void 0?f({confidence:t.confidence,datasetId:p(t[`dataset-id`],`dataset-id`,`text`),targetId:p(t[`target-id`],`target-id`,`text`),targetType:
|
|
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=>p(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 Vn={command:`create <tag-uuid>`,describe:`Create a relationship for a tag`,builder:Bn,handler:async t=>c({command:`cloudforce-one events tags relationships create`,classification:{safeFlags:[`target-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags relationships create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},bodyKind:`json`,body:t.body===void 0?f({confidence:t.confidence,datasetId:p(t[`dataset-id`],`dataset-id`,`text`),targetId:p(t[`target-id`],`target-id`,`text`),targetType:t[`target-type`],type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.events.tags.relationships.create({...e,account_id:l,tag_uuid:t[`tag-uuid`]}));a(n,{successLabel:`Created`});return}t[`dataset-id`]===void 0&&(t[`dataset-id`]=await h(`dataset-id`,`Dataset UUID where the relationship row will be stored (locates the Indicators DO).`)),t[`target-id`]===void 0&&(t[`target-id`]=await h(`target-id`,`UUID of the target entity.`)),t[`target-type`]===void 0&&(t[`target-type`]=await g(`target-type`,`Target type. "tag" is not allowed (tag↔tag relationships are not supported).`,[`event`,`indicator`])),t.type===void 0&&(t.type=await h(`type`,`Relationship type.`));let d=f({confidence:t.confidence,datasetId:p(t[`dataset-id`],`dataset-id`,`text`),targetId:p(t[`target-id`],`target-id`,`text`),targetType:t[`target-type`],type:p(t.type,`type`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.events.tags.relationships.create({...d,account_id:l,tag_uuid:t[`tag-uuid`]}));a(m,{successLabel:`Created`})})};function Hn(e){return e.usage(`$0 cloudforce-one events tags relationships delete <rel-uuid>
|
|
142
142
|
|
|
143
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 Un={command:`delete <rel-uuid>`,describe:`Delete a tag relationship`,builder:Hn,handler:async t=>c({command:`cloudforce-one events tags relationships delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{let c={datasetId:t[`dataset-id`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags relationships delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}/relationships/${t[`rel-uuid`]==null?`<rel-uuid>`:encodeURIComponent(String(t[`rel-uuid`]))}`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``),"rel-uuid":String(t[`rel-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();if(t.accountId=u,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
144
144
|
`);return}let d=await s(`Deleting`,async()=>l.cloudforceOne.events.tags.relationships.delete({account_id:u,tag_uuid:t[`tag-uuid`],rel_uuid:t[`rel-uuid`],...c}));a(d,{successLabel:`Deleted`})})};function Wn(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 Gn={command:`list`,describe:`List relationships for a tag`,builder:v(Wn),handler:async t=>c({command:`cloudforce-one events tags relationships list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasets:t.datasets,search:t.search,expand:t.expand,cursor:t.cursor,pageSize:t[`page-size`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags relationships list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/${t[`tag-uuid`]==null?`<tag-uuid>`:encodeURIComponent(String(t[`tag-uuid`]))}/relationships`,pathParams:{"tag-uuid":String(t[`tag-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.events.tags.relationships.list({account_id:u,tag_uuid:t[`tag-uuid`],...c}));a(d,{successLabel:`Loaded`})})};function Kn(e){return e.usage(`$0 cloudforce-one events tags relationships update <rel-uuid>
|
|
@@ -162,7 +162,7 @@ Uses bounded full-span top-N candidates and daily event-date buckets. Results ar
|
|
|
162
162
|
|
|
163
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 xr={command:`get <backtest-id>`,describe:`Get a persisted account-interest backtest`,builder:br,handler:async t=>c({command:`cloudforce-one priority-intelligence interests backtests get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests backtests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests/${t[`backtest-id`]==null?`<backtest-id>`:encodeURIComponent(String(t[`backtest-id`]))}`,pathParams:{"backtest-id":String(t[`backtest-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.get({account_id:l,backtest_id:t[`backtest-id`]}));a(u,{successLabel:`Loaded`})})},Sr={command:`backtests`,describe:`Operations for priority-intelligence.interests.backtests`,builder:e=>e.command(yr).command(xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cr(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`]}).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 wr={command:`create`,describe:`Create an account interest for PIR Option 2`,builder:Cr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests create`,classification:{safeFlags:[`dimension`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({dimension:
|
|
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=>p(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 wr={command:`create`,describe:`Create an account interest for PIR Option 2`,builder:Cr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests create`,classification:{safeFlags:[`dimension`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({dimension:t.dimension,enabled:t.enabled,value:p(t.value,`value`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.dimension===void 0&&(t.dimension=await g(`dimension`,`The dimension field`,[`actor`,`targetIndustry`,`category`,`country`,`attackerCountry`,`targetCountry`,`mitreAttack`,`killChain`,`mitreCapec`])),t.value===void 0&&(t.value=await h(`value`,`The value field`));let d=f({dimension:t.dimension,enabled:t.enabled,value:p(t.value,`value`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Tr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests delete <interest-id>
|
|
166
166
|
|
|
167
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 Er={command:`delete <interest-id>`,describe:`Delete an account interest for PIR Option 2`,builder:Tr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/${t[`interest-id`]==null?`<interest-id>`:encodeURIComponent(String(t[`interest-id`]))}`,pathParams:{"interest-id":String(t[`interest-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
168
168
|
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.priorityIntelligence.interests.delete({account_id:l,interest_id:t[`interest-id`]}));a(u,{successLabel:`Deleted`})})};function Dr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations create
|
|
@@ -179,269 +179,227 @@ Lists free-form Priority Intelligence Requirements for the account. Results are
|
|
|
179
179
|
|
|
180
180
|
Returns the account's annual PIR quota including total allowed, remaining, and anniversary dates.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Br={command:`create`,describe:`Get PIR quota for an account`,builder:zr,handler:async t=>c({command:`cloudforce-one priority-intelligence quota create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.quota.create({account_id:l}));a(u,{successLabel:`Created`})})},Vr={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(Br).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hr(e){return e.usage(`$0 cloudforce-one priority-intelligence update <priority-id>
|
|
181
181
|
|
|
182
|
-
Updates a free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`requirement`,{type:`string`,description:`The requirement 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 Ur={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:Hr,handler:async t=>c({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${t[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(t[`priority-id`]))}`,pathParams:{"priority-id":String(t[`priority-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...e,account_id:l,priority_id:t[`priority-id`]}));a(n,{successLabel:`Updated`});return}let d=f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...d,account_id:l,priority_id:t[`priority-id`]}));a(m,{successLabel:`Updated`})})},Wr={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(ur).command(fr).command(_r).command(Rr).command(Ur).command(cr).command(hr).command(Ir).command(Vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gr(e){return e.usage(`$0 cloudforce-one requests
|
|
182
|
+
Updates a free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`priority`,{type:`number`,description:`The priority field`}).option(`requirement`,{type:`string`,description:`The requirement 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 Ur={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:Hr,handler:async t=>c({command:`cloudforce-one priority-intelligence update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/${t[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(t[`priority-id`]))}`,pathParams:{"priority-id":String(t[`priority-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...e,account_id:l,priority_id:t[`priority-id`]}));a(n,{successLabel:`Updated`});return}let d=f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.update({...d,account_id:l,priority_id:t[`priority-id`]}));a(m,{successLabel:`Updated`})})},Wr={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(ur).command(fr).command(_r).command(Rr).command(Ur).command(cr).command(hr).command(Ir).command(Vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gr(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
|
|
183
183
|
|
|
184
|
-
|
|
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 Kr={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Gr,handler:async t=>c({command:`cloudforce-one requests assets download`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/assets/${t[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(t[`asset-id`]))}/download`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``),"asset-id":String(t[`asset-id`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>b(`/accounts/${a}/cloudforce-one/v2/requests/${encodeURIComponent(String(t[`project-type`]))}/${encodeURIComponent(String(t[`request-id`]))}/assets/${encodeURIComponent(String(t[`asset-id`]))}/download`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));y(t.text===!0?c.toString(`utf-8`):c)})};function qr(e){return e.usage(`$0 cloudforce-one requests assets list
|
|
185
185
|
|
|
186
|
-
|
|
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 Jr={command:`list`,describe:`List assets in request (Customer)`,builder:v(qr),handler:async t=>c({command:`cloudforce-one requests assets list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/assets/list`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.assets.list({account_id:l,project_type:t[`project-type`],request_id:t[`request-id`]}));a(u,{successLabel:`Loaded`})})};function Yr(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.requests.assets.delete({account_id:l,request_id:t[`request-id`],asset_id:t[`asset-id`]}));a(u,{successLabel:`Deleted`})})};function Qr(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
|
|
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 Xr={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:v(Yr),handler:async l=>c({command:`cloudforce-one requests assets upload`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${l[`project-type`]==null?`<project-type>`:encodeURIComponent(String(l[`project-type`]))}/${l[`request-id`]==null?`<request-id>`:encodeURIComponent(String(l[`request-id`]))}/assets/upload`,pathParams:{"project-type":String(l[`project-type`]??``),"request-id":String(l[`request-id`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,description:l.description,metadata:l.metadata}});return}let c=await n(l),u=l.local?e:await i();if(l.accountId=u,l.file!==void 0||l.body!==void 0||l.description!==void 0||l.metadata!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);l.description!==void 0&&e.append(`description`,String(p(l.description,`description`,`text`)??``)),l.metadata!==void 0&&e.append(`metadata`,String(p(l.metadata,`metadata`,`text`)??``));let n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(l[`project-type`]))}/${encodeURIComponent(String(l[`request-id`]))}/assets/upload`,{body:e}));a(n,{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`),n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${u}/cloudforce-one/v2/requests/${encodeURIComponent(String(l[`project-type`]))}/${encodeURIComponent(String(l[`request-id`]))}/assets/upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));a(n,{successLabel:`Created`});return}let d=await s(`Creating`,async()=>c.cloudforceOne.requests.assets.upload({account_id:u,project_type:l[`project-type`],request_id:l[`request-id`]}));a(d,{successLabel:`Created`})})},Zr={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Kr).command(Jr).command(Xr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qr(e){return e.usage(`$0 cloudforce-one requests constants get <project-type>
|
|
190
189
|
|
|
191
|
-
|
|
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 $r={command:`get <project-type>`,describe:`Get request constants`,builder:v(Qr),handler:async t=>c({command:`cloudforce-one requests constants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests constants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/constants`,pathParams:{"project-type":String(t[`project-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.constants.get({account_id:l,project_type:t[`project-type`]}));a(u,{successLabel:`Loaded`})})},ei={command:`constants`,describe:`Operations for requests.constants`,builder:e=>e.command($r).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ti(e){return e.usage(`$0 cloudforce-one requests getRequestList <project-type>
|
|
192
191
|
|
|
193
|
-
Retrieves
|
|
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 ni={command:`getRequestList <project-type>`,describe:`List RFIs`,builder:v(ti),handler:async t=>c({command:`cloudforce-one requests getRequestList`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,pageSize:t[`page-size`],status:t.status,search:t.search,createdBy:t[`created-by`],assignee:t.assignee,requestType:t[`request-type`],priority:t.priority,tlp:t.tlp,id:t.id,readableId:t[`readable-id`],summary:t.summary,accountId:t[`filter-account-id`],metadata:t.metadata,orderBy:t[`order-by`],order:t.order};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests getRequestList`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}`,pathParams:{"project-type":String(t[`project-type`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.requests.getRequestList({account_id:u,project_type:t[`project-type`],...c}));a(d,{successLabel:`Loaded`})})};function ri(e){return e.usage(`$0 cloudforce-one requests getRequestRead <request-id>
|
|
194
193
|
|
|
195
|
-
|
|
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 ii={command:`getRequestRead <request-id>`,describe:`Get an RFI by ID`,builder:v(ri),handler:async t=>c({command:`cloudforce-one requests getRequestRead`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests getRequestRead`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.getRequestRead({account_id:l,project_type:t[`project-type`],request_id:t[`request-id`]}));a(u,{successLabel:`Loaded`})})};function ai(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
|
|
196
195
|
|
|
197
|
-
|
|
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 oi={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:ai,handler:async t=>c({command:`cloudforce-one requests legal-response access-check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.legalResponse.accessCheck({account_id:l}));a(u,{successLabel:`Loaded`})})},si={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(oi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ci(e){return e.usage(`$0 cloudforce-one requests messages create <request-id>
|
|
198
197
|
|
|
199
|
-
|
|
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=>p(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 li={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:ci,handler:async d=>c({command:`cloudforce-one requests messages create`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){let e=await r();o({command:`cf cloudforce-one requests messages create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${d[`project-type`]==null?`<project-type>`:encodeURIComponent(String(d[`project-type`]))}/${d[`request-id`]==null?`<request-id>`:encodeURIComponent(String(d[`request-id`]))}/messages/new`,pathParams:{"project-type":String(d[`project-type`]??``),"request-id":String(d[`request-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({attachment_asset_ids:d[`attachment-asset-ids`],author_id:p(d[`author-id`],`author-id`,`text`),author_name:p(d[`author-name`],`author-name`,`text`),content:p(d.content,`content`,`text`),publish:d.publish,tlp:d.tlp}):u(d.body)});return}let m=await n(d),g=d.local?e:await i();if(d.accountId=g,d.body){let e=u(d.body),n=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${g}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/new`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Created`});return}d.content===void 0&&(d.content=await h(`content`,`The content field`));let _={};d[`attachment-asset-ids`]!==void 0&&l(_,[`attachment_asset_ids`],d[`attachment-asset-ids`]),d[`author-id`]!==void 0&&l(_,[`author_id`],p(d[`author-id`],`author-id`,`text`)),d[`author-name`]!==void 0&&l(_,[`author_name`],p(d[`author-name`],`author-name`,`text`)),d.content!==void 0&&l(_,[`content`],p(d.content,`content`,`text`)),d.publish!==void 0&&l(_,[`publish`],d.publish),d.tlp!==void 0&&l(_,[`tlp`],d.tlp);let v=await s(`Creating`,async()=>t(m,`POST`,`/accounts/${g}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/new`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0}));a(v,{successLabel:`Created`})})};function ui(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
|
|
200
199
|
|
|
201
|
-
|
|
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 di={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:ui,handler:async t=>c({command:`cloudforce-one requests messages get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests messages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/messages/${t[`message-id`]==null?`<message-id>`:encodeURIComponent(String(t[`message-id`]))}`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``),"message-id":String(t[`message-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.messages.get({account_id:l,project_type:t[`project-type`],request_id:t[`request-id`],message_id:t[`message-id`]}));a(u,{successLabel:`Loaded`})})};function fi(e){return e.usage(`$0 cloudforce-one requests messages list
|
|
202
201
|
|
|
203
|
-
|
|
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 pi={command:`list`,describe:`List messages for an RFI request`,builder:fi,handler:async t=>c({command:`cloudforce-one requests messages list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests messages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/messages`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.requests.messages.list({account_id:u,project_type:t[`project-type`],request_id:t[`request-id`],...c}));a(d,{successLabel:`Loaded`})})};function mi(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
|
|
204
203
|
|
|
205
|
-
|
|
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=>p(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 hi={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:mi,handler:async d=>c({command:`cloudforce-one requests messages update`,classification:{safeFlags:[`publish`,`tlp`,`dry-run`]}},d,async()=>{let c={};if(d[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(d[`idempotency-key`])),d.dryRun){let e=await r();o({command:`cf cloudforce-one requests messages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${d[`project-type`]==null?`<project-type>`:encodeURIComponent(String(d[`project-type`]))}/${d[`request-id`]==null?`<request-id>`:encodeURIComponent(String(d[`request-id`]))}/messages/${d[`message-id`]==null?`<message-id>`:encodeURIComponent(String(d[`message-id`]))}`,pathParams:{"project-type":String(d[`project-type`]??``),"request-id":String(d[`request-id`]??``),"message-id":String(d[`message-id`]??``)},bodyKind:`json`,body:d.body===void 0?f({attachment_asset_ids:d[`attachment-asset-ids`],content:p(d.content,`content`,`text`),publish:d.publish,tlp:d.tlp}):u(d.body)});return}let m=await n(d),_=d.local?e:await i();if(d.accountId=_,d.body){let e=u(d.body),n=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${_}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/${encodeURIComponent(String(d[`message-id`]))}`,{body:e,headers:Object.keys(c).length>0?c:void 0}));a(n,{successLabel:`Updated`});return}if(d.content===void 0&&(d.content=await h(`content`,`The content field`)),d.publish===void 0)throw Error(`--publish is required (or pass --body with this field set).`);d.tlp===void 0&&(d.tlp=await g(`tlp`,`The tlp field`,[`clear`,`green`,`amber`,`amber-strict`,`red`,`white`]));let v={};d[`attachment-asset-ids`]!==void 0&&l(v,[`attachment_asset_ids`],d[`attachment-asset-ids`]),d.content!==void 0&&l(v,[`content`],p(d.content,`content`,`text`)),d.publish!==void 0&&l(v,[`publish`],d.publish),d.tlp!==void 0&&l(v,[`tlp`],d.tlp);let y=await s(`Updating`,async()=>t(m,`PUT`,`/accounts/${_}/cloudforce-one/v2/requests/${encodeURIComponent(String(d[`project-type`]))}/${encodeURIComponent(String(d[`request-id`]))}/messages/${encodeURIComponent(String(d[`message-id`]))}`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0}));a(y,{successLabel:`Updated`})})},gi={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(li).command(di).command(pi).command(hi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _i(e){return e.usage(`$0 cloudforce-one requests metadata list
|
|
206
205
|
|
|
207
|
-
|
|
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 vi={command:`list`,describe:`List metadata fields for an RFI type`,builder:v(_i),handler:async t=>c({command:`cloudforce-one requests metadata list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={request_type:t[`request-type`],country:t.country};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests metadata list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/metadata`,pathParams:{"project-type":String(t[`project-type`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.requests.metadata.list({account_id:u,project_type:t[`project-type`],...c}));a(d,{successLabel:`Loaded`})})},yi={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command(vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function bi(e){return e.usage(`$0 cloudforce-one requests postRequestCreate <project-type>
|
|
208
207
|
|
|
209
|
-
|
|
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=>p(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=>p(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 xi={command:`postRequestCreate <project-type>`,describe:`Creates a new RFI`,builder:v(bi),handler:async t=>c({command:`cloudforce-one requests postRequestCreate`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests postRequestCreate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}`,pathParams:{"project-type":String(t[`project-type`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),eventId:p(t[`event-id`],`event-id`,`text`),priority:t.priority,request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),title:p(t.title,`title`,`text`),tlp:t.tlp}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.requests.postRequestCreate({...e,account_id:l,project_type:t[`project-type`]}));a(n,{successLabel:`Created`});return}let d=f({description:p(t.description,`description`,`text`),eventId:p(t[`event-id`],`event-id`,`text`),priority:t.priority,request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),title:p(t.title,`title`,`text`),tlp:t.tlp}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.postRequestCreate({...d,account_id:l,project_type:t[`project-type`]}));a(m,{successLabel:`Created`})})};function Si(e){return e.usage(`$0 cloudforce-one requests putRequestUpdate <request-id>
|
|
210
209
|
|
|
211
|
-
|
|
212
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.requests.delete({account_id:l,request_id:t[`request-id`]}));a(u,{successLabel:`Deleted`})})};function xi(e){return e.usage(`$0 cloudforce-one requests getRequestList <project-type>
|
|
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=>p(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=>p(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 Ci={command:`putRequestUpdate <request-id>`,describe:`Update an RFI`,builder:v(Si),handler:async t=>c({command:`cloudforce-one requests putRequestUpdate`,classification:{safeFlags:[`priority`,`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests putRequestUpdate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}`,pathParams:{"project-type":String(t[`project-type`]??``),"request-id":String(t[`request-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({description:p(t.description,`description`,`text`),eventId:p(t[`event-id`],`event-id`,`text`),priority:t.priority,request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),summary:p(t.summary,`summary`,`text`),title:p(t.title,`title`,`text`),tlp:t.tlp}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.requests.putRequestUpdate({...e,account_id:l,project_type:t[`project-type`],request_id:t[`request-id`]}));a(n,{successLabel:`Updated`});return}let d=f({description:p(t.description,`description`,`text`),eventId:p(t[`event-id`],`event-id`,`text`),priority:t.priority,request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),summary:p(t.summary,`summary`,`text`),title:p(t.title,`title`,`text`),tlp:t.tlp}),m=await s(`Updating`,async()=>c.cloudforceOne.requests.putRequestUpdate({...d,account_id:l,project_type:t[`project-type`],request_id:t[`request-id`]}));a(m,{successLabel:`Updated`})})};function wi(e){return e.usage(`$0 cloudforce-one requests quota get <project-type>
|
|
213
211
|
|
|
214
|
-
|
|
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 Ti={command:`get <project-type>`,describe:`Get request token quota`,builder:v(wi),handler:async t=>c({command:`cloudforce-one requests quota get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/quota`,pathParams:{"project-type":String(t[`project-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.quota.get({account_id:l,project_type:t[`project-type`]}));a(u,{successLabel:`Loaded`})})},Ei={command:`quota`,describe:`Operations for requests.quota`,builder:e=>e.command(Ti).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Di(e){return e.usage(`$0 cloudforce-one requests types list
|
|
215
213
|
|
|
216
|
-
|
|
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 $={command:`list`,describe:`List visible request types for a project (dashboard)`,builder:Di,handler:async t=>c({command:`cloudforce-one requests types list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests types list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/types`,pathParams:{"project-type":String(t[`project-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.types.list({account_id:l,project_type:t[`project-type`]}));a(u,{successLabel:`Loaded`})})},Oi={command:`types`,describe:`Operations for requests.types`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ki(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
|
|
217
215
|
|
|
218
|
-
|
|
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 Ai={command:`get <project-type>`,describe:`Get current user profile`,builder:ki,handler:async t=>c({command:`cloudforce-one requests user get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests user get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/requests/${t[`project-type`]==null?`<project-type>`:encodeURIComponent(String(t[`project-type`]))}/user/me`,pathParams:{"project-type":String(t[`project-type`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.requests.user.get({account_id:l,project_type:t[`project-type`]}));a(u,{successLabel:`Loaded`})})},ji={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(Ai).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mi={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(ni).command(ii).command(xi).command(Ci).command(Zr).command(ei).command(si).command(gi).command(yi).command(Ei).command(Oi).command(ji).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ni(e){return e.usage(`$0 cloudforce-one rules approvals cancel <id>
|
|
219
217
|
|
|
220
|
-
|
|
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 Pi={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:Ni,handler:async t=>c({command:`cloudforce-one rules approvals cancel`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules approvals cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}/cancel`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.cancel({account_id:l,id:t.id}));a(u,{successLabel:`Created`})})};function Fi(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
|
|
221
219
|
|
|
222
|
-
|
|
223
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.requests.message.delete({account_id:l,request_id:t[`request-id`],message_id:t[`message-id`]}));a(u,{successLabel:`Deleted`})})};function Mi(e){return e.usage(`$0 cloudforce-one requests message get <request-id>
|
|
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 Ii={command:`get <id>`,describe:`Get rule approval details`,builder:Fi,handler:async t=>c({command:`cloudforce-one rules approvals get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules approvals get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.approvals.get({account_id:l,id:t.id}));a(u,{successLabel:`Loaded`})})};function Li(e){return e.usage(`$0 cloudforce-one rules approvals list
|
|
224
221
|
|
|
225
|
-
|
|
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 Ri={command:`list`,describe:`List rule approvals`,builder:v(Li),handler:async t=>c({command:`cloudforce-one rules approvals list`,classification:{safeFlags:[`status`,`latest-only`,`reviewer-scope`,`change-type`,`dry-run`]}},t,async()=>{let c={status:t.status,latest_only:t[`latest-only`],limit:t.limit,offset:t.offset,reviewer_scope:t[`reviewer-scope`],change_type:t[`change-type`],rule_id:t[`rule-id`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.rules.approvals.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function zi(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
|
|
226
223
|
|
|
227
|
-
|
|
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 Bi={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:zi,handler:async t=>c({command:`cloudforce-one rules approvals resubmit`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/approvals/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}/resubmit`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?f({commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,name:p(t.name,`name`,`text`),namespaces:t.namespaces}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.resubmit({...e,account_id:l,id:t.id}));a(n,{successLabel:`Created`});return}let d=f({commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,name:p(t.name,`name`,`text`),namespaces:t.namespaces}),m=await s(`Creating`,async()=>c.cloudforceOne.rules.approvals.resubmit({...d,account_id:l,id:t.id}));a(m,{successLabel:`Created`})})},Vi={command:`approvals`,describe:`Approval workflow operations`,builder:e=>e.command(Pi).command(Ii).command(Ri).command(Bi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hi(e){return e.usage(`$0 cloudforce-one rules create
|
|
228
225
|
|
|
229
|
-
|
|
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 Ui={command:`create`,describe:`Create a rule`,builder:Hi,handler:async t=>c({command:`cloudforce-one rules create`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({actions:d(t.actions,`actions`),commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,is_public:t[`is-public`],meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.content===void 0&&(t.content=await h(`content`,`The content field`)),t.name===void 0&&(t.name=await h(`name`,`The name field`)),t.path===void 0&&(t.path=await h(`path`,`The path field`));let m=f({actions:d(t.actions,`actions`),commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,is_public:t[`is-public`],meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}),g=await s(`Creating`,async()=>c.cloudforceOne.rules.create({...m,account_id:l}));a(g,{successLabel:`Created`})})};function Wi(e){return e.usage(`$0 cloudforce-one rules delete <id>
|
|
230
227
|
|
|
231
|
-
|
|
228
|
+
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 Gi={command:`delete <id>`,describe:`Delete a rule`,builder:Wi,handler:async t=>c({command:`cloudforce-one rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?f({commit_message:p(t[`commit-message`],`commit-message`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
229
|
+
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...e,account_id:l,id:t.id}));a(n,{successLabel:`Deleted`});return}let d=f({commit_message:p(t[`commit-message`],`commit-message`,`text`)}),m=await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...d,account_id:l,id:t.id}));a(m,{successLabel:`Deleted`})})};function Ki(e){return e.usage(`$0 cloudforce-one rules deleteAll
|
|
232
230
|
|
|
233
|
-
|
|
231
|
+
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 qi={command:`deleteAll`,describe:`Delete all rules`,builder:Ki,handler:async t=>c({command:`cloudforce-one rules deleteAll`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules deleteAll`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
232
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.deleteAll({account_id:l}));a(u,{successLabel:`Deleted`})})};function Ji(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
|
|
234
233
|
|
|
235
|
-
|
|
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=>p(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>p(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=>p(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 Yi={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:v(Ji),handler:async t=>c({command:`cloudforce-one rules email approvals resubmit`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},t,async()=>{let c={module:t.module};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email approvals resubmit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/approvals/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}/resubmit`,pathParams:{id:String(t.id??``)},query:c,bodyKind:`json`,body:t.body===void 0?f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}):u(t.body)});return}let l=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>l.cloudforceOne.rules.email.approvals.resubmit({...e,account_id:m,id:t.id,...c}));a(n,{successLabel:`Created`});return}t[`condition-operator`]===void 0&&(t[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),t[`condition-type`]===void 0&&(t[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),t.name===void 0&&(t.name=await h(`name`,`The name field`));let _=f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Creating`,async()=>l.cloudforceOne.rules.email.approvals.resubmit({..._,account_id:m,id:t.id,...c}));a(v,{successLabel:`Created`})})},Xi={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command(Yi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Zi(e){return e.usage(`$0 cloudforce-one rules email create
|
|
236
235
|
|
|
237
|
-
|
|
236
|
+
Create a structured email rule.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).coerce(`condition-operator`,e=>p(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>p(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=>p(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 Qi={command:`create`,describe:`Create an email rule`,builder:Zi,handler:async t=>c({command:`cloudforce-one rules email create`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.email.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`condition-operator`]===void 0&&(t[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),t[`condition-type`]===void 0&&(t[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),t.name===void 0&&(t.name=await h(`name`,`The name field`));let m=f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}),_=await s(`Creating`,async()=>c.cloudforceOne.rules.email.create({...m,account_id:l}));a(_,{successLabel:`Created`})})};function $i(e){return e.usage(`$0 cloudforce-one rules email delete <id>
|
|
238
237
|
|
|
239
|
-
|
|
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 ea={command:`delete <id>`,describe:`Delete an email rule`,builder:$i,handler:async t=>c({command:`cloudforce-one rules email delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
239
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.email.delete({account_id:l,id:t.id}));a(u,{successLabel:`Deleted`})})};function ta(e){return e.usage(`$0 cloudforce-one rules email get <id>
|
|
240
240
|
|
|
241
|
-
|
|
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 na={command:`get <id>`,describe:`Get an email rule`,builder:ta,handler:async t=>c({command:`cloudforce-one rules email get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.email.get({account_id:l,id:t.id}));a(u,{successLabel:`Loaded`})})};function ra(e){return e.usage(`$0 cloudforce-one rules email list
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.requests.priority.delete({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Deleted`})})};function ea(e){return e.usage(`$0 cloudforce-one requests priority get <priority-id>
|
|
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 ia={command:`list`,describe:`List email rules`,builder:ra,handler:async t=>c({command:`cloudforce-one rules email list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,offset:t.offset,search:t.search};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.rules.email.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function aa(e){return e.usage(`$0 cloudforce-one rules email schema get
|
|
245
244
|
|
|
246
|
-
|
|
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 oa={command:`get`,describe:`Get email rule schema`,builder:aa,handler:async t=>c({command:`cloudforce-one rules email schema get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.email.schema.get({account_id:l}));a(u,{successLabel:`Loaded`})})},sa={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(oa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ca(e){return e.usage(`$0 cloudforce-one rules email test <id>
|
|
247
246
|
|
|
248
|
-
|
|
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 la={command:`test <id>`,describe:`Test an email rule`,builder:ca,handler:async t=>c({command:`cloudforce-one rules email test`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email test`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}/test`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?f({sample_json:p(t[`sample-json`],`sample-json`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.email.test({...e,account_id:l,id:t.id}));a(n,{successLabel:`Created`});return}t[`sample-json`]===void 0&&(t[`sample-json`]=await h(`sample-json`,`The sample_json field`));let d=f({sample_json:p(t[`sample-json`],`sample-json`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.rules.email.test({...d,account_id:l,id:t.id}));a(m,{successLabel:`Created`})})};function ua(e){return e.usage(`$0 cloudforce-one rules email update <id>
|
|
249
248
|
|
|
250
|
-
|
|
249
|
+
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=>p(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>p(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=>p(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 da={command:`update <id>`,describe:`Update an email rule`,builder:ua,handler:async t=>c({command:`cloudforce-one rules email update`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.rules.email.update({...e,account_id:l,id:t.id}));a(n,{successLabel:`Updated`});return}let m=f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}),h=await s(`Updating`,async()=>c.cloudforceOne.rules.email.update({...m,account_id:l,id:t.id}));a(h,{successLabel:`Updated`})})};function fa(e){return e.usage(`$0 cloudforce-one rules email updatePendingApproval <id>
|
|
251
250
|
|
|
252
|
-
|
|
251
|
+
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=>p(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>p(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=>p(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 pa={command:`updatePendingApproval <id>`,describe:`Update a pending structured email rule approval`,builder:v(fa),handler:async t=>c({command:`cloudforce-one rules email updatePendingApproval`,classification:{safeFlags:[`module`,`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},t,async()=>{let c={module:t.module};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email updatePendingApproval`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/approvals/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},query:c,bodyKind:`json`,body:t.body===void 0?f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}):u(t.body)});return}let l=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Updating`,async()=>l.cloudforceOne.rules.email.updatePendingApproval({...e,account_id:m,id:t.id,...c}));a(n,{successLabel:`Updated`});return}t[`condition-operator`]===void 0&&(t[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),t[`condition-type`]===void 0&&(t[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),t.name===void 0&&(t.name=await h(`name`,`The name field`));let _=f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Updating`,async()=>l.cloudforceOne.rules.email.updatePendingApproval({..._,account_id:m,id:t.id,...c}));a(v,{successLabel:`Updated`})})};function ma(e){return e.usage(`$0 cloudforce-one rules email validate
|
|
253
252
|
|
|
254
|
-
|
|
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=>p(e,`condition-operator`,`text`)).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).coerce(`condition-type`,e=>p(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=>p(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 ha={command:`validate`,describe:`Validate an email rule`,builder:ma,handler:async t=>c({command:`cloudforce-one rules email validate`,classification:{safeFlags:[`condition-operator`,`condition-type`,`enabled`,`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules email validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/structured/validate`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,existing_rule_id:p(t[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.email.validate({...e,account_id:l}));a(n,{successLabel:`Created`});return}t[`condition-operator`]===void 0&&(t[`condition-operator`]=await g(`condition-operator`,`The condition.operator field`,[`and`,`or`])),t[`condition-type`]===void 0&&(t[`condition-type`]=await g(`condition-type`,`The condition.type field`,[`group`])),t.name===void 0&&(t.name=await h(`name`,`The name field`));let m=f({condition:{operator:t[`condition-operator`],type:t[`condition-type`]},description:p(t.description,`description`,`text`),enabled:t.enabled,existing_rule_id:p(t[`existing-rule-id`],`existing-rule-id`,`text`),meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:t.status,strings:d(t.strings,`strings`)}),_=await s(`Creating`,async()=>c.cloudforceOne.rules.email.validate({...m,account_id:l}));a(_,{successLabel:`Created`})})},ga={command:`email`,describe:`Email rule operations`,builder:e=>e.command(Qi).command(ea).command(na).command(ia).command(la).command(da).command(pa).command(ha).command(Xi).command(sa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _a(e){return e.usage(`$0 cloudforce-one rules exemptions create
|
|
255
254
|
|
|
256
|
-
|
|
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 va={command:`create`,describe:`Add patterns to exemption rules`,builder:_a,handler:async t=>c({command:`cloudforce-one rules exemptions create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules exemptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({namespace:t.namespace,tag_match:t[`tag-match`],worker_name:t[`worker-name`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.exemptions.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({namespace:t.namespace,tag_match:t[`tag-match`],worker_name:t[`worker-name`]}),p=await s(`Creating`,async()=>c.cloudforceOne.rules.exemptions.create({body:d,account_id:l}));a(p,{successLabel:`Created`})})};function ya(e){return e.usage(`$0 cloudforce-one rules exemptions delete
|
|
257
256
|
|
|
258
|
-
|
|
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 ba={command:`delete`,describe:`Remove patterns from exemption rules`,builder:ya,handler:async t=>c({command:`cloudforce-one rules exemptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules exemptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({namespace:t.namespace,tag_match:t[`tag-match`],worker_name:t[`worker-name`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
258
|
+
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:e,account_id:l}));a(n,{successLabel:`Deleted`});return}let d=f({namespace:t.namespace,tag_match:t[`tag-match`],worker_name:t[`worker-name`]}),p=await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:d,account_id:l}));a(p,{successLabel:`Deleted`})})};function xa(e){return e.usage(`$0 cloudforce-one rules exemptions get
|
|
259
259
|
|
|
260
|
-
Get
|
|
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 Sa={command:`get`,describe:`Get exemption rules for an account`,builder:xa,handler:async t=>c({command:`cloudforce-one rules exemptions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.exemptions.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function Ca(e){return e.usage(`$0 cloudforce-one rules exemptions update
|
|
261
261
|
|
|
262
|
-
|
|
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 wa={command:`update`,describe:`Update exemption rule patterns`,builder:Ca,handler:async t=>c({command:`cloudforce-one rules exemptions update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules exemptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/exemptions`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({namespace:d(t.namespace,`namespace`),tag_match:d(t[`tag-match`],`tag-match`),worker_name:d(t[`worker-name`],`worker-name`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.rules.exemptions.update({...e,account_id:l}));a(n,{successLabel:`Updated`});return}let p=f({namespace:d(t.namespace,`namespace`),tag_match:d(t[`tag-match`],`tag-match`),worker_name:d(t[`worker-name`],`worker-name`)}),m=await s(`Updating`,async()=>c.cloudforceOne.rules.exemptions.update({...p,account_id:l}));a(m,{successLabel:`Updated`})})},Ta={command:`exemptions`,describe:`Exemption rule operations`,builder:e=>e.command(va).command(ba).command(Sa).command(wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ea(e){return e.usage(`$0 cloudforce-one rules get <id>
|
|
263
263
|
|
|
264
|
-
Get a single rule
|
|
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 Da={command:`get <id>`,describe:`Get a rule`,builder:Ea,handler:async t=>c({command:`cloudforce-one rules get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.get({account_id:l,id:t.id}));a(u,{successLabel:`Loaded`})})};function Oa(e){return e.usage(`$0 cloudforce-one rules list
|
|
265
265
|
|
|
266
|
-
Returns
|
|
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 ka={command:`list`,describe:`List rules`,builder:v(Oa),handler:async t=>c({command:`cloudforce-one rules list`,classification:{safeFlags:[`recursive`,`is-public`,`dry-run`]}},t,async()=>{let c={namespace:t.namespace,path:t.path,recursive:t.recursive,search:t.search,is_public:t[`is-public`],limit:t.limit,offset:t.offset};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.rules.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Aa(e){return e.usage(`$0 cloudforce-one rules managed get
|
|
267
267
|
|
|
268
|
-
|
|
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 ja={command:`get`,describe:`Get managed rules`,builder:Aa,handler:async t=>c({command:`cloudforce-one rules managed get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.managed.get({account_id:l}));a(u,{successLabel:`Loaded`})})},Ma={command:`managed`,describe:`Managed rule operations`,builder:e=>e.command(ja).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Na(e){return e.usage(`$0 cloudforce-one rules search
|
|
269
269
|
|
|
270
|
-
|
|
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 Pa={command:`search`,describe:`Search rules`,builder:v(Na),handler:async t=>c({command:`cloudforce-one rules search`,classification:{safeFlags:[`recursive`,`is-public`,`search-mode`,`language`,`dry-run`]}},t,async()=>{let c={namespace:t.namespace,path:t.path,recursive:t.recursive,search:t.search,is_public:t[`is-public`],limit:t.limit,offset:t.offset,query:t.query,mode:t[`search-mode`],language:t.language};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.rules.search({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Fa(e){return e.usage(`$0 cloudforce-one rules stats get
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...e,account_id:l,id:t.id}));a(n,{successLabel:`Deleted`});return}let d=f({commit_message:p(t[`commit-message`],`commit-message`,`text`)}),m=await s(`Deleting`,async()=>c.cloudforceOne.rules.delete({...d,account_id:l,id:t.id}));a(m,{successLabel:`Deleted`})})};function Ma(e){return e.usage(`$0 cloudforce-one rules deleteAll
|
|
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 Ia={command:`get`,describe:`Get dashboard stats`,builder:Fa,handler:async t=>c({command:`cloudforce-one rules stats get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.stats.get({account_id:l}));a(u,{successLabel:`Loaded`})})},La={command:`stats`,describe:`Rule statistics operations`,builder:e=>e.command(Ia).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ra(e){return e.usage(`$0 cloudforce-one rules tree get
|
|
274
273
|
|
|
275
|
-
|
|
276
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.deleteAll({account_id:l}));a(u,{successLabel:`Deleted`})})};function Pa(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
|
|
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 za={command:`get`,describe:`Get folder tree structure`,builder:Ra,handler:async t=>c({command:`cloudforce-one rules tree get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.rules.tree.get({account_id:l}));a(u,{successLabel:`Loaded`})})},Ba={command:`tree`,describe:`Rule navigation tree operations`,builder:e=>e.command(za).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Va(e){return e.usage(`$0 cloudforce-one rules update <id>
|
|
277
275
|
|
|
278
|
-
|
|
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 Ha={command:`update <id>`,describe:`Update a rule`,builder:Va,handler:async t=>c({command:`cloudforce-one rules update`,classification:{safeFlags:[`enabled`,`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},bodyKind:`json`,body:t.body===void 0?f({commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,is_public:t[`is-public`],meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.rules.update({...e,account_id:l,id:t.id}));a(n,{successLabel:`Updated`});return}let m=f({commit_message:p(t[`commit-message`],`commit-message`,`text`),content:p(t.content,`content`,`text`),description:p(t.description,`description`,`text`),enabled:t.enabled,is_public:t[`is-public`],meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}),h=await s(`Updating`,async()=>c.cloudforceOne.rules.update({...m,account_id:l,id:t.id}));a(h,{successLabel:`Updated`})})};function Ua(e){return e.usage(`$0 cloudforce-one rules validate
|
|
279
277
|
|
|
280
|
-
|
|
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 Wa={command:`validate`,describe:`Validate rule with context`,builder:Ua,handler:async t=>c({command:`cloudforce-one rules validate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one rules validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/rules/validate`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({content:p(t.content,`content`,`text`),excludeRuleId:p(t[`exclude-rule-id`],`exclude-rule-id`,`text`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.rules.validate({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.content===void 0&&(t.content=await h(`content`,`The content field`)),t.name===void 0&&(t.name=await h(`name`,`The name field`));let d=f({content:p(t.content,`content`,`text`),excludeRuleId:p(t[`exclude-rule-id`],`exclude-rule-id`,`text`),name:p(t.name,`name`,`text`),namespaces:t.namespaces,path:p(t.path,`path`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.rules.validate({...d,account_id:l}));a(m,{successLabel:`Created`})})},Ga={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(Ui).command(Gi).command(qi).command(Da).command(ka).command(Pa).command(Ha).command(Wa).command(Vi).command(ga).command(Ta).command(Ma).command(La).command(Ba).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ka(e){return e.usage(`$0 cloudforce-one scans config create
|
|
281
279
|
|
|
282
|
-
|
|
283
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.email.delete({account_id:l,id:t.id}));a(u,{successLabel:`Deleted`})})};function Va(e){return e.usage(`$0 cloudforce-one rules email get <id>
|
|
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 qa={command:`create`,describe:`Create a new Scan Config`,builder:Ka,handler:async t=>c({command:`cloudforce-one scans config create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one scans config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({frequency:t.frequency,ips:t.ips,ports:t.ports}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.scans.config.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.ips===void 0)throw Error(`--ips is required (or pass --body with this field set).`);let d=f({frequency:t.frequency,ips:t.ips,ports:t.ports}),p=await s(`Creating`,async()=>c.cloudforceOne.scans.config.create({...d,account_id:l}));a(p,{successLabel:`Created`})})};function Ja(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
|
|
284
281
|
|
|
285
|
-
|
|
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 Ya={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:Ja,handler:async t=>c({command:`cloudforce-one scans config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one scans config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config/${t[`config-id`]==null?`<config-id>`:encodeURIComponent(String(t[`config-id`]))}`,pathParams:{"config-id":String(t[`config-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
283
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.scans.config.delete({account_id:l,config_id:t[`config-id`]}));a(u,{successLabel:`Deleted`})})};function Xa(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
|
|
286
284
|
|
|
287
|
-
|
|
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 Za={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:Xa,handler:async t=>c({command:`cloudforce-one scans config edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one scans config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/config/${t[`config-id`]==null?`<config-id>`:encodeURIComponent(String(t[`config-id`]))}`,pathParams:{"config-id":String(t[`config-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({frequency:t.frequency,ips:t.ips,ports:t.ports}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.scans.config.edit({...e,account_id:l,config_id:t[`config-id`]}));a(n,{successLabel:`Updated`});return}let d=f({frequency:t.frequency,ips:t.ips,ports:t.ports}),p=await s(`Updating`,async()=>c.cloudforceOne.scans.config.edit({...d,account_id:l,config_id:t[`config-id`]}));a(p,{successLabel:`Updated`})})};function Qa(e){return e.usage(`$0 cloudforce-one scans config list
|
|
288
286
|
|
|
289
|
-
|
|
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 $a={command:`list`,describe:`List Scan Configs`,builder:Qa,handler:async t=>c({command:`cloudforce-one scans config list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.scans.config.list({account_id:l}));a(u,{successLabel:`Loaded`})})},eo={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(qa).command(Ya).command(Za).command($a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function to(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
|
|
290
288
|
|
|
291
|
-
|
|
289
|
+
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 no={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:to,handler:async t=>c({command:`cloudforce-one scans results get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one scans results get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/scans/results/${t[`config-id`]==null?`<config-id>`:encodeURIComponent(String(t[`config-id`]))}`,pathParams:{"config-id":String(t[`config-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.scans.results.get({account_id:l,config_id:t[`config-id`]}));a(u,{successLabel:`Loaded`})})};function ro(e){return e.usage(`$0 cloudforce-one scans results getBanners <config-id>
|
|
292
290
|
|
|
293
|
-
|
|
291
|
+
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 io={command:`getBanners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:ro,handler:async t=>c({command:`cloudforce-one scans results getBanners`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one scans results getBanners`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/banner/${t[`config-id`]==null?`<config-id>`:encodeURIComponent(String(t[`config-id`]))}`,pathParams:{"config-id":String(t[`config-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.scans.results.getBanners({account_id:l,config_id:t[`config-id`]}));a(u,{successLabel:`Loaded`})})},ao={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(no).command(io).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oo={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(eo).command(ao).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function so(e){return e.usage(`$0 cloudforce-one threat-events attackers list
|
|
294
292
|
|
|
295
|
-
|
|
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 co={command:`list`,describe:`Lists attackers across multiple datasets`,builder:so,handler:async t=>c({command:`cloudforce-one threat-events attackers list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.attackers.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},lo={command:`attackers`,describe:`Operations for threat-events.attackers`,builder:e=>e.command(co).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function uo(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 fo={command:`bulk-create`,describe:`Creates bulk events`,builder:uo,handler:async t=>c({command:`cloudforce-one threat-events bulk-create`,classification:{safeFlags:[`include-created-events`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/create/bulk`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({data:d(t.data,`data`),datasetId:p(t[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:t[`include-created-events`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.bulkCreate({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.data===void 0)throw Error(`--data is required (or pass --body with this field set).`);t[`dataset-id`]===void 0&&(t[`dataset-id`]=await h(`dataset-id`,`The datasetId field`));let m=f({data:d(t.data,`data`),datasetId:p(t[`dataset-id`],`dataset-id`,`text`),includeCreatedEvents:t[`include-created-events`]}),g=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.bulkCreate({...m,account_id:l}));a(g,{successLabel:`Created`})})};function po(e){return e.usage(`$0 cloudforce-one threat-events categories create
|
|
296
294
|
|
|
297
|
-
|
|
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 mo={command:`create`,describe:`Creates a new category`,builder:po,handler:async t=>c({command:`cloudforce-one threat-events categories create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events categories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({killChain:t[`kill-chain`],mitreAttack:t[`mitre-attack`],mitreCapec:t[`mitre-capec`],name:p(t.name,`name`,`text`),shortname:p(t.shortname,`shortname`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.categories.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`kill-chain`]===void 0)throw Error(`--kill-chain is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`The name field`));let d=f({killChain:t[`kill-chain`],mitreAttack:t[`mitre-attack`],mitreCapec:t[`mitre-capec`],name:p(t.name,`name`,`text`),shortname:p(t.shortname,`shortname`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.categories.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function ho(e){return e.usage(`$0 cloudforce-one threat-events categories delete <category-id>
|
|
298
296
|
|
|
299
|
-
|
|
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 go={command:`delete <category-id>`,describe:`Deletes a category`,builder:ho,handler:async t=>c({command:`cloudforce-one threat-events categories delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events categories delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${t[`category-id`]==null?`<category-id>`:encodeURIComponent(String(t[`category-id`]))}`,pathParams:{"category-id":String(t[`category-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
298
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.categories.delete({account_id:l,category_id:t[`category-id`]}));a(u,{successLabel:`Deleted`})})};function _o(e){return e.usage(`$0 cloudforce-one threat-events categories edit <category-id>
|
|
300
299
|
|
|
301
|
-
|
|
302
|
-
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:e,account_id:l}));a(n,{successLabel:`Deleted`});return}let d=f({namespace:t.namespace,tag_match:t[`tag-match`],worker_name:t[`worker-name`]}),p=await s(`Deleting`,async()=>c.cloudforceOne.rules.exemptions.delete({body:d,account_id:l}));a(p,{successLabel:`Deleted`})})};function so(e){return e.usage(`$0 cloudforce-one rules exemptions get
|
|
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 vo={command:`edit <category-id>`,describe:`Updates a category`,builder:_o,handler:async t=>c({command:`cloudforce-one threat-events categories edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events categories edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${t[`category-id`]==null?`<category-id>`:encodeURIComponent(String(t[`category-id`]))}`,pathParams:{"category-id":String(t[`category-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({killChain:t[`kill-chain`],mitreAttack:t[`mitre-attack`],mitreCapec:t[`mitre-capec`],name:p(t.name,`name`,`text`),shortname:p(t.shortname,`shortname`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.categories.edit({...e,account_id:l,category_id:t[`category-id`]}));a(n,{successLabel:`Updated`});return}let d=f({killChain:t[`kill-chain`],mitreAttack:t[`mitre-attack`],mitreCapec:t[`mitre-capec`],name:p(t.name,`name`,`text`),shortname:p(t.shortname,`shortname`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.categories.edit({...d,account_id:l,category_id:t[`category-id`]}));a(m,{successLabel:`Updated`})})};function yo(e){return e.usage(`$0 cloudforce-one threat-events categories get <category-id>
|
|
303
301
|
|
|
304
|
-
|
|
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 bo={command:`get <category-id>`,describe:`Reads a category`,builder:yo,handler:async t=>c({command:`cloudforce-one threat-events categories get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/event-categories/by-id/${t[`category-id`]==null?`<category-id>`:encodeURIComponent(String(t[`category-id`]))}`,pathParams:{"category-id":String(t[`category-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.categories.get({account_id:l,category_id:t[`category-id`]}));a(u,{successLabel:`Loaded`})})};function xo(e){return e.usage(`$0 cloudforce-one threat-events categories list
|
|
305
303
|
|
|
306
|
-
|
|
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 So={command:`list`,describe:`Lists categories across multiple datasets`,builder:xo,handler:async t=>c({command:`cloudforce-one threat-events categories list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.categories.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Co={command:`categories`,describe:`Operations for threat-events.categories`,builder:e=>e.command(mo).command(go).command(vo).command(bo).command(So).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wo(e){return e.usage(`$0 cloudforce-one threat-events countries list
|
|
307
305
|
|
|
308
|
-
|
|
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 To={command:`list`,describe:`Retrieves countries information for all countries`,builder:wo,handler:async t=>c({command:`cloudforce-one threat-events countries list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.countries.list({account_id:l}));a(u,{successLabel:`Loaded`})})},Eo={command:`countries`,describe:`Operations for threat-events.countries`,builder:e=>e.command(To).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Do(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-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=>p(e,`source-resource-type`,`text`)).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).coerce(`source-system`,e=>p(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 Oo={command:`create <account-id-path>`,describe:`Creates a new event`,builder:Do,handler:async e=>c({command:`cloudforce-one threat-events create`,classification:{safeFlags:[`source-resource-type`,`source-system`,`dry-run`]}},e,async()=>{if(e.dryRun){o({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?f({accountId:e[`account-id-body`],attacker:p(e.attacker,`attacker`,`text`),attackerCountry:p(e[`attacker-country`],`attacker-country`,`text`),category:p(e.category,`category`,`text`),datasetId:p(e[`dataset-id`],`dataset-id`,`text`),date:p(e.date,`date`,`text`),event:p(e.event,`event`,`text`),indicator:p(e.indicator,`indicator`,`text`),indicatorType:p(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:p(e.insight,`insight`,`text`),raw:{source:p(e[`raw-source`],`raw-source`,`text`),tlp:p(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:p(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:p(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:p(e[`target-country`],`target-country`,`text`),targetIndustry:p(e[`target-industry`],`target-industry`,`text`),tlp:p(e.tlp,`tlp`,`text`)}):u(e.body)});return}let t=await n(e);if(e.body){let n=u(e.body),r=await s(`Creating`,async()=>t.cloudforceOne.threatEvents.create({...n,account_id_path:e[`account-id-path`]}));a(r,{successLabel:`Created`});return}e.category===void 0&&(e.category=await h(`category`,`The category field`)),e.date===void 0&&(e.date=await h(`date`,`The date field`)),e.event===void 0&&(e.event=await h(`event`,`The event field`)),e.tlp===void 0&&(e.tlp=await h(`tlp`,`The tlp field`));let r=f({accountId:e[`account-id-body`],attacker:p(e.attacker,`attacker`,`text`),attackerCountry:p(e[`attacker-country`],`attacker-country`,`text`),category:p(e.category,`category`,`text`),datasetId:p(e[`dataset-id`],`dataset-id`,`text`),date:p(e.date,`date`,`text`),event:p(e.event,`event`,`text`),indicator:p(e.indicator,`indicator`,`text`),indicatorType:p(e[`indicator-type`],`indicator-type`,`text`),indicators:d(e.indicators,`indicators`),insight:p(e.insight,`insight`,`text`),raw:{source:p(e[`raw-source`],`raw-source`,`text`),tlp:p(e[`raw-tlp`],`raw-tlp`,`text`)},source:{resourceId:p(e[`source-resource-id`],`source-resource-id`,`text`),resourceType:e[`source-resource-type`],system:e[`source-system`],title:p(e[`source-title`],`source-title`,`text`)},tags:e.tags,targetCountry:p(e[`target-country`],`target-country`,`text`),targetIndustry:p(e[`target-industry`],`target-industry`,`text`),tlp:p(e.tlp,`tlp`,`text`)}),i=await s(`Creating`,async()=>t.cloudforceOne.threatEvents.create({...r,account_id_path:e[`account-id-path`]}));a(i,{successLabel:`Created`})})};function ko(e){return e.usage(`$0 cloudforce-one threat-events datasets create
|
|
309
307
|
|
|
310
|
-
|
|
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 Ao={command:`create`,describe:`Creates a dataset`,builder:ko,handler:async t=>c({command:`cloudforce-one threat-events datasets create`,classification:{safeFlags:[`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({isPublic:t[`is-public`],name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.datasets.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`Used to describe the dataset within the account context.`));let d=f({isPublic:t[`is-public`],name:p(t.name,`name`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.datasets.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function jo(e){return e.usage(`$0 cloudforce-one threat-events datasets edit <dataset-id>
|
|
311
309
|
|
|
312
|
-
|
|
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 Mo={command:`edit <dataset-id>`,describe:`Updates an existing dataset`,builder:jo,handler:async t=>c({command:`cloudforce-one threat-events datasets edit`,classification:{safeFlags:[`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events datasets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({isPublic:t[`is-public`],name:p(t.name,`name`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.datasets.edit({...e,account_id:l,dataset_id:t[`dataset-id`]}));a(n,{successLabel:`Updated`});return}if(t[`is-public`]===void 0)throw Error(`--is-public is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`Used to describe the dataset within the account context.`));let d=f({isPublic:t[`is-public`],name:p(t.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.datasets.edit({...d,account_id:l,dataset_id:t[`dataset-id`]}));a(m,{successLabel:`Updated`})})};function No(e){return e.usage(`$0 cloudforce-one threat-events datasets get <dataset-id>
|
|
313
311
|
|
|
314
|
-
|
|
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 Po={command:`get <dataset-id>`,describe:`Reads a dataset`,builder:No,handler:async t=>c({command:`cloudforce-one threat-events datasets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/dataset/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}`,pathParams:{"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.datasets.get({account_id:l,dataset_id:t[`dataset-id`]}));a(u,{successLabel:`Loaded`})})};function Fo(e){return e.usage(`$0 cloudforce-one threat-events datasets list
|
|
315
313
|
|
|
316
|
-
|
|
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 Io={command:`list`,describe:`Lists all datasets in an account`,builder:Fo,handler:async t=>c({command:`cloudforce-one threat-events datasets list`,classification:{safeFlags:[`include-deleted`,`dry-run`]}},t,async()=>{let c={includeDeleted:t[`include-deleted`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.datasets.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Lo(e){return e.usage(`$0 cloudforce-one threat-events datasets raw <event-id>
|
|
317
315
|
|
|
318
|
-
|
|
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 Ro={command:`raw <event-id>`,describe:`Reads raw data for an event by UUID`,builder:Lo,handler:async t=>c({command:`cloudforce-one threat-events datasets raw`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events datasets raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/datasets/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}/events/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/raw`,pathParams:{"event-id":String(t[`event-id`]??``),"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.datasets.raw({account_id:l,dataset_id:t[`dataset-id`],event_id:t[`event-id`]}));a(u,{successLabel:`Loaded`})})},zo={command:`datasets`,describe:`Operations for threat-events.datasets`,builder:e=>e.command(Ao).command(Mo).command(Po).command(Io).command(Ro).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bo(e){return e.usage(`$0 cloudforce-one threat-events edit <event-id>
|
|
319
317
|
|
|
320
|
-
|
|
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 Vo={command:`edit <event-id>`,describe:`Updates an event`,builder:Bo,handler:async t=>c({command:`cloudforce-one threat-events edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({attacker:p(t.attacker,`attacker`,`text`),attackerCountry:p(t[`attacker-country`],`attacker-country`,`text`),category:p(t.category,`category`,`text`),createdAt:p(t[`created-at`],`created-at`,`text`),datasetId:p(t[`dataset-id`],`dataset-id`,`text`),date:p(t.date,`date`,`text`),event:p(t.event,`event`,`text`),indicator:p(t.indicator,`indicator`,`text`),indicatorType:p(t[`indicator-type`],`indicator-type`,`text`),insight:p(t.insight,`insight`,`text`),raw:{source:p(t[`raw-source`],`raw-source`,`text`),tlp:p(t[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(t[`target-country`],`target-country`,`text`),targetIndustry:p(t[`target-industry`],`target-industry`,`text`),tlp:p(t.tlp,`tlp`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.edit({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Updated`});return}t[`dataset-id`]===void 0&&(t[`dataset-id`]=await h(`dataset-id`,`Dataset ID containing the event to update.`));let d=f({attacker:p(t.attacker,`attacker`,`text`),attackerCountry:p(t[`attacker-country`],`attacker-country`,`text`),category:p(t.category,`category`,`text`),createdAt:p(t[`created-at`],`created-at`,`text`),datasetId:p(t[`dataset-id`],`dataset-id`,`text`),date:p(t.date,`date`,`text`),event:p(t.event,`event`,`text`),indicator:p(t.indicator,`indicator`,`text`),indicatorType:p(t[`indicator-type`],`indicator-type`,`text`),insight:p(t.insight,`insight`,`text`),raw:{source:p(t[`raw-source`],`raw-source`,`text`),tlp:p(t[`raw-tlp`],`raw-tlp`,`text`)},targetCountry:p(t[`target-country`],`target-country`,`text`),targetIndustry:p(t[`target-industry`],`target-industry`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.edit({...d,account_id:l,event_id:t[`event-id`]}));a(m,{successLabel:`Updated`})})};function Ho(e){return e.usage(`$0 cloudforce-one threat-events event-tags create <event-id>
|
|
321
319
|
|
|
322
|
-
|
|
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 Uo={command:`create <event-id>`,describe:`Adds a tag to an event`,builder:Ho,handler:async t=>c({command:`cloudforce-one threat-events event-tags create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events event-tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/event_tag/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/create`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({tags:t.tags}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.eventTags.create({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Created`});return}if(t.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=f({tags:t.tags}),p=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.eventTags.create({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Created`})})};function Wo(e){return e.usage(`$0 cloudforce-one threat-events event-tags delete <event-id>
|
|
323
321
|
|
|
324
|
-
|
|
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 Go={command:`delete <event-id>`,describe:`Removes a tag from an event`,builder:Wo,handler:async t=>c({command:`cloudforce-one threat-events event-tags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events event-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/event_tag/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({tags:t.tags}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
323
|
+
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Deleted`});return}if(t.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=f({tags:t.tags}),p=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Deleted`})})},Ko={command:`event-tags`,describe:`Operations for threat-events.event-tags`,builder:e=>e.command(Uo).command(Go).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qo(e){return e.usage(`$0 cloudforce-one threat-events get <event-id>
|
|
325
324
|
|
|
326
|
-
|
|
327
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.scans.config.delete({account_id:l,config_id:t[`config-id`]}));a(u,{successLabel:`Deleted`})})};function Lo(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
|
|
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 Jo={command:`get <event-id>`,describe:`Reads an event`,builder:qo,handler:async t=>c({command:`cloudforce-one threat-events get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.get({account_id:l,event_id:t[`event-id`]}));a(u,{successLabel:`Loaded`})})};function Yo(e){return e.usage(`$0 cloudforce-one threat-events indicator-types list
|
|
328
326
|
|
|
329
|
-
|
|
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 Xo={command:`list`,describe:`Lists all indicator types`,builder:Yo,handler:async t=>c({command:`cloudforce-one threat-events indicator-types list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.indicatorTypes.list({account_id:l}));a(u,{successLabel:`Loaded`})})},Zo={command:`indicator-types`,describe:`Operations for threat-events.indicator-types`,builder:e=>e.command(Xo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qo(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 $o={command:`list`,describe:`Filter and list events`,builder:v(Qo),handler:async t=>c({command:`cloudforce-one threat-events list`,classification:{safeFlags:[`order`,`force-refresh`,`format`,`cache`,`dry-run`]}},t,async()=>{let c={cursor:t.cursor,search:t.search,searchBranches:t[`search-branches`],page:t.page,pageSize:t[`page-size`],orderBy:t[`order-by`],order:t.order,datasetId:t[`dataset-id`],forceRefresh:t[`force-refresh`],format:t.format,cache:t.cache};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function es(e){return e.usage(`$0 cloudforce-one threat-events raw edit <raw-id>
|
|
330
328
|
|
|
331
|
-
|
|
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 ts={command:`edit <raw-id>`,describe:`Updates a raw event`,builder:es,handler:async t=>c({command:`cloudforce-one threat-events raw edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events raw edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/raw/${t[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(t[`raw-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``),"raw-id":String(t[`raw-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({source:p(t.source,`source`,`text`),tlp:p(t.tlp,`tlp`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.raw.edit({...e,account_id:l,event_id:t[`event-id`],raw_id:t[`raw-id`]}));a(n,{successLabel:`Updated`});return}let d=f({source:p(t.source,`source`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatEvents.raw.edit({...d,account_id:l,event_id:t[`event-id`],raw_id:t[`raw-id`]}));a(m,{successLabel:`Updated`})})};function ns(e){return e.usage(`$0 cloudforce-one threat-events raw get <raw-id>
|
|
332
330
|
|
|
333
|
-
Retrieves
|
|
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 rs={command:`get <raw-id>`,describe:`Reads data for a raw event`,builder:ns,handler:async t=>c({command:`cloudforce-one threat-events raw get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}/raw/${t[`raw-id`]==null?`<raw-id>`:encodeURIComponent(String(t[`raw-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``),"raw-id":String(t[`raw-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatEvents.raw.get({account_id:l,event_id:t[`event-id`],raw_id:t[`raw-id`]}));a(u,{successLabel:`Loaded`})})},is={command:`raw`,describe:`Operations for threat-events.raw`,builder:e=>e.command(ts).command(rs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function as(e){return e.usage(`$0 cloudforce-one threat-events relate delete <event-id>
|
|
334
332
|
|
|
335
|
-
|
|
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 os={command:`delete <event-id>`,describe:`Removes an event reference`,builder:as,handler:async t=>c({command:`cloudforce-one threat-events relate delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events relate delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/relate/${t[`event-id`]==null?`<event-id>`:encodeURIComponent(String(t[`event-id`]))}`,pathParams:{"event-id":String(t[`event-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({events:t.events}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
334
|
+
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Deleted`});return}if(t.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=f({events:t.events}),p=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Deleted`})})},ss={command:`relate`,describe:`Operations for threat-events.relate`,builder:e=>e.command(os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function cs(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=>p(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 ls={command:`search`,describe:`Filter and list events`,builder:v(cs),handler:async t=>c({command:`cloudforce-one threat-events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},t,async()=>{let c={forceRefresh:t[`force-refresh`],format:t.format,cache:t.cache};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:c,bodyKind:`json`,body:t.body===void 0?f({cursor:p(t.cursor,`cursor`,`text`),datasetId:t[`dataset-id`],order:t.order,orderBy:p(t[`order-by`],`order-by`,`text`),page:t.page,pageSize:t[`page-size`],search:d(t.search,`search`)}):u(t.body)});return}let l=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...e,account_id:m,...c}));a(n,{successLabel:`Loaded`});return}let h=f({cursor:p(t.cursor,`cursor`,`text`),datasetId:t[`dataset-id`],order:t.order,orderBy:p(t[`order-by`],`order-by`,`text`),page:t.page,pageSize:t[`page-size`],search:d(t.search,`search`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...h,account_id:m,...c}));a(g,{successLabel:`Loaded`})})};function us(e){return e.usage(`$0 cloudforce-one threat-events tags create
|
|
336
335
|
|
|
337
|
-
|
|
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=>p(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 ds={command:`create`,describe:`Creates a new tag`,builder:us,handler:async t=>c({command:`cloudforce-one threat-events tags create`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events tags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/tags/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({aliasGroupNames:t[`alias-group-names`],aliasGroupNamesInternal:t[`alias-group-names-internal`],aliases:d(t.aliases,`aliases`),categoryUuid:p(t[`category-uuid`],`category-uuid`,`text`),confidence:t.confidence,dateOfDiscovery:p(t[`date-of-discovery`],`date-of-discovery`,`text`),description:p(t.description,`description`,`text`),externalReferenceLinks:t[`external-reference-links`],externalReferences:d(t[`external-references`],`external-references`),internalAliases:d(t[`internal-aliases`],`internal-aliases`),internalDescription:p(t[`internal-description`],`internal-description`,`text`),lastSeen:p(t[`last-seen`],`last-seen`,`text`),tlp:t.tlp,value:p(t.value,`value`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.tags.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.value===void 0&&(t.value=await h(`value`,`The value field`));let m=f({aliasGroupNames:t[`alias-group-names`],aliasGroupNamesInternal:t[`alias-group-names-internal`],aliases:d(t.aliases,`aliases`),categoryUuid:p(t[`category-uuid`],`category-uuid`,`text`),confidence:t.confidence,dateOfDiscovery:p(t[`date-of-discovery`],`date-of-discovery`,`text`),description:p(t.description,`description`,`text`),externalReferenceLinks:t[`external-reference-links`],externalReferences:d(t[`external-references`],`external-references`),internalAliases:d(t[`internal-aliases`],`internal-aliases`),internalDescription:p(t[`internal-description`],`internal-description`,`text`),lastSeen:p(t[`last-seen`],`last-seen`,`text`),tlp:t.tlp,value:p(t.value,`value`,`text`)}),g=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.tags.create({...m,account_id:l}));a(g,{successLabel:`Created`})})},fs={command:`tags`,describe:`Operations for threat-events.tags`,builder:e=>e.command(ds).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ps(e){return e.usage(`$0 cloudforce-one threat-events target-industries list
|
|
338
337
|
|
|
339
|
-
|
|
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 ms={command:`list`,describe:`Lists target industries across multiple datasets`,builder:ps,handler:async t=>c({command:`cloudforce-one threat-events target-industries list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.targetIndustries.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},hs={command:`target-industries`,describe:`Operations for threat-events.target-industries`,builder:e=>e.command(ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gs={command:`threat-events`,describe:`Operations for threat-events`,builder:e=>e.command(fo).command(Oo).command(Vo).command(Jo).command($o).command(ls).command(lo).command(Co).command(Eo).command(zo).command(Ko).command(Zo).command(is).command(ss).command(fs).command(hs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _s(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
|
|
340
339
|
|
|
341
|
-
|
|
342
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.categories.delete({account_id:l,category_id:t[`category-id`]}));a(u,{successLabel:`Deleted`})})};function rs(e){return e.usage(`$0 cloudforce-one threat-events categories edit <category-id>
|
|
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 vs={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:_s,handler:async t=>c({command:`cloudforce-one threat-signals articles bulk-mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles bulk-mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({article_ids:t[`article-ids`],read:t.read}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.bulkMarkRead({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t[`article-ids`]===void 0)throw Error(`--article-ids is required (or pass --body with this field set).`);if(t.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=f({article_ids:t[`article-ids`],read:t.read}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.bulkMarkRead({...d,account_id:l}));a(p,{successLabel:`Updated`})})};function ys(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
|
|
343
341
|
|
|
344
|
-
|
|
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 bs={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:ys,handler:async t=>c({command:`cloudforce-one threat-signals articles get-content`,classification:{safeFlags:[`format`,`dry-run`]}},t,async()=>{let a={format:t.format};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles get-content`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/content`,pathParams:{"article-id":String(t[`article-id`]??``)},query:a,bodyKind:`none`});return}await n(t);let c=t.local?e:await i();t.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>b(`/accounts/${c}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(t[`article-id`]))}/content${l?`?`+l:``}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));y(u.toString(`utf-8`))})};function xs(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
|
|
345
343
|
|
|
346
|
-
Retrieves
|
|
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 Ss={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:xs,handler:async t=>c({command:`cloudforce-one threat-signals articles get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}`,pathParams:{"article-id":String(t[`article-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.articles.get({account_id:l,article_id:t[`article-id`]}));a(u,{successLabel:`Loaded`})})};function Cs(e){return e.usage(`$0 cloudforce-one threat-signals articles list
|
|
347
345
|
|
|
348
|
-
Lists
|
|
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 ws={command:`list`,describe:`List Threat Signals articles`,builder:v(Cs),handler:async t=>c({command:`cloudforce-one threat-signals articles list`,classification:{safeFlags:[`read`,`include-total`,`source-type`,`tag-applied-by`,`dry-run`]}},t,async()=>{let c={cursor:t.cursor,per_page:t[`per-page`],feed_id:t[`feed-id`],article_id:t[`article-id`],read:t.read,tag_id:t[`tag-id`],tag_category_id:t[`tag-category-id`],tag:t.tag,tag_category:t[`tag-category`],include_total:t[`include-total`],search:t.search,published_after:t[`published-after`],published_before:t[`published-before`],fetched_after:t[`fetched-after`],fetched_before:t[`fetched-before`],feed_category:t[`feed-category`],source_type:t[`source-type`],tag_applied_by:t[`tag-applied-by`],sort:t.sort};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.articles.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ts(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
|
|
349
347
|
|
|
350
|
-
|
|
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 Es={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:Ts,handler:async t=>c({command:`cloudforce-one threat-signals articles mark-read`,classification:{safeFlags:[`read`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles mark-read`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}`,pathParams:{"article-id":String(t[`article-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({read:t.read}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.markRead({...e,account_id:l,article_id:t[`article-id`]}));a(n,{successLabel:`Updated`});return}if(t.read===void 0)throw Error(`--read is required (or pass --body with this field set).`);let d=f({read:t.read}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.articles.markRead({...d,account_id:l,article_id:t[`article-id`]}));a(p,{successLabel:`Updated`})})};function Ds(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
|
|
351
349
|
|
|
352
|
-
|
|
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 Os={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:Ds,handler:async t=>c({command:`cloudforce-one threat-signals articles skills get-output`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles skills get-output`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}/output`,pathParams:{"article-id":String(t[`article-id`]??``),"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.articles.skills.getOutput({account_id:l,article_id:t[`article-id`],skill_id:t[`skill-id`]}));a(u,{successLabel:`Loaded`})})};function ks(e){return e.usage(`$0 cloudforce-one threat-signals articles skills list
|
|
353
351
|
|
|
354
|
-
|
|
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 As={command:`list`,describe:`List Threat Signals article custom skills`,builder:ks,handler:async t=>c({command:`cloudforce-one threat-signals articles skills list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles skills list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/skills`,pathParams:{"article-id":String(t[`article-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.articles.skills.list({account_id:l,article_id:t[`article-id`]}));a(u,{successLabel:`Loaded`})})};function js(e){return e.usage(`$0 cloudforce-one threat-signals articles skills run <skill-id>
|
|
355
353
|
|
|
356
|
-
|
|
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 Ms={command:`run <skill-id>`,describe:`Run and persist a Threat Signals article skill`,builder:js,handler:async l=>c({command:`cloudforce-one threat-signals articles skills run`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles skills run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${l[`article-id`]==null?`<article-id>`:encodeURIComponent(String(l[`article-id`]))}/skills/${l[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(l[`skill-id`]))}/run`,pathParams:{"article-id":String(l[`article-id`]??``),"skill-id":String(l[`skill-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let c=await n(l),d=l.local?e:await i();if(l.accountId=d,l.body){let e=u(l.body),t=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.skills.run({body:e,account_id:d,article_id:l[`article-id`],skill_id:l[`skill-id`]}));a(t,{successLabel:`Created`});return}let f=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${d}/cloudforce-one/v2/threat-signals/articles/${encodeURIComponent(String(l[`article-id`]))}/skills/${encodeURIComponent(String(l[`skill-id`]))}/run`));a(f,{successLabel:`Created`})})},Ns={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(Os).command(As).command(Ms).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ps(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
|
|
357
355
|
|
|
358
|
-
|
|
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 Fs={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:Ps,handler:async t=>c({command:`cloudforce-one threat-signals articles tags add`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles tags add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/tags`,pathParams:{"article-id":String(t[`article-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({tag_id:p(t[`tag-id`],`tag-id`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.add({...e,account_id:l,article_id:t[`article-id`]}));a(n,{successLabel:`Created`});return}t[`tag-id`]===void 0&&(t[`tag-id`]=await h(`tag-id`,`The tag_id field`));let d=f({tag_id:p(t[`tag-id`],`tag-id`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.add({...d,account_id:l,article_id:t[`article-id`]}));a(m,{successLabel:`Created`})})};function Is(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
|
|
359
357
|
|
|
360
|
-
|
|
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 Ls={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:Is,handler:async t=>c({command:`cloudforce-one threat-signals articles tags generate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles tags generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/tag`,pathParams:{"article-id":String(t[`article-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.articles.tags.generate({account_id:l,article_id:t[`article-id`]}));a(u,{successLabel:`Created`})})};function Rs(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
|
|
361
359
|
|
|
362
|
-
|
|
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 zs={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:Rs,handler:async t=>c({command:`cloudforce-one threat-signals articles tags remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals articles tags remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/articles/${t[`article-id`]==null?`<article-id>`:encodeURIComponent(String(t[`article-id`]))}/tags/${t[`tag-id`]==null?`<tag-id>`:encodeURIComponent(String(t[`tag-id`]))}`,pathParams:{"article-id":String(t[`article-id`]??``),"tag-id":String(t[`tag-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
361
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.articles.tags.remove({account_id:l,article_id:t[`article-id`],tag_id:t[`tag-id`]}));a(u,{successLabel:`Deleted`})})},Bs={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(Fs).command(Ls).command(zs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Vs={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(vs).command(Ss).command(bs).command(ws).command(Es).command(Ns).command(Bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hs(e){return e.usage(`$0 cloudforce-one threat-signals categories list
|
|
363
362
|
|
|
364
|
-
|
|
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 Us={command:`list`,describe:`List Threat Signals feed categories`,builder:Hs,handler:async t=>c({command:`cloudforce-one threat-signals categories list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.categories.list({account_id:l}));a(u,{successLabel:`Loaded`})})},Ws={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(Us).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gs(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds list
|
|
365
364
|
|
|
366
|
-
|
|
367
|
-
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Deleted`});return}if(t.tags===void 0)throw Error(`--tags is required (or pass --body with this field set).`);let d=f({tags:t.tags}),p=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.eventTags.delete({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Deleted`})})},Ms={command:`event-tags`,describe:`Operations for threat-events.event-tags`,builder:e=>e.command(ks).command(js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ns(e){return e.usage(`$0 cloudforce-one threat-events get <event-id>
|
|
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 Ks={command:`list`,describe:`List curated Threat Signals feeds`,builder:Gs,handler:async t=>c({command:`cloudforce-one threat-signals curated-feeds list`,classification:{safeFlags:[`include-inactive`,`dry-run`]}},t,async()=>{let c={category:t.category,include_inactive:t[`include-inactive`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.curatedFeeds.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function qs(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds opt-out
|
|
368
366
|
|
|
369
|
-
|
|
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 Js={command:`opt-out`,describe:`Opt out of curated Threat Signals feeds`,builder:qs,handler:async t=>c({command:`cloudforce-one threat-signals curated-feeds opt-out`,classification:{safeFlags:[`opted-out`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals curated-feeds opt-out`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/opt-out`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({opted_out:t[`opted-out`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t[`opted-out`]===void 0)throw Error(`--opted-out is required (or pass --body with this field set).`);let d=f({opted_out:t[`opted-out`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...d,account_id:l}));a(p,{successLabel:`Updated`})})},Ys={command:`curated-feeds`,describe:`Operations for threat-signals.curated-feeds`,builder:e=>e.command(Ks).command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xs(e){return e.usage(`$0 cloudforce-one threat-signals feeds create
|
|
370
368
|
|
|
371
|
-
|
|
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=>p(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 Zs={command:`create`,describe:`Create Threat Signals feed`,builder:Xs,handler:async t=>c({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({category_id:t[`category-id`],curated_feed_id:p(t[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`),url:p(t.url,`url`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({category_id:t[`category-id`],curated_feed_id:p(t[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`),url:p(t.url,`url`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Qs(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
|
|
372
370
|
|
|
373
|
-
|
|
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 $s={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:Qs,handler:async t=>c({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
372
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.feeds.delete({account_id:l,feed_id:t[`feed-id`]}));a(u,{successLabel:`Deleted`})})};function ec(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
|
|
374
373
|
|
|
375
|
-
Retrieves
|
|
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 tc={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:ec,handler:async t=>c({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},t,async()=>{let a={format:t.format};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/raw`,pathParams:{"feed-id":String(t[`feed-id`]??``)},query:a,bodyKind:`none`});return}await n(t);let c=t.local?e:await i();t.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>b(`/accounts/${c}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(t[`feed-id`]))}/raw${l?`?`+l:``}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));y(u.toString(`utf-8`))})};function nc(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
|
|
376
375
|
|
|
377
|
-
|
|
378
|
-
`);return}if(t.body){let e=u(t.body),n=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...e,account_id:l,event_id:t[`event-id`]}));a(n,{successLabel:`Deleted`});return}if(t.events===void 0)throw Error(`--events is required (or pass --body with this field set).`);let d=f({events:t.events}),p=await s(`Deleting`,async()=>c.cloudforceOne.threatEvents.relate.delete({...d,account_id:l,event_id:t[`event-id`]}));a(p,{successLabel:`Deleted`})})},qs={command:`relate`,describe:`Operations for threat-events.relate`,builder:e=>e.command(Ks).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Js(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`]}).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 Ys={command:`search`,describe:`Filter and list events`,builder:v(Js),handler:async t=>c({command:`cloudforce-one threat-events search`,classification:{safeFlags:[`force-refresh`,`format`,`cache`,`order`,`dry-run`]}},t,async()=>{let c={forceRefresh:t[`force-refresh`],format:t.format,cache:t.cache};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events`,pathParams:{},query:c,bodyKind:`json`,body:t.body===void 0?f({cursor:p(t.cursor,`cursor`,`text`),datasetId:t[`dataset-id`],order:p(t.order,`order`,`text`),orderBy:p(t[`order-by`],`order-by`,`text`),page:t.page,pageSize:t[`page-size`],search:d(t.search,`search`)}):u(t.body)});return}let l=await n(t),m=t.local?e:await i();if(t.accountId=m,t.body){let e=u(t.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...e,account_id:m,...c}));a(n,{successLabel:`Loaded`});return}let h=f({cursor:p(t.cursor,`cursor`,`text`),datasetId:t[`dataset-id`],order:p(t.order,`order`,`text`),orderBy:p(t[`order-by`],`order-by`,`text`),page:t.page,pageSize:t[`page-size`],search:d(t.search,`search`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Loading`,async()=>l.cloudforceOne.threatEvents.search({...h,account_id:m,...c}));a(g,{successLabel:`Loaded`})})};function Xs(e){return e.usage(`$0 cloudforce-one threat-events tags create
|
|
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 rc={command:`list`,describe:`List Threat Signals feeds`,builder:v(nc),handler:async t=>c({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],limit:t.limit,sort:t.sort,category:t.category,source_type:t[`source-type`],enabled:t.enabled,status:t.status};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.feeds.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function ic(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
|
|
379
377
|
|
|
380
|
-
|
|
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 ac={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:v(ic),handler:async t=>c({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={feed_id:t[`feed-id`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Creating`,async()=>l.cloudforceOne.threatSignals.feeds.poll({account_id:u,...c}));a(d,{successLabel:`Created`})})};function oc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
|
|
381
379
|
|
|
382
|
-
Retrieves the
|
|
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 sc={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:oc,handler:async t=>c({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/skills`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.feeds.skills.get({account_id:l,feed_id:t[`feed-id`]}));a(u,{successLabel:`Loaded`})})};function cc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
|
|
383
381
|
|
|
384
|
-
|
|
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 lc={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:cc,handler:async t=>c({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/skills`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({skill_ids:t[`skill-ids`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...e,account_id:l,feed_id:t[`feed-id`]}));a(n,{successLabel:`Updated`});return}if(t[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let d=f({skill_ids:t[`skill-ids`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...d,account_id:l,feed_id:t[`feed-id`]}));a(p,{successLabel:`Updated`})})},uc={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(sc).command(lc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dc(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
|
|
385
383
|
|
|
386
|
-
|
|
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=>p(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 fc={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:dc,handler:async t=>c({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({category_id:t[`category-id`],display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...e,account_id:l,feed_id:t[`feed-id`]}));a(n,{successLabel:`Updated`});return}let d=f({category_id:t[`category-id`],display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...d,account_id:l,feed_id:t[`feed-id`]}));a(m,{successLabel:`Updated`})})},pc={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Zs).command($s).command(tc).command(rc).command(ac).command(fc).command(uc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function mc(e){return e.usage(`$0 cloudforce-one threat-signals health
|
|
387
385
|
|
|
388
|
-
|
|
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 hc={command:`health`,describe:`Check Threat Signals service health`,builder:mc,handler:async t=>c({command:`cloudforce-one threat-signals health`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.health({account_id:l}));a(u,{successLabel:`Loaded`})})};function gc(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
|
|
389
387
|
|
|
390
|
-
Lists
|
|
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 _c={command:`list`,describe:`List Threat Signals article indicators`,builder:gc,handler:async t=>c({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},t,async()=>{let c={feed_id:t[`feed-id`],article_id:t[`article-id`],search:t.search,per_page:t[`per-page`],sort:t.sort,include_total:t[`include-total`],cursor:t.cursor};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.indicators.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},vc={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(_c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function yc(e){return e.usage(`$0 cloudforce-one threat-signals search
|
|
391
389
|
|
|
392
|
-
|
|
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 bc={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:v(yc),handler:async t=>c({command:`cloudforce-one threat-signals search`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={query:t.query,max_results:t[`max-results`],feed_id:t[`feed-id`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.search({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function xc(e){return e.usage(`$0 cloudforce-one threat-signals skills create
|
|
393
391
|
|
|
394
|
-
|
|
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=>p(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 Sc={command:`create`,describe:`Create Threat Signals skill`,builder:xc,handler:async t=>c({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`),type:t.type}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await h(`name`,`The name field`)),t[`output-schema`]===void 0&&(t[`output-schema`]=await h(`output-schema`,`The output_schema field`)),t.prompt===void 0&&(t.prompt=await h(`prompt`,`The prompt field`));let d=f({name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`),type:t.type}),m=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Cc(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
|
|
395
393
|
|
|
396
|
-
|
|
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 wc={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:Cc,handler:async t=>c({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
395
|
+
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.skills.delete({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Deleted`})})};function Tc(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
|
|
397
396
|
|
|
398
|
-
|
|
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 Ec={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:Tc,handler:async t=>c({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.get({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Loaded`})})};function Dc(e){return e.usage(`$0 cloudforce-one threat-signals skills list
|
|
399
398
|
|
|
400
|
-
|
|
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 Oc={command:`list`,describe:`List Threat Signals skills`,builder:Dc,handler:async t=>c({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.skills.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function kc(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
|
|
401
400
|
|
|
402
|
-
|
|
403
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.articles.tags.remove({account_id:l,article_id:t[`article-id`],tag_id:t[`tag-id`]}));a(u,{successLabel:`Deleted`})})},wc={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(yc).command(xc).command(Cc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Tc={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(ic).command(cc).command(oc).command(uc).command(fc).command(_c).command(wc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ec(e){return e.usage(`$0 cloudforce-one threat-signals categories list
|
|
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 Ac={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:v(kc),handler:async t=>c({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.get({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Loaded`})})};function jc(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
|
|
404
402
|
|
|
405
|
-
|
|
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 Mc={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:v(jc),handler:async t=>c({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({category_uuids:t[`category-uuids`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...e,account_id:l,skill_id:t[`skill-id`]}));a(n,{successLabel:`Updated`});return}if(t[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let d=f({category_uuids:t[`category-uuids`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...d,account_id:l,skill_id:t[`skill-id`]}));a(p,{successLabel:`Updated`})})},Nc={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(Ac).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pc(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
|
|
406
404
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
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 Mc={command:`opt-out`,describe:`Opt out of curated Threat Signals feeds`,builder:jc,handler:async t=>c({command:`cloudforce-one threat-signals curated-feeds opt-out`,classification:{safeFlags:[`opted-out`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals curated-feeds opt-out`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/curated-feeds/opt-out`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({opted_out:t[`opted-out`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...e,account_id:l}));a(n,{successLabel:`Updated`});return}if(t[`opted-out`]===void 0)throw Error(`--opted-out is required (or pass --body with this field set).`);let d=f({opted_out:t[`opted-out`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.curatedFeeds.optOut({...d,account_id:l}));a(p,{successLabel:`Updated`})})},Nc={command:`curated-feeds`,describe:`Operations for threat-signals.curated-feeds`,builder:e=>e.command(Ac).command(Mc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pc(e){return e.usage(`$0 cloudforce-one threat-signals feeds create
|
|
410
|
-
|
|
411
|
-
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`]}).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 Fc={command:`create`,describe:`Create Threat Signals feed`,builder:Pc,handler:async t=>c({command:`cloudforce-one threat-signals feeds create`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({category_id:p(t[`category-id`],`category-id`,`text`),curated_feed_id:p(t[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`),url:p(t.url,`url`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({category_id:p(t[`category-id`],`category-id`,`text`),curated_feed_id:p(t[`curated-feed-id`],`curated-feed-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`),url:p(t.url,`url`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.feeds.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Ic(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
|
|
412
|
-
|
|
413
|
-
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 Lc={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:Ic,handler:async t=>c({command:`cloudforce-one threat-signals feeds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
414
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.feeds.delete({account_id:l,feed_id:t[`feed-id`]}));a(u,{successLabel:`Deleted`})})};function Rc(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
|
|
415
|
-
|
|
416
|
-
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 zc={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:Rc,handler:async t=>c({command:`cloudforce-one threat-signals feeds get-raw`,classification:{safeFlags:[`format`,`dry-run`]}},t,async()=>{let a={format:t.format};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds get-raw`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/raw`,pathParams:{"feed-id":String(t[`feed-id`]??``)},query:a,bodyKind:`none`});return}await n(t);let c=t.local?e:await i();t.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>b(`/accounts/${c}/cloudforce-one/v2/threat-signals/feeds/${encodeURIComponent(String(t[`feed-id`]))}/raw${l?`?`+l:``}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));y(u.toString(`utf-8`))})};function Bc(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
|
|
417
|
-
|
|
418
|
-
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 Vc={command:`list`,describe:`List Threat Signals feeds`,builder:v(Bc),handler:async t=>c({command:`cloudforce-one threat-signals feeds list`,classification:{safeFlags:[`source-type`,`enabled`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],limit:t.limit,sort:t.sort,category:t.category,source_type:t[`source-type`],enabled:t.enabled,status:t.status};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.feeds.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Hc(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
|
|
419
|
-
|
|
420
|
-
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 Uc={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:v(Hc),handler:async t=>c({command:`cloudforce-one threat-signals feeds poll`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={feed_id:t[`feed-id`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Creating`,async()=>l.cloudforceOne.threatSignals.feeds.poll({account_id:u,...c}));a(d,{successLabel:`Created`})})};function Wc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
|
|
421
|
-
|
|
422
|
-
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 Gc={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:Wc,handler:async t=>c({command:`cloudforce-one threat-signals feeds skills get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/skills`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.feeds.skills.get({account_id:l,feed_id:t[`feed-id`]}));a(u,{successLabel:`Loaded`})})};function Kc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
|
|
423
|
-
|
|
424
|
-
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 qc={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Kc,handler:async t=>c({command:`cloudforce-one threat-signals feeds skills update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds skills update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/skills`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({skill_ids:t[`skill-ids`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...e,account_id:l,feed_id:t[`feed-id`]}));a(n,{successLabel:`Updated`});return}if(t[`skill-ids`]===void 0)throw Error(`--skill-ids is required (or pass --body with this field set).`);let d=f({skill_ids:t[`skill-ids`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.skills.update({...d,account_id:l,feed_id:t[`feed-id`]}));a(p,{successLabel:`Updated`})})},Jc={command:`skills`,describe:`Operations for threat-signals.feeds.skills`,builder:e=>e.command(Gc).command(qc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Yc(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
|
|
425
|
-
|
|
426
|
-
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`]}).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 Xc={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:Yc,handler:async t=>c({command:`cloudforce-one threat-signals feeds update`,classification:{safeFlags:[`category-id`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals feeds update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({category_id:p(t[`category-id`],`category-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...e,account_id:l,feed_id:t[`feed-id`]}));a(n,{successLabel:`Updated`});return}let d=f({category_id:p(t[`category-id`],`category-id`,`text`),display_name:p(t[`display-name`],`display-name`,`text`),enabled:t.enabled,poll_interval_s:t[`poll-interval-s`],title:p(t.title,`title`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.feeds.update({...d,account_id:l,feed_id:t[`feed-id`]}));a(m,{successLabel:`Updated`})})},Zc={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Fc).command(Lc).command(zc).command(Vc).command(Uc).command(Xc).command(Jc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qc(e){return e.usage(`$0 cloudforce-one threat-signals health
|
|
427
|
-
|
|
428
|
-
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 $c={command:`health`,describe:`Check Threat Signals service health`,builder:Qc,handler:async t=>c({command:`cloudforce-one threat-signals health`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({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 c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.health({account_id:l}));a(u,{successLabel:`Loaded`})})};function el(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
|
|
429
|
-
|
|
430
|
-
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 tl={command:`list`,describe:`List Threat Signals article indicators`,builder:el,handler:async t=>c({command:`cloudforce-one threat-signals indicators list`,classification:{safeFlags:[`include-total`,`dry-run`]}},t,async()=>{let c={feed_id:t[`feed-id`],article_id:t[`article-id`],search:t.search,per_page:t[`per-page`],sort:t.sort,include_total:t[`include-total`],cursor:t.cursor};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.indicators.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},nl={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(tl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rl(e){return e.usage(`$0 cloudforce-one threat-signals search
|
|
431
|
-
|
|
432
|
-
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 il={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:v(rl),handler:async t=>c({command:`cloudforce-one threat-signals search`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={query:t.query,max_results:t[`max-results`],feed_id:t[`feed-id`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.search({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function al(e){return e.usage(`$0 cloudforce-one threat-signals skills create
|
|
433
|
-
|
|
434
|
-
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:`The type field`,choices:[`summary`,`tags`]}).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 ol={command:`create`,describe:`Create Threat Signals skill`,builder:al,handler:async t=>c({command:`cloudforce-one threat-signals skills create`,classification:{safeFlags:[`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`),type:p(t.type,`type`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await h(`name`,`The name field`)),t[`output-schema`]===void 0&&(t[`output-schema`]=await h(`output-schema`,`The output_schema field`)),t.prompt===void 0&&(t.prompt=await h(`prompt`,`The prompt field`)),t.type===void 0&&(t.type=await g(`type`,`The type field`,[`summary`,`tags`]));let d=f({name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`),type:p(t.type,`type`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.threatSignals.skills.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function sl(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
|
|
435
|
-
|
|
436
|
-
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 cl={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:sl,handler:async t=>c({command:`cloudforce-one threat-signals skills delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
|
|
437
|
-
`);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.threatSignals.skills.delete({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Deleted`})})};function ll(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
|
|
438
|
-
|
|
439
|
-
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 ul={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:ll,handler:async t=>c({command:`cloudforce-one threat-signals skills get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.get({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Loaded`})})};function dl(e){return e.usage(`$0 cloudforce-one threat-signals skills list
|
|
440
|
-
|
|
441
|
-
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 fl={command:`list`,describe:`List Threat Signals skills`,builder:dl,handler:async t=>c({command:`cloudforce-one threat-signals skills list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({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:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.cloudforceOne.threatSignals.skills.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function pl(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
|
|
442
|
-
|
|
443
|
-
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 ml={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:v(pl),handler:async t=>c({command:`cloudforce-one threat-signals skills tag-categories get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills tag-categories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.get({account_id:l,skill_id:t[`skill-id`]}));a(u,{successLabel:`Loaded`})})};function hl(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
|
|
444
|
-
|
|
445
|
-
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 gl={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:v(hl),handler:async t=>c({command:`cloudforce-one threat-signals skills tag-categories update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills tag-categories update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}/tag-categories`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({category_uuids:t[`category-uuids`]}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...e,account_id:l,skill_id:t[`skill-id`]}));a(n,{successLabel:`Updated`});return}if(t[`category-uuids`]===void 0)throw Error(`--category-uuids is required (or pass --body with this field set).`);let d=f({category_uuids:t[`category-uuids`]}),p=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.tagCategories.update({...d,account_id:l,skill_id:t[`skill-id`]}));a(p,{successLabel:`Updated`})})},_l={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(ml).command(gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vl(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
|
|
446
|
-
|
|
447
|
-
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 yl={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:vl,handler:async t=>c({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({config:p(t[`skill-config`],`skill-config`,`text`),is_active:t[`is-active`],name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...e,account_id:l,skill_id:t[`skill-id`]}));a(n,{successLabel:`Updated`});return}let d=f({config:p(t[`skill-config`],`skill-config`,`text`),is_active:t[`is-active`],name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...d,account_id:l,skill_id:t[`skill-id`]}));a(m,{successLabel:`Updated`})})},bl={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(ol).command(cl).command(ul).command(fl).command(yl).command(_l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xl={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command($c).command(il).command(Tc).command(Oc).command(Nc).command(Zc).command(nl).command(bl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Sl={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(C).command(P).command(ar).command(Wr).command(va).command(Mo).command(qo).command(nc).command(xl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Sl as default};
|
|
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 Fc={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:Pc,handler:async t=>c({command:`cloudforce-one threat-signals skills update`,classification:{safeFlags:[`is-active`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one threat-signals skills update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/threat-signals/skills/${t[`skill-id`]==null?`<skill-id>`:encodeURIComponent(String(t[`skill-id`]))}`,pathParams:{"skill-id":String(t[`skill-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({config:p(t[`skill-config`],`skill-config`,`text`),is_active:t[`is-active`],name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`)}):u(t.body)});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,t.body){let e=u(t.body),n=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...e,account_id:l,skill_id:t[`skill-id`]}));a(n,{successLabel:`Updated`});return}let d=f({config:p(t[`skill-config`],`skill-config`,`text`),is_active:t[`is-active`],name:p(t.name,`name`,`text`),output_schema:p(t[`output-schema`],`output-schema`,`text`),prompt:p(t.prompt,`prompt`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.threatSignals.skills.update({...d,account_id:l,skill_id:t[`skill-id`]}));a(m,{successLabel:`Updated`})})},Ic={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(Sc).command(wc).command(Ec).command(Oc).command(Fc).command(Nc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Lc={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(hc).command(bc).command(Vs).command(Ws).command(Ys).command(pc).command(vc).command(Ic).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Rc={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(C).command(P).command(ar).command(Wr).command(Mi).command(Ga).command(oo).command(gs).command(Lc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Rc as default};
|