cf 1.0.0-beta.12 → 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.
Files changed (306) hide show
  1. package/dist/_meta/commands.json +4648 -3810
  2. package/dist/_meta/hand-written-commands.json +356 -23
  3. package/dist/_meta/schemas.json +2522 -2143
  4. package/dist/abuse-reports-CVv52Q2w.mjs +24 -0
  5. package/dist/access-k1QjF5rE.mjs +2 -0
  6. package/dist/account-tags-RhvWOkOf.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts--3lrEkmu.mjs} +67 -80
  8. package/dist/{acm-BfI0p2sX.mjs → acm-BJxINEcu.mjs} +2 -2
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-BqByG9JW.mjs} +55 -43
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-D4dQMGbh.mjs} +2 -2
  11. package/dist/{ai-jFzFBANM.mjs → ai-CRkQ4pjC.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-fMSn4c5L.mjs} +1 -1
  13. package/dist/ai-gateway-CbhvQK4L.mjs +80 -0
  14. package/dist/ai-search-CvVSnOA0.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-Z_qpI92I.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-CpbCB8br.mjs} +5 -5
  17. package/dist/analytics-DkY9dOP1.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-DE_jvlx_.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BHnOU5MM.mjs} +25 -25
  20. package/dist/argo-DhC5L_aN.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-CrIupY7P.mjs} +3 -3
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-BjeBxTox.mjs} +1 -1
  23. package/dist/{auth-CKotxfap.mjs → auth-BNYfOMl0.mjs} +1 -1
  24. package/dist/{auth-AobvBmz4.mjs → auth-CAWalgW0.mjs} +1 -1
  25. package/dist/auth-DOwC01PW.mjs +2 -0
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-Dop0wLCw.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-RQ3HS4m1.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-DZ7QV-_N.mjs} +3 -3
  29. package/dist/{billing-CDMc4tvX.mjs → billing-BFyte9fL.mjs} +3 -3
  30. package/dist/bot-management-DXcbV3am.mjs +9 -0
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-bGGp_cwX.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-DN36XkxH.mjs} +2 -2
  33. package/dist/browser-run-hHD1RT43.mjs +42 -0
  34. package/dist/build-BhpWYgNm.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-CCe7IrWT.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-6aO61R9R.mjs} +4 -4
  37. package/dist/{cache-C05hHXUp.mjs → cache-C5YJpMqi.mjs} +6 -6
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CbqDAktQ.mjs} +1 -1
  39. package/dist/cf-oRSQKirD.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-CPI5cYtB.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Civns3WA.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-ht4q6i2y.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-balaN_my.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-3_4Ermmg.mjs} +3 -3
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-avx27sLw.mjs} +1 -1
  47. package/dist/cloudflared-D83U8Yn3.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CXdeqJ9l.mjs} +143 -185
  49. package/dist/{command-VuxpEvmH.mjs → command-9VAc7b30.mjs} +1 -1
  50. package/dist/{command-CUkXxZsc.mjs → command-B_Ixlz8Q.mjs} +1 -1
  51. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  52. package/dist/{command-DBaNgfA4.mjs → command-BtDY_MKv.mjs} +1 -1
  53. package/dist/command-CUNMrMou.mjs +2 -0
  54. package/dist/{command-SS1z_t68.mjs → command-Ckb9FufU.mjs} +1 -1
  55. package/dist/{command-BWlpCtHe.mjs → command-CtVUNm__.mjs} +1 -1
  56. package/dist/{command-DyE8v4sd.mjs → command-CyJQ40fc.mjs} +1 -1
  57. package/dist/{command-BlGILcTA.mjs → command-DPX9sJVi.mjs} +1 -1
  58. package/dist/{command-CXxh5Hce.mjs → command-DXaRn1ls.mjs} +1 -1
  59. package/dist/{command-CRl00uA2.mjs → command-DjEJaOwV.mjs} +1 -1
  60. package/dist/{command-Rv2MR-eh.mjs → command-DtgJilOK.mjs} +1 -1
  61. package/dist/{command-CKQlxypn.mjs → command-OHov3PEc.mjs} +1 -1
  62. package/dist/{command-DEQSv-S1.mjs → command-OWe3v69l.mjs} +1 -1
  63. package/dist/{command-BQpXcGKV.mjs → command-SmWD-MeI.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-CuqAO3N_.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-ftd10Du-.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-TwDZYdEM.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-CZxkOuC3.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-6lVSr-fd.mjs} +1 -1
  69. package/dist/containers-Dqs_ZnO2.mjs +78 -0
  70. package/dist/containers-ncw3bd3a.mjs +376 -0
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-BWFbqfQ0.mjs} +3 -3
  72. package/dist/{context-Bwkz4Lm_.mjs → context-BBLtgdR1.mjs} +2 -2
  73. package/dist/cps-C5phNoVU.mjs +6 -0
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-BwZNZu0A.mjs} +3 -3
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-DPp3qLqO.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-pfpZcr06.mjs} +5 -5
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-DrvGRAkl.mjs} +2 -2
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-wGtmFbz1.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-HTG6MPKv.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DqEHBSVt.mjs} +2 -2
  81. package/dist/d1-EQMUlHTJ.mjs +94 -0
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-D6nj0Z5N.mjs} +1 -1
  83. package/dist/deploy-B22sEVHd.mjs +2 -0
  84. package/dist/deploy-context-DmG9rgPO.mjs +56 -0
  85. package/dist/deploy-input-BCjcuP6u.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ClhhXuNU.mjs} +1 -1
  87. package/dist/diagnostics-tqHjq-Pl.mjs +15 -0
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/dist-DmRM6WSZ.mjs +449 -0
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-BEHj4X9T.mjs} +1 -1
  92. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-zwbkutyf.mjs} +1 -1
  93. package/dist/{dns-C-A5pwf3.mjs → dns-n4mfYBZg.mjs} +7 -7
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-CQ2dHhho.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DOi6yOt3.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-WcSPt22u.mjs} +5 -5
  98. package/dist/{email-security-BCarmbky.mjs → email-security-BXu3OGay.mjs} +15 -15
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-B9zTlIjt.mjs} +2 -2
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-B37m2lKW.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall-CRtYO0Ha.mjs} +7 -7
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-DvTFZSay.mjs} +3 -3
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-uSyibsit.mjs} +5 -5
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-BFXiiokq.mjs} +1 -1
  107. package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
  108. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-27u7b7Jb.mjs} +5 -5
  109. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-DvaUSzsj.mjs} +1 -1
  110. package/dist/hyperdrive-BzJvPdu6.mjs +37 -0
  111. package/dist/{iam-sRKDU2Z3.mjs → iam-Dl3cU9GI.mjs} +1 -1
  112. package/dist/{images-DXdekLVs.mjs → images-C2OkI1j7.mjs} +6 -6
  113. package/dist/index.mjs +1 -1
  114. package/dist/init-Da8pe296.mjs +43 -0
  115. package/dist/{intel-CnVeSjIS.mjs → intel-DoB1g_K7.mjs} +2 -2
  116. package/dist/interactive-BW9T1D1q.mjs +48 -0
  117. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  118. package/dist/{ips-COCUG8mk.mjs → ips-BRt68epr.mjs} +1 -1
  119. package/dist/k2-_eq5ZY2t.mjs +11 -0
  120. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-DaO2yqYu.mjs} +2 -2
  121. package/dist/{keys-CDZreums.mjs → keys-7BQ3Zq6Y.mjs} +1 -1
  122. package/dist/{kv-DkpKVimq.mjs → kv-BTYCXKML.mjs} +4 -4
  123. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-CDWwCsD2.mjs} +1 -1
  124. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-CPHOK_dE.mjs} +1 -1
  125. package/dist/load-balancers-Bu9pd2SV.mjs +76 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-BcPM4I0s.mjs} +1 -1
  127. package/dist/local-BundUuDT.mjs +2 -0
  128. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-BHKyRlCP.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-BBYC_BtH.mjs} +1 -1
  130. package/dist/{login-BrjOuHKu.mjs → login-D2uoWhWh.mjs} +1 -1
  131. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-Bc1DQ4-g.mjs} +1 -1
  132. package/dist/{logos-Bd8xNRKW.mjs → logos-X5B8z7Iv.mjs} +1 -1
  133. package/dist/{logpush-BYk3qqwY.mjs → logpush-C2ENi1et.mjs} +7 -7
  134. package/dist/{logs-Jcj2NN8H.mjs → logs-BKDz7kBW.mjs} +1 -1
  135. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-B60Gld8A.mjs} +6 -6
  136. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-CxXI3Y-H.mjs} +4 -4
  137. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-ZCSaCbl8.mjs} +171 -168
  138. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-DrxMb7xi.mjs} +1 -1
  139. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-AI7KrRU1.mjs} +1 -1
  140. package/dist/{matches-BtKqG8T9.mjs → matches-rPMLS3Ip.mjs} +1 -1
  141. package/dist/mcp-DXUMvEWt.mjs +32 -0
  142. package/dist/mesh-MmBCQ37q.mjs +26 -0
  143. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  144. package/dist/{monetization-pLalYYMI.mjs → monetization-DQE5VtUO.mjs} +2 -2
  145. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-DwkEb-Hy.mjs} +2 -2
  146. package/dist/{network-DrJxPWXQ.mjs → network-BcfobxQY.mjs} +1 -1
  147. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-BU3tN_Ab.mjs} +10 -11
  148. package/dist/o11y-BBv7nedp.mjs +93 -0
  149. package/dist/{oauth-B08YQ4xq.mjs → oauth-BUr8bPwo.mjs} +1 -1
  150. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-qWVImhHE.mjs} +3 -3
  151. package/dist/{oauth-TGbM1Q0V.mjs → oauth-n8um6MFk.mjs} +1 -1
  152. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-CdeIgJIx.mjs} +1 -1
  153. package/dist/organization-CJeOVWH7.mjs +71 -0
  154. package/dist/{organizations-Dk0D9ukm.mjs → organizations-BpfoqZcG.mjs} +1 -1
  155. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-Bimf07RF.mjs} +2 -2
  156. package/dist/origin-post-quantum-encryption-CM-If38w.mjs +6 -0
  157. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-BPwYPhc9.mjs} +3 -3
  158. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  159. package/dist/{page-rules-BKaU37cM.mjs → page-rules-DOeekMrj.mjs} +4 -4
  160. package/dist/pages-Bn0Sg1ay.mjs +54 -0
  161. package/dist/pay-per-crawl-qJpseNNx.mjs +38 -0
  162. package/dist/pay-per-use-C1MWKJ4O.mjs +33 -0
  163. package/dist/pipelines-rCwXQw6S.mjs +44 -0
  164. package/dist/{precursor-DmQ32-Sp.mjs → precursor-Bk8Pp6jT.mjs} +2 -2
  165. package/dist/previews-BEheHO3T.mjs +4 -0
  166. package/dist/process-2wmDCy17.mjs +2 -0
  167. package/dist/{progress-BYVZuEcG.mjs → progress-CQqDtgmF.mjs} +1 -1
  168. package/dist/prompt-C8FyienX.mjs +3 -0
  169. package/dist/{queries-DPBkVynK.mjs → queries-DJ8looyq.mjs} +1 -1
  170. package/dist/{queues-CCXRs98q.mjs → queues-BBH9Q-Tt.mjs} +7 -7
  171. package/dist/{r2-BKuBSW8h.mjs → r2-CdJKpP2w.mjs} +52 -49
  172. package/dist/{radar-Gv1yFoRX.mjs → radar-CdvQL4xm.mjs} +1 -1
  173. package/dist/raw-fetch-DbXN3SlE.mjs +2 -0
  174. package/dist/{realtime-CVl-rvgx.mjs → realtime-onrXppzh.mjs} +9 -9
  175. package/dist/{registrar-swlnh22i.mjs → registrar-CbEBc5IE.mjs} +2 -2
  176. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-BJhn1HFT.mjs} +3 -3
  177. package/dist/{registry-C20J1MW0.mjs → registry-PI6sO95I.mjs} +1 -1
  178. package/dist/{reporting-Bgwsvol1.mjs → reporting-bXZY6obP.mjs} +1 -1
  179. package/dist/{request-headers-CUee83pa.mjs → request-headers-D8L95bEQ.mjs} +1 -1
  180. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-CihskC2A.mjs} +1 -1
  181. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  182. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  183. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-DDqcCHVs.mjs} +11 -11
  184. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-D63RpBce.mjs} +1 -1
  185. package/dist/{rules-BDunCGMj.mjs → rules-CAW0-Wde.mjs} +1 -1
  186. package/dist/rulesets-CPir63Qc.mjs +37 -0
  187. package/dist/{rum-B7XiECe9.mjs → rum-BfwTcuup.mjs} +1 -1
  188. package/dist/{run-CrZgB8L_.mjs → run-CW2Cgi0S.mjs} +1 -1
  189. package/dist/run-DEynXvCc.mjs +2 -0
  190. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  191. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BTItUu1K.mjs} +1 -1
  192. package/dist/{scim-CORcs2wK.mjs → scim-CtZ1FeQE.mjs} +1 -1
  193. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-BIuBYUJT.mjs} +2 -2
  194. package/dist/{security-insights-DblK_6sg.mjs → security-insights-DfUus0bs.mjs} +3 -3
  195. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-CgZOsAIZ.mjs} +1 -1
  196. package/dist/{session-BWe9et4K.mjs → session-BcM8Vyyx.mjs} +1 -1
  197. package/dist/shared-CpS23WwR.mjs +2 -0
  198. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-ClgB7r-9.mjs} +5 -5
  199. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DLO3iFAg.mjs} +1 -1
  200. package/dist/spawn-D07wH-MH.mjs +10 -0
  201. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-B6qkjR_Z.mjs} +5 -5
  202. package/dist/{speed-Dj0YhfRe.mjs → speed-DX5X2EIR.mjs} +1 -1
  203. package/dist/sql-CF044HDW.mjs +4 -0
  204. package/dist/src-BMATTZU_.mjs +125 -0
  205. package/dist/{ssl-BQL1fNtD.mjs → ssl-CM-rChEC.mjs} +5 -5
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CrtCP-6-.mjs} +1 -1
  207. package/dist/startup-profile-D662WI9s.mjs +2 -0
  208. package/dist/state-D7uNYnoi.mjs +2 -0
  209. package/dist/{state-Dy6-rKNd.mjs → state-DIiIGEtR.mjs} +1 -1
  210. package/dist/{stream-DKv2TtZN.mjs → stream-5EmUOQvy.mjs} +5 -5
  211. package/dist/{submit-Byt2KBGI.mjs → submit-lEAaRSMR.mjs} +1 -1
  212. package/dist/{tags-BIBsdG68.mjs → tags-CX23P4jg.mjs} +1 -1
  213. package/dist/telemetry-0Y5hAtCX.mjs +2 -0
  214. package/dist/{telemetry-bu3txnIR.mjs → telemetry-ZlCi5Xhc.mjs} +1 -1
  215. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-DnI7QziH.mjs} +1 -1
  216. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-MR0dlcGm.mjs} +1 -1
  217. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  218. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-NzYpsfi_.mjs} +15 -15
  219. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-M7sKCEz3.mjs} +11 -11
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-HFkPml6x.mjs} +1 -1
  221. package/dist/update-check-aTutXNRd.mjs +2 -0
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-B8udoxlx.mjs → url-info-Dos9VOXV.mjs} +1 -1
  224. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-CZbFOq_v.mjs} +2 -2
  225. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-B7quLPGW.mjs} +2 -2
  226. package/dist/{user-BLZ-0Bgv.mjs → user-rXca0J9M.mjs} +14 -14
  227. package/dist/values-D-rrZrDa.mjs +4 -0
  228. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-D2tf_oA8.mjs} +4 -4
  229. package/dist/version-BGnqDvNR.mjs +2 -0
  230. package/dist/waiting-rooms-DrA3-0bw.mjs +53 -0
  231. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-DQAfvPT9.mjs} +3 -3
  232. package/dist/{web3-DjeavuLg.mjs → web3-MI0GQDnu.mjs} +5 -5
  233. package/dist/workers-By6Pf8fv.mjs +40 -0
  234. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-6YsWsCmC.mjs} +2 -2
  235. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-DL8fC1qR.mjs} +4 -6
  236. package/dist/workers-vpc-BYx6sbgd.mjs +13 -0
  237. package/dist/workflows-ByQLnV0E.mjs +52 -0
  238. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  239. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-CgbpmA85.mjs} +1 -1
  240. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CpjTkkWt.mjs} +418 -402
  241. package/dist/{zone-tymlghWb.mjs → zone-DnKIe6po.mjs} +1 -1
  242. package/dist/{zones-Bz6dgT9_.mjs → zones--5ZzsDmQ.mjs} +15 -15
  243. package/package.json +25 -26
  244. package/dist/abuse-reports-Cy9RcWPu.mjs +0 -24
  245. package/dist/access-DwJm1qet.mjs +0 -2
  246. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  247. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  248. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  249. package/dist/analytics-NPND7aHB.mjs +0 -20
  250. package/dist/argo-DYfLQhd2.mjs +0 -10
  251. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  252. package/dist/bot-management-UrCM3P8K.mjs +0 -9
  253. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  254. package/dist/build-C4giET85.mjs +0 -2
  255. package/dist/cf-B9aqZZKD.mjs +0 -18
  256. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  257. package/dist/cloudflared-B48cfu95.mjs +0 -2
  258. package/dist/command-CzvlHvov.mjs +0 -2
  259. package/dist/containers-DRzgE46U.mjs +0 -375
  260. package/dist/containers-DuIsM7lM.mjs +0 -78
  261. package/dist/cps-B7_BJaAU.mjs +0 -6
  262. package/dist/d1-MvAQMvvo.mjs +0 -89
  263. package/dist/deploy-BS47vZvJ.mjs +0 -2
  264. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  265. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  266. package/dist/diagnostics-ChDfJ-Gv.mjs +0 -15
  267. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  268. package/dist/dist-8rP3V95o.mjs +0 -57
  269. package/dist/dist-CYFkGHYv.mjs +0 -487
  270. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  271. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  272. package/dist/hyperdrive-DAA8Fazg.mjs +0 -37
  273. package/dist/init-j47MT4Qe.mjs +0 -39
  274. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  275. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  276. package/dist/k2-CmHkArHL.mjs +0 -13
  277. package/dist/load-balancers-C5YMvhXD.mjs +0 -76
  278. package/dist/local-D5L5Bwju.mjs +0 -2
  279. package/dist/mcp-QDd1Iyc0.mjs +0 -32
  280. package/dist/mesh-DtrIzl5z.mjs +0 -26
  281. package/dist/observability-CvN9oxAo.mjs +0 -80
  282. package/dist/organization-DIwqRBBV.mjs +0 -75
  283. package/dist/origin-post-quantum-encryption-BOKWKDTY.mjs +0 -6
  284. package/dist/pages-2Xg-lrMf.mjs +0 -54
  285. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  286. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  287. package/dist/pipelines-BM-T7mMK.mjs +0 -44
  288. package/dist/previews-DDQ9ACDJ.mjs +0 -4
  289. package/dist/prompt-F5wxc8zq.mjs +0 -3
  290. package/dist/raw-fetch-DyYWa923.mjs +0 -2
  291. package/dist/resolve-qwL1LmKN.mjs +0 -2
  292. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  293. package/dist/run-nNxXb_Cv.mjs +0 -2
  294. package/dist/shared-0N31BXkY.mjs +0 -2
  295. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  296. package/dist/src-CAiZlihY.mjs +0 -117
  297. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  298. package/dist/state-BA2CanJ_.mjs +0 -2
  299. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  300. package/dist/update-check-B-CvDAUz.mjs +0 -2
  301. package/dist/values-BUK-m0Jg.mjs +0 -4
  302. package/dist/version-BZNc7Y3t.mjs +0 -2
  303. package/dist/waiting-rooms-BycGk2Y0.mjs +0 -53
  304. package/dist/workers-C_SfyU-v.mjs +0 -38
  305. package/dist/workers-vpc-CKts8Av0.mjs +0 -13
  306. package/dist/workflows-BibtWuOx.mjs +0 -43
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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-F5wxc8zq.mjs";import{t as v}from"./cli-types-9oYmRTHJ.mjs";import{n as y,t as b}from"./raw-fetch-DyYWa923.mjs";function ee(e){return e.usage(`$0 cloudforce-one binary-storage create
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
 
@@ -14,7 +14,7 @@ List all domains registered for credential monitoring.`).option(`page`,{type:`nu
14
14
 
15
15
  Get credential matches for the account's monitored domains.`).option(`domain`,{type:`string`,description:`Filter by domain (exact match)`}).option(`username`,{type:`string`,description:`Filter by username (partial match)`}).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Items per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List credential matches`,builder:j,handler:async t=>c({command:`cloudforce-one credential-monitor matches list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={domain:t.domain,username:t.username,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one credential-monitor matches list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/credential-monitor/matches`,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.credentialMonitor.matches.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},N={command:`matches`,describe:`Operations for credential-monitor.matches`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`credential-monitor`,describe:`Operations for credential-monitor`,builder:e=>e.command(A).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 cloudforce-one events aggregate get
16
16
 
17
- Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) with optional date filtering and daily grouping. Supports multi-dimensional aggregation for cross-analysis.`).option(`aggregate-by`,{type:`string`,description:`Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry')`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUIDs to filter by, or one standalone scope value: 'all'/'*' for all accessible non-analytics event datasets (analytics datasets are silently excluded), 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`start-date`,{type:`string`,description:`Start date for filtering (ISO 8601 format, e.g., '2024-01-01')`}).option(`end-date`,{type:`string`,description:`End date for filtering (ISO 8601 format, e.g., '2024-12-31')`}).option(`group-by-date`,{type:`boolean`,description:`Whether to group results by date (daily aggregation)`}).option(`limit`,{type:`number`,description:`Maximum number of results to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Aggregate events by single or multiple columns with optional date filtering`,builder:F,handler:async t=>c({command:`cloudforce-one events aggregate get`,classification:{safeFlags:[`group-by-date`,`dry-run`]}},t,async()=>{let c={aggregateBy:t[`aggregate-by`],datasetId:t[`dataset-id`],startDate:t[`start-date`],endDate:t[`end-date`],groupByDate:t[`group-by-date`],limit:t.limit};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events aggregate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/aggregate`,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.aggregate.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},L={command:`aggregate`,describe:`Operations for events.aggregate`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 cloudforce-one events categories catalog get
17
+ Aggregate threat events by one or more columns (e.g., attacker, targetIndustry) with optional date filtering and daily grouping. Supports multi-dimensional aggregation for cross-analysis.`).option(`aggregate-by`,{type:`string`,description:`Column(s) to aggregate by - single column or comma-separated list (e.g., 'attacker', 'targetIndustry', 'attacker,targetIndustry')`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUIDs to filter by, 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(`start-date`,{type:`string`,description:`Start date for filtering (ISO 8601 format, e.g., '2024-01-01')`}).option(`end-date`,{type:`string`,description:`End date for filtering (ISO 8601 format, e.g., '2024-12-31')`}).option(`group-by-date`,{type:`boolean`,description:`Whether to group results by date (daily aggregation)`}).option(`limit`,{type:`number`,description:`Maximum number of results to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Aggregate events by single or multiple columns with optional date filtering`,builder:F,handler:async t=>c({command:`cloudforce-one events aggregate get`,classification:{safeFlags:[`group-by-date`,`dry-run`]}},t,async()=>{let c={aggregateBy:t[`aggregate-by`],datasetId:t[`dataset-id`],startDate:t[`start-date`],endDate:t[`end-date`],groupByDate:t[`group-by-date`],limit:t.limit};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events aggregate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/aggregate`,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.aggregate.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},L={command:`aggregate`,describe:`Operations for events.aggregate`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 cloudforce-one events categories catalog get
18
18
 
19
19
  Lists categories`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get`,describe:`Lists categories`,builder:R,handler:async t=>c({command:`cloudforce-one events categories catalog get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events categories catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/categories/catalog`,pathParams:{},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.cloudforceOne.events.categories.catalog.get({account_id:l}));a(u,{successLabel:`Loaded`})})},B={command:`catalog`,describe:`Operations for events.categories.catalog`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 cloudforce-one events categories create <category-id>
20
20
 
@@ -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:p(t[`target-type`],`target-type`,`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.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:p(t[`target-type`],`target-type`,`text`),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>
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,16 +75,16 @@ 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:p(t.role,`role`,`text`),subjectId:p(t[`subject-id`],`subject-id`,`text`),subjectType:p(t[`subject-type`],`subject-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.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:p(t.role,`role`,`text`),subjectId:p(t[`subject-id`],`subject-id`,`text`),subjectType:p(t[`subject-type`],`subject-type`,`text`)}),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>
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:p(t.role,`role`,`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.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:p(t.role,`role`,`text`)}),m=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(m,{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>
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
- Returns indicators associated with the provided tag UUID, with pagination. By default fans out across every indicator dataset the account can read; pass datasetIds to scope to UUIDs, analytics datasets, or operational datasets. 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: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. Analytics datasets do not expose tag associations, so 'analytics' returns an empty result. Omit to search all readable datasets.`}).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>
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
 
89
89
  Lists all target industries for a specific dataset`).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 vt={command:`get <dataset-id>`,describe:`Lists all target industries for a specific dataset`,builder:_t,handler:async t=>c({command:`cloudforce-one events dataset target industries get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events dataset target industries 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`]))}/targetIndustries`,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.target.industries.get({account_id:l,dataset_id:t[`dataset-id`]}));a(u,{successLabel:`Loaded`})})},yt={command:`industries`,describe:`Operations for events.dataset.target.industries`,builder:e=>e.command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bt={command:`target`,describe:`Operations for events.dataset.target`,builder:e=>e.command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`dataset`,describe:`Operations for events.dataset`,builder:e=>e.command(X).command(Q).command(J).command(ie).command(Ce).command(Oe).command(et).command(rt).command(ft).command(gt).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return e.usage(`$0 cloudforce-one events datasets populate create
90
90
 
@@ -97,9 +97,9 @@ Execute GraphQL aggregations over threat events. Supports multi-dimensional grou
97
97
 
98
98
  Execute GraphQL aggregations over threat events. Supports multi-dimensional group-bys, optional date range filtering, and multi-dataset aggregation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`qlv2`,describe:`GraphQL endpoint for event aggregation`,builder:jt,handler:async t=>c({command:`cloudforce-one events graphql create graph qlv2`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events graphql create graph qlv2`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/events/graphql`,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.events.graphql.create.graph.qlv2({account_id:l}));a(u,{successLabel:`Created`})})},Nt={command:`graph`,describe:`Operations for events.graphql.create.graph`,builder:e=>e.command(At).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`create`,describe:`Operations for events.graphql.create`,builder:e=>e.command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ft={command:`graphql`,describe:`Operations for events.graphql`,builder:e=>e.command(Pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function It(e){return e.usage(`$0 cloudforce-one events indicator types get
99
99
 
100
- Lists indicator types across multiple datasets`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, queries all accessible datasets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lt={command:`get`,describe:`Lists indicator types across multiple datasets`,builder:It,handler:async t=>c({command:`cloudforce-one events indicator types get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events indicator types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query: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.indicator.types.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Rt={command:`types`,describe:`Operations for events.indicator.types`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},zt={command:`indicator`,describe:`Operations for events.indicator`,builder:e=>e.command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bt(e){return e.usage(`$0 cloudforce-one events indicators get
100
+ Lists indicator types across multiple datasets`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'operational' for readable intelligence datasets (isAnalytics=false), 'analytics' for readable analytics datasets (isAnalytics=true), or 'all'/'*' for every readable dataset including analytics datasets. If not provided, queries all accessible datasets, including analytics datasets.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Lt={command:`get`,describe:`Lists indicator types across multiple datasets`,builder:It,handler:async t=>c({command:`cloudforce-one events indicator types get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events indicator types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicator-types`,pathParams:{},query: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.indicator.types.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Rt={command:`types`,describe:`Operations for events.indicator.types`,builder:e=>e.command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},zt={command:`indicator`,describe:`Operations for events.indicator`,builder:e=>e.command(Rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Bt(e){return e.usage(`$0 cloudforce-one events indicators get
101
101
 
102
- Retrieves indicators across specified datasets, ordered by createdAt descending then UUID, dataset ID, and shard ID ascending. Use the standalone datasetIds value 'all'/'*' for legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If no datasetIds are provided, uses the default dataset.`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' for legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType, uuid. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the 'in' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`name`,{type:`string`,description:`Filter indicators by value using substring match (LIKE). Legacy alternative to structured search.`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-events`,{type:`string`,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,description:`Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value.`}).option(`tag-search`,{type:`string`,description:'Structured tag-metadata filter as a JSON array of {field, op, value} objects. Operates against the per-dataset IndicatorTag mirror so you can find indicators by tag attributes (origin country, motive, sophistication, priority, etc.) without a separate Tags lookup. Common dashboard usage: drill from a country into indicators, e.g. tagSearch=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Operators: equals, not, gt/gte/lt/lte (numeric only), contains/like/find/startsWith/endsWith (string only), in. AND-joined across entries; combined with `tags`, a matching tag must satisfy both. Max 10 entries per request, max 100 values per \'in\'. Performance notes: `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`created-after`,{type:`string`,description:`Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z').`}).option(`created-before`,{type:`string`,description:`Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z').`}).option(`related-events-limit`,{type:`number`,description:"Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events. For JSON responses, when the limit hides events, the indicator carries `relatedEventsHasMore: true` and the response includes an advisory message — the cap is never applied silently. STIX and TAXII representations do not include related-event data."}).option(`include-tags`,{type:`boolean`,description:`Whether to include full tag details for each indicator. Defaults to true.`}).option(`include-total-count`,{type:`boolean`,description:`Whether to compute total count via COUNT(*). Defaults to false for performance. total_count is null unless this is true and the complete fan-out succeeds.`}).option(`format`,{type:`string`,description:`Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:"Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit. Cannot be combined with `cursor`.",choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `pagination.cursor`. When provided, all filters, datasetIds, page, `pageSize`, `includeTags` and `relatedEventsLimit` come from the cursor — do not resend them. Sending any filter, `page`, `pageSize`, `includeTags`, `relatedEventsLimit`, `includeTotalCount=true`, or `cache=from-graph` alongside a cursor yields a 400 `CursorFilterConflictError`. A cursor issued for a different entity, an unsupported version, or a dataset that has since been reconfigured as analytics-only yields a 400 `InvalidCursorError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vt={command:`get`,describe:`Lists indicators across multiple datasets`,builder:v(Bt),handler:async t=>c({command:`cloudforce-one events indicators get`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`],page:t.page,pageSize:t[`page-size`],search:t.search,name:t.name,indicatorType:t[`indicator-type`],relatedEvents:t[`related-events`],tags:t.tags,tagSearch:t[`tag-search`],createdAfter:t[`created-after`],createdBefore:t[`created-before`],relatedEventsLimit:t[`related-events-limit`],includeTags:t[`include-tags`],includeTotalCount:t[`include-total-count`],format:t.format,cache:t.cache,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query: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.indicators.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ht={command:`indicators`,describe:`Operations for events.indicators`,builder:e=>e.command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ut(e){return e.usage(`$0 cloudforce-one events queries create-create
102
+ Retrieves indicators across specified datasets, ordered by createdAt descending then UUID, dataset ID, and shard ID ascending. Use one standalone datasetIds scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If no datasetIds are provided, uses the default dataset.`).option(`dataset-ids`,{type:`string`,description:`Dataset UUIDs to query, or one standalone scope value: 'all'/'*' or 'operational' for readable intelligence datasets (isAnalytics=false), or 'analytics' for readable analytics datasets (isAnalytics=true). If not provided, uses the default dataset.`}).option(`page`,{type:`number`,description:`Page`}).option(`page-size`,{type:`number`,description:`PageSize`}).option(`search`,{type:`string`,description:`Structured search as a JSON array of {field, op, value} objects. Searchable fields: value, indicatorType, uuid. Supports operators: equals, not, contains, startsWith, endsWith, gt, lt, gte, lte, like, in, find. Use the 'in' operator with an array value to bulk-check up to 100 indicators in a single request, e.g. search=[{"field":"value","op":"in","value":["evil.com","bad.org"]}]. Multiple conditions are AND'd together. Max 10 conditions per request.`}).option(`name`,{type:`string`,description:`Filter indicators by value using substring match (LIKE). Legacy alternative to structured search.`}).option(`indicator-type`,{type:`string`,description:`IndicatorType`}).option(`related-events`,{type:`string`,description:`Filter by related event IDs`}).option(`tags`,{type:`string`,description:`Filter by tag values or UUIDs. Indicators must have at least one of the specified tags (OR logic). Supports both tag UUID and tag value.`}).option(`tag-search`,{type:`string`,description:'Structured tag-metadata filter as a JSON array of {field, op, value} objects. Operates against the per-dataset IndicatorTag mirror so you can find indicators by tag attributes (origin country, motive, sophistication, priority, etc.) without a separate Tags lookup. Common dashboard usage: drill from a country into indicators, e.g. tagSearch=[{"field":"originCountryISO","op":"in","value":["IR","CN"]}]. Country values may be passed as alpha-2, alpha-3, name, or alias (e.g. "iran"). Operators: equals, not, gt/gte/lt/lte (numeric only), contains/like/find/startsWith/endsWith (string only), in. AND-joined across entries; combined with `tags`, a matching tag must satisfy both. Max 10 entries per request, max 100 values per \'in\'. Performance notes: `originCountryISO` uses its B-tree index for equals/not/in. `priority` uses its B-tree index for numeric comparisons. Other string columns (`actorCategory`, `motive`, etc.) are case-insensitive and unindexed; current catalog size makes this a non-issue. `endsWith` and `aliasGroupNames` contains/like are leading-wildcard scans and slow on large result sets. `aliasGroupNames` matches on the JSON-encoded text, so substrings can cross alias boundaries ("apt28" also matches "apt280" when both appear in the same tag\'s alias list).'}).option(`created-after`,{type:`string`,description:`Filter indicators created on or after this date. Must use ISO 8601 format (e.g., '2024-01-15T00:00:00Z').`}).option(`created-before`,{type:`string`,description:`Filter indicators created on or before this date. Must use ISO 8601 format (e.g., '2024-12-31T23:59:59Z').`}).option(`related-events-limit`,{type:`number`,description:"Limit the number of related events returned per indicator. Default: 2. Set to 0 for none, -1 for all events. For JSON responses, when the limit hides events, the indicator carries `relatedEventsHasMore: true` and the response includes an advisory message — the cap is never applied silently. STIX and TAXII representations do not include related-event data."}).option(`include-tags`,{type:`boolean`,description:`Whether to include full tag details for each indicator. Defaults to true.`}).option(`include-total-count`,{type:`boolean`,description:`Whether to compute total count via COUNT(*). Defaults to false for performance. total_count is null unless this is true and the complete fan-out succeeds.`}).option(`format`,{type:`string`,description:`Output format for indicator data. 'json' returns the default format, 'stix2' returns STIX 2.1 Indicator SDOs, 'taxii' returns a TAXII 2.1 Envelope with Content-Type application/taxii+json;version=2.1.`,choices:[`json`,`stix2`,`taxii`]}).option(`cache`,{type:`string`,description:"Cache strategy. 'from-graph' serves results from the graph-node KV cache when all requested UUIDs are cached; falls back to normal path on partial/zero hit. Cannot be combined with `cursor`.",choices:[`from-graph`]}).option(`cursor`,{type:`string`,description:"Opaque cursor from a previous response's `pagination.cursor`. When provided, all filters, datasetIds, page, `pageSize`, `includeTags` and `relatedEventsLimit` come from the cursor — do not resend them. Sending any filter, `page`, `pageSize`, `includeTags`, `relatedEventsLimit`, `includeTotalCount=true`, or `cache=from-graph` alongside a cursor yields a 400 `CursorFilterConflictError`. A cursor issued for a different entity, an unsupported version, or a dataset that has since been reconfigured as analytics-only yields a 400 `InvalidCursorError`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Vt={command:`get`,describe:`Lists indicators across multiple datasets`,builder:v(Bt),handler:async t=>c({command:`cloudforce-one events indicators get`,classification:{safeFlags:[`include-tags`,`include-total-count`,`format`,`cache`,`dry-run`]}},t,async()=>{let c={datasetIds:t[`dataset-ids`],page:t.page,pageSize:t[`page-size`],search:t.search,name:t.name,indicatorType:t[`indicator-type`],relatedEvents:t[`related-events`],tags:t.tags,tagSearch:t[`tag-search`],createdAfter:t[`created-after`],createdBefore:t[`created-before`],relatedEventsLimit:t[`related-events-limit`],includeTags:t[`include-tags`],includeTotalCount:t[`include-total-count`],format:t.format,cache:t.cache,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events indicators get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/indicators`,pathParams:{},query: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.indicators.get({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ht={command:`indicators`,describe:`Operations for events.indicators`,builder:e=>e.command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ut(e){return e.usage(`$0 cloudforce-one events queries create-create
103
103
 
104
104
  Create a new saved event query for the account`).option(`alert-enabled`,{type:`boolean`,description:`Enable alerts for this query`}).option(`alert-rollup-enabled`,{type:`boolean`,description:`Enable alert rollup for this query`}).option(`name`,{type:`string`,description:`Unique name for the saved query`}).option(`query-json`,{type:`string`,description:`JSON string containing the query parameters`}).option(`rule-enabled`,{type:`boolean`,description:`Enable rule for this query`}).option(`rule-scope`,{type:`string`,description:`Scope for the rule`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Wt={command:`create-create`,describe:`Create a saved event query`,builder:Ut,handler:async t=>c({command:`cloudforce-one events queries create-create`,classification:{safeFlags:[`alert-enabled`,`alert-rollup-enabled`,`rule-enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events queries create-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/events/queries/create`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({alert_enabled:t[`alert-enabled`],alert_rollup_enabled:t[`alert-rollup-enabled`],name:p(t.name,`name`,`text`),query_json:p(t[`query-json`],`query-json`,`text`),rule_enabled:t[`rule-enabled`],rule_scope:p(t[`rule-scope`],`rule-scope`,`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.queries.createCreate({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t[`alert-enabled`]===void 0)throw Error(`--alert-enabled is required (or pass --body with this field set).`);if(t[`alert-rollup-enabled`]===void 0)throw Error(`--alert-rollup-enabled is required (or pass --body with this field set).`);if(t.name===void 0&&(t.name=await h(`name`,`Unique name for the saved query`)),t[`query-json`]===void 0&&(t[`query-json`]=await h(`query-json`,`JSON string containing the query parameters`)),t[`rule-enabled`]===void 0)throw Error(`--rule-enabled is required (or pass --body with this field set).`);let d=f({alert_enabled:t[`alert-enabled`],alert_rollup_enabled:t[`alert-rollup-enabled`],name:p(t.name,`name`,`text`),query_json:p(t[`query-json`],`query-json`,`text`),rule_enabled:t[`rule-enabled`],rule_scope:p(t[`rule-scope`],`rule-scope`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.events.queries.createCreate({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Gt(e){return e.usage(`$0 cloudforce-one events queries create <query-id>
105
105
 
@@ -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:p(t[`relationship-type`],`relationship-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.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:p(t[`relationship-type`],`relationship-type`,`text`)}),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 (`value`, `categoryName`, `aliasGroupNames`, `originCountryISO`); filtering on a redacted field returns 400. 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
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,14 +136,12 @@ 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: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.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:p(t.tlp,`tlp`,`text`),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>
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:p(t[`target-type`],`target-type`,`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.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:p(t[`target-type`],`target-type`,`text`),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>
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
- `);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
145
-
146
- Returns sparse relationship edges. Optionally hydrate related entities via \`expand\`. Fans out across all accessible indicator dataset shards. 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: 'all'/'*', 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false datasets. 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>
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>
147
145
 
148
146
  Partially updates a relationship by UUID. Requires datasetId query param.`).positional(`rel-uuid`,{type:`string`,description:`Relationship UUID.`,demandOption:!0}).option(`tag-uuid`,{type:`string`,description:`Tag UUID.`,demandOption:!0}).option(`dataset-id`,{type:`string`,description:`Dataset UUID containing the relationship.`,demandOption:!0}).option(`confidence`,{type:`number`,description:`Updated confidence. null clears it.`}).option(`type`,{type:`string`,description:`Updated relationship type.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const qn={command:`update <rel-uuid>`,describe:`Update a tag relationship`,builder:Kn,handler:async t=>c({command:`cloudforce-one events tags relationships update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={datasetId:t[`dataset-id`]};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one events tags relationships update`,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`]))}/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:`json`,body:t.body===void 0?f({confidence:t.confidence,type:p(t.type,`type`,`text`)}):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(`Updating`,async()=>l.cloudforceOne.events.tags.relationships.update({...e,account_id:d,tag_uuid:t[`tag-uuid`],rel_uuid:t[`rel-uuid`],...c}));a(n,{successLabel:`Updated`});return}let m=f({confidence:t.confidence,type:p(t.type,`type`,`text`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await s(`Updating`,async()=>l.cloudforceOne.events.tags.relationships.update({...m,account_id:d,tag_uuid:t[`tag-uuid`],rel_uuid:t[`rel-uuid`],...c}));a(h,{successLabel:`Updated`})})},Jn={command:`relationships`,describe:`Operations for events.tags.relationships`,builder:e=>e.command(Vn).command(Un).command(Gn).command(qn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Yn={command:`tags`,describe:`Operations for events.tags`,builder:e=>e.command(Nn).command(Ln).command(Fn).command(zn).command(jn).command(Jn).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xn(e){return e.usage(`$0 cloudforce-one events target industries catalog get
149
147
 
@@ -156,292 +154,252 @@ Requirements is the existing free-form PIR method. Interests is the experimental
156
154
  Creates a new PIR for the account. Subject to the account's annual PIR quota from the cfone.priority_intelligence_requirement_limit entitlement.`).option(`labels`,{type:`string`,array:!0,description:`The labels field`}).option(`priority`,{type:`number`,description:`The priority field`,default:0}).option(`requirement`,{type:`string`,description:`The requirement field`}).option(`tlp`,{type:`string`,description:`The tlp field`,default:`amber`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ur={command:`create`,describe:`Create a priority intelligence requirement`,builder:lr,handler:async t=>c({command:`cloudforce-one priority-intelligence create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,pathParams:{},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(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.requirement===void 0&&(t.requirement=await h(`requirement`,`The requirement field`));let d=f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function dr(e){return e.usage(`$0 cloudforce-one priority-intelligence delete <priority-id>
157
155
 
158
156
  Soft-deletes a PIR. The PIR will no longer count against quota.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fr={command:`delete <priority-id>`,describe:`Delete a priority intelligence requirement`,builder:dr,handler:async t=>c({command:`cloudforce-one priority-intelligence 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 delete`,method:`DELETE`,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:`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.
159
- `);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.priorityIntelligence.delete({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Deleted`})})};function pr(e){return e.usage(`$0 cloudforce-one priority-intelligence get <priority-id>
160
-
161
- Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mr={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:pr,handler:async t=>c({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,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:`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.get({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Loaded`})})};function hr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
162
-
163
- Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const gr={command:`create`,describe:`Backtest account-interest change detection`,builder:hr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({as_of:p(t[`as-of`],`as-of`,`text`),backtest_days:t[`backtest-days`],candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}):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.backtests.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({as_of:p(t[`as-of`],`as-of`,`text`),backtest_days:t[`backtest-days`],candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function _r(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests get <backtest-id>
164
-
165
- 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 vr={command:`get <backtest-id>`,describe:`Get a persisted account-interest backtest`,builder:_r,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`})})},yr={command:`backtests`,describe:`Operations for priority-intelligence.interests.backtests`,builder:e=>e.command(gr).command(vr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function br(e){return e.usage(`$0 cloudforce-one priority-intelligence interests create
166
-
167
- 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 xr={command:`create`,describe:`Create an account interest for PIR Option 2`,builder:br,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:p(t.dimension,`dimension`,`text`),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:p(t.dimension,`dimension`,`text`),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 Sr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests delete <interest-id>
168
-
169
- 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 Cr={command:`delete <interest-id>`,describe:`Delete an account interest for PIR Option 2`,builder:Sr,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.
170
- `);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 wr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations create
171
-
172
- Compares the trailing event-date window with the preceding window. Results are precision-gated to enabled account interests. Late ingestion can cause an older event to appear in a later evaluation, so results describe changes in event-dated intelligence rather than exact adversary-activity timing.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Tr={command:`create`,describe:`Evaluate recent event-dated changes for account interests`,builder:wr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests evaluations create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests evaluations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({as_of:p(t[`as-of`],`as-of`,`text`),candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}):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.evaluations.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({as_of:p(t[`as-of`],`as-of`,`text`),candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.evaluations.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function Er(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations get <evaluation-id>
173
-
174
- Returns a previously completed live account-interest evaluation by ID. The evaluation must belong to this account.`).positional(`evaluation-id`,{type:`string`,description:`Evaluation UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dr={command:`get <evaluation-id>`,describe:`Get a persisted account-interest evaluation`,builder:Er,handler:async t=>c({command:`cloudforce-one priority-intelligence interests evaluations get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests evaluations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations/${t[`evaluation-id`]==null?`<evaluation-id>`:encodeURIComponent(String(t[`evaluation-id`]))}`,pathParams:{"evaluation-id":String(t[`evaluation-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.evaluations.get({account_id:l,evaluation_id:t[`evaluation-id`]}));a(u,{successLabel:`Loaded`})})},Or={command:`evaluations`,describe:`Operations for priority-intelligence.interests.evaluations`,builder:e=>e.command(Tr).command(Dr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests list
175
-
176
- Lists structured account interests for Priority Intelligence Option 2. Filter by enabled state and paginate results.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enabled`,{type:`string`,description:`Enabled`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ar={command:`list`,describe:`List account interests for PIR Option 2`,builder:v(kr),handler:async t=>c({command:`cloudforce-one priority-intelligence interests list`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],enabled:t.enabled};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},query: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.priorityIntelligence.interests.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function jr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests update <interest-id>
177
-
178
- Updates a structured account interest used by Priority Intelligence Option 2 evaluations. Changing the value re-resolves the interest against the current catalog.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Mr={command:`update <interest-id>`,describe:`Update an account interest for PIR Option 2`,builder:jr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests update`,method:`PATCH`,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:`json`,body:t.body===void 0?f({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(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...e,account_id:l,interest_id:t[`interest-id`]}));a(n,{successLabel:`Updated`});return}let d=f({enabled:t.enabled,value:p(t.value,`value`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...d,account_id:l,interest_id:t[`interest-id`]}));a(m,{successLabel:`Updated`})})},Nr={command:`interests`,describe:`Operations for priority-intelligence.interests`,builder:e=>e.command(xr).command(Cr).command(Ar).command(Mr).command(yr).command(Or).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pr(e){return e.usage(`$0 cloudforce-one priority-intelligence list
179
-
180
- Lists free-form Priority Intelligence Requirements for the account. Results are scoped to the authenticated account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fr={command:`list`,describe:`List priority intelligence requirements for an account`,builder:Pr,handler:async t=>c({command:`cloudforce-one priority-intelligence 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 priority-intelligence list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,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.priorityIntelligence.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ir(e){return e.usage(`$0 cloudforce-one priority-intelligence quota create
181
-
182
- 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 Lr={command:`create`,describe:`Get PIR quota for an account`,builder:Ir,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`})})},Rr={command:`quota`,describe:`Operations for priority-intelligence.quota`,builder:e=>e.command(Lr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zr(e){return e.usage(`$0 cloudforce-one priority-intelligence update <priority-id>
183
-
184
- 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 Br={command:`update <priority-id>`,describe:`Update a priority intelligence requirement`,builder:zr,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`})})},Vr={command:`priority-intelligence`,describe:`Operations for priority-intelligence`,builder:e=>e.command(ur).command(fr).command(mr).command(Fr).command(Br).command(cr).command(Nr).command(Rr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hr(e){return e.usage(`$0 cloudforce-one requests asset-new create <request-id>
185
-
186
- Uploads a new asset to a Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,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(`source`,{type:`string`,description:`Asset file to upload.`})}const Ur={command:`create <request-id>`,describe:`Create a New Request Asset`,builder:Hr,handler:async l=>c({command:`cloudforce-one requests asset-new create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await r();o({command:`cf cloudforce-one requests asset-new create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${l[`request-id`]==null?`<request-id>`:encodeURIComponent(String(l[`request-id`]))}/asset/new`,pathParams:{"request-id":String(l[`request-id`]??``)},bodyKind:`multipart`,body:{body:l.body,file:l.file,source:l.source}});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.source!==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.source!==void 0&&e.append(`source`,String(p(l.source,`source`,`text`)??``));let n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${u}/cloudforce-one/requests/${encodeURIComponent(String(l[`request-id`]))}/asset/new`,{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/requests/${encodeURIComponent(String(l[`request-id`]))}/asset/new`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));a(n,{successLabel:`Created`});return}let d=await s(`Creating`,async()=>c.cloudforceOne.requests.assetNew.create({account_id:u,request_id:l[`request-id`]}));a(d,{successLabel:`Created`})})},Wr={command:`asset-new`,describe:`Operations for requests.asset-new`,builder:e=>e.command(Ur).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gr(e){return e.usage(`$0 cloudforce-one requests assets create <request-id>
187
-
188
- Lists assets attached to a Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Kr={command:`create <request-id>`,describe:`List Request Assets`,builder:Gr,handler:async t=>c({command:`cloudforce-one requests assets create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/asset`,pathParams:{"request-id":String(t[`request-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({page:t.page,per_page:t[`per-page`]}):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.assets.create({...e,account_id:l,request_id:t[`request-id`]}));a(n,{successLabel:`Created`});return}if(t.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(t[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:t.page,per_page:t[`per-page`]}),p=await s(`Creating`,async()=>c.cloudforceOne.requests.assets.create({...d,account_id:l,request_id:t[`request-id`]}));a(p,{successLabel:`Created`})})};function qr(e){return e.usage(`$0 cloudforce-one requests assets delete <asset-id>
189
-
190
- Removes an asset from a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`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 Jr={command:`delete <asset-id>`,describe:`Delete a Request Asset`,builder:qr,handler:async t=>c({command:`cloudforce-one requests assets 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 requests assets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/asset/${t[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(t[`asset-id`]))}`,pathParams:{"request-id":String(t[`request-id`]??``),"asset-id":String(t[`asset-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.
191
- `);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 Yr(e){return e.usage(`$0 cloudforce-one requests assets download <asset-id>
192
-
193
- 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 Xr={command:`download <asset-id>`,describe:`Download asset (Customer)`,builder:Yr,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 Zr(e){return e.usage(`$0 cloudforce-one requests assets get <asset-id>
194
-
195
- Retrieves an asset attached to a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qr={command:`get <asset-id>`,describe:`Get a Request Asset`,builder:Zr,handler:async t=>c({command:`cloudforce-one requests assets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/asset/${t[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(t[`asset-id`]))}`,pathParams:{"request-id":String(t[`request-id`]??``),"asset-id":String(t[`asset-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.get({account_id:l,request_id:t[`request-id`],asset_id:t[`asset-id`]}));a(u,{successLabel:`Loaded`})})};function $r(e){return e.usage(`$0 cloudforce-one requests assets list
196
-
197
- 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 ei={command:`list`,describe:`List assets in request (Customer)`,builder:v($r),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 ti(e){return e.usage(`$0 cloudforce-one requests assets update <asset-id>
157
+ `);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.priorityIntelligence.delete({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Deleted`})})};function pr(e){return e.usage("$0 cloudforce-one priority-intelligence filters generate\n\nTranslates a natural-language Priority Intelligence Requirement into Threat Events `searchBranches` with Workers AI. Terms that cannot be expressed as event filters are returned in `unresolved_terms`. Nothing is stored or executed.").option(`requirement`,{type:`string`,description:`Natural-language Priority Intelligence Requirement.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const mr={command:`generate`,describe:`Generate event filters from a PIR`,builder:pr,handler:async t=>c({command:`cloudforce-one priority-intelligence filters generate`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence filters generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/filters/generate`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({requirement:p(t.requirement,`requirement`,`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.filters.generate({...e,account_id:l}));a(n,{successLabel:`Created`});return}t.requirement===void 0&&(t.requirement=await h(`requirement`,`Natural-language Priority Intelligence Requirement.`));let d=f({requirement:p(t.requirement,`requirement`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.filters.generate({...d,account_id:l}));a(m,{successLabel:`Created`})})},hr={command:`filters`,describe:`Operations for priority-intelligence.filters`,builder:e=>e.command(mr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gr(e){return e.usage(`$0 cloudforce-one priority-intelligence get <priority-id>
198
158
 
199
- Updates an asset in a Cloudforce One intelligence request.`).positional(`asset-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`source`,{type:`string`,description:`Asset file to upload.`}).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 ni={command:`update <asset-id>`,describe:`Update a Request Asset`,builder:ti,handler:async t=>c({command:`cloudforce-one requests assets update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests assets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/asset/${t[`asset-id`]==null?`<asset-id>`:encodeURIComponent(String(t[`asset-id`]))}`,pathParams:{"request-id":String(t[`request-id`]??``),"asset-id":String(t[`asset-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({source:p(t.source,`source`,`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.requests.assets.update({...e,account_id:l,request_id:t[`request-id`],asset_id:t[`asset-id`]}));a(n,{successLabel:`Updated`});return}let d=f({source:p(t.source,`source`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.requests.assets.update({...d,account_id:l,request_id:t[`request-id`],asset_id:t[`asset-id`]}));a(m,{successLabel:`Updated`})})};function ri(e){return e.usage(`$0 cloudforce-one requests assets upload <request-id>
159
+ Returns a single free-form Priority Intelligence Requirement for the authenticated account.`).positional(`priority-id`,{type:`string`,description:`Priority ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _r={command:`get <priority-id>`,describe:`Get a priority intelligence requirement by ID`,builder:gr,handler:async t=>c({command:`cloudforce-one priority-intelligence get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence get`,method:`GET`,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:`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.get({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Loaded`})})};function vr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests create
200
160
 
201
- 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 ii={command:`upload <request-id>`,describe:`Upload asset to request (Customer)`,builder:v(ri),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`})})},ai={command:`assets`,describe:`Operations for requests.assets`,builder:e=>e.command(Kr).command(Jr).command(Xr).command(Qr).command(ei).command(ni).command(ii).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oi(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestGet <request-id>
161
+ Uses bounded full-span top-N candidates and daily event-date buckets. Results are conservative rather than an exact historical replay.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`backtest-days`,{type:`number`,description:`The backtest_days field`,default:30}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const yr={command:`create`,describe:`Backtest account-interest change detection`,builder:vr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests backtests create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests backtests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/backtests`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({as_of:p(t[`as-of`],`as-of`,`text`),backtest_days:t[`backtest-days`],candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}):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.backtests.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({as_of:p(t[`as-of`],`as-of`,`text`),backtest_days:t[`backtest-days`],candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.backtests.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function br(e){return e.usage(`$0 cloudforce-one priority-intelligence interests backtests get <backtest-id>
202
162
 
203
- Retrieves details for a specific Cloudforce One intelligence request.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const si={command:`cloudforceOneRequestGet <request-id>`,describe:`Get a Request`,builder:oi,handler:async t=>c({command:`cloudforce-one requests cloudforceOneRequestGet`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests cloudforceOneRequestGet`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}`,pathParams:{"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.cloudforceOneRequestGet({account_id:l,request_id:t[`request-id`]}));a(u,{successLabel:`Loaded`})})};function ci(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestList
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
204
164
 
205
- Lists Cloudforce One intelligence requests with filtering and pagination.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`sort-by`,{type:`string`,description:`Field to sort results by.`}).option(`sort-order`,{type:`string`,description:`Sort order (asc or desc).`,choices:[`asc`,`desc`]}).option(`status`,{type:`string`,description:`Request Status.`,choices:[`open`,`accepted`,`reported`,`approved`,`completed`,`declined`]}).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:`cloudforceOneRequestList`,describe:`List Requests`,builder:ci,handler:async t=>c({command:`cloudforce-one requests cloudforceOneRequestList`,classification:{safeFlags:[`sort-order`,`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests cloudforceOneRequestList`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({page:t.page,per_page:t[`per-page`],request_type:p(t[`request-type`],`request-type`,`text`),sort_by:p(t[`sort-by`],`sort-by`,`text`),sort_order:p(t[`sort-order`],`sort-order`,`text`),status:p(t.status,`status`,`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.requests.cloudforceOneRequestList({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(t[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:t.page,per_page:t[`per-page`],request_type:p(t[`request-type`],`request-type`,`text`),sort_by:p(t[`sort-by`],`sort-by`,`text`),sort_order:p(t[`sort-order`],`sort-order`,`text`),status:p(t.status,`status`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestList({...d,account_id:l}));a(m,{successLabel:`Created`})})};function ui(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestNew
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>
206
166
 
207
- Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability should be provided. If one is not provided, a default will be assigned.`).option(`content`,{type:`string`,description:`Request content.`}).option(`priority`,{type:`string`,description:`Priority for analyzing the request.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`summary`,{type:`string`,description:`Brief description of the request.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).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 di={command:`cloudforceOneRequestNew`,describe:`Create a New Request.`,builder:ui,handler:async t=>c({command:`cloudforce-one requests cloudforceOneRequestNew`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests cloudforceOneRequestNew`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/new`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({content:p(t.content,`content`,`text`),priority:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),summary:p(t.summary,`summary`,`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(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestNew({body:e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({content:p(t.content,`content`,`text`),priority:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),summary:p(t.summary,`summary`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestNew({body:d,account_id:l}));a(m,{successLabel:`Created`})})};function fi(e){return e.usage(`$0 cloudforce-one requests cloudforceOneRequestUpdate <request-id>
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
+ `);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
208
169
 
209
- Updating a request alters the request in the Cloudforce One queue. This API may be used to update any attributes of the request after the initial submission. Only fields that you choose to update need to be add to the request body.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Request content.`}).option(`priority`,{type:`string`,description:`Priority for analyzing the request.`}).option(`request-type`,{type:`string`,description:`Requested information from request.`}).option(`summary`,{type:`string`,description:`Brief description of the request.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).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 pi={command:`cloudforceOneRequestUpdate <request-id>`,describe:`Update a Request`,builder:fi,handler:async t=>c({command:`cloudforce-one requests cloudforceOneRequestUpdate`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests cloudforceOneRequestUpdate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}`,pathParams:{"request-id":String(t[`request-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({content:p(t.content,`content`,`text`),priority:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),summary:p(t.summary,`summary`,`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.requests.cloudforceOneRequestUpdate({body:e,account_id:l,request_id:t[`request-id`]}));a(n,{successLabel:`Updated`});return}let d=f({content:p(t.content,`content`,`text`),priority:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),summary:p(t.summary,`summary`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.requests.cloudforceOneRequestUpdate({body:d,account_id:l,request_id:t[`request-id`]}));a(m,{successLabel:`Updated`})})};function mi(e){return e.usage(`$0 cloudforce-one requests constants
170
+ Compares the trailing event-date window with the preceding window. Results are precision-gated to enabled account interests. Late ingestion can cause an older event to appear in a later evaluation, so results describe changes in event-dated intelligence rather than exact adversary-activity timing.`).option(`as-of`,{type:`string`,description:`The as_of field`}).option(`candidate-limit`,{type:`number`,description:`The candidate_limit field`}).option(`dataset-ids`,{type:`string`,array:!0,description:`The dataset_ids field`}).option(`emerging-min-current-count`,{type:`number`,description:`The emerging_min_current_count field`}).option(`established-min-absolute-delta`,{type:`number`,description:`The established_min_absolute_delta field`}).option(`established-min-prior-count`,{type:`number`,description:`The established_min_prior_count field`}).option(`established-min-relative-delta`,{type:`number`,description:`The established_min_relative_delta field`}).option(`window-days`,{type:`number`,description:`The window_days field`,default:7}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Or={command:`create`,describe:`Evaluate recent event-dated changes for account interests`,builder:Dr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests evaluations create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests evaluations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({as_of:p(t[`as-of`],`as-of`,`text`),candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}):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.evaluations.create({...e,account_id:l}));a(n,{successLabel:`Created`});return}let d=f({as_of:p(t[`as-of`],`as-of`,`text`),candidate_limit:t[`candidate-limit`],dataset_ids:t[`dataset-ids`],emerging_min_current_count:t[`emerging-min-current-count`],established_min_absolute_delta:t[`established-min-absolute-delta`],established_min_prior_count:t[`established-min-prior-count`],established_min_relative_delta:t[`established-min-relative-delta`],window_days:t[`window-days`]}),m=await s(`Creating`,async()=>c.cloudforceOne.priorityIntelligence.interests.evaluations.create({...d,account_id:l}));a(m,{successLabel:`Created`})})};function kr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests evaluations get <evaluation-id>
210
171
 
211
- Retrieves constant values used in Cloudforce One requests, including valid statuses and types.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const hi={command:`constants`,describe:`Get Request Priority, Status, and TLP constants`,builder:mi,handler:async t=>c({command:`cloudforce-one requests constants`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests constants`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/constants`,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.constants({account_id:l}));a(u,{successLabel:`Loaded`})})};function gi(e){return e.usage(`$0 cloudforce-one requests delete <request-id>
172
+ Returns a previously completed live account-interest evaluation by ID. The evaluation must belong to this account.`).positional(`evaluation-id`,{type:`string`,description:`Evaluation UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ar={command:`get <evaluation-id>`,describe:`Get a persisted account-interest evaluation`,builder:kr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests evaluations get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests evaluations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests/evaluations/${t[`evaluation-id`]==null?`<evaluation-id>`:encodeURIComponent(String(t[`evaluation-id`]))}`,pathParams:{"evaluation-id":String(t[`evaluation-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.evaluations.get({account_id:l,evaluation_id:t[`evaluation-id`]}));a(u,{successLabel:`Loaded`})})},jr={command:`evaluations`,describe:`Operations for priority-intelligence.interests.evaluations`,builder:e=>e.command(Or).command(Ar).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests list
212
173
 
213
- Deletes a Cloudforce One intelligence request and all associated data.`).positional(`request-id`,{type:`string`,description:`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 _i={command:`delete <request-id>`,describe:`Delete a Request`,builder:gi,handler:async t=>c({command:`cloudforce-one requests 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 requests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}`,pathParams:{"request-id":String(t[`request-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.
214
- `);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.requests.delete({account_id:l,request_id:t[`request-id`]}));a(u,{successLabel:`Deleted`})})};function vi(e){return e.usage(`$0 cloudforce-one requests getRequestList <project-type>
174
+ Lists structured account interests for Priority Intelligence Option 2. Filter by enabled state and paginate results.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`enabled`,{type:`string`,description:`Enabled`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nr={command:`list`,describe:`List account interests for PIR Option 2`,builder:v(Mr),handler:async t=>c({command:`cloudforce-one priority-intelligence interests list`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],enabled:t.enabled};if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence/interests`,pathParams:{},query: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.priorityIntelligence.interests.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Pr(e){return e.usage(`$0 cloudforce-one priority-intelligence interests update <interest-id>
215
175
 
216
- 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 yi={command:`getRequestList <project-type>`,describe:`List RFIs`,builder:v(vi),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 bi(e){return e.usage(`$0 cloudforce-one requests getRequestRead <request-id>
176
+ Updates a structured account interest used by Priority Intelligence Option 2 evaluations. Changing the value re-resolves the interest against the current catalog.`).positional(`interest-id`,{type:`string`,description:`Interest UUID`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`value`,{type:`string`,description:`The value field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fr={command:`update <interest-id>`,describe:`Update an account interest for PIR Option 2`,builder:Pr,handler:async t=>c({command:`cloudforce-one priority-intelligence interests update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one priority-intelligence interests update`,method:`PATCH`,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:`json`,body:t.body===void 0?f({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(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...e,account_id:l,interest_id:t[`interest-id`]}));a(n,{successLabel:`Updated`});return}let d=f({enabled:t.enabled,value:p(t.value,`value`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.priorityIntelligence.interests.update({...d,account_id:l,interest_id:t[`interest-id`]}));a(m,{successLabel:`Updated`})})},Ir={command:`interests`,describe:`Operations for priority-intelligence.interests`,builder:e=>e.command(wr).command(Er).command(Nr).command(Fr).command(Sr).command(jr).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Lr(e){return e.usage(`$0 cloudforce-one priority-intelligence list
217
177
 
218
- 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 xi={command:`getRequestRead <request-id>`,describe:`Get an RFI by ID`,builder:v(bi),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 Si(e){return e.usage(`$0 cloudforce-one requests legal-response access-check
178
+ Lists free-form Priority Intelligence Requirements for the account. Results are scoped to the authenticated account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rr={command:`list`,describe:`List priority intelligence requirements for an account`,builder:Lr,handler:async t=>c({command:`cloudforce-one priority-intelligence 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 priority-intelligence list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/priority-intelligence`,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.priorityIntelligence.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function zr(e){return e.usage(`$0 cloudforce-one priority-intelligence quota create
219
179
 
220
- 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 Ci={command:`access-check`,describe:`Check if current user is allowlisted for Legal Response`,builder:Si,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`})})},wi={command:`legal-response`,describe:`Operations for requests.legal-response`,builder:e=>e.command(Ci).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ti(e){return e.usage(`$0 cloudforce-one requests message create <request-id>
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>
221
181
 
222
- Adds a message to a Cloudforce One intelligence request conversation.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Content of message.`}).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 Ei={command:`create <request-id>`,describe:`Create a New Request Message`,builder:Ti,handler:async t=>c({command:`cloudforce-one requests message create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests message create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/message/new`,pathParams:{"request-id":String(t[`request-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({content:p(t.content,`content`,`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.requests.message.create({body:e,account_id:l,request_id:t[`request-id`]}));a(n,{successLabel:`Created`});return}let d=f({content:p(t.content,`content`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.message.create({body:d,account_id:l,request_id:t[`request-id`]}));a(m,{successLabel:`Created`})})};function Di(e){return e.usage(`$0 cloudforce-one requests message delete <message-id>
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>
223
183
 
224
- Removes a message from a Cloudforce One intelligence request thread.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`request-id`,{type:`string`,description:`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 Oi={command:`delete <message-id>`,describe:`Delete a Request Message`,builder:Di,handler:async t=>c({command:`cloudforce-one requests message 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 requests message delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/message/${t[`message-id`]==null?`<message-id>`:encodeURIComponent(String(t[`message-id`]))}`,pathParams:{"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();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
225
- `);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 ki(e){return e.usage(`$0 cloudforce-one requests message get <request-id>
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
226
185
 
227
- Lists messages in a Cloudforce One intelligence request conversation.`).positional(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`sort-by`,{type:`string`,description:`Field to sort results by.`}).option(`sort-order`,{type:`string`,description:`Sort order (asc or desc).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ai={command:`get <request-id>`,describe:`List Request Messages`,builder:ki,handler:async t=>c({command:`cloudforce-one requests message get`,classification:{safeFlags:[`sort-order`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests message get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/message`,pathParams:{"request-id":String(t[`request-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({page:t.page,per_page:t[`per-page`],sort_by:p(t[`sort-by`],`sort-by`,`text`),sort_order:p(t[`sort-order`],`sort-order`,`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.requests.message.get({...e,account_id:l,request_id:t[`request-id`]}));a(n,{successLabel:`Created`});return}if(t.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(t[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:t.page,per_page:t[`per-page`],sort_by:p(t[`sort-by`],`sort-by`,`text`),sort_order:p(t[`sort-order`],`sort-order`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.message.get({...d,account_id:l,request_id:t[`request-id`]}));a(m,{successLabel:`Created`})})};function ji(e){return e.usage(`$0 cloudforce-one requests message update <message-id>
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>
228
187
 
229
- Updates a message in a Cloudforce One intelligence request thread.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`request-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`content`,{type:`string`,description:`Content of message.`}).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 Mi={command:`update <message-id>`,describe:`Update a Request Message`,builder:ji,handler:async t=>c({command:`cloudforce-one requests message update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests message update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/${t[`request-id`]==null?`<request-id>`:encodeURIComponent(String(t[`request-id`]))}/message/${t[`message-id`]==null?`<message-id>`:encodeURIComponent(String(t[`message-id`]))}`,pathParams:{"request-id":String(t[`request-id`]??``),"message-id":String(t[`message-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({content:p(t.content,`content`,`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.requests.message.update({body:e,account_id:l,request_id:t[`request-id`],message_id:t[`message-id`]}));a(n,{successLabel:`Updated`});return}let d=f({content:p(t.content,`content`,`text`)}),m=await s(`Updating`,async()=>c.cloudforceOne.requests.message.update({body:d,account_id:l,request_id:t[`request-id`],message_id:t[`message-id`]}));a(m,{successLabel:`Updated`})})},Ni={command:`message`,describe:`Operations for requests.message`,builder:e=>e.command(Ei).command(Oi).command(Ai).command(Mi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pi(e){return e.usage(`$0 cloudforce-one requests messages create <request-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>
230
189
 
231
- 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`}).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 Fi={command:`create <request-id>`,describe:`Create a customer follow-on message on an RFI request`,builder:Pi,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:p(d.tlp,`tlp`,`text`)}):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`],p(d.tlp,`tlp`,`text`));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 Ii(e){return e.usage(`$0 cloudforce-one requests messages get <message-id>
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>
232
191
 
233
- 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 Li={command:`get <message-id>`,describe:`Read a single message for an RFI request`,builder:Ii,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 Ri(e){return e.usage(`$0 cloudforce-one requests messages list
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>
234
193
 
235
- 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 zi={command:`list`,describe:`List messages for an RFI request`,builder:Ri,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 Bi(e){return e.usage(`$0 cloudforce-one requests messages update <message-id>
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
236
195
 
237
- 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`]}).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 Vi={command:`update <message-id>`,describe:`Update/publish a message for an RFI request`,builder:Bi,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:p(d.tlp,`tlp`,`text`)}):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`],p(d.tlp,`tlp`,`text`));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`})})},Hi={command:`messages`,describe:`Operations for requests.messages`,builder:e=>e.command(Fi).command(Li).command(zi).command(Vi).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ui(e){return e.usage(`$0 cloudforce-one requests metadata list
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>
238
197
 
239
- 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 $={command:`list`,describe:`List metadata fields for an RFI type`,builder:v(Ui),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`})})},Wi={command:`metadata`,describe:`Operations for requests.metadata`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gi(e){return e.usage(`$0 cloudforce-one requests postRequestCreate <project-type>
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>
240
199
 
241
- 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`]}).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`]}).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 Ki={command:`postRequestCreate <project-type>`,describe:`Creates a new RFI`,builder:v(Gi),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:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),title:p(t.title,`title`,`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(`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:p(t.priority,`priority`,`text`),request_type:p(t[`request-type`],`request-type`,`text`),subtypeId:p(t[`subtype-id`],`subtype-id`,`text`),title:p(t.title,`title`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.postRequestCreate({...d,account_id:l,project_type:t[`project-type`]}));a(m,{successLabel:`Created`})})};function qi(e){return e.usage(`$0 cloudforce-one requests priority create
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
242
201
 
243
- Creates a new priority intelligence request in Cloudforce One.`).option(`labels`,{type:`string`,array:!0,description:`List of labels.`}).option(`priority`,{type:`number`,description:`Priority.`}).option(`requirement`,{type:`string`,description:`Requirement.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).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 Ji={command:`create`,describe:`Create a New Priority Intelligence Requirement`,builder:qi,handler:async t=>c({command:`cloudforce-one requests priority create`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests priority create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority/new`,pathParams:{},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(`Creating`,async()=>c.cloudforceOne.requests.priority.create({body:e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.labels===void 0)throw Error(`--labels is required (or pass --body with this field set).`);if(t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);t.requirement===void 0&&(t.requirement=await h(`requirement`,`Requirement.`)),t.tlp===void 0&&(t.tlp=await g(`tlp`,`The CISA defined Traffic Light Protocol (TLP).`,[`clear`,`amber`,`amber-strict`,`green`,`red`]));let d=f({labels:t.labels,priority:t.priority,requirement:p(t.requirement,`requirement`,`text`),tlp:p(t.tlp,`tlp`,`text`)}),m=await s(`Creating`,async()=>c.cloudforceOne.requests.priority.create({body:d,account_id:l}));a(m,{successLabel:`Created`})})};function Yi(e){return e.usage(`$0 cloudforce-one requests priority delete <priority-id>
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>
244
203
 
245
- Deletes a priority intelligence request from Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`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 Xi={command:`delete <priority-id>`,describe:`Delete a Priority Intelligence Requirement`,builder:Yi,handler:async t=>c({command:`cloudforce-one requests priority 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 requests priority delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority/${t[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(t[`priority-id`]))}`,pathParams:{"priority-id":String(t[`priority-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.
246
- `);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 Zi(e){return e.usage(`$0 cloudforce-one requests priority get <priority-id>
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
247
205
 
248
- Retrieves a specific priority intelligence request from Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qi={command:`get <priority-id>`,describe:`Get a Priority Intelligence Requirement`,builder:Zi,handler:async t=>c({command:`cloudforce-one requests priority get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests priority get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority/${t[`priority-id`]==null?`<priority-id>`:encodeURIComponent(String(t[`priority-id`]))}`,pathParams:{"priority-id":String(t[`priority-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.priority.get({account_id:l,priority_id:t[`priority-id`]}));a(u,{successLabel:`Loaded`})})};function $i(e){return e.usage(`$0 cloudforce-one requests priority list
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>
249
207
 
250
- Lists priority intelligence requests in Cloudforce One.`).option(`page`,{type:`number`,description:`Page number of results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ea={command:`list`,describe:`List Priority Intelligence Requirements`,builder:$i,handler:async t=>c({command:`cloudforce-one requests priority list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests priority list`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({page:t.page,per_page:t[`per-page`]}):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.priority.list({...e,account_id:l}));a(n,{successLabel:`Created`});return}if(t.page===void 0)throw Error(`--page is required (or pass --body with this field set).`);if(t[`per-page`]===void 0)throw Error(`--per-page is required (or pass --body with this field set).`);let d=f({page:t.page,per_page:t[`per-page`]}),p=await s(`Creating`,async()=>c.cloudforceOne.requests.priority.list({...d,account_id:l}));a(p,{successLabel:`Created`})})};function ta(e){return e.usage(`$0 cloudforce-one requests priority quota
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>
251
209
 
252
- Retrieves quota usage for Cloudforce One priority requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const na={command:`quota`,describe:`Get Priority Intelligence Requirement Quota`,builder:ta,handler:async t=>c({command:`cloudforce-one requests priority quota`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests priority quota`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority/quota`,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.priority.quota({account_id:l}));a(u,{successLabel:`Loaded`})})};function ra(e){return e.usage(`$0 cloudforce-one requests priority update <priority-id>
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>
253
211
 
254
- Updates a priority intelligence request in Cloudforce One.`).positional(`priority-id`,{type:`string`,description:`UUID.`,demandOption:!0}).option(`labels`,{type:`string`,array:!0,description:`List of labels.`}).option(`priority`,{type:`number`,description:`Priority.`}).option(`requirement`,{type:`string`,description:`Requirement.`}).option(`tlp`,{type:`string`,description:`The CISA defined Traffic Light Protocol (TLP).`,choices:[`clear`,`amber`,`amber-strict`,`green`,`red`]}).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 ia={command:`update <priority-id>`,describe:`Update a Priority Intelligence Requirement`,builder:ra,handler:async t=>c({command:`cloudforce-one requests priority update`,classification:{safeFlags:[`tlp`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests priority update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/priority/${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.requests.priority.update({body:e,account_id:l,priority_id:t[`priority-id`]}));a(n,{successLabel:`Updated`});return}if(t.labels===void 0)throw Error(`--labels is required (or pass --body with this field set).`);if(t.priority===void 0)throw Error(`--priority is required (or pass --body with this field set).`);t.requirement===void 0&&(t.requirement=await h(`requirement`,`Requirement.`)),t.tlp===void 0&&(t.tlp=await g(`tlp`,`The CISA defined Traffic Light Protocol (TLP).`,[`clear`,`amber`,`amber-strict`,`green`,`red`]));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.requests.priority.update({body:d,account_id:l,priority_id:t[`priority-id`]}));a(m,{successLabel:`Updated`})})},aa={command:`priority`,describe:`Operations for requests.priority`,builder:e=>e.command(Ji).command(Xi).command(Qi).command(ea).command(na).command(ia).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oa(e){return e.usage(`$0 cloudforce-one requests putRequestUpdate <request-id>
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
255
213
 
256
- 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`]}).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`]}).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 sa={command:`putRequestUpdate <request-id>`,describe:`Update an RFI`,builder:v(oa),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:p(t.priority,`priority`,`text`),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: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.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:p(t.priority,`priority`,`text`),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:p(t.tlp,`tlp`,`text`)}),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 ca(e){return e.usage(`$0 cloudforce-one requests quota
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>
257
215
 
258
- Retrieves quota usage for Cloudforce One standard requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const la={command:`quota`,describe:`Get Request Quota`,builder:ca,handler:async t=>c({command:`cloudforce-one requests quota`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests quota`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/quota`,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.quota({account_id:l}));a(u,{successLabel:`Loaded`})})};function ua(e){return e.usage(`$0 cloudforce-one requests types
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>
259
217
 
260
- Lists available request types for Cloudforce One intelligence requests.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const da={command:`types`,describe:`Get Request Types`,builder:ua,handler:async t=>c({command:`cloudforce-one requests types`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf cloudforce-one requests types`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/requests/types`,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.types({account_id:l}));a(u,{successLabel:`Loaded`})})};function fa(e){return e.usage(`$0 cloudforce-one requests user get <project-type>
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>
261
219
 
262
- 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 pa={command:`get <project-type>`,describe:`Get current user profile`,builder:fa,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`})})},ma={command:`user`,describe:`Operations for requests.user`,builder:e=>e.command(pa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ha={command:`requests`,describe:`Additional request operations — priority listing and asset creation`,builder:e=>e.command(si).command(li).command(di).command(pi).command(hi).command(_i).command(yi).command(xi).command(Ki).command(sa).command(la).command(da).command(Wr).command(ai).command(wi).command(Ni).command(Hi).command(Wi).command(aa).command(ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ga(e){return e.usage(`$0 cloudforce-one rules approvals cancel <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
263
221
 
264
- 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 _a={command:`cancel <id>`,describe:`Cancel a pending approval`,builder:ga,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 va(e){return e.usage(`$0 cloudforce-one rules approvals get <id>
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>
265
223
 
266
- 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 ya={command:`get <id>`,describe:`Get rule approval details`,builder:va,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 ba(e){return e.usage(`$0 cloudforce-one rules approvals list
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
267
225
 
268
- 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 xa={command:`list`,describe:`List rule approvals`,builder:v(ba),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 Sa(e){return e.usage(`$0 cloudforce-one rules approvals resubmit <id>
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>
269
227
 
270
- 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 Ca={command:`resubmit <id>`,describe:`Revise and resubmit a rejected approval`,builder:Sa,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`})})},wa={command:`approvals`,describe:`Approval workflow operations`,builder:e=>e.command(_a).command(ya).command(xa).command(Ca).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ta(e){return e.usage(`$0 cloudforce-one rules create
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
271
230
 
272
- 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 Ea={command:`create`,describe:`Create a rule`,builder:Ta,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 Da(e){return e.usage(`$0 cloudforce-one rules delete <id>
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>
273
233
 
274
- 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 Oa={command:`delete <id>`,describe:`Delete a rule`,builder:Da,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.
275
- `);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 ka(e){return e.usage(`$0 cloudforce-one rules deleteAll
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
276
235
 
277
- 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 Aa={command:`deleteAll`,describe:`Delete all rules`,builder:ka,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.
278
- `);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.deleteAll({account_id:l}));a(u,{successLabel:`Deleted`})})};function ja(e){return e.usage(`$0 cloudforce-one rules email approvals resubmit <id>
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>
279
237
 
280
- 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`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).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`}).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 Ma={command:`resubmit <id>`,describe:`Revise and resubmit a rejected structured email rule approval`,builder:v(ja),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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`})})},Na={command:`approvals`,describe:`Operations for rules.email.approvals`,builder:e=>e.command(Ma).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pa(e){return e.usage(`$0 cloudforce-one rules email create
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>
281
240
 
282
- Create a structured email rule.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).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`}).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 Fa={command:`create`,describe:`Create an email rule`,builder:Pa,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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),strings:d(t.strings,`strings`)}),_=await s(`Creating`,async()=>c.cloudforceOne.rules.email.create({...m,account_id:l}));a(_,{successLabel:`Created`})})};function Ia(e){return e.usage(`$0 cloudforce-one rules email delete <id>
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
283
242
 
284
- 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 La={command:`delete <id>`,describe:`Delete an email rule`,builder:Ia,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.
285
- `);return}let u=await s(`Deleting`,async()=>c.cloudforceOne.rules.email.delete({account_id:l,id:t.id}));a(u,{successLabel:`Deleted`})})};function Ra(e){return e.usage(`$0 cloudforce-one rules email get <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
286
244
 
287
- 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 za={command:`get <id>`,describe:`Get an email rule`,builder:Ra,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 Ba(e){return e.usage(`$0 cloudforce-one rules email list
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>
288
246
 
289
- 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 Va={command:`list`,describe:`List email rules`,builder:Ba,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 Ha(e){return e.usage(`$0 cloudforce-one rules email schema get
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>
290
248
 
291
- 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 Ua={command:`get`,describe:`Get email rule schema`,builder:Ha,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`})})},Wa={command:`schema`,describe:`Operations for rules.email.schema`,builder:e=>e.command(Ua).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ga(e){return e.usage(`$0 cloudforce-one rules email test <id>
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>
292
250
 
293
- 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 Ka={command:`test <id>`,describe:`Test an email rule`,builder:Ga,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 qa(e){return e.usage(`$0 cloudforce-one rules email update <id>
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
294
252
 
295
- 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`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).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`]}).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 Ja={command:`update <id>`,describe:`Update an email rule`,builder:qa,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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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 Ya(e){return e.usage(`$0 cloudforce-one rules email updatePendingApproval <id>
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
296
254
 
297
- 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`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).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`]}).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 Xa={command:`updatePendingApproval <id>`,describe:`Update a pending structured email rule approval`,builder:v(Ya),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},description:p(t.description,`description`,`text`),enabled:t.enabled,meta:d(t.meta,`meta`),name:p(t.name,`name`,`text`),status:p(t.status,`status`,`text`),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 Za(e){return e.usage(`$0 cloudforce-one rules email validate
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
298
256
 
299
- Validates structured email rule syntax and metadata.`).option(`condition-operator`,{type:`string`,description:`The condition.operator field`,choices:[`and`,`or`]}).option(`condition-type`,{type:`string`,description:`The condition.type field`,choices:[`group`]}).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`}).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 Qa={command:`validate`,describe:`Validate an email rule`,builder:Za,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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},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:p(t.status,`status`,`text`),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:p(t[`condition-operator`],`condition-operator`,`text`),type:p(t[`condition-type`],`condition-type`,`text`)},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:p(t.status,`status`,`text`),strings:d(t.strings,`strings`)}),_=await s(`Creating`,async()=>c.cloudforceOne.rules.email.validate({...m,account_id:l}));a(_,{successLabel:`Created`})})},$a={command:`email`,describe:`Email rule operations`,builder:e=>e.command(Fa).command(La).command(za).command(Va).command(Ka).command(Ja).command(Xa).command(Qa).command(Na).command(Wa).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function eo(e){return e.usage(`$0 cloudforce-one rules exemptions create
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
300
259
 
301
- 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 to={command:`create`,describe:`Add patterns to exemption rules`,builder:eo,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 no(e){return e.usage(`$0 cloudforce-one rules exemptions delete
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
302
261
 
303
- 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 ro={command:`delete`,describe:`Remove patterns from exemption rules`,builder:no,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.
304
- `);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 io(e){return e.usage(`$0 cloudforce-one rules exemptions get
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>
305
263
 
306
- 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 ao={command:`get`,describe:`Get exemption rules for an account`,builder:io,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 oo(e){return e.usage(`$0 cloudforce-one rules exemptions update
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
307
265
 
308
- 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 so={command:`update`,describe:`Update exemption rule patterns`,builder:oo,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`})})},co={command:`exemptions`,describe:`Exemption rule operations`,builder:e=>e.command(to).command(ro).command(ao).command(so).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lo(e){return e.usage(`$0 cloudforce-one rules get <id>
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
309
267
 
310
- 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 uo={command:`get <id>`,describe:`Get a rule`,builder:lo,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 fo(e){return e.usage(`$0 cloudforce-one rules list
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
311
269
 
312
- 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 po={command:`list`,describe:`List rules`,builder:v(fo),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 mo(e){return e.usage(`$0 cloudforce-one rules managed get
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
313
271
 
314
- 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 ho={command:`get`,describe:`Get managed rules`,builder:mo,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`})})},go={command:`managed`,describe:`Managed rule operations`,builder:e=>e.command(ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _o(e){return e.usage(`$0 cloudforce-one rules search
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
315
273
 
316
- 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 vo={command:`search`,describe:`Search rules`,builder:v(_o),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 yo(e){return e.usage(`$0 cloudforce-one rules stats get
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>
317
275
 
318
- Get statistics about rules for the dashboard.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const bo={command:`get`,describe:`Get dashboard stats`,builder:yo,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`})})},xo={command:`stats`,describe:`Rule statistics operations`,builder:e=>e.command(bo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function So(e){return e.usage(`$0 cloudforce-one rules tree get
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
319
277
 
320
- 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 Co={command:`get`,describe:`Get folder tree structure`,builder:So,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`})})},wo={command:`tree`,describe:`Rule navigation tree operations`,builder:e=>e.command(Co).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function To(e){return e.usage(`$0 cloudforce-one rules update <id>
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
321
279
 
322
- 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 Eo={command:`update <id>`,describe:`Update a rule`,builder:To,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 Do(e){return e.usage(`$0 cloudforce-one rules validate
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>
323
281
 
324
- 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 Oo={command:`validate`,describe:`Validate rule with context`,builder:Do,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`})})},ko={command:`rules`,describe:`Rule management operations`,builder:e=>e.command(Ea).command(Oa).command(Aa).command(uo).command(po).command(vo).command(Eo).command(Oo).command(wa).command($a).command(co).command(go).command(xo).command(wo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ao(e){return e.usage(`$0 cloudforce-one scans config create
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>
325
284
 
326
- 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 jo={command:`create`,describe:`Create a new Scan Config`,builder:Ao,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 Mo(e){return e.usage(`$0 cloudforce-one scans config delete <config-id>
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
327
286
 
328
- 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 No={command:`delete <config-id>`,describe:`Delete a Scan Config`,builder:Mo,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.
329
- `);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 Po(e){return e.usage(`$0 cloudforce-one scans config edit <config-id>
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>
330
288
 
331
- 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 Fo={command:`edit <config-id>`,describe:`Update an existing Scan Config`,builder:Po,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 Io(e){return e.usage(`$0 cloudforce-one scans config list
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>
332
290
 
333
- 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 Lo={command:`list`,describe:`List Scan Configs`,builder:Io,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`})})},Ro={command:`config`,describe:`Operations for scans.config`,builder:e=>e.command(jo).command(No).command(Fo).command(Lo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function zo(e){return e.usage(`$0 cloudforce-one scans results get <config-id>
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
334
292
 
335
- 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 Bo={command:`get <config-id>`,describe:`Get the Latest Scan Result`,builder:zo,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 Vo(e){return e.usage(`$0 cloudforce-one scans results getBanners <config-id>
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
336
294
 
337
- 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 Ho={command:`getBanners <config-id>`,describe:`Get the Latest Banner Grab Result`,builder:Vo,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`})})},Uo={command:`results`,describe:`Operations for scans.results`,builder:e=>e.command(Bo).command(Ho).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wo={command:`scans`,describe:`Scan URLs, IPs, and domains for threat intelligence indicators`,builder:e=>e.command(Ro).command(Uo).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Go(e){return e.usage(`$0 cloudforce-one threat-events attackers list
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>
338
296
 
339
- 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 Ko={command:`list`,describe:`Lists attackers across multiple datasets`,builder:Go,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`})})},qo={command:`attackers`,describe:`Operations for threat-events.attackers`,builder:e=>e.command(Ko).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Jo(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 Yo={command:`bulk-create`,describe:`Creates bulk events`,builder:Jo,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 Xo(e){return e.usage(`$0 cloudforce-one threat-events categories create
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>
340
299
 
341
- 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 Zo={command:`create`,describe:`Creates a new category`,builder:Xo,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 Qo(e){return e.usage(`$0 cloudforce-one threat-events categories delete <category-id>
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>
342
301
 
343
- 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 $o={command:`delete <category-id>`,describe:`Deletes a category`,builder:Qo,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.
344
- `);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 es(e){return e.usage(`$0 cloudforce-one threat-events categories edit <category-id>
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
345
303
 
346
- 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 ts={command:`edit <category-id>`,describe:`Updates a category`,builder:es,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 ns(e){return e.usage(`$0 cloudforce-one threat-events categories get <category-id>
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
347
305
 
348
- 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 rs={command:`get <category-id>`,describe:`Reads a category`,builder:ns,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 is(e){return e.usage(`$0 cloudforce-one threat-events categories list
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
349
307
 
350
- 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 as={command:`list`,describe:`Lists categories across multiple datasets`,builder:is,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`})})},os={command:`categories`,describe:`Operations for threat-events.categories`,builder:e=>e.command(Zo).command($o).command(ts).command(rs).command(as).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ss(e){return e.usage(`$0 cloudforce-one threat-events countries list
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>
351
309
 
352
- 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 cs={command:`list`,describe:`Retrieves countries information for all countries`,builder:ss,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`})})},ls={command:`countries`,describe:`Operations for threat-events.countries`,builder:e=>e.command(cs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function us(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`]}).option(`source-system`,{type:`string`,description:`The source.system field`,choices:[`threat-signals`]}).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 ds={command:`create <account-id-path>`,describe:`Creates a new event`,builder:us,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:p(e[`source-resource-type`],`source-resource-type`,`text`),system:p(e[`source-system`],`source-system`,`text`),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:p(e[`source-resource-type`],`source-resource-type`,`text`),system:p(e[`source-system`],`source-system`,`text`),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 fs(e){return e.usage(`$0 cloudforce-one threat-events datasets create
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>
353
311
 
354
- 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 ps={command:`create`,describe:`Creates a dataset`,builder:fs,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 ms(e){return e.usage(`$0 cloudforce-one threat-events datasets edit <dataset-id>
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
355
313
 
356
- 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 hs={command:`edit <dataset-id>`,describe:`Updates an existing dataset`,builder:ms,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 gs(e){return e.usage(`$0 cloudforce-one threat-events datasets get <dataset-id>
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>
357
315
 
358
- 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 _s={command:`get <dataset-id>`,describe:`Reads a dataset`,builder:gs,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 vs(e){return e.usage(`$0 cloudforce-one threat-events datasets list
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>
359
317
 
360
- 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 ys={command:`list`,describe:`Lists all datasets in an account`,builder:vs,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 bs(e){return e.usage(`$0 cloudforce-one threat-events datasets raw <event-id>
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>
361
319
 
362
- 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 xs={command:`raw <event-id>`,describe:`Reads raw data for an event by UUID`,builder:bs,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`})})},Ss={command:`datasets`,describe:`Operations for threat-events.datasets`,builder:e=>e.command(ps).command(hs).command(_s).command(ys).command(xs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Cs(e){return e.usage(`$0 cloudforce-one threat-events edit <event-id>
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>
363
321
 
364
- 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 ws={command:`edit <event-id>`,describe:`Updates an event`,builder:Cs,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 Ts(e){return e.usage(`$0 cloudforce-one threat-events event-tags create <event-id>
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>
365
324
 
366
- 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 Es={command:`create <event-id>`,describe:`Adds a tag to an event`,builder:Ts,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 Ds(e){return e.usage(`$0 cloudforce-one threat-events event-tags delete <event-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
367
326
 
368
- 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 Os={command:`delete <event-id>`,describe:`Removes a tag from an event`,builder:Ds,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.
369
- `);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`})})},ks={command:`event-tags`,describe:`Operations for threat-events.event-tags`,builder:e=>e.command(Es).command(Os).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function As(e){return e.usage(`$0 cloudforce-one threat-events get <event-id>
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>
370
328
 
371
- 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 js={command:`get <event-id>`,describe:`Reads an event`,builder:As,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 Ms(e){return e.usage(`$0 cloudforce-one threat-events indicator-types list
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>
372
330
 
373
- 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 Ns={command:`list`,describe:`Lists all indicator types`,builder:Ms,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`})})},Ps={command:`indicator-types`,describe:`Operations for threat-events.indicator-types`,builder:e=>e.command(Ns).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fs(e){return e.usage("$0 cloudforce-one threat-events list\n\nUse `datasetId=all` or `datasetId=*` for the legacy all-datasets scope, `datasetId=analytics` for datasets with `isAnalytics=true`, or `datasetId=operational` for datasets with `isAnalytics=false` (limited to 50). Scope values 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(`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'/'*' for the legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false 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 Is={command:`list`,describe:`Filter and list events`,builder:v(Fs),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,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 Ls(e){return e.usage(`$0 cloudforce-one threat-events raw edit <raw-id>
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>
374
332
 
375
- 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 Rs={command:`edit <raw-id>`,describe:`Updates a raw event`,builder:Ls,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 zs(e){return e.usage(`$0 cloudforce-one threat-events raw get <raw-id>
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
376
335
 
377
- 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 Bs={command:`get <raw-id>`,describe:`Reads data for a raw event`,builder:zs,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`})})},Vs={command:`raw`,describe:`Operations for threat-events.raw`,builder:e=>e.command(Rs).command(Bs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Hs(e){return e.usage(`$0 cloudforce-one threat-events relate delete <event-id>
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
378
337
 
379
- 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 Us={command:`delete <event-id>`,describe:`Removes an event reference`,builder:Hs,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.
380
- `);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`})})},Ws={command:`relate`,describe:`Operations for threat-events.relate`,builder:e=>e.command(Us).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Gs(e){return e.usage('$0 cloudforce-one threat-events search\n\nUse `datasetId: ["all"]` or `datasetId: ["*"]` for the legacy all-datasets scope, `datasetId: ["analytics"]` for datasets with `isAnalytics=true`, or `datasetId: ["operational"]` for datasets with `isAnalytics=false` (limited to 50). Scope values 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'/'*' for the legacy all-datasets behavior, 'analytics' for isAnalytics=true datasets, or 'operational' for isAnalytics=false 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 Ks={command:`search`,describe:`Filter and list events`,builder:v(Gs),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 qs(e){return e.usage(`$0 cloudforce-one threat-events tags create
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
381
339
 
382
- 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`]}).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 Js={command:`create`,describe:`Creates a new tag`,builder:qs,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: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(`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:p(t.tlp,`tlp`,`text`),value:p(t.value,`value`,`text`)}),g=await s(`Creating`,async()=>c.cloudforceOne.threatEvents.tags.create({...m,account_id:l}));a(g,{successLabel:`Created`})})},Ys={command:`tags`,describe:`Operations for threat-events.tags`,builder:e=>e.command(Js).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Xs(e){return e.usage(`$0 cloudforce-one threat-events target-industries list
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>
383
341
 
384
- 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 Zs={command:`list`,describe:`Lists target industries across multiple datasets`,builder:Xs,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`})})},Qs={command:`target-industries`,describe:`Operations for threat-events.target-industries`,builder:e=>e.command(Zs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$s={command:`threat-events`,describe:`Operations for threat-events`,builder:e=>e.command(Yo).command(ds).command(ws).command(js).command(Is).command(Ks).command(qo).command(os).command(ls).command(Ss).command(ks).command(Ps).command(Vs).command(Ws).command(Ys).command(Qs).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ec(e){return e.usage(`$0 cloudforce-one threat-signals articles bulk-mark-read
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>
385
343
 
386
- 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 tc={command:`bulk-mark-read`,describe:`Bulk update Threat Signals article read status`,builder:ec,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 nc(e){return e.usage(`$0 cloudforce-one threat-signals articles get-content <article-id>
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
387
345
 
388
- 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 rc={command:`get-content <article-id>`,describe:`Get Threat Signals article content`,builder:nc,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 ic(e){return e.usage(`$0 cloudforce-one threat-signals articles get <article-id>
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>
389
347
 
390
- 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 ac={command:`get <article-id>`,describe:`Get Threat Signals article`,builder:ic,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 oc(e){return e.usage(`$0 cloudforce-one threat-signals articles list
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>
391
349
 
392
- 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 sc={command:`list`,describe:`List Threat Signals articles`,builder:v(oc),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 cc(e){return e.usage(`$0 cloudforce-one threat-signals articles mark-read <article-id>
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
393
351
 
394
- 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 lc={command:`mark-read <article-id>`,describe:`Update Threat Signals article read status`,builder:cc,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 uc(e){return e.usage(`$0 cloudforce-one threat-signals articles skills get-output <skill-id>
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>
395
353
 
396
- 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 dc={command:`get-output <skill-id>`,describe:`Get Threat Signals article skill output`,builder:uc,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`})})},fc={command:`skills`,describe:`Operations for threat-signals.articles.skills`,builder:e=>e.command(dc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pc(e){return e.usage(`$0 cloudforce-one threat-signals articles tags add <article-id>
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>
397
355
 
398
- 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 mc={command:`add <article-id>`,describe:`Add tag to Threat Signals article`,builder:pc,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 hc(e){return e.usage(`$0 cloudforce-one threat-signals articles tags generate <article-id>
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>
399
357
 
400
- 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 gc={command:`generate <article-id>`,describe:`Generate Threat Signals article AI tags`,builder:hc,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 _c(e){return e.usage(`$0 cloudforce-one threat-signals articles tags remove <tag-id>
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>
401
359
 
402
- 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 vc={command:`remove <tag-id>`,describe:`Remove tag from Threat Signals article`,builder:_c,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.
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`})})},yc={command:`tags`,describe:`Operations for threat-signals.articles.tags`,builder:e=>e.command(mc).command(gc).command(vc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},bc={command:`articles`,describe:`Operations for threat-signals.articles`,builder:e=>e.command(tc).command(ac).command(rc).command(sc).command(lc).command(fc).command(yc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xc(e){return e.usage(`$0 cloudforce-one threat-signals categories list
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
404
362
 
405
- 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 Sc={command:`list`,describe:`List Threat Signals feed categories`,builder:xc,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`})})},Cc={command:`categories`,describe:`Operations for threat-signals.categories`,builder:e=>e.command(Sc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function wc(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds list
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
406
364
 
407
- 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 Tc={command:`list`,describe:`List curated Threat Signals feeds`,builder:wc,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 Ec(e){return e.usage(`$0 cloudforce-one threat-signals curated-feeds opt-out
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
408
366
 
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 Dc={command:`opt-out`,describe:`Opt out of curated Threat Signals feeds`,builder:Ec,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`})})},Oc={command:`curated-feeds`,describe:`Operations for threat-signals.curated-feeds`,builder:e=>e.command(Tc).command(Dc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function kc(e){return e.usage(`$0 cloudforce-one threat-signals feeds create
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
410
368
 
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 Ac={command:`create`,describe:`Create Threat Signals feed`,builder:kc,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 jc(e){return e.usage(`$0 cloudforce-one threat-signals feeds delete <feed-id>
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>
412
370
 
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 Mc={command:`delete <feed-id>`,describe:`Delete Threat Signals feed`,builder:jc,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 Nc(e){return e.usage(`$0 cloudforce-one threat-signals feeds get-raw <feed-id>
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>
415
373
 
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 Pc={command:`get-raw <feed-id>`,describe:`Get Threat Signals feed XML`,builder:Nc,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 Fc(e){return e.usage(`$0 cloudforce-one threat-signals feeds list
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
417
375
 
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 Ic={command:`list`,describe:`List Threat Signals feeds`,builder:v(Fc),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 Lc(e){return e.usage(`$0 cloudforce-one threat-signals feeds poll
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
419
377
 
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 Rc={command:`poll`,describe:`Trigger Threat Signals feed poll`,builder:v(Lc),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 zc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills get <feed-id>
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>
421
379
 
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 Bc={command:`get <feed-id>`,describe:`Get Threat Signals feed skills`,builder:zc,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 Vc(e){return e.usage(`$0 cloudforce-one threat-signals feeds skills update <feed-id>
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>
423
381
 
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 Hc={command:`update <feed-id>`,describe:`Set Threat Signals feed skills`,builder:Vc,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(Bc).command(Hc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Wc(e){return e.usage(`$0 cloudforce-one threat-signals feeds update <feed-id>
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>
425
383
 
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 Gc={command:`update <feed-id>`,describe:`Update Threat Signals feed`,builder:Wc,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`})})},Kc={command:`feeds`,describe:`Operations for threat-signals.feeds`,builder:e=>e.command(Ac).command(Mc).command(Pc).command(Ic).command(Rc).command(Gc).command(Uc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qc(e){return e.usage(`$0 cloudforce-one threat-signals health
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
427
385
 
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 Jc={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 Yc(e){return e.usage(`$0 cloudforce-one threat-signals indicators list
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
429
387
 
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 Xc={command:`list`,describe:`List Threat Signals article indicators`,builder:Yc,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`})})},Zc={command:`indicators`,describe:`Operations for threat-signals.indicators`,builder:e=>e.command(Xc).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qc(e){return e.usage(`$0 cloudforce-one threat-signals search
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
431
389
 
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 $c={command:`search`,describe:`Search Threat Signals articles using AI Search`,builder:v(Qc),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 el(e){return e.usage(`$0 cloudforce-one threat-signals skills create
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
433
391
 
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 tl={command:`create`,describe:`Create Threat Signals skill`,builder:el,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 nl(e){return e.usage(`$0 cloudforce-one threat-signals skills delete <skill-id>
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>
435
393
 
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 rl={command:`delete <skill-id>`,describe:`Delete Threat Signals skill`,builder:nl,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 il(e){return e.usage(`$0 cloudforce-one threat-signals skills get <skill-id>
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>
438
396
 
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 al={command:`get <skill-id>`,describe:`Get Threat Signals skill`,builder:il,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 ol(e){return e.usage(`$0 cloudforce-one threat-signals skills list
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
440
398
 
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 sl={command:`list`,describe:`List Threat Signals skills`,builder:ol,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 cl(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories get <skill-id>
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>
442
400
 
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 ll={command:`get <skill-id>`,describe:`Get Threat Signals skill tag categories`,builder:v(cl),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 ul(e){return e.usage(`$0 cloudforce-one threat-signals skills tag-categories update <skill-id>
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>
444
402
 
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 dl={command:`update <skill-id>`,describe:`Replace Threat Signals skill tag categories`,builder:v(ul),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`})})},fl={command:`tag-categories`,describe:`Operations for threat-signals.skills.tag-categories`,builder:e=>e.command(ll).command(dl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pl(e){return e.usage(`$0 cloudforce-one threat-signals skills update <skill-id>
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>
446
404
 
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 ml={command:`update <skill-id>`,describe:`Update Threat Signals skill`,builder:pl,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`})})},hl={command:`skills`,describe:`Operations for threat-signals.skills`,builder:e=>e.command(tl).command(rl).command(al).command(sl).command(ml).command(fl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gl={command:`threat-signals`,describe:`Operations for threat-signals`,builder:e=>e.command(Jc).command($c).command(bc).command(Cc).command(Oc).command(Kc).command(Zc).command(hl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_l={command:`cloudforce-one`,describe:`Detection rule management APIs`,builder:e=>e.command(C).command(P).command(ar).command(Vr).command(ha).command(ko).command(Wo).command($s).command(gl).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_l 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};